content
stringlengths 7
1.05M
| fixed_cases
stringlengths 1
1.28M
|
|---|---|
class Connection:
def __init__(self, unique,ip, hostname):
self.ip = ip
self.hostname = hostname
self.unique = unique
def __str__(self):
return str({"ip":self.ip, "hostname": self.hostname, "unique": self.unique})
|
class Connection:
def __init__(self, unique, ip, hostname):
self.ip = ip
self.hostname = hostname
self.unique = unique
def __str__(self):
return str({'ip': self.ip, 'hostname': self.hostname, 'unique': self.unique})
|
def external_service(name, datacenter, node, address, port, token=None):
ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''}
if token is None:
token = __pillar__['consul']['acl']['tokens']['default']
# Determine if the cluster is ready
if not __salt__["consul.cluster_ready"]():
ret["result"] = True
ret["comment"] = "Consul cluster is not ready."
return ret
# Determine if the node we're attempting to register exists
if __salt__["consul.node_exists"](node, address, dc=datacenter):
# Determine if the service we're attempting to register exists
if __salt__["consul.node_service_exists"](
node, name, port, dc=datacenter):
ret["result"] = True
ret["comment"] = (
"External Service {} already in the desired state.".format(
name,
)
)
return ret
if __opts__['test'] == True:
ret['comment'] = 'The state of "{0}" will be changed.'.format(name)
ret['changes'] = {
'old': None,
'new': 'External Service {}'.format(name),
}
ret["result"] = None
return ret
__salt__["consul.register_external_service"](
node, address, datacenter, name, port, token,
)
ret["result"] = True
ret["comment"] = "Registered external service: '{}'.".format(name)
ret["changes"] = {
"old": None,
"new": 'External Service {}'.format(name),
}
return ret
|
def external_service(name, datacenter, node, address, port, token=None):
ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''}
if token is None:
token = __pillar__['consul']['acl']['tokens']['default']
if not __salt__['consul.cluster_ready']():
ret['result'] = True
ret['comment'] = 'Consul cluster is not ready.'
return ret
if __salt__['consul.node_exists'](node, address, dc=datacenter):
if __salt__['consul.node_service_exists'](node, name, port, dc=datacenter):
ret['result'] = True
ret['comment'] = 'External Service {} already in the desired state.'.format(name)
return ret
if __opts__['test'] == True:
ret['comment'] = 'The state of "{0}" will be changed.'.format(name)
ret['changes'] = {'old': None, 'new': 'External Service {}'.format(name)}
ret['result'] = None
return ret
__salt__['consul.register_external_service'](node, address, datacenter, name, port, token)
ret['result'] = True
ret['comment'] = "Registered external service: '{}'.".format(name)
ret['changes'] = {'old': None, 'new': 'External Service {}'.format(name)}
return ret
|
#
# Copyright 2019 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. This License does not grant permission to use the trade
# names, trademarks, service marks, or product names of the Licensor
# and its affiliates, except as required to comply with Section 4(c) of
# the License and to reproduce the content of the NOTICE file.
#
# You may obtain a copy of the Apache License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Apache License with the above modification is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the Apache License for the specific
# language governing permissions and limitations under the Apache License.
#
class RefinementComplexities(object):
"""
An enum-like container of standard complexity settings.
"""
class _RefinementComplexity(object):
"""
Class which represents a level of mesh refinement complexity. Each
level has a string identifier, a display name, and a float complexity
value.
"""
def __init__(self, compId, name, value):
self._id = compId
self._name = name
self._value = value
def __repr__(self):
return self.id
@property
def id(self):
return self._id
@property
def name(self):
return self._name
@property
def value(self):
return self._value
LOW = _RefinementComplexity("low", "Low", 1.0)
MEDIUM = _RefinementComplexity("medium", "Medium", 1.1)
HIGH = _RefinementComplexity("high", "High", 1.2)
VERY_HIGH = _RefinementComplexity("veryhigh", "Very High", 1.3)
_ordered = (LOW, MEDIUM, HIGH, VERY_HIGH)
@classmethod
def ordered(cls):
"""
Get a tuple of all complexity levels in order.
"""
return cls._ordered
@classmethod
def fromId(cls, compId):
"""
Get a complexity from its identifier.
"""
matches = [comp for comp in cls._ordered if comp.id == compId]
if len(matches) == 0:
raise ValueError("No complexity with id '{}'".format(compId))
return matches[0]
@classmethod
def fromName(cls, name):
"""
Get a complexity from its display name.
"""
matches = [comp for comp in cls._ordered if comp.name == name]
if len(matches) == 0:
raise ValueError("No complexity with name '{}'".format(name))
return matches[0]
@classmethod
def next(cls, comp):
"""
Get the next highest level of complexity. If already at the highest
level, return it.
"""
if comp not in cls._ordered:
raise ValueError("Invalid complexity: {}".format(comp))
nextIndex = min(
len(cls._ordered) - 1,
cls._ordered.index(comp) + 1)
return cls._ordered[nextIndex]
@classmethod
def prev(cls, comp):
"""
Get the next lowest level of complexity. If already at the lowest
level, return it.
"""
if comp not in cls._ordered:
raise ValueError("Invalid complexity: {}".format(comp))
prevIndex = max(0, cls._ordered.index(comp) - 1)
return cls._ordered[prevIndex]
def AddCmdlineArgs(argsParser, defaultValue=RefinementComplexities.LOW,
altHelpText=''):
"""
Adds complexity-related command line arguments to argsParser.
The resulting 'complexity' argument will be one of the standard
RefinementComplexities.
"""
helpText = altHelpText
if not helpText:
helpText = ('level of refinement to use (default=%(default)s)')
argsParser.add_argument('--complexity', '-c', action='store',
type=RefinementComplexities.fromId,
default=defaultValue,
choices=[c for c in RefinementComplexities.ordered()],
help=helpText)
|
class Refinementcomplexities(object):
"""
An enum-like container of standard complexity settings.
"""
class _Refinementcomplexity(object):
"""
Class which represents a level of mesh refinement complexity. Each
level has a string identifier, a display name, and a float complexity
value.
"""
def __init__(self, compId, name, value):
self._id = compId
self._name = name
self._value = value
def __repr__(self):
return self.id
@property
def id(self):
return self._id
@property
def name(self):
return self._name
@property
def value(self):
return self._value
low = __refinement_complexity('low', 'Low', 1.0)
medium = __refinement_complexity('medium', 'Medium', 1.1)
high = __refinement_complexity('high', 'High', 1.2)
very_high = __refinement_complexity('veryhigh', 'Very High', 1.3)
_ordered = (LOW, MEDIUM, HIGH, VERY_HIGH)
@classmethod
def ordered(cls):
"""
Get a tuple of all complexity levels in order.
"""
return cls._ordered
@classmethod
def from_id(cls, compId):
"""
Get a complexity from its identifier.
"""
matches = [comp for comp in cls._ordered if comp.id == compId]
if len(matches) == 0:
raise value_error("No complexity with id '{}'".format(compId))
return matches[0]
@classmethod
def from_name(cls, name):
"""
Get a complexity from its display name.
"""
matches = [comp for comp in cls._ordered if comp.name == name]
if len(matches) == 0:
raise value_error("No complexity with name '{}'".format(name))
return matches[0]
@classmethod
def next(cls, comp):
"""
Get the next highest level of complexity. If already at the highest
level, return it.
"""
if comp not in cls._ordered:
raise value_error('Invalid complexity: {}'.format(comp))
next_index = min(len(cls._ordered) - 1, cls._ordered.index(comp) + 1)
return cls._ordered[nextIndex]
@classmethod
def prev(cls, comp):
"""
Get the next lowest level of complexity. If already at the lowest
level, return it.
"""
if comp not in cls._ordered:
raise value_error('Invalid complexity: {}'.format(comp))
prev_index = max(0, cls._ordered.index(comp) - 1)
return cls._ordered[prevIndex]
def add_cmdline_args(argsParser, defaultValue=RefinementComplexities.LOW, altHelpText=''):
"""
Adds complexity-related command line arguments to argsParser.
The resulting 'complexity' argument will be one of the standard
RefinementComplexities.
"""
help_text = altHelpText
if not helpText:
help_text = 'level of refinement to use (default=%(default)s)'
argsParser.add_argument('--complexity', '-c', action='store', type=RefinementComplexities.fromId, default=defaultValue, choices=[c for c in RefinementComplexities.ordered()], help=helpText)
|
class DumbDriveForward(Autonomous):
nickname = "Dumb drive forward"
def __init__(self, robot):
super().__init__(robot)
self.addSequential(AutoDumbDrive(robot, time=3, speed=-0.4))
class DumbDriveForwardHighGear(CommandGroup):
nickname = "Dumb drive forward high gear"
def __init__(self, robot):
super().__init__()
self.robot = robot
self.addSequential(ShiftDriveGear(robot,
self.robot.drive_train.HIGH_GEAR))
self.addSequential(AutoDumbDrive(robot, time=0.5, speed=0))
self.addSequential(AutoDumbDrive(robot, time=3, speed=-0.4))
class DumbPlaceGear(Autonomous):
nickname = "Dumb place gear"
def __init__(self, robot):
super().__init__(robot)
self.addSequential(IntakeGear(robot))
self.addSequential(AutoDumbDrive(robot, time=3, speed=-0.4))
self.addSequential(AutoDumbDrive(robot, time=0.5, speed=0))
self.addSequential(DepositGear(robot))
self.addSequential(AutoDumbDrive(robot, time=0.5, speed=0))
# self.addSequential(AutoDumbDrive(robot, time=0.25, speed=-0.4))
self.addSequential(AutoDumbDrive(robot, time=3, speed=0.2))
class DumbPlaceAndShoot(DumbPlaceGear):
nickname = "Dumb place and shoot"
def __init__(self, robot):
super().__init__(robot)
self.addParallel(DumbShoot(robot))
self.addParallel(RunCommandAfterTime(DumbFeed(robot), time=3))
self.addParallel(AutoDumbDrive(robot, speed=0, dont_stop=True))
class DumbDriveAndShoot(Autonomous):
nickname = "Dumb drive and shoot"
def __init__(self, robot):
super().__init__(robot)
self.addSequential(IntakeGear(robot))
self.addSequential(AutoDumbDrive(robot, time=3, speed=-0.4))
self.addParallel(DumbShoot(robot))
self.addParallel(RunCommandAfterTime(DumbFeed(robot), time=3))
self.addParallel(AutoDumbDrive(robot, speed=0, dont_stop=True))
class DumbTurn(Autonomous):
nickname = "Dumb turn"
def __init__(self, robot):
super().__init__(robot)
self.addSequential(AutoRotate(robot, 90)) # Fur lols
|
class Dumbdriveforward(Autonomous):
nickname = 'Dumb drive forward'
def __init__(self, robot):
super().__init__(robot)
self.addSequential(auto_dumb_drive(robot, time=3, speed=-0.4))
class Dumbdriveforwardhighgear(CommandGroup):
nickname = 'Dumb drive forward high gear'
def __init__(self, robot):
super().__init__()
self.robot = robot
self.addSequential(shift_drive_gear(robot, self.robot.drive_train.HIGH_GEAR))
self.addSequential(auto_dumb_drive(robot, time=0.5, speed=0))
self.addSequential(auto_dumb_drive(robot, time=3, speed=-0.4))
class Dumbplacegear(Autonomous):
nickname = 'Dumb place gear'
def __init__(self, robot):
super().__init__(robot)
self.addSequential(intake_gear(robot))
self.addSequential(auto_dumb_drive(robot, time=3, speed=-0.4))
self.addSequential(auto_dumb_drive(robot, time=0.5, speed=0))
self.addSequential(deposit_gear(robot))
self.addSequential(auto_dumb_drive(robot, time=0.5, speed=0))
self.addSequential(auto_dumb_drive(robot, time=3, speed=0.2))
class Dumbplaceandshoot(DumbPlaceGear):
nickname = 'Dumb place and shoot'
def __init__(self, robot):
super().__init__(robot)
self.addParallel(dumb_shoot(robot))
self.addParallel(run_command_after_time(dumb_feed(robot), time=3))
self.addParallel(auto_dumb_drive(robot, speed=0, dont_stop=True))
class Dumbdriveandshoot(Autonomous):
nickname = 'Dumb drive and shoot'
def __init__(self, robot):
super().__init__(robot)
self.addSequential(intake_gear(robot))
self.addSequential(auto_dumb_drive(robot, time=3, speed=-0.4))
self.addParallel(dumb_shoot(robot))
self.addParallel(run_command_after_time(dumb_feed(robot), time=3))
self.addParallel(auto_dumb_drive(robot, speed=0, dont_stop=True))
class Dumbturn(Autonomous):
nickname = 'Dumb turn'
def __init__(self, robot):
super().__init__(robot)
self.addSequential(auto_rotate(robot, 90))
|
#Write a function name kinetic_energy that accepts an object's mass (in kg) and
#velocity (in m/s) as arguments. The function should return the amount of kinetic
#energy that object has. Write a program that asks the user to enter values for
#mass and velocity, the calls kinetic_energy to get the object's kinetic energy.
def main():
print('This program calculates and displays kinetic energy of an object')
print('with the values entered.')
print()
mass = float(input('Enter mass: '))
velocity = float(input('Enter velocity: '))
energy = kinetic_energy(mass, velocity)
print('The kinetic energy is', format(energy, ',.2f'))
def kinetic_energy(m,v):
KE = 0.5*m*v**2 #the book says the formula is 12mv2, but i think it means
return KE #the correct formula, which is (1/2)mv^2
main()
|
def main():
print('This program calculates and displays kinetic energy of an object')
print('with the values entered.')
print()
mass = float(input('Enter mass: '))
velocity = float(input('Enter velocity: '))
energy = kinetic_energy(mass, velocity)
print('The kinetic energy is', format(energy, ',.2f'))
def kinetic_energy(m, v):
ke = 0.5 * m * v ** 2
return KE
main()
|
def seg(s):
s2 = s[0]
for e in s[1:]:
if e == s2[-1]:
s2 += e
else:
s2 += '/'
s2 += e
print(s)
print(s2)
def seg2():
s2 = []
s = ['a', 'a', 'b', 'b', 'v', 'v', 'c', 'c', 'a', 's']
for e in enumerate(s):
s2.append(e)
s3 = s2[0]
for ind, e in enumerate(s2[1:]):
if e == s3[-1]:
s3 += e
else:
# s3 += '/'
s3 += e
print(s)
print(s3)
if __name__ == '__main__':
seg2()
|
def seg(s):
s2 = s[0]
for e in s[1:]:
if e == s2[-1]:
s2 += e
else:
s2 += '/'
s2 += e
print(s)
print(s2)
def seg2():
s2 = []
s = ['a', 'a', 'b', 'b', 'v', 'v', 'c', 'c', 'a', 's']
for e in enumerate(s):
s2.append(e)
s3 = s2[0]
for (ind, e) in enumerate(s2[1:]):
if e == s3[-1]:
s3 += e
else:
s3 += e
print(s)
print(s3)
if __name__ == '__main__':
seg2()
|
class Solution:
def subtractProductAndSum(self, n: int) -> int:
prod = 1
sum_ = 0
while n > 0:
last_digit = n % 10
prod *= last_digit
sum_ += last_digit
n //= 10
return prod - sum_
|
class Solution:
def subtract_product_and_sum(self, n: int) -> int:
prod = 1
sum_ = 0
while n > 0:
last_digit = n % 10
prod *= last_digit
sum_ += last_digit
n //= 10
return prod - sum_
|
def test(x):
try:
if x:
print(x)
else:
raise (Exception)
except:
print("wrong")
finally:
print("finally")
print("after finally")
if __name__ == "__main__":
test(None)
test("hello")
|
def test(x):
try:
if x:
print(x)
else:
raise Exception
except:
print('wrong')
finally:
print('finally')
print('after finally')
if __name__ == '__main__':
test(None)
test('hello')
|
# The example function below keeps track of the opponent's history and plays whatever the opponent played two plays ago. It is not a very good player so you will need to change the code to pass the challenge.
def player(prev_play, opponent_history=[]):
opponent_history.append(prev_play)
guess = "R"
if len(opponent_history) > 2:
guess = opponent_history[-2]
return guess
|
def player(prev_play, opponent_history=[]):
opponent_history.append(prev_play)
guess = 'R'
if len(opponent_history) > 2:
guess = opponent_history[-2]
return guess
|
"""Robot in a grid."""
def robot_path(grid):
"""Return a path for the robot."""
rows = len(grid)
cols = len(grid[0])
valid_paths = []
def traverse_grid(i=0, j=0, path=[]):
if i > rows - 1 or j > cols - 1:
return
if grid[i][j] == 1:
return
if i == rows - 1 and j == cols - 1:
valid_paths.append(path)
traverse_grid(i + 1, j, path + ['down'])
traverse_grid(i, j + 1, path + ['right'])
traverse_grid()
return valid_paths
|
"""Robot in a grid."""
def robot_path(grid):
"""Return a path for the robot."""
rows = len(grid)
cols = len(grid[0])
valid_paths = []
def traverse_grid(i=0, j=0, path=[]):
if i > rows - 1 or j > cols - 1:
return
if grid[i][j] == 1:
return
if i == rows - 1 and j == cols - 1:
valid_paths.append(path)
traverse_grid(i + 1, j, path + ['down'])
traverse_grid(i, j + 1, path + ['right'])
traverse_grid()
return valid_paths
|
# Copyright 2021 NVIDIA CORPORATION
# SPDX-License-Identifier: Apache-2.0
#
# Script to generate the GLSL compute functions
#
# uint autogeneratedGetCaseNumber(float sample000, float sample001, float sample010, float sample011,
# float sample100, float sample101, float sample110, float sample111);
#
# which takes a cube of 8 samples (sample{x}{y}{z}) returns a value 0-255 indicating which marching cubes
# case this is, and,
#
# void autogeneratedGetCellTriangles(out McubesCell cell, in uint caseNumber, in uint denominator,
# in float sample000, in float sample001, in float sample010, in float sample011,
# in float sample100, in float sample101, in float sample110, in float sample111);
#
# which fills in just the triangles in the given McubesCell as appropriate for the given samples cube.
# The fixed point format is such that packNormalizedVec3(vec3(0), denominator) indicates the coordinate that sample000
# is at, and packNormalizedVec3(vec3(1), denominator) indicates the coordinate that sample111 is at.
#
# We depend on outside code to fill in McubesCell::offset and McubesGeometry::packedVertScale correctly.
#
# This is pretty nasty code, more of an augmentation of my brain than serious software.
# (as if I had written the autogenerated code manually and you are just looking at what would have been
# my private thought process).
# Bit meanings in caseNumber
sample000_positive_bit = 1
sample001_positive_bit = 2
sample010_positive_bit = 4
sample011_positive_bit = 8
sample100_positive_bit = 16
sample101_positive_bit = 32
sample110_positive_bit = 64
sample111_positive_bit = 128
bit_map = {
"sample000" : sample000_positive_bit,
"sample001" : sample001_positive_bit,
"sample010" : sample010_positive_bit,
"sample011" : sample011_positive_bit,
"sample100" : sample100_positive_bit,
"sample101" : sample101_positive_bit,
"sample110" : sample110_positive_bit,
"sample111" : sample111_positive_bit,
}
# Print out autogeneratedGetCaseNumber
print(
f"""\
// Copyright 2021 NVIDIA CORPORATION
// SPDX-License-Identifier: Apache-2.0
// generated by shaders/generate_autogenerated_mcubes.py
// clang-format off
uint autogeneratedGetCaseNumber(float sample000, float sample001, float sample010, float sample011,
float sample100, float sample101, float sample110, float sample111)
{{
int bits = (sample000 > 0.0 ? {sample000_positive_bit} : 0)
| (sample001 > 0.0 ? {sample001_positive_bit} : 0)
| (sample010 > 0.0 ? {sample010_positive_bit} : 0)
| (sample011 > 0.0 ? {sample011_positive_bit} : 0)
| (sample100 > 0.0 ? {sample100_positive_bit} : 0)
| (sample101 > 0.0 ? {sample101_positive_bit} : 0)
| (sample110 > 0.0 ? {sample110_positive_bit} : 0)
| (sample111 > 0.0 ? {sample111_positive_bit} : 0);
return uint(bits);
}}
""")
# Print out start of autogeneratedGetCellTriangles
print(
f"""
// Used shared memory for some thread-private variables. This makes the GLSL compiler not take forever.
uint sharedIntersect_00x[THREADS];
uint sharedIntersect_0x0[THREADS];
uint sharedIntersect_x00[THREADS];
uint sharedIntersect_01x[THREADS];
uint sharedIntersect_0x1[THREADS];
uint sharedIntersect_x01[THREADS];
uint sharedIntersect_10x[THREADS];
uint sharedIntersect_1x0[THREADS];
uint sharedIntersect_x10[THREADS];
uint sharedIntersect_11x[THREADS];
uint sharedIntersect_1x1[THREADS];
uint sharedIntersect_x11[THREADS];
// e.g. INTERSECT_00x indicates the interpolated intersection point (if any) from sample000 to sample001.
#define INTERSECT_00x sharedIntersect_00x[gl_LocalInvocationIndex]
#define INTERSECT_0x0 sharedIntersect_0x0[gl_LocalInvocationIndex]
#define INTERSECT_x00 sharedIntersect_x00[gl_LocalInvocationIndex]
#define INTERSECT_01x sharedIntersect_01x[gl_LocalInvocationIndex]
#define INTERSECT_0x1 sharedIntersect_0x1[gl_LocalInvocationIndex]
#define INTERSECT_x01 sharedIntersect_x01[gl_LocalInvocationIndex]
#define INTERSECT_10x sharedIntersect_10x[gl_LocalInvocationIndex]
#define INTERSECT_1x0 sharedIntersect_1x0[gl_LocalInvocationIndex]
#define INTERSECT_x10 sharedIntersect_x10[gl_LocalInvocationIndex]
#define INTERSECT_11x sharedIntersect_11x[gl_LocalInvocationIndex]
#define INTERSECT_1x1 sharedIntersect_1x1[gl_LocalInvocationIndex]
#define INTERSECT_x11 sharedIntersect_x11[gl_LocalInvocationIndex]
void autogeneratedGetCellTriangles(out McubesCell cell, in uint caseNumber, in uint denominator,
in float sample000, in float sample001, in float sample010, in float sample011,
in float sample100, in float sample101, in float sample110, in float sample111)
{{
""")
# Function for printing the computation for a INTERSECT_xxx variable.
def print_intersect_assignment(variable_name):
assert variable_name.startswith("INTERSECT_") and len(variable_name) == 13
last3 = variable_name[-3:]
assert last3.count('x') == 1
sample0_name = 'sample' + last3.replace('x', '0')
sample1_name = 'sample' + last3.replace('x', '1')
interpolant_calculation = f"{sample0_name} / ({sample0_name} - {sample1_name})"
vec_x = interpolant_calculation if last3[0] == 'x' else last3[0]
vec_y = interpolant_calculation if last3[1] == 'x' else last3[1]
vec_z = interpolant_calculation if last3[2] == 'x' else last3[2]
print(f" {variable_name} = packNormalizedVec3(vec3({vec_x}, {vec_y}, {vec_z}), denominator);")
for name in ["INTERSECT_00x", "INTERSECT_0x0", "INTERSECT_x00",
"INTERSECT_01x", "INTERSECT_0x1", "INTERSECT_x01",
"INTERSECT_10x", "INTERSECT_1x0", "INTERSECT_x10",
"INTERSECT_11x", "INTERSECT_1x1", "INTERSECT_x11"]:
print_intersect_assignment(name)
print(" switch(caseNumber)\n{")
# Analyze the square of 4 samples (one face of the 8-sample cube) and add any edges found to the edge_dictionary.
# The samples shall be passed as 4 sampleXXX variable names, in anticlocwise order (viewed from outside).
# This is in the form of a key:value pair, where the directed edge goes from key to value
# (both INTERSECT_XXX variable names).
def add_square_edges(bits, edge_dictionary, sample_sw_name, sample_se_name, sample_ne_name, sample_nw_name, hack):
get_intersect_name = lambda sample_a_name, sample_b_name: \
"INTERSECT_x" + sample_a_name[-2:] if sample_a_name[-3] != sample_b_name[-3] else \
"INTERSECT_" + sample_a_name[-3] + 'x' + sample_a_name[-1] if sample_a_name[-2] != sample_b_name[-2] else \
"INTERSECT_" + sample_a_name[-3:-1] + 'x'
sw_bit = 1
se_bit = 2
ne_bit = 4
nw_bit = 8
s_intersect = get_intersect_name(sample_sw_name, sample_se_name)
n_intersect = get_intersect_name(sample_nw_name, sample_ne_name)
e_intersect = get_intersect_name(sample_se_name, sample_ne_name)
w_intersect = get_intersect_name(sample_sw_name, sample_nw_name)
square_bits = 0
if bits & bit_map[sample_sw_name]: square_bits |= sw_bit
if bits & bit_map[sample_se_name]: square_bits |= se_bit
if bits & bit_map[sample_ne_name]: square_bits |= ne_bit
if bits & bit_map[sample_nw_name]: square_bits |= nw_bit
if square_bits == 0:
pass
elif square_bits == sw_bit:
edge_dictionary[s_intersect] = w_intersect
elif square_bits == se_bit:
edge_dictionary[e_intersect] = s_intersect
elif square_bits == sw_bit | se_bit:
edge_dictionary[e_intersect] = w_intersect
elif square_bits == ne_bit:
edge_dictionary[n_intersect] = e_intersect
elif square_bits == ne_bit | sw_bit:
if hack & 1:
edge_dictionary[n_intersect] = w_intersect
edge_dictionary[s_intersect] = e_intersect
else:
edge_dictionary[n_intersect] = e_intersect
edge_dictionary[s_intersect] = w_intersect
elif square_bits == ne_bit | se_bit:
edge_dictionary[n_intersect] = s_intersect
elif square_bits == ne_bit | se_bit | sw_bit:
edge_dictionary[n_intersect] = w_intersect
elif square_bits == nw_bit:
edge_dictionary[w_intersect] = n_intersect
elif square_bits == nw_bit | sw_bit:
edge_dictionary[s_intersect] = n_intersect
elif square_bits == nw_bit | se_bit:
if hack & 2:
edge_dictionary[w_intersect] = s_intersect
edge_dictionary[e_intersect] = n_intersect
else:
edge_dictionary[w_intersect] = n_intersect
edge_dictionary[e_intersect] = s_intersect
elif square_bits == nw_bit | se_bit | sw_bit:
edge_dictionary[e_intersect] = n_intersect
elif square_bits == nw_bit | ne_bit:
edge_dictionary[w_intersect] = e_intersect
elif square_bits == nw_bit | ne_bit | sw_bit:
edge_dictionary[s_intersect] = e_intersect
elif square_bits == nw_bit | ne_bit | se_bit:
edge_dictionary[w_intersect] = s_intersect
elif square_bits == sw_bit | se_bit | ne_bit | nw_bit:
pass
else:
assert 0
# Collect the cube face edges for a given cube case, then assemble into a list of closed loops.
# This does not include edges that pass through the interior of the cube -- these will be tesselated later.
def collect_face_contours(case_bits, hack):
edge_dictionary = {}
# +x face
add_square_edges(case_bits, edge_dictionary, "sample100", "sample110", "sample111", "sample101", hack)
# -x face
add_square_edges(case_bits, edge_dictionary, "sample000", "sample001", "sample011", "sample010", hack)
# +y face
add_square_edges(case_bits, edge_dictionary, "sample010", "sample011", "sample111", "sample110", hack)
# -y face
add_square_edges(case_bits, edge_dictionary, "sample000", "sample100", "sample101", "sample001", hack)
# +z face
add_square_edges(case_bits, edge_dictionary, "sample001", "sample101", "sample111", "sample011", hack)
# -z face
add_square_edges(case_bits, edge_dictionary, "sample000", "sample010", "sample110", "sample100", hack)
contours = []
while edge_dictionary:
start, next_point = edge_dictionary.popitem()
points = [start]
while next_point != start:
points.append(next_point)
tmp = edge_dictionary[next_point]
del edge_dictionary[next_point]
next_point = tmp
contours.append(points)
return contours
# Tesselate contours.
# Given list of contours of length 3, 4, 5, or 6 points, arbitrarily tesselate those with > 3 points,
# and return a list of only 3-point contours.
def tesselate_contours(contours):
triangles = []
for point_list in contours:
if len(point_list) == 3:
triangles.append(tuple(point_list))
elif len(point_list) == 4:
triangles.append((point_list[0], point_list[1], point_list[2]))
triangles.append((point_list[0], point_list[2], point_list[3]))
elif len(point_list) == 5:
triangles.append((point_list[0], point_list[1], point_list[2]))
triangles.append((point_list[0], point_list[2], point_list[3]))
triangles.append((point_list[0], point_list[3], point_list[4]))
elif len(point_list) == 6:
triangles.append((point_list[0], point_list[1], point_list[2]))
triangles.append((point_list[2], point_list[3], point_list[4]))
triangles.append((point_list[4], point_list[5], point_list[0]))
triangles.append((point_list[0], point_list[2], point_list[4]))
else:
assert 0
return triangles
# Print the code for a given case number.
def print_case(case_bits):
print(f" case {case_bits}:")
max_point_list_length = 1000
for hack in range(4):
face_contours = collect_face_contours(case_bits, hack)
hack_max_point_list_length = 0
if face_contours:
hack_max_point_list_length = max(len(point_list) for point_list in face_contours)
if hack_max_point_list_length < max_point_list_length:
max_point_list_length = hack_max_point_list_length
best_face_contours = face_contours
del face_contours
face_contours = best_face_contours
triangles = tesselate_contours(face_contours)
print(f" cell.vertexCount = {len(triangles) * 3};")
index = 0
for t in triangles:
print(f" cell.packedVerts[{index + 0}] = {t[0]};")
print(f" cell.packedVerts[{index + 1}] = {t[1]};")
print(f" cell.packedVerts[{index + 2}] = {t[2]};")
index += 3
print(f" break;")
for case_bits in range(256):
print_case(case_bits)
# Print function end
print(
""" }
}""")
|
sample000_positive_bit = 1
sample001_positive_bit = 2
sample010_positive_bit = 4
sample011_positive_bit = 8
sample100_positive_bit = 16
sample101_positive_bit = 32
sample110_positive_bit = 64
sample111_positive_bit = 128
bit_map = {'sample000': sample000_positive_bit, 'sample001': sample001_positive_bit, 'sample010': sample010_positive_bit, 'sample011': sample011_positive_bit, 'sample100': sample100_positive_bit, 'sample101': sample101_positive_bit, 'sample110': sample110_positive_bit, 'sample111': sample111_positive_bit}
print(f'// Copyright 2021 NVIDIA CORPORATION\n// SPDX-License-Identifier: Apache-2.0\n// generated by shaders/generate_autogenerated_mcubes.py\n// clang-format off\nuint autogeneratedGetCaseNumber(float sample000, float sample001, float sample010, float sample011,\n float sample100, float sample101, float sample110, float sample111)\n{{\n int bits = (sample000 > 0.0 ? {sample000_positive_bit} : 0)\n | (sample001 > 0.0 ? {sample001_positive_bit} : 0)\n | (sample010 > 0.0 ? {sample010_positive_bit} : 0)\n | (sample011 > 0.0 ? {sample011_positive_bit} : 0)\n | (sample100 > 0.0 ? {sample100_positive_bit} : 0)\n | (sample101 > 0.0 ? {sample101_positive_bit} : 0)\n | (sample110 > 0.0 ? {sample110_positive_bit} : 0)\n | (sample111 > 0.0 ? {sample111_positive_bit} : 0);\n return uint(bits);\n}}\n')
print(f'\n// Used shared memory for some thread-private variables. This makes the GLSL compiler not take forever.\nuint sharedIntersect_00x[THREADS];\nuint sharedIntersect_0x0[THREADS];\nuint sharedIntersect_x00[THREADS];\nuint sharedIntersect_01x[THREADS];\nuint sharedIntersect_0x1[THREADS];\nuint sharedIntersect_x01[THREADS];\nuint sharedIntersect_10x[THREADS];\nuint sharedIntersect_1x0[THREADS];\nuint sharedIntersect_x10[THREADS];\nuint sharedIntersect_11x[THREADS];\nuint sharedIntersect_1x1[THREADS];\nuint sharedIntersect_x11[THREADS];\n\n// e.g. INTERSECT_00x indicates the interpolated intersection point (if any) from sample000 to sample001.\n#define INTERSECT_00x sharedIntersect_00x[gl_LocalInvocationIndex]\n#define INTERSECT_0x0 sharedIntersect_0x0[gl_LocalInvocationIndex]\n#define INTERSECT_x00 sharedIntersect_x00[gl_LocalInvocationIndex]\n#define INTERSECT_01x sharedIntersect_01x[gl_LocalInvocationIndex]\n#define INTERSECT_0x1 sharedIntersect_0x1[gl_LocalInvocationIndex]\n#define INTERSECT_x01 sharedIntersect_x01[gl_LocalInvocationIndex]\n#define INTERSECT_10x sharedIntersect_10x[gl_LocalInvocationIndex]\n#define INTERSECT_1x0 sharedIntersect_1x0[gl_LocalInvocationIndex]\n#define INTERSECT_x10 sharedIntersect_x10[gl_LocalInvocationIndex]\n#define INTERSECT_11x sharedIntersect_11x[gl_LocalInvocationIndex]\n#define INTERSECT_1x1 sharedIntersect_1x1[gl_LocalInvocationIndex]\n#define INTERSECT_x11 sharedIntersect_x11[gl_LocalInvocationIndex]\n\nvoid autogeneratedGetCellTriangles(out McubesCell cell, in uint caseNumber, in uint denominator,\n in float sample000, in float sample001, in float sample010, in float sample011,\n in float sample100, in float sample101, in float sample110, in float sample111)\n{{\n')
def print_intersect_assignment(variable_name):
assert variable_name.startswith('INTERSECT_') and len(variable_name) == 13
last3 = variable_name[-3:]
assert last3.count('x') == 1
sample0_name = 'sample' + last3.replace('x', '0')
sample1_name = 'sample' + last3.replace('x', '1')
interpolant_calculation = f'{sample0_name} / ({sample0_name} - {sample1_name})'
vec_x = interpolant_calculation if last3[0] == 'x' else last3[0]
vec_y = interpolant_calculation if last3[1] == 'x' else last3[1]
vec_z = interpolant_calculation if last3[2] == 'x' else last3[2]
print(f' {variable_name} = packNormalizedVec3(vec3({vec_x}, {vec_y}, {vec_z}), denominator);')
for name in ['INTERSECT_00x', 'INTERSECT_0x0', 'INTERSECT_x00', 'INTERSECT_01x', 'INTERSECT_0x1', 'INTERSECT_x01', 'INTERSECT_10x', 'INTERSECT_1x0', 'INTERSECT_x10', 'INTERSECT_11x', 'INTERSECT_1x1', 'INTERSECT_x11']:
print_intersect_assignment(name)
print(' switch(caseNumber)\n{')
def add_square_edges(bits, edge_dictionary, sample_sw_name, sample_se_name, sample_ne_name, sample_nw_name, hack):
get_intersect_name = lambda sample_a_name, sample_b_name: 'INTERSECT_x' + sample_a_name[-2:] if sample_a_name[-3] != sample_b_name[-3] else 'INTERSECT_' + sample_a_name[-3] + 'x' + sample_a_name[-1] if sample_a_name[-2] != sample_b_name[-2] else 'INTERSECT_' + sample_a_name[-3:-1] + 'x'
sw_bit = 1
se_bit = 2
ne_bit = 4
nw_bit = 8
s_intersect = get_intersect_name(sample_sw_name, sample_se_name)
n_intersect = get_intersect_name(sample_nw_name, sample_ne_name)
e_intersect = get_intersect_name(sample_se_name, sample_ne_name)
w_intersect = get_intersect_name(sample_sw_name, sample_nw_name)
square_bits = 0
if bits & bit_map[sample_sw_name]:
square_bits |= sw_bit
if bits & bit_map[sample_se_name]:
square_bits |= se_bit
if bits & bit_map[sample_ne_name]:
square_bits |= ne_bit
if bits & bit_map[sample_nw_name]:
square_bits |= nw_bit
if square_bits == 0:
pass
elif square_bits == sw_bit:
edge_dictionary[s_intersect] = w_intersect
elif square_bits == se_bit:
edge_dictionary[e_intersect] = s_intersect
elif square_bits == sw_bit | se_bit:
edge_dictionary[e_intersect] = w_intersect
elif square_bits == ne_bit:
edge_dictionary[n_intersect] = e_intersect
elif square_bits == ne_bit | sw_bit:
if hack & 1:
edge_dictionary[n_intersect] = w_intersect
edge_dictionary[s_intersect] = e_intersect
else:
edge_dictionary[n_intersect] = e_intersect
edge_dictionary[s_intersect] = w_intersect
elif square_bits == ne_bit | se_bit:
edge_dictionary[n_intersect] = s_intersect
elif square_bits == ne_bit | se_bit | sw_bit:
edge_dictionary[n_intersect] = w_intersect
elif square_bits == nw_bit:
edge_dictionary[w_intersect] = n_intersect
elif square_bits == nw_bit | sw_bit:
edge_dictionary[s_intersect] = n_intersect
elif square_bits == nw_bit | se_bit:
if hack & 2:
edge_dictionary[w_intersect] = s_intersect
edge_dictionary[e_intersect] = n_intersect
else:
edge_dictionary[w_intersect] = n_intersect
edge_dictionary[e_intersect] = s_intersect
elif square_bits == nw_bit | se_bit | sw_bit:
edge_dictionary[e_intersect] = n_intersect
elif square_bits == nw_bit | ne_bit:
edge_dictionary[w_intersect] = e_intersect
elif square_bits == nw_bit | ne_bit | sw_bit:
edge_dictionary[s_intersect] = e_intersect
elif square_bits == nw_bit | ne_bit | se_bit:
edge_dictionary[w_intersect] = s_intersect
elif square_bits == sw_bit | se_bit | ne_bit | nw_bit:
pass
else:
assert 0
def collect_face_contours(case_bits, hack):
edge_dictionary = {}
add_square_edges(case_bits, edge_dictionary, 'sample100', 'sample110', 'sample111', 'sample101', hack)
add_square_edges(case_bits, edge_dictionary, 'sample000', 'sample001', 'sample011', 'sample010', hack)
add_square_edges(case_bits, edge_dictionary, 'sample010', 'sample011', 'sample111', 'sample110', hack)
add_square_edges(case_bits, edge_dictionary, 'sample000', 'sample100', 'sample101', 'sample001', hack)
add_square_edges(case_bits, edge_dictionary, 'sample001', 'sample101', 'sample111', 'sample011', hack)
add_square_edges(case_bits, edge_dictionary, 'sample000', 'sample010', 'sample110', 'sample100', hack)
contours = []
while edge_dictionary:
(start, next_point) = edge_dictionary.popitem()
points = [start]
while next_point != start:
points.append(next_point)
tmp = edge_dictionary[next_point]
del edge_dictionary[next_point]
next_point = tmp
contours.append(points)
return contours
def tesselate_contours(contours):
triangles = []
for point_list in contours:
if len(point_list) == 3:
triangles.append(tuple(point_list))
elif len(point_list) == 4:
triangles.append((point_list[0], point_list[1], point_list[2]))
triangles.append((point_list[0], point_list[2], point_list[3]))
elif len(point_list) == 5:
triangles.append((point_list[0], point_list[1], point_list[2]))
triangles.append((point_list[0], point_list[2], point_list[3]))
triangles.append((point_list[0], point_list[3], point_list[4]))
elif len(point_list) == 6:
triangles.append((point_list[0], point_list[1], point_list[2]))
triangles.append((point_list[2], point_list[3], point_list[4]))
triangles.append((point_list[4], point_list[5], point_list[0]))
triangles.append((point_list[0], point_list[2], point_list[4]))
else:
assert 0
return triangles
def print_case(case_bits):
print(f' case {case_bits}:')
max_point_list_length = 1000
for hack in range(4):
face_contours = collect_face_contours(case_bits, hack)
hack_max_point_list_length = 0
if face_contours:
hack_max_point_list_length = max((len(point_list) for point_list in face_contours))
if hack_max_point_list_length < max_point_list_length:
max_point_list_length = hack_max_point_list_length
best_face_contours = face_contours
del face_contours
face_contours = best_face_contours
triangles = tesselate_contours(face_contours)
print(f' cell.vertexCount = {len(triangles) * 3};')
index = 0
for t in triangles:
print(f' cell.packedVerts[{index + 0}] = {t[0]};')
print(f' cell.packedVerts[{index + 1}] = {t[1]};')
print(f' cell.packedVerts[{index + 2}] = {t[2]};')
index += 3
print(f' break;')
for case_bits in range(256):
print_case(case_bits)
print(' }\n}')
|
def view(user, tool):
return True
def create(user, tool):
if user.is_superuser:
return True
return user.is_developer
def change(user, tool):
if user.is_superuser:
return True
return user.is_developer
def delete(user, tool):
if user.is_superuser:
return True
return user.is_developer
|
def view(user, tool):
return True
def create(user, tool):
if user.is_superuser:
return True
return user.is_developer
def change(user, tool):
if user.is_superuser:
return True
return user.is_developer
def delete(user, tool):
if user.is_superuser:
return True
return user.is_developer
|
ingredient1 = "chicken"
ingredient2 = "rice"
Michsays = input ("What is inside this hawker chicken rice?")
if (Michsays == ingredient1 or Michsays == ingredient2):
print("correct!")
else:
print("look again!")
# == takes precedence over or
Michasks = input("How much is the hawker chicken rice?")
floatConvertedMichasks = float(Michasks)
# price = 3.5 (dont need to assign values, alr in criteria)
if floatConvertedMichasks == 3.5:
print("the price is right!")
if floatConvertedMichasks > 3.5:
print("hmm that may be too expensive! sad")
if floatConvertedMichasks < 3.5:
print("wow thats peanuts")
|
ingredient1 = 'chicken'
ingredient2 = 'rice'
michsays = input('What is inside this hawker chicken rice?')
if Michsays == ingredient1 or Michsays == ingredient2:
print('correct!')
else:
print('look again!')
michasks = input('How much is the hawker chicken rice?')
float_converted_michasks = float(Michasks)
if floatConvertedMichasks == 3.5:
print('the price is right!')
if floatConvertedMichasks > 3.5:
print('hmm that may be too expensive! sad')
if floatConvertedMichasks < 3.5:
print('wow thats peanuts')
|
with open("input.txt") as f:
arr = [line.strip() for line in f.readlines()]
feesh = arr[0].split(",")
feesh = [int(num) for num in feesh]
days = 256
max_age = 8
birth_rates = [ [None] * (max_age + 1) for i in range(days + 1)]
#print(feesh)
#print(birth_rates)
def final_feesh(fish_age, day):
print("Age: " + str(fish_age) + " Day: " + str(day))
if birth_rates[day][fish_age]:
print("Job done - " + str(birth_rates[day][fish_age]))
return birth_rates[day][fish_age]
#print("Job not done")
val = 0
if (day + fish_age >= days):
val = 1
elif fish_age > 0:
val = final_feesh(fish_age - 1, day + 1)
else:
val = final_feesh(6, day + 1) + final_feesh(8, day + 1)
birth_rates[day][fish_age] = val
return val
sum = 0
for num in feesh:
sum += final_feesh(num, 0)
print(sum)
|
with open('input.txt') as f:
arr = [line.strip() for line in f.readlines()]
feesh = arr[0].split(',')
feesh = [int(num) for num in feesh]
days = 256
max_age = 8
birth_rates = [[None] * (max_age + 1) for i in range(days + 1)]
def final_feesh(fish_age, day):
print('Age: ' + str(fish_age) + ' Day: ' + str(day))
if birth_rates[day][fish_age]:
print('Job done - ' + str(birth_rates[day][fish_age]))
return birth_rates[day][fish_age]
val = 0
if day + fish_age >= days:
val = 1
elif fish_age > 0:
val = final_feesh(fish_age - 1, day + 1)
else:
val = final_feesh(6, day + 1) + final_feesh(8, day + 1)
birth_rates[day][fish_age] = val
return val
sum = 0
for num in feesh:
sum += final_feesh(num, 0)
print(sum)
|
class Solution:
def flipgame(self, fronts: 'List[int]', backs: 'List[int]') -> 'int':
same_sides = {}
for i in range(len(fronts)):
if fronts[i] == backs[i]:
if fronts[i] not in same_sides:
same_sides[fronts[i]] = 0
same_sides[fronts[i]] += 1
min_side = 2345
for i in range(len(fronts)):
f, b = fronts[i], backs[i]
if f == b: continue
if f not in same_sides:
min_side = min(min_side, f)
if b not in same_sides:
min_side = min(min_side, b)
if min_side == 2345: min_side = 0
return min_side
|
class Solution:
def flipgame(self, fronts: 'List[int]', backs: 'List[int]') -> 'int':
same_sides = {}
for i in range(len(fronts)):
if fronts[i] == backs[i]:
if fronts[i] not in same_sides:
same_sides[fronts[i]] = 0
same_sides[fronts[i]] += 1
min_side = 2345
for i in range(len(fronts)):
(f, b) = (fronts[i], backs[i])
if f == b:
continue
if f not in same_sides:
min_side = min(min_side, f)
if b not in same_sides:
min_side = min(min_side, b)
if min_side == 2345:
min_side = 0
return min_side
|
"""
Given a set and a sum (m) findout whether
there is a subset whose sub is equal to m
Time complexity : O(n*m)
Space complexity : O(n*m)
"""
def solve():
n,m = map(int,input().split())
a = list(map(int,input().split()))
dp = [[0 for i in range(m+1)] for j in range(n+1)]
for i in range(m+1):
dp[0][i] = 0
for i in range(n+1):
dp[i][0] = 1
for i in range(1,n+1):
for j in range(1,m+1):
if dp[i-1][j]:
dp[i][j] = 1
else:
if ((j-a[i-1]) >= 0):
dp[i][j] = dp[i][(j-a[i-1])]
if dp[i][j]:
print('YES')
else:
print('NO')
if __name__ == '__main__':
for t in range(int(input())):
solve()
|
"""
Given a set and a sum (m) findout whether
there is a subset whose sub is equal to m
Time complexity : O(n*m)
Space complexity : O(n*m)
"""
def solve():
(n, m) = map(int, input().split())
a = list(map(int, input().split()))
dp = [[0 for i in range(m + 1)] for j in range(n + 1)]
for i in range(m + 1):
dp[0][i] = 0
for i in range(n + 1):
dp[i][0] = 1
for i in range(1, n + 1):
for j in range(1, m + 1):
if dp[i - 1][j]:
dp[i][j] = 1
elif j - a[i - 1] >= 0:
dp[i][j] = dp[i][j - a[i - 1]]
if dp[i][j]:
print('YES')
else:
print('NO')
if __name__ == '__main__':
for t in range(int(input())):
solve()
|
UNSIGNED_CHAR_COLUMN = 251
UNSIGNED_CHAR_LENGTH = 1
UNSIGNED_INT24_COLUMN = 253
UNSIGNED_INT24_LENGTH = 3
UNSIGNED_INT64_COLUMN = 254
UNSIGNED_INT64_LENGTH = 8
UNSIGNED_SHORT_COLUMN = 252
UNSIGNED_SHORT_LENGTH = 2
|
unsigned_char_column = 251
unsigned_char_length = 1
unsigned_int24_column = 253
unsigned_int24_length = 3
unsigned_int64_column = 254
unsigned_int64_length = 8
unsigned_short_column = 252
unsigned_short_length = 2
|
"""PostgreSQL utilities"""
def pg_result_to_dict(columns, result, single_object=False):
"""Convert a PostgreSQL query result to a dict"""
resp = []
for row in result:
resp.append(dict(zip(columns, row)))
if single_object:
return resp[0]
return resp
|
"""PostgreSQL utilities"""
def pg_result_to_dict(columns, result, single_object=False):
"""Convert a PostgreSQL query result to a dict"""
resp = []
for row in result:
resp.append(dict(zip(columns, row)))
if single_object:
return resp[0]
return resp
|
info = {
"friendly_name": "Comment (Block)",
"example_template": "comment text",
"summary": "The text within the block is not interpreted or rendered in the final displayed page.",
}
def SublanguageHandler(args, doc, renderer):
pass
|
info = {'friendly_name': 'Comment (Block)', 'example_template': 'comment text', 'summary': 'The text within the block is not interpreted or rendered in the final displayed page.'}
def sublanguage_handler(args, doc, renderer):
pass
|
def digitize(n):
if n == 0:
return[0]
else:
digits = []
while n > 0:
digits.append(n % 10)
n = (n - n % 10) // 10
return(digits[::-1])
#def digitize(n):
#return list(map(int, str(n)))cc
|
def digitize(n):
if n == 0:
return [0]
else:
digits = []
while n > 0:
digits.append(n % 10)
n = (n - n % 10) // 10
return digits[::-1]
|
#
# PySNMP MIB module CERENT-GLOBAL-REGISTRY (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CERENT-GLOBAL-REGISTRY
# Produced by pysmi-0.3.4 at Wed May 1 11:48:12 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Integer32, IpAddress, Gauge32, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, enterprises, Bits, TimeTicks, iso, Counter32, Unsigned32, NotificationType, Counter64, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "IpAddress", "Gauge32", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "enterprises", "Bits", "TimeTicks", "iso", "Counter32", "Unsigned32", "NotificationType", "Counter64", "ModuleIdentity")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
cerentGlobalRegModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 10, 10))
cerentGlobalRegModule.setRevisions(('1904-10-01 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: cerentGlobalRegModule.setRevisionsDescriptions(('This file can be used with R5.0 release.',))
if mibBuilder.loadTexts: cerentGlobalRegModule.setLastUpdated('0410010000Z')
if mibBuilder.loadTexts: cerentGlobalRegModule.setOrganization('Cisco Systems')
if mibBuilder.loadTexts: cerentGlobalRegModule.setContactInfo(' Support@Cisco.com Postal: Cisco Systems, Inc. 1450 N. McDowell Blvd. Petaluma, CA 94954 USA Tel: 1-877-323-7368')
if mibBuilder.loadTexts: cerentGlobalRegModule.setDescription('This module provides the global registrations for all other Cisco OTBU MIB modules.')
cerent = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607))
if mibBuilder.loadTexts: cerent.setStatus('current')
if mibBuilder.loadTexts: cerent.setDescription('Sub-tree for Cisco OTBU. Cerent enterprise OID provided by IANA is used.')
cerentRegistry = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1))
if mibBuilder.loadTexts: cerentRegistry.setStatus('current')
if mibBuilder.loadTexts: cerentRegistry.setDescription('Sub-tree for registrations for all Cisco OTBU modules.')
cerentGeneric = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 2))
if mibBuilder.loadTexts: cerentGeneric.setStatus('current')
if mibBuilder.loadTexts: cerentGeneric.setDescription('Sub-tree for common object and event definitions.')
cerentGenericDummyObjects = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 2, 1))
if mibBuilder.loadTexts: cerentGenericDummyObjects.setStatus('current')
if mibBuilder.loadTexts: cerentGenericDummyObjects.setDescription('Sub-tree for object and event definitions which are defined for compilation compatibility reasons. These objects will never be implemented!')
cerentExperimental = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 3))
if mibBuilder.loadTexts: cerentExperimental.setStatus('current')
if mibBuilder.loadTexts: cerentExperimental.setDescription('cerentExperimental provides a root object identifier from which experimental MIBs may be temporarily based. A MIB module in the cerentExperimental sub-tree will be moved under cerentGeneric or cerentProducts whenever the development of that module is deemed completed.')
cerentAgentCapabilities = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 4))
if mibBuilder.loadTexts: cerentAgentCapabilities.setStatus('current')
if mibBuilder.loadTexts: cerentAgentCapabilities.setDescription('cerentAgentCaps provides a root object identifier from which AGENT-CAPABILITIES values may be assigned.')
cerentRequirements = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 5))
if mibBuilder.loadTexts: cerentRequirements.setStatus('current')
if mibBuilder.loadTexts: cerentRequirements.setDescription('Sub-tree for management application requirements.')
cerentProducts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 6))
if mibBuilder.loadTexts: cerentProducts.setStatus('current')
if mibBuilder.loadTexts: cerentProducts.setDescription('Sub-tree for specific object and event definitions.')
cerentModules = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 10))
if mibBuilder.loadTexts: cerentModules.setStatus('current')
if mibBuilder.loadTexts: cerentModules.setDescription('Sub-tree to register MIB modules.')
cerentCommunicationEquipment = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20))
if mibBuilder.loadTexts: cerentCommunicationEquipment.setStatus('current')
if mibBuilder.loadTexts: cerentCommunicationEquipment.setDescription('Sub-tree to register all Cisco manufactured equipment (OTBU only).')
cerentComponents = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30))
if mibBuilder.loadTexts: cerentComponents.setStatus('current')
if mibBuilder.loadTexts: cerentComponents.setDescription('Sub-tree to register all Cisco OTBU boards.')
cerentADMs = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10))
if mibBuilder.loadTexts: cerentADMs.setStatus('current')
if mibBuilder.loadTexts: cerentADMs.setDescription('Sub-tree to register Cisco OTBU products - Switches.')
cerentDwdmDevices = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 20))
if mibBuilder.loadTexts: cerentDwdmDevices.setStatus('current')
if mibBuilder.loadTexts: cerentDwdmDevices.setDescription('Sub-tree to register Cisco OTBU products - DWDM devices.')
cerent454Node = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 10))
if mibBuilder.loadTexts: cerent454Node.setStatus('current')
if mibBuilder.loadTexts: cerent454Node.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15454')
cerent327Node = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 20))
if mibBuilder.loadTexts: cerent327Node.setStatus('current')
if mibBuilder.loadTexts: cerent327Node.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15327')
cerent600Node = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 30))
if mibBuilder.loadTexts: cerent600Node.setStatus('current')
if mibBuilder.loadTexts: cerent600Node.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15600')
cerent310Node = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 40))
if mibBuilder.loadTexts: cerent310Node.setStatus('current')
if mibBuilder.loadTexts: cerent310Node.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15310')
cerent310MaAnsiNode = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 50))
if mibBuilder.loadTexts: cerent310MaAnsiNode.setStatus('current')
if mibBuilder.loadTexts: cerent310MaAnsiNode.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15310-MA SONET MULTISERVICE PLATFORM')
cerent310MaEtsiNode = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 60))
if mibBuilder.loadTexts: cerent310MaEtsiNode.setStatus('current')
if mibBuilder.loadTexts: cerent310MaEtsiNode.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15310-MA SDH MULTISERVICE PLATFORM')
cerent454M6Node = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 70))
if mibBuilder.loadTexts: cerent454M6Node.setStatus('current')
if mibBuilder.loadTexts: cerent454M6Node.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15456-M6 MULTISERVICE PLATFORM')
cerent454M2Node = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 80))
if mibBuilder.loadTexts: cerent454M2Node.setStatus('current')
if mibBuilder.loadTexts: cerent454M2Node.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15456-M2 MULTISERVICE PLATFORM')
cerent15216OpmNode = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 20, 10))
if mibBuilder.loadTexts: cerent15216OpmNode.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmNode.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15216 OPM')
cerent15216EdfaNode = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 20, 20))
if mibBuilder.loadTexts: cerent15216EdfaNode.setStatus('current')
if mibBuilder.loadTexts: cerent15216EdfaNode.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15216 EDFA')
cerentOtherComponent = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1))
if mibBuilder.loadTexts: cerentOtherComponent.setStatus('current')
if mibBuilder.loadTexts: cerentOtherComponent.setDescription('An unknown component is installed or the component type is unavailable.')
cerentTcc = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 10))
if mibBuilder.loadTexts: cerentTcc.setStatus('current')
if mibBuilder.loadTexts: cerentTcc.setDescription('The OID definition for Cisco OTBU Timing Communications and Control card.')
cerentXc = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 20))
if mibBuilder.loadTexts: cerentXc.setStatus('current')
if mibBuilder.loadTexts: cerentXc.setDescription('The OID definition for Cross Connect card.')
cerentDs114 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 30))
if mibBuilder.loadTexts: cerentDs114.setStatus('current')
if mibBuilder.loadTexts: cerentDs114.setDescription('The OID definition for DS1-14 card.')
cerentDs1n14 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 40))
if mibBuilder.loadTexts: cerentDs1n14.setStatus('current')
if mibBuilder.loadTexts: cerentDs1n14.setDescription('The OID definition for DS1N-14 card.')
cerentDs312 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 50))
if mibBuilder.loadTexts: cerentDs312.setStatus('current')
if mibBuilder.loadTexts: cerentDs312.setDescription('The OID definition for DS3-12 card.')
cerentOc3ir = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 60))
if mibBuilder.loadTexts: cerentOc3ir.setStatus('current')
if mibBuilder.loadTexts: cerentOc3ir.setDescription('The OID definition for OC3-IR card.')
cerentOc12ir = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 70))
if mibBuilder.loadTexts: cerentOc12ir.setStatus('current')
if mibBuilder.loadTexts: cerentOc12ir.setDescription('The OID definition for OC12-IR card.')
cerentOc12lr1310 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 80))
if mibBuilder.loadTexts: cerentOc12lr1310.setStatus('current')
if mibBuilder.loadTexts: cerentOc12lr1310.setDescription('The OID definition for OC12-LR-1310 card.')
cerentOc48ir = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 90))
if mibBuilder.loadTexts: cerentOc48ir.setStatus('current')
if mibBuilder.loadTexts: cerentOc48ir.setDescription('The OID definition for OC48-IR card.')
cerentOc48lr = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 100))
if mibBuilder.loadTexts: cerentOc48lr.setStatus('current')
if mibBuilder.loadTexts: cerentOc48lr.setDescription('The OID definition for OC48-LR card.')
cerentFanTray = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 110))
if mibBuilder.loadTexts: cerentFanTray.setStatus('current')
if mibBuilder.loadTexts: cerentFanTray.setDescription('')
cerentFanSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 120))
if mibBuilder.loadTexts: cerentFanSlot.setStatus('current')
if mibBuilder.loadTexts: cerentFanSlot.setDescription('')
cerentIoSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 130))
if mibBuilder.loadTexts: cerentIoSlot.setStatus('current')
if mibBuilder.loadTexts: cerentIoSlot.setDescription('')
cerentXcSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 140))
if mibBuilder.loadTexts: cerentXcSlot.setStatus('current')
if mibBuilder.loadTexts: cerentXcSlot.setDescription('')
cerentAicSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 150))
if mibBuilder.loadTexts: cerentAicSlot.setStatus('current')
if mibBuilder.loadTexts: cerentAicSlot.setDescription('')
cerentTccSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 160))
if mibBuilder.loadTexts: cerentTccSlot.setStatus('current')
if mibBuilder.loadTexts: cerentTccSlot.setDescription('')
cerentBackPlane454 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 170))
if mibBuilder.loadTexts: cerentBackPlane454.setStatus('current')
if mibBuilder.loadTexts: cerentBackPlane454.setDescription('')
cerentChassis454 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 180))
if mibBuilder.loadTexts: cerentChassis454.setStatus('current')
if mibBuilder.loadTexts: cerentChassis454.setDescription('')
cerentPowerSupply = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1500))
if mibBuilder.loadTexts: cerentPowerSupply.setStatus('current')
if mibBuilder.loadTexts: cerentPowerSupply.setDescription('Power Supply')
cerentDs3nCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 190))
if mibBuilder.loadTexts: cerentDs3nCard.setStatus('current')
if mibBuilder.loadTexts: cerentDs3nCard.setDescription('Ds3n card.')
cerentDs3XmCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 200))
if mibBuilder.loadTexts: cerentDs3XmCard.setStatus('current')
if mibBuilder.loadTexts: cerentDs3XmCard.setDescription('Ds3Xm card.')
cerentOc3Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 210))
if mibBuilder.loadTexts: cerentOc3Card.setStatus('current')
if mibBuilder.loadTexts: cerentOc3Card.setDescription('Oc3 card.')
cerentOc3OctaCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 212))
if mibBuilder.loadTexts: cerentOc3OctaCard.setStatus('current')
if mibBuilder.loadTexts: cerentOc3OctaCard.setDescription('Oc3-8 card.')
cerentOc12Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 220))
if mibBuilder.loadTexts: cerentOc12Card.setStatus('current')
if mibBuilder.loadTexts: cerentOc12Card.setDescription('Oc12 card.')
cerentOc48Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 230))
if mibBuilder.loadTexts: cerentOc48Card.setStatus('current')
if mibBuilder.loadTexts: cerentOc48Card.setDescription('Oc48 card.')
cerentEc1Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 240))
if mibBuilder.loadTexts: cerentEc1Card.setStatus('current')
if mibBuilder.loadTexts: cerentEc1Card.setDescription('Ec1 card.')
cerentEc1nCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 250))
if mibBuilder.loadTexts: cerentEc1nCard.setStatus('current')
if mibBuilder.loadTexts: cerentEc1nCard.setDescription('Ec1n card.')
cerentEpos100Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 260))
if mibBuilder.loadTexts: cerentEpos100Card.setStatus('current')
if mibBuilder.loadTexts: cerentEpos100Card.setDescription('EPOS 100 card.')
cerentEpos1000Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 270))
if mibBuilder.loadTexts: cerentEpos1000Card.setStatus('current')
if mibBuilder.loadTexts: cerentEpos1000Card.setDescription('EPOS 1000 card.')
cerentAicCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 280))
if mibBuilder.loadTexts: cerentAicCard.setStatus('current')
if mibBuilder.loadTexts: cerentAicCard.setDescription('AIC card.')
cerentXcVtCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 290))
if mibBuilder.loadTexts: cerentXcVtCard.setStatus('current')
if mibBuilder.loadTexts: cerentXcVtCard.setDescription('VT cross connect card.')
cerentEther1000Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 300))
if mibBuilder.loadTexts: cerentEther1000Port.setStatus('current')
if mibBuilder.loadTexts: cerentEther1000Port.setDescription('Ether1000 port.')
cerentEther100Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 310))
if mibBuilder.loadTexts: cerentEther100Port.setStatus('current')
if mibBuilder.loadTexts: cerentEther100Port.setDescription('Ether100 port.')
cerentDs1VtMappedPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 320))
if mibBuilder.loadTexts: cerentDs1VtMappedPort.setStatus('current')
if mibBuilder.loadTexts: cerentDs1VtMappedPort.setDescription('Mapped Ds1-Vt port.')
cerentDs3XmPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 330))
if mibBuilder.loadTexts: cerentDs3XmPort.setStatus('current')
if mibBuilder.loadTexts: cerentDs3XmPort.setDescription('Ds3Xm port.')
cerentDs3Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 340))
if mibBuilder.loadTexts: cerentDs3Port.setStatus('current')
if mibBuilder.loadTexts: cerentDs3Port.setDescription('Ds3 port.')
cerentEc1Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 350))
if mibBuilder.loadTexts: cerentEc1Port.setStatus('current')
if mibBuilder.loadTexts: cerentEc1Port.setDescription('Ec1 port.')
cerentOc3Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 360))
if mibBuilder.loadTexts: cerentOc3Port.setStatus('current')
if mibBuilder.loadTexts: cerentOc3Port.setDescription('Oc3 port.')
cerentOc12Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 370))
if mibBuilder.loadTexts: cerentOc12Port.setStatus('current')
if mibBuilder.loadTexts: cerentOc12Port.setDescription('Oc12 port.')
cerentDs1E156LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1470))
if mibBuilder.loadTexts: cerentDs1E156LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentDs1E156LineCard.setDescription('Cerent DS1 E1 56 Port Line Card')
cerentMrc12LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1480))
if mibBuilder.loadTexts: cerentMrc12LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentMrc12LineCard.setDescription('Cerent Multirate 12 Port Line Card')
cerentOc192XfpLineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1490))
if mibBuilder.loadTexts: cerentOc192XfpLineCard.setStatus('current')
if mibBuilder.loadTexts: cerentOc192XfpLineCard.setDescription('Cerent OC192 XFP Line card')
cerentOc48Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 380))
if mibBuilder.loadTexts: cerentOc48Port.setStatus('current')
if mibBuilder.loadTexts: cerentOc48Port.setDescription('Oc48 port.')
cerentOrderwirePort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 390))
if mibBuilder.loadTexts: cerentOrderwirePort.setStatus('current')
if mibBuilder.loadTexts: cerentOrderwirePort.setDescription('Orderwire port.')
cerentSensorComponent = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 400))
if mibBuilder.loadTexts: cerentSensorComponent.setStatus('current')
if mibBuilder.loadTexts: cerentSensorComponent.setDescription('Misc. sensor component.')
cerentChassis15327 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 410))
if mibBuilder.loadTexts: cerentChassis15327.setStatus('current')
if mibBuilder.loadTexts: cerentChassis15327.setDescription('Chassis of 15327')
cerentBackPlane15327 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 420))
if mibBuilder.loadTexts: cerentBackPlane15327.setStatus('current')
if mibBuilder.loadTexts: cerentBackPlane15327.setDescription('Backplane of 15327')
cerentXtcCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 430))
if mibBuilder.loadTexts: cerentXtcCard.setStatus('current')
if mibBuilder.loadTexts: cerentXtcCard.setDescription('Xtc Card')
cerentMicCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 440))
if mibBuilder.loadTexts: cerentMicCard.setStatus('current')
if mibBuilder.loadTexts: cerentMicCard.setDescription('Mic Card')
cerentMicExtCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 450))
if mibBuilder.loadTexts: cerentMicExtCard.setStatus('current')
if mibBuilder.loadTexts: cerentMicExtCard.setDescription('Mic Ext Card')
cerentXtcSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 460))
if mibBuilder.loadTexts: cerentXtcSlot.setStatus('current')
if mibBuilder.loadTexts: cerentXtcSlot.setDescription('Xtc Slot')
cerentMicSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 470))
if mibBuilder.loadTexts: cerentMicSlot.setStatus('current')
if mibBuilder.loadTexts: cerentMicSlot.setDescription('Mic Slot')
cerentVicEncoderLineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 480))
if mibBuilder.loadTexts: cerentVicEncoderLineCard.setStatus('current')
if mibBuilder.loadTexts: cerentVicEncoderLineCard.setDescription('Vic Encoder Line Card')
cerentVicDecoderLineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 490))
if mibBuilder.loadTexts: cerentVicDecoderLineCard.setStatus('current')
if mibBuilder.loadTexts: cerentVicDecoderLineCard.setDescription('Vic Decoder Line Card')
cerentVicEncoderPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 500))
if mibBuilder.loadTexts: cerentVicEncoderPort.setStatus('current')
if mibBuilder.loadTexts: cerentVicEncoderPort.setDescription('Vic Encoder Port')
cerentVicDecoderPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 510))
if mibBuilder.loadTexts: cerentVicDecoderPort.setStatus('current')
if mibBuilder.loadTexts: cerentVicDecoderPort.setDescription('Vic Decoder Port')
cerentVicTestPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 520))
if mibBuilder.loadTexts: cerentVicTestPort.setStatus('current')
if mibBuilder.loadTexts: cerentVicTestPort.setDescription('Vic Test Port')
cerentAip = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 530))
if mibBuilder.loadTexts: cerentAip.setStatus('current')
if mibBuilder.loadTexts: cerentAip.setDescription('')
cerentBicSmb = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 540))
if mibBuilder.loadTexts: cerentBicSmb.setStatus('current')
if mibBuilder.loadTexts: cerentBicSmb.setDescription('Backplane interface card - SMB connector')
cerentBicBnc = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 550))
if mibBuilder.loadTexts: cerentBicBnc.setStatus('current')
if mibBuilder.loadTexts: cerentBicBnc.setDescription('Backplane interface card - BNC connector')
cerentFcb = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 560))
if mibBuilder.loadTexts: cerentFcb.setStatus('current')
if mibBuilder.loadTexts: cerentFcb.setDescription('')
cerentEnvironmentControl = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 570))
if mibBuilder.loadTexts: cerentEnvironmentControl.setStatus('current')
if mibBuilder.loadTexts: cerentEnvironmentControl.setDescription('Environment Control')
cerentLedIndicator = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 580))
if mibBuilder.loadTexts: cerentLedIndicator.setStatus('current')
if mibBuilder.loadTexts: cerentLedIndicator.setDescription('LED Indicator')
cerentAudibleAlarm = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 590))
if mibBuilder.loadTexts: cerentAudibleAlarm.setStatus('current')
if mibBuilder.loadTexts: cerentAudibleAlarm.setDescription('Audible Alarm')
cerentXc10g = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 600))
if mibBuilder.loadTexts: cerentXc10g.setStatus('current')
if mibBuilder.loadTexts: cerentXc10g.setDescription('Cross Connect 192 card')
cerentOc192Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 610))
if mibBuilder.loadTexts: cerentOc192Card.setStatus('current')
if mibBuilder.loadTexts: cerentOc192Card.setDescription('OC192 Card')
cerentOc192Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 620))
if mibBuilder.loadTexts: cerentOc192Port.setStatus('current')
if mibBuilder.loadTexts: cerentOc192Port.setDescription('OC192 Port')
cerentDs3eCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 630))
if mibBuilder.loadTexts: cerentDs3eCard.setStatus('current')
if mibBuilder.loadTexts: cerentDs3eCard.setDescription('DS3E Line Card')
cerentDs3neCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 640))
if mibBuilder.loadTexts: cerentDs3neCard.setStatus('current')
if mibBuilder.loadTexts: cerentDs3neCard.setDescription('DS3NE Line Card')
cerent15216OpmChassis = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 650))
if mibBuilder.loadTexts: cerent15216OpmChassis.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmChassis.setDescription('')
cerent15216OpmBackPlane = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 660))
if mibBuilder.loadTexts: cerent15216OpmBackPlane.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmBackPlane.setDescription('')
cerent15216OpmSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 670))
if mibBuilder.loadTexts: cerent15216OpmSlot.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmSlot.setDescription('')
cerent15216OpmController = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 680))
if mibBuilder.loadTexts: cerent15216OpmController.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmController.setDescription('OPM Controller Module')
cerent15216OpmSpectrometer = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 690))
if mibBuilder.loadTexts: cerent15216OpmSpectrometer.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmSpectrometer.setDescription('OPM Spectrometer Module')
cerent15216OpmOpticalSwitch = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 700))
if mibBuilder.loadTexts: cerent15216OpmOpticalSwitch.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmOpticalSwitch.setDescription('OPM Optical Switch Module')
cerent15216OpmOpticalPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 710))
if mibBuilder.loadTexts: cerent15216OpmOpticalPort.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmOpticalPort.setDescription('OPM Optical Port')
cerent15216OpmSerialPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 720))
if mibBuilder.loadTexts: cerent15216OpmSerialPort.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmSerialPort.setDescription('OPM RS-232 port for Craft')
cerent15216OpmLedIndicator = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 730))
if mibBuilder.loadTexts: cerent15216OpmLedIndicator.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmLedIndicator.setDescription('OPM LED')
cerent15216OpmRelay = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 740))
if mibBuilder.loadTexts: cerent15216OpmRelay.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmRelay.setDescription('OPM Relay')
cerent15216OpmPowerSupply = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 750))
if mibBuilder.loadTexts: cerent15216OpmPowerSupply.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmPowerSupply.setDescription('OPM Power Supply')
cerent15216OpmPcmciaSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 760))
if mibBuilder.loadTexts: cerent15216OpmPcmciaSlot.setStatus('current')
if mibBuilder.loadTexts: cerent15216OpmPcmciaSlot.setDescription('OPM PCMCIA slot')
cerentOc12QuadCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 770))
if mibBuilder.loadTexts: cerentOc12QuadCard.setStatus('current')
if mibBuilder.loadTexts: cerentOc12QuadCard.setDescription('Four Port OC12 Line Card')
cerentG1000QuadCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 780))
if mibBuilder.loadTexts: cerentG1000QuadCard.setStatus('deprecated')
if mibBuilder.loadTexts: cerentG1000QuadCard.setDescription('G1000-4 Card')
cerentG1000Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 790))
if mibBuilder.loadTexts: cerentG1000Port.setStatus('current')
if mibBuilder.loadTexts: cerentG1000Port.setDescription('G1000 Port')
cerentMlEtherPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 791))
if mibBuilder.loadTexts: cerentMlEtherPort.setStatus('current')
if mibBuilder.loadTexts: cerentMlEtherPort.setDescription('Ether Port on ML Series Ether card')
cerentMlPosPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 792))
if mibBuilder.loadTexts: cerentMlPosPort.setStatus('current')
if mibBuilder.loadTexts: cerentMlPosPort.setDescription('POS Port on ML Series Ether card')
cerentG1000GenericCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 800))
if mibBuilder.loadTexts: cerentG1000GenericCard.setStatus('current')
if mibBuilder.loadTexts: cerentG1000GenericCard.setDescription('G1000 Card')
cerentML100GenericCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 801))
if mibBuilder.loadTexts: cerentML100GenericCard.setStatus('current')
if mibBuilder.loadTexts: cerentML100GenericCard.setDescription('ML100T ether Card')
cerentML1000GenericCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 802))
if mibBuilder.loadTexts: cerentML1000GenericCard.setStatus('current')
if mibBuilder.loadTexts: cerentML1000GenericCard.setDescription('ML1000T ether Card')
cerentG1K4Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 810))
if mibBuilder.loadTexts: cerentG1K4Card.setStatus('current')
if mibBuilder.loadTexts: cerentG1K4Card.setDescription('G1K-4 Card')
cerentOc192IrCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 820))
if mibBuilder.loadTexts: cerentOc192IrCard.setStatus('current')
if mibBuilder.loadTexts: cerentOc192IrCard.setDescription('OC192 Intermediate Reach Card')
cerentOc192LrCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 830))
if mibBuilder.loadTexts: cerentOc192LrCard.setStatus('current')
if mibBuilder.loadTexts: cerentOc192LrCard.setDescription('OC192 Long Reach Card')
cerentOc192ItuCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 840))
if mibBuilder.loadTexts: cerentOc192ItuCard.setStatus('current')
if mibBuilder.loadTexts: cerentOc192ItuCard.setDescription('OC192 ITU Card')
cerentOc3n1Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 850))
if mibBuilder.loadTexts: cerentOc3n1Card.setStatus('current')
if mibBuilder.loadTexts: cerentOc3n1Card.setDescription('OC3 1-port Card')
ape = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 860))
if mibBuilder.loadTexts: ape.setStatus('current')
if mibBuilder.loadTexts: ape.setDescription('')
oneGePort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 870))
if mibBuilder.loadTexts: oneGePort.setStatus('current')
if mibBuilder.loadTexts: oneGePort.setDescription('1 GBit/Sec Ethernet Port')
tenGePort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 880))
if mibBuilder.loadTexts: tenGePort.setStatus('current')
if mibBuilder.loadTexts: tenGePort.setDescription('10 GBit/Sec Ethernet Port')
esconPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 890))
if mibBuilder.loadTexts: esconPort.setStatus('current')
if mibBuilder.loadTexts: esconPort.setDescription('')
dv6000Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 900))
if mibBuilder.loadTexts: dv6000Port.setStatus('current')
if mibBuilder.loadTexts: dv6000Port.setDescription('')
cerentE1n14 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 910))
if mibBuilder.loadTexts: cerentE1n14.setStatus('current')
if mibBuilder.loadTexts: cerentE1n14.setDescription('The OID definition for E1N-14 card.')
cerentBackPlane454SDH = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 911))
if mibBuilder.loadTexts: cerentBackPlane454SDH.setStatus('current')
if mibBuilder.loadTexts: cerentBackPlane454SDH.setDescription('')
cerentChassis454SDH = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 912))
if mibBuilder.loadTexts: cerentChassis454SDH.setStatus('current')
if mibBuilder.loadTexts: cerentChassis454SDH.setDescription('')
cerentDs3inCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 913))
if mibBuilder.loadTexts: cerentDs3inCard.setStatus('current')
if mibBuilder.loadTexts: cerentDs3inCard.setDescription('Ds3in card.')
cerentE312Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 914))
if mibBuilder.loadTexts: cerentE312Card.setStatus('current')
if mibBuilder.loadTexts: cerentE312Card.setDescription('E3-12 card.')
cerentE1Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 915))
if mibBuilder.loadTexts: cerentE1Port.setStatus('current')
if mibBuilder.loadTexts: cerentE1Port.setDescription('E1 port.')
cerentDs3iPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 916))
if mibBuilder.loadTexts: cerentDs3iPort.setStatus('current')
if mibBuilder.loadTexts: cerentDs3iPort.setDescription('Ds3i port.')
cerentE3Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 917))
if mibBuilder.loadTexts: cerentE3Port.setStatus('current')
if mibBuilder.loadTexts: cerentE3Port.setDescription('E3 port')
cerentAlmPwrSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 918))
if mibBuilder.loadTexts: cerentAlmPwrSlot.setStatus('current')
if mibBuilder.loadTexts: cerentAlmPwrSlot.setDescription('EFCA Alarm/Power slot')
cerentCrftTmgSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 919))
if mibBuilder.loadTexts: cerentCrftTmgSlot.setStatus('current')
if mibBuilder.loadTexts: cerentCrftTmgSlot.setDescription('EFCA Craft/Timing Slot')
cerentAlmPwr = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 920))
if mibBuilder.loadTexts: cerentAlmPwr.setStatus('current')
if mibBuilder.loadTexts: cerentAlmPwr.setDescription('EFCA Alarm/Power Card')
cerentCrftTmg = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 921))
if mibBuilder.loadTexts: cerentCrftTmg.setStatus('current')
if mibBuilder.loadTexts: cerentCrftTmg.setDescription('EFCA Craft/Timing Card')
cerentFmecDb = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 922))
if mibBuilder.loadTexts: cerentFmecDb.setStatus('current')
if mibBuilder.loadTexts: cerentFmecDb.setDescription('FMEC-DB card')
cerentFmecSmzE1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 923))
if mibBuilder.loadTexts: cerentFmecSmzE1.setStatus('current')
if mibBuilder.loadTexts: cerentFmecSmzE1.setDescription('FMEC-SMZ-E1 card')
cerentFmecBlank = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 924))
if mibBuilder.loadTexts: cerentFmecBlank.setStatus('current')
if mibBuilder.loadTexts: cerentFmecBlank.setDescription('FMEC-BLANK card')
cerentXcVxlCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 925))
if mibBuilder.loadTexts: cerentXcVxlCard.setStatus('current')
if mibBuilder.loadTexts: cerentXcVxlCard.setDescription('VC cross connect card.')
cerentEfca454Sdh = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 926))
if mibBuilder.loadTexts: cerentEfca454Sdh.setStatus('current')
if mibBuilder.loadTexts: cerentEfca454Sdh.setDescription('EFCA')
cerentFmecSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 927))
if mibBuilder.loadTexts: cerentFmecSlot.setStatus('current')
if mibBuilder.loadTexts: cerentFmecSlot.setDescription('FMEC Slot')
cerentFmecSmzE3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 928))
if mibBuilder.loadTexts: cerentFmecSmzE3.setStatus('current')
if mibBuilder.loadTexts: cerentFmecSmzE3.setDescription('FMEC Slot')
cerentDs3i = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 929))
if mibBuilder.loadTexts: cerentDs3i.setStatus('current')
if mibBuilder.loadTexts: cerentDs3i.setDescription('FMEC Slot')
cerent15216EdfaChassis = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 930))
if mibBuilder.loadTexts: cerent15216EdfaChassis.setStatus('current')
if mibBuilder.loadTexts: cerent15216EdfaChassis.setDescription('')
cerentAici = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 931))
if mibBuilder.loadTexts: cerentAici.setStatus('current')
if mibBuilder.loadTexts: cerentAici.setDescription('Aici Card')
cerentFudcPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 932))
if mibBuilder.loadTexts: cerentFudcPort.setStatus('current')
if mibBuilder.loadTexts: cerentFudcPort.setDescription('Aici F-UDC Port')
cerentDccPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 933))
if mibBuilder.loadTexts: cerentDccPort.setStatus('current')
if mibBuilder.loadTexts: cerentDccPort.setDescription('Aici DCC-UDC Port')
cerentAiciAep = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 934))
if mibBuilder.loadTexts: cerentAiciAep.setStatus('current')
if mibBuilder.loadTexts: cerentAiciAep.setDescription('Aici Alarm Expansion Panel')
cerentAiciAie = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 935))
if mibBuilder.loadTexts: cerentAiciAie.setStatus('current')
if mibBuilder.loadTexts: cerentAiciAie.setDescription('Aici Alarm Interface Extension')
cerentXcVxl25GCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 936))
if mibBuilder.loadTexts: cerentXcVxl25GCard.setStatus('current')
if mibBuilder.loadTexts: cerentXcVxl25GCard.setDescription('XCVXL25G card')
cerentE114 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 937))
if mibBuilder.loadTexts: cerentE114.setStatus('current')
if mibBuilder.loadTexts: cerentE114.setDescription('The OID definition for E1-14 card.')
cerentPIMSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 940))
if mibBuilder.loadTexts: cerentPIMSlot.setStatus('current')
if mibBuilder.loadTexts: cerentPIMSlot.setDescription('Pluggable IO Module Slot')
cerentPIM4PPM = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 950))
if mibBuilder.loadTexts: cerentPIM4PPM.setStatus('current')
if mibBuilder.loadTexts: cerentPIM4PPM.setDescription('Pluggable IO Module containing 4 Pluggable Port Modules.')
cerentPPMSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 960))
if mibBuilder.loadTexts: cerentPPMSlot.setStatus('current')
if mibBuilder.loadTexts: cerentPPMSlot.setDescription('Pluggable Port Module Slot')
cerentPPM1Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 970))
if mibBuilder.loadTexts: cerentPPM1Port.setStatus('current')
if mibBuilder.loadTexts: cerentPPM1Port.setDescription('Pluggable Port Module containing one Port')
cerentChassis15310ClOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1000))
if mibBuilder.loadTexts: cerentChassis15310ClOid.setStatus('current')
if mibBuilder.loadTexts: cerentChassis15310ClOid.setDescription('Chassis of ONS15310 CL')
cerentChassis15310MaAnsiOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1010))
if mibBuilder.loadTexts: cerentChassis15310MaAnsiOid.setStatus('current')
if mibBuilder.loadTexts: cerentChassis15310MaAnsiOid.setDescription('Chassis of ONS15310 MA ANSI')
cerentChassis15310MaEtsiOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1020))
if mibBuilder.loadTexts: cerentChassis15310MaEtsiOid.setStatus('current')
if mibBuilder.loadTexts: cerentChassis15310MaEtsiOid.setDescription('Chassis of ONS15310 MA ETSI')
cerentBackplane15310ClOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1030))
if mibBuilder.loadTexts: cerentBackplane15310ClOid.setStatus('current')
if mibBuilder.loadTexts: cerentBackplane15310ClOid.setDescription('Backplane of ONS15310 CL')
cerentBackplane15310MaAnsiOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1040))
if mibBuilder.loadTexts: cerentBackplane15310MaAnsiOid.setStatus('current')
if mibBuilder.loadTexts: cerentBackplane15310MaAnsiOid.setDescription('Backplane of ONS15310 MA ANSI')
cerentBackplane15310MaEtsiOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1050))
if mibBuilder.loadTexts: cerentBackplane15310MaEtsiOid.setStatus('current')
if mibBuilder.loadTexts: cerentBackplane15310MaEtsiOid.setDescription('Backplane of ONS15310 MA ETSI')
cerentCtxCardOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1060))
if mibBuilder.loadTexts: cerentCtxCardOid.setStatus('current')
if mibBuilder.loadTexts: cerentCtxCardOid.setDescription('CTX Card')
cerentBbeLineCardOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1070))
if mibBuilder.loadTexts: cerentBbeLineCardOid.setStatus('current')
if mibBuilder.loadTexts: cerentBbeLineCardOid.setDescription('BBE Line Card')
cerentWbeLineCardOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1080))
if mibBuilder.loadTexts: cerentWbeLineCardOid.setStatus('current')
if mibBuilder.loadTexts: cerentWbeLineCardOid.setDescription('WBE Line Card')
cerentCtxSlotOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1090))
if mibBuilder.loadTexts: cerentCtxSlotOid.setStatus('current')
if mibBuilder.loadTexts: cerentCtxSlotOid.setDescription('CTX Slot')
cerentBbeSlotOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1100))
if mibBuilder.loadTexts: cerentBbeSlotOid.setStatus('current')
if mibBuilder.loadTexts: cerentBbeSlotOid.setDescription('BBE Slot')
cerentWbeSlotOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1110))
if mibBuilder.loadTexts: cerentWbeSlotOid.setStatus('current')
if mibBuilder.loadTexts: cerentWbeSlotOid.setDescription('WBE Slot')
cerentAsap4LineCardOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1120))
if mibBuilder.loadTexts: cerentAsap4LineCardOid.setStatus('current')
if mibBuilder.loadTexts: cerentAsap4LineCardOid.setDescription('ASAP Four Ports Line Card')
cerentMrc4LineCardOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1130))
if mibBuilder.loadTexts: cerentMrc4LineCardOid.setStatus('current')
if mibBuilder.loadTexts: cerentMrc4LineCardOid.setDescription('MRC Four ports Line Card')
cerent310CE100t8LineCardOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1140))
if mibBuilder.loadTexts: cerent310CE100t8LineCardOid.setStatus('current')
if mibBuilder.loadTexts: cerent310CE100t8LineCardOid.setDescription('ML2 Mapper Line Card')
cerent310ML100t8LineCardOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1150))
if mibBuilder.loadTexts: cerent310ML100t8LineCardOid.setStatus('current')
if mibBuilder.loadTexts: cerent310ML100t8LineCardOid.setDescription('ML2 L2L3 Line Card')
cerentL1PPosPortOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1160))
if mibBuilder.loadTexts: cerentL1PPosPortOid.setStatus('current')
if mibBuilder.loadTexts: cerentL1PPosPortOid.setDescription('L1P POS port')
cerentL1PEtherPortOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1170))
if mibBuilder.loadTexts: cerentL1PEtherPortOid.setStatus('current')
if mibBuilder.loadTexts: cerentL1PEtherPortOid.setDescription('L1P Ether port')
fc10gPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1180))
if mibBuilder.loadTexts: fc10gPort.setStatus('current')
if mibBuilder.loadTexts: fc10gPort.setDescription('10 GBit/Sec Fiber Channel Port')
ficon1gport = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1190))
if mibBuilder.loadTexts: ficon1gport.setStatus('current')
if mibBuilder.loadTexts: ficon1gport.setDescription('')
ficon2gport = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1200))
if mibBuilder.loadTexts: ficon2gport.setStatus('current')
if mibBuilder.loadTexts: ficon2gport.setDescription('')
ficon4gport = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1710))
if mibBuilder.loadTexts: ficon4gport.setStatus('current')
if mibBuilder.loadTexts: ficon4gport.setDescription('')
cerentOc192Card4Ports = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1210))
if mibBuilder.loadTexts: cerentOc192Card4Ports.setStatus('current')
if mibBuilder.loadTexts: cerentOc192Card4Ports.setDescription('ONS OC192 4 ports I/O card')
cerentOc48Card8Ports = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1215))
if mibBuilder.loadTexts: cerentOc48Card8Ports.setStatus('current')
if mibBuilder.loadTexts: cerentOc48Card8Ports.setDescription('ONS OC48 8 ports I/O card')
cerentOc48Card16Ports = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1220))
if mibBuilder.loadTexts: cerentOc48Card16Ports.setStatus('current')
if mibBuilder.loadTexts: cerentOc48Card16Ports.setDescription('ONS OC48 16 ports I/O card')
cerent15600ControllerSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1225))
if mibBuilder.loadTexts: cerent15600ControllerSlot.setStatus('current')
if mibBuilder.loadTexts: cerent15600ControllerSlot.setDescription('ONS 15600 controller card slot')
cerentTsc = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1230))
if mibBuilder.loadTexts: cerentTsc.setStatus('current')
if mibBuilder.loadTexts: cerentTsc.setDescription('ONS 15600 Timing Shelf Controller card')
cerentChassis600 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1235))
if mibBuilder.loadTexts: cerentChassis600.setStatus('current')
if mibBuilder.loadTexts: cerentChassis600.setDescription('Chassis of ONS 15600')
cerentBackPlane600 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1240))
if mibBuilder.loadTexts: cerentBackPlane600.setStatus('current')
if mibBuilder.loadTexts: cerentBackPlane600.setDescription('Backplane of ONS 15600')
cerentCap = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1245))
if mibBuilder.loadTexts: cerentCap.setStatus('current')
if mibBuilder.loadTexts: cerentCap.setDescription('ONS 15600 Customer Access Panel')
cerentCxc = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1250))
if mibBuilder.loadTexts: cerentCxc.setStatus('current')
if mibBuilder.loadTexts: cerentCxc.setDescription('ONS 15600 Cross Connect Card')
cerentCxcSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1255))
if mibBuilder.loadTexts: cerentCxcSlot.setStatus('current')
if mibBuilder.loadTexts: cerentCxcSlot.setDescription('ONS 15600 Cross Connect Card Slot')
cerentFillerCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1260))
if mibBuilder.loadTexts: cerentFillerCard.setStatus('current')
if mibBuilder.loadTexts: cerentFillerCard.setDescription('ONS 15600 Filler Card')
cerentFcmrLineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1265))
if mibBuilder.loadTexts: cerentFcmrLineCard.setStatus('current')
if mibBuilder.loadTexts: cerentFcmrLineCard.setDescription('')
cerentFcmrPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1270))
if mibBuilder.loadTexts: cerentFcmrPort.setStatus('current')
if mibBuilder.loadTexts: cerentFcmrPort.setDescription('')
cerentDs3Xm12Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1285))
if mibBuilder.loadTexts: cerentDs3Xm12Card.setStatus('current')
if mibBuilder.loadTexts: cerentDs3Xm12Card.setDescription('Ds3Xm12 card.')
ds3Ec148LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1290))
if mibBuilder.loadTexts: ds3Ec148LineCard.setStatus('current')
if mibBuilder.loadTexts: ds3Ec148LineCard.setDescription('')
gfpPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1300))
if mibBuilder.loadTexts: gfpPort.setStatus('current')
if mibBuilder.loadTexts: gfpPort.setDescription('')
cerent454CE100t8LineCardOid = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1310))
if mibBuilder.loadTexts: cerent454CE100t8LineCardOid.setStatus('current')
if mibBuilder.loadTexts: cerent454CE100t8LineCardOid.setDescription('')
bicUniv = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1320))
if mibBuilder.loadTexts: bicUniv.setStatus('current')
if mibBuilder.loadTexts: bicUniv.setDescription('')
bicUnknown = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1330))
if mibBuilder.loadTexts: bicUnknown.setStatus('current')
if mibBuilder.loadTexts: bicUnknown.setDescription('')
sdiD1VideoPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1340))
if mibBuilder.loadTexts: sdiD1VideoPort.setStatus('current')
if mibBuilder.loadTexts: sdiD1VideoPort.setDescription('')
hdtvPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1350))
if mibBuilder.loadTexts: hdtvPort.setStatus('current')
if mibBuilder.loadTexts: hdtvPort.setDescription('')
passThruPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1360))
if mibBuilder.loadTexts: passThruPort.setStatus('current')
if mibBuilder.loadTexts: passThruPort.setDescription('')
etrCloPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1370))
if mibBuilder.loadTexts: etrCloPort.setStatus('current')
if mibBuilder.loadTexts: etrCloPort.setDescription('')
iscPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1380))
if mibBuilder.loadTexts: iscPort.setStatus('current')
if mibBuilder.loadTexts: iscPort.setDescription('')
fc1gPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1390))
if mibBuilder.loadTexts: fc1gPort.setStatus('current')
if mibBuilder.loadTexts: fc1gPort.setDescription('')
fc2gPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1400))
if mibBuilder.loadTexts: fc2gPort.setStatus('current')
if mibBuilder.loadTexts: fc2gPort.setDescription('')
fc4gPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1700))
if mibBuilder.loadTexts: fc4gPort.setStatus('current')
if mibBuilder.loadTexts: fc4gPort.setDescription('')
mrSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1410))
if mibBuilder.loadTexts: mrSlot.setStatus('current')
if mibBuilder.loadTexts: mrSlot.setDescription('')
isc3Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1420))
if mibBuilder.loadTexts: isc3Port.setStatus('current')
if mibBuilder.loadTexts: isc3Port.setDescription('')
isc3Peer1gPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1720))
if mibBuilder.loadTexts: isc3Peer1gPort.setStatus('current')
if mibBuilder.loadTexts: isc3Peer1gPort.setDescription('')
isc3Peer2gPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1730))
if mibBuilder.loadTexts: isc3Peer2gPort.setStatus('current')
if mibBuilder.loadTexts: isc3Peer2gPort.setDescription('')
cerentDs1i14 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1430))
if mibBuilder.loadTexts: cerentDs1i14.setStatus('current')
if mibBuilder.loadTexts: cerentDs1i14.setDescription('The OID definition for DS1I-14 card.')
cerentFmecDs1i14 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1440))
if mibBuilder.loadTexts: cerentFmecDs1i14.setStatus('current')
if mibBuilder.loadTexts: cerentFmecDs1i14.setDescription('The OID definition for FMEC-SMZ-DS1I-14 card.')
cerentBackPlane454HD = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1450))
if mibBuilder.loadTexts: cerentBackPlane454HD.setStatus('current')
if mibBuilder.loadTexts: cerentBackPlane454HD.setDescription('15454 High Density Backplane')
cerentTxpd10GCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1550))
if mibBuilder.loadTexts: cerentTxpd10GCard.setStatus('current')
if mibBuilder.loadTexts: cerentTxpd10GCard.setDescription('TXP_MR_10G_LINE_CARD')
cerentTxpd10ECard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1275))
if mibBuilder.loadTexts: cerentTxpd10ECard.setStatus('current')
if mibBuilder.loadTexts: cerentTxpd10ECard.setDescription('TXP_MR_10E_LINE_CARD')
cerentTxpd25GCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1560))
if mibBuilder.loadTexts: cerentTxpd25GCard.setStatus('current')
if mibBuilder.loadTexts: cerentTxpd25GCard.setDescription('TXP_MR_2_5G_LINE_CARD')
cerentTxpdP25GCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1570))
if mibBuilder.loadTexts: cerentTxpdP25GCard.setStatus('current')
if mibBuilder.loadTexts: cerentTxpdP25GCard.setDescription('TXPP_MR_2_5G_LINE_CARD')
cerentTxpd10EXCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4160))
if mibBuilder.loadTexts: cerentTxpd10EXCard.setStatus('current')
if mibBuilder.loadTexts: cerentTxpd10EXCard.setDescription('TXP-MR-10EX_LINE_CARD')
cerentOtu2Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4220))
if mibBuilder.loadTexts: cerentOtu2Port.setStatus('current')
if mibBuilder.loadTexts: cerentOtu2Port.setDescription('Otu2 port.')
cerentTxpdP10EXCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4165))
if mibBuilder.loadTexts: cerentTxpdP10EXCard.setStatus('current')
if mibBuilder.loadTexts: cerentTxpdP10EXCard.setDescription('TXPP-MR-10EX_LINE_CARD')
cerentMuxpd25G10GCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1580))
if mibBuilder.loadTexts: cerentMuxpd25G10GCard.setStatus('current')
if mibBuilder.loadTexts: cerentMuxpd25G10GCard.setDescription('MXP_2_5G_10G_LINE_CARD')
cerentMuxpd25G10ECard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1280))
if mibBuilder.loadTexts: cerentMuxpd25G10ECard.setStatus('current')
if mibBuilder.loadTexts: cerentMuxpd25G10ECard.setDescription('MXP_2_5G_10E_LINE_CARD')
cerentMuxpd25G10XCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4170))
if mibBuilder.loadTexts: cerentMuxpd25G10XCard.setStatus('current')
if mibBuilder.loadTexts: cerentMuxpd25G10XCard.setDescription('MXP_2_5G_10X_LINE_CARD')
cerentDwdmClientPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1590))
if mibBuilder.loadTexts: cerentDwdmClientPort.setStatus('current')
if mibBuilder.loadTexts: cerentDwdmClientPort.setDescription('DWDM client port.')
cerentDwdmTrunkPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1600))
if mibBuilder.loadTexts: cerentDwdmTrunkPort.setStatus('current')
if mibBuilder.loadTexts: cerentDwdmTrunkPort.setDescription('DWDM trunk port.')
cerentMuxpdMr25GCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1610))
if mibBuilder.loadTexts: cerentMuxpdMr25GCard.setStatus('current')
if mibBuilder.loadTexts: cerentMuxpdMr25GCard.setDescription('MXP_MR_2_5G_LINE_CARD.')
cerentMuxpdPMr25GCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1620))
if mibBuilder.loadTexts: cerentMuxpdPMr25GCard.setStatus('current')
if mibBuilder.loadTexts: cerentMuxpdPMr25GCard.setDescription('MXPP_MR_2_5G_LINE_CARD.')
cerentMxpMr10DmexCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4270))
if mibBuilder.loadTexts: cerentMxpMr10DmexCard.setStatus('current')
if mibBuilder.loadTexts: cerentMxpMr10DmexCard.setDescription('MXP-MR-10DMEX card.')
cerentXpdGECard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4210))
if mibBuilder.loadTexts: cerentXpdGECard.setStatus('current')
if mibBuilder.loadTexts: cerentXpdGECard.setDescription('GE_XP_LINE_CARD.')
cerentXpd10GECard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4205))
if mibBuilder.loadTexts: cerentXpd10GECard.setStatus('current')
if mibBuilder.loadTexts: cerentXpd10GECard.setDescription('10GE_XP_LINE_CARD.')
cerentMm850Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1630))
if mibBuilder.loadTexts: cerentMm850Port.setStatus('current')
if mibBuilder.loadTexts: cerentMm850Port.setDescription('MM_850_PORT.')
cerentSm1310Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1640))
if mibBuilder.loadTexts: cerentSm1310Port.setStatus('current')
if mibBuilder.loadTexts: cerentSm1310Port.setDescription('SM_1310_PORT.')
cerentXcVxcCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1670))
if mibBuilder.loadTexts: cerentXcVxcCard.setStatus('current')
if mibBuilder.loadTexts: cerentXcVxcCard.setDescription('VC cross connect card.')
cerentXcVxc25GCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1680))
if mibBuilder.loadTexts: cerentXcVxc25GCard.setStatus('current')
if mibBuilder.loadTexts: cerentXcVxc25GCard.setDescription('XCVXC 2.5G card')
cerentOptBstECard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1690))
if mibBuilder.loadTexts: cerentOptBstECard.setStatus('current')
if mibBuilder.loadTexts: cerentOptBstECard.setDescription('Enhanced Optical Booster Card.')
cerentE1P42LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4000))
if mibBuilder.loadTexts: cerentE1P42LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentE1P42LineCard.setDescription('E1_42_LINE_CARD.')
cerentE1nP42LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4005))
if mibBuilder.loadTexts: cerentE1nP42LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentE1nP42LineCard.setDescription('E1N_42_LINE_CARD.')
cerentFmecE1P42TypeUnprotW120Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4010))
if mibBuilder.loadTexts: cerentFmecE1P42TypeUnprotW120Card.setStatus('current')
if mibBuilder.loadTexts: cerentFmecE1P42TypeUnprotW120Card.setDescription('FMEC_E1_42_UNPROT_120_CARD.')
cerentFmecE1P42Type1To3W120aCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4015))
if mibBuilder.loadTexts: cerentFmecE1P42Type1To3W120aCard.setStatus('current')
if mibBuilder.loadTexts: cerentFmecE1P42Type1To3W120aCard.setDescription('FMEC_E1_42_1TO3_120A_CARD.')
cerentFmecE1P42Type1To3W120bCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4020))
if mibBuilder.loadTexts: cerentFmecE1P42Type1To3W120bCard.setStatus('current')
if mibBuilder.loadTexts: cerentFmecE1P42Type1To3W120bCard.setDescription('FMEC_E1_42_1TO3_120B_CARD.')
cerentStm1e12LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4025))
if mibBuilder.loadTexts: cerentStm1e12LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentStm1e12LineCard.setDescription('STM1E_12_LINE_CARD.')
cerentStm1ePort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4030))
if mibBuilder.loadTexts: cerentStm1ePort.setStatus('current')
if mibBuilder.loadTexts: cerentStm1ePort.setDescription('STM1E_PORT.')
cerentFmec155eUnprotCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4035))
if mibBuilder.loadTexts: cerentFmec155eUnprotCard.setStatus('current')
if mibBuilder.loadTexts: cerentFmec155eUnprotCard.setDescription('FMEC_155E_CARD_UNPROT.')
cerentFmec155e1To1Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4040))
if mibBuilder.loadTexts: cerentFmec155e1To1Card.setStatus('current')
if mibBuilder.loadTexts: cerentFmec155e1To1Card.setDescription('FMEC_155E_CARD_1TO1.')
cerentFmec155e1To3Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4045))
if mibBuilder.loadTexts: cerentFmec155e1To3Card.setStatus('current')
if mibBuilder.loadTexts: cerentFmec155e1To3Card.setDescription('FMEC_155E_CARD_1TO3.')
cerent15216Edfa3ShelfController = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4050))
if mibBuilder.loadTexts: cerent15216Edfa3ShelfController.setStatus('current')
if mibBuilder.loadTexts: cerent15216Edfa3ShelfController.setDescription('')
cerent15216Edfa3OpticsModule = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4051))
if mibBuilder.loadTexts: cerent15216Edfa3OpticsModule.setStatus('current')
if mibBuilder.loadTexts: cerent15216Edfa3OpticsModule.setDescription('')
cerent15216EdfaEtherPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4052))
if mibBuilder.loadTexts: cerent15216EdfaEtherPort.setStatus('current')
if mibBuilder.loadTexts: cerent15216EdfaEtherPort.setDescription('Ether port.')
cerent15216EdfaSerialPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4053))
if mibBuilder.loadTexts: cerent15216EdfaSerialPort.setStatus('current')
if mibBuilder.loadTexts: cerent15216EdfaSerialPort.setDescription('Serial port.')
cerentMl100X8LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4055))
if mibBuilder.loadTexts: cerentMl100X8LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentMl100X8LineCard.setDescription('ML-100X 8-ports Card.')
cerentOscmCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3200))
if mibBuilder.loadTexts: cerentOscmCard.setStatus('current')
if mibBuilder.loadTexts: cerentOscmCard.setDescription('Optical Service Channel Module Card.')
cerentOscCsmCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3205))
if mibBuilder.loadTexts: cerentOscCsmCard.setStatus('current')
if mibBuilder.loadTexts: cerentOscCsmCard.setDescription('Optical Service Channel with COmbiner/Separator module Card.')
cerentOptPreCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3210))
if mibBuilder.loadTexts: cerentOptPreCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptPreCard.setDescription('Optical Pre-Amplifier Card.')
cerentOptBstCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3215))
if mibBuilder.loadTexts: cerentOptBstCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptBstCard.setDescription('Optical Booster Card.')
cerentOptAmp17Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4175))
if mibBuilder.loadTexts: cerentOptAmp17Card.setStatus('current')
if mibBuilder.loadTexts: cerentOptAmp17Card.setDescription('Low Gain C-Band Amplifier.')
cerentOptAmp23Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4180))
if mibBuilder.loadTexts: cerentOptAmp23Card.setStatus('current')
if mibBuilder.loadTexts: cerentOptAmp23Card.setDescription('High Gain C-Band Amplifier.')
cerentOptDemux32ChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3220))
if mibBuilder.loadTexts: cerentOptDemux32ChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptDemux32ChCard.setDescription('Optical De-Mutiplexer 32 Channels Card.')
cerentOptDemux40ChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4195))
if mibBuilder.loadTexts: cerentOptDemux40ChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptDemux40ChCard.setDescription('Optical De-Mutiplexer 40 Channels Card.')
cerentOptMux32ChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3225))
if mibBuilder.loadTexts: cerentOptMux32ChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptMux32ChCard.setDescription('Optical Mutiplexer 32 Channels Card.')
cerentOptMux40ChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4190))
if mibBuilder.loadTexts: cerentOptMux40ChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptMux40ChCard.setDescription('Optical Mutiplexer 40 Channels Card.')
cerentOptWxc40ChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4200))
if mibBuilder.loadTexts: cerentOptWxc40ChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptWxc40ChCard.setDescription('Optical Wavelenght Cross Connect 40 Channels Card.')
cerentOptMuxDemux4ChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3230))
if mibBuilder.loadTexts: cerentOptMuxDemux4ChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptMuxDemux4ChCard.setDescription('Optical Multiplexer/De-Mutiplexer 4 Channels Card.')
cerentOadm1ChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3235))
if mibBuilder.loadTexts: cerentOadm1ChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOadm1ChCard.setDescription('Optical ADM with 1 Channel Card.')
cerentOadm2ChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3240))
if mibBuilder.loadTexts: cerentOadm2ChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOadm2ChCard.setDescription('Optical ADM with 2 Channels Card.')
cerentOadm4ChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3245))
if mibBuilder.loadTexts: cerentOadm4ChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOadm4ChCard.setDescription('Optical ADM with 4 Channels Card.')
cerentOadm1BnCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3250))
if mibBuilder.loadTexts: cerentOadm1BnCard.setStatus('current')
if mibBuilder.loadTexts: cerentOadm1BnCard.setDescription('Optical ADM with 1 Band Card.')
cerentOadm10GCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4215))
if mibBuilder.loadTexts: cerentOadm10GCard.setStatus('current')
if mibBuilder.loadTexts: cerentOadm10GCard.setDescription('Optical ADM 10G Card.')
cerentOadm4BnCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3255))
if mibBuilder.loadTexts: cerentOadm4BnCard.setStatus('current')
if mibBuilder.loadTexts: cerentOadm4BnCard.setDescription('Optical ADM with 4 Bands Card.')
cerentOptDemux32RChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 980))
if mibBuilder.loadTexts: cerentOptDemux32RChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptDemux32RChCard.setDescription('Optical De-Mutiplexer 32 Channels Reconfigurable Card.')
cerentOptWss32ChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 990))
if mibBuilder.loadTexts: cerentOptWss32ChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptWss32ChCard.setDescription('Optical Wavelenght Selectable Switch 32 Channels Reconfigurable Card.')
cerentOptWss40ChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4185))
if mibBuilder.loadTexts: cerentOptWss40ChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptWss40ChCard.setDescription('Optical Wavelenght Selectable Switch 40 Channels Reconfigurable Card.')
cerentOTSPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3260))
if mibBuilder.loadTexts: cerentOTSPort.setStatus('current')
if mibBuilder.loadTexts: cerentOTSPort.setDescription('Optical Transport Port.')
cerentAOTSPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3265))
if mibBuilder.loadTexts: cerentAOTSPort.setStatus('current')
if mibBuilder.loadTexts: cerentAOTSPort.setDescription('Optical Amplifier Transport Port.')
cerentOMSPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3270))
if mibBuilder.loadTexts: cerentOMSPort.setStatus('current')
if mibBuilder.loadTexts: cerentOMSPort.setDescription('Optical Multiplex Section Port.')
cerentOCHPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3275))
if mibBuilder.loadTexts: cerentOCHPort.setStatus('current')
if mibBuilder.loadTexts: cerentOCHPort.setDescription('Optical Channel Port.')
cerentOptBstLCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4060))
if mibBuilder.loadTexts: cerentOptBstLCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptBstLCard.setDescription('L-band amplifier.')
cerentOptAmpLCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4065))
if mibBuilder.loadTexts: cerentOptAmpLCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptAmpLCard.setDescription('L-band pre-amplifier.')
cerentOptAmpCCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4255))
if mibBuilder.loadTexts: cerentOptAmpCCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptAmpCCard.setDescription('C-band amplifier.')
cerentOptRAmpCCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4285))
if mibBuilder.loadTexts: cerentOptRAmpCCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptRAmpCCard.setDescription('C-band RAMAN amplifier.')
cerentOptRAmpECard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4287))
if mibBuilder.loadTexts: cerentOptRAmpECard.setStatus('current')
if mibBuilder.loadTexts: cerentOptRAmpECard.setDescription('C-band Enhanced RAMAN amplifier.')
cerentDmx32LCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4070))
if mibBuilder.loadTexts: cerentDmx32LCard.setStatus('current')
if mibBuilder.loadTexts: cerentDmx32LCard.setDescription('L-band 32 ch. demux.')
cerentWss32LCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4075))
if mibBuilder.loadTexts: cerentWss32LCard.setStatus('current')
if mibBuilder.loadTexts: cerentWss32LCard.setDescription('L-band 32 ch. WSS.')
cerentWss40LCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4225))
if mibBuilder.loadTexts: cerentWss40LCard.setStatus('current')
if mibBuilder.loadTexts: cerentWss40LCard.setDescription('L-band 40 ch. WSS.')
cerentWssCE40Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4260))
if mibBuilder.loadTexts: cerentWssCE40Card.setStatus('current')
if mibBuilder.loadTexts: cerentWssCE40Card.setDescription('CE 40 ch. WSS.')
cerentMux40LCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4230))
if mibBuilder.loadTexts: cerentMux40LCard.setStatus('current')
if mibBuilder.loadTexts: cerentMux40LCard.setDescription('L-band 40 ch. MUX.')
cerentDmx40LCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4235))
if mibBuilder.loadTexts: cerentDmx40LCard.setStatus('current')
if mibBuilder.loadTexts: cerentDmx40LCard.setDescription('L-band 40 ch. DMX.')
cerentDmxCE40Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4265))
if mibBuilder.loadTexts: cerentDmxCE40Card.setStatus('current')
if mibBuilder.loadTexts: cerentDmxCE40Card.setDescription('CE 40 ch. DMX.')
cerentWxc40LCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4240))
if mibBuilder.loadTexts: cerentWxc40LCard.setStatus('current')
if mibBuilder.loadTexts: cerentWxc40LCard.setDescription('L-band 40 ch. WXC.')
cerentMMUCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4080))
if mibBuilder.loadTexts: cerentMMUCard.setStatus('current')
if mibBuilder.loadTexts: cerentMMUCard.setDescription('MMU.')
cerentPSMCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4282))
if mibBuilder.loadTexts: cerentPSMCard.setStatus('current')
if mibBuilder.loadTexts: cerentPSMCard.setDescription('PSM.')
cerentXP10G4LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4290))
if mibBuilder.loadTexts: cerentXP10G4LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentXP10G4LineCard.setDescription('XP_4_10G_LINE_CARD.')
cerent40SMR1Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4305))
if mibBuilder.loadTexts: cerent40SMR1Card.setStatus('current')
if mibBuilder.loadTexts: cerent40SMR1Card.setDescription('40 SMR1 C')
cerent40SMR2Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4310))
if mibBuilder.loadTexts: cerent40SMR2Card.setStatus('current')
if mibBuilder.loadTexts: cerent40SMR2Card.setDescription('40 SMR2 C')
cerentOptWxc80ChCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4315))
if mibBuilder.loadTexts: cerentOptWxc80ChCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptWxc80ChCard.setDescription('Optical Wavelenght Cross Connect 80 Channels Card.')
cerentBackPlaneM2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4510))
if mibBuilder.loadTexts: cerentBackPlaneM2.setStatus('current')
if mibBuilder.loadTexts: cerentBackPlaneM2.setDescription('Backplane for UTS-TNC M2 platform')
cerentChassisM2Ansi = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4520))
if mibBuilder.loadTexts: cerentChassisM2Ansi.setStatus('current')
if mibBuilder.loadTexts: cerentChassisM2Ansi.setDescription('Chassis for UTS-TNC M2 ANSI platform')
cerentChassisM2Etsi = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4530))
if mibBuilder.loadTexts: cerentChassisM2Etsi.setStatus('current')
if mibBuilder.loadTexts: cerentChassisM2Etsi.setDescription('Backplane for UTS-TNC M2 SDH platform')
cerentBackPlaneM6 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4540))
if mibBuilder.loadTexts: cerentBackPlaneM6.setStatus('current')
if mibBuilder.loadTexts: cerentBackPlaneM6.setDescription('Back plane for M6')
cerentChassisM6Ansi = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4550))
if mibBuilder.loadTexts: cerentChassisM6Ansi.setStatus('current')
if mibBuilder.loadTexts: cerentChassisM6Ansi.setDescription('Cerent Chassis M6 Ansi')
cerentChassisM6Etsi = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4560))
if mibBuilder.loadTexts: cerentChassisM6Etsi.setStatus('current')
if mibBuilder.loadTexts: cerentChassisM6Etsi.setDescription('Chassis for UTS-TNC M6 platform')
cerentPowerSupplyUts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4570))
if mibBuilder.loadTexts: cerentPowerSupplyUts.setStatus('current')
if mibBuilder.loadTexts: cerentPowerSupplyUts.setDescription('Power supply for UTS mounted on ECU')
cerentFlashUts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4580))
if mibBuilder.loadTexts: cerentFlashUts.setStatus('current')
if mibBuilder.loadTexts: cerentFlashUts.setDescription('FALSH unit for UTS mounted on ECU')
cerentAicInUts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4590))
if mibBuilder.loadTexts: cerentAicInUts.setStatus('current')
if mibBuilder.loadTexts: cerentAicInUts.setDescription('AIC IN on ECU ')
cerentAicOutUts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4600))
if mibBuilder.loadTexts: cerentAicOutUts.setStatus('current')
if mibBuilder.loadTexts: cerentAicOutUts.setDescription('AIC OUT for ECU')
cerentIscEqptUts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4610))
if mibBuilder.loadTexts: cerentIscEqptUts.setStatus('current')
if mibBuilder.loadTexts: cerentIscEqptUts.setDescription('ISC eqpt on ECU')
cerentUdcVoipEmsUts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4620))
if mibBuilder.loadTexts: cerentUdcVoipEmsUts.setStatus('current')
if mibBuilder.loadTexts: cerentUdcVoipEmsUts.setDescription('UDC VOIP unit on ECU')
cerentBitsUts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4630))
if mibBuilder.loadTexts: cerentBitsUts.setStatus('current')
if mibBuilder.loadTexts: cerentBitsUts.setDescription('BITS unit on ECU')
cerentFanTrayUts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4640))
if mibBuilder.loadTexts: cerentFanTrayUts.setStatus('current')
if mibBuilder.loadTexts: cerentFanTrayUts.setDescription('FAN Tray UTS')
cerentAlarmDryContactUts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4645))
if mibBuilder.loadTexts: cerentAlarmDryContactUts.setStatus('current')
if mibBuilder.loadTexts: cerentAlarmDryContactUts.setDescription('Alarm Dry Contact UTS')
cerentIoUts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4660))
if mibBuilder.loadTexts: cerentIoUts.setStatus('current')
if mibBuilder.loadTexts: cerentIoUts.setDescription('IO UTS')
cerentEcuTray = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4670))
if mibBuilder.loadTexts: cerentEcuTray.setStatus('current')
if mibBuilder.loadTexts: cerentEcuTray.setDescription('ECU Tray')
cerentTncUtsCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4680))
if mibBuilder.loadTexts: cerentTncUtsCard.setStatus('current')
if mibBuilder.loadTexts: cerentTncUtsCard.setDescription('Transport Node Controller UTS card')
cerentTscUtsCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4690))
if mibBuilder.loadTexts: cerentTscUtsCard.setStatus('current')
if mibBuilder.loadTexts: cerentTscUtsCard.setDescription('Transport Shelf Controller UTS card')
cerentUsbUtsPortCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4655))
if mibBuilder.loadTexts: cerentUsbUtsPortCard.setStatus('current')
if mibBuilder.loadTexts: cerentUsbUtsPortCard.setDescription('UTS USB Port ')
cerentUsbUts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4650))
if mibBuilder.loadTexts: cerentUsbUts.setStatus('current')
if mibBuilder.loadTexts: cerentUsbUts.setDescription('UTS USB Module ')
cerentTncTscUtsSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4700))
if mibBuilder.loadTexts: cerentTncTscUtsSlot.setStatus('current')
if mibBuilder.loadTexts: cerentTncTscUtsSlot.setDescription('Transport Node Controller Universal Transport Shelf Slot')
cerentEcuSlot = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4710))
if mibBuilder.loadTexts: cerentEcuSlot.setStatus('current')
if mibBuilder.loadTexts: cerentEcuSlot.setDescription('ECU slot')
cerentMscIscUtsPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4720))
if mibBuilder.loadTexts: cerentMscIscUtsPort.setStatus('current')
if mibBuilder.loadTexts: cerentMscIscUtsPort.setDescription('Multi Shelf Controller - Inter shelf Controller')
cerentTncFePort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4730))
if mibBuilder.loadTexts: cerentTncFePort.setStatus('current')
if mibBuilder.loadTexts: cerentTncFePort.setDescription('FE Port')
cerentPtSystem = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4740))
if mibBuilder.loadTexts: cerentPtSystem.setStatus('current')
if mibBuilder.loadTexts: cerentPtSystem.setDescription('CPT System - NGXP System')
cerentPtf10GECard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4745))
if mibBuilder.loadTexts: cerentPtf10GECard.setStatus('current')
if mibBuilder.loadTexts: cerentPtf10GECard.setDescription('CPT System - Uplink Card')
cerentPt10GECard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4750))
if mibBuilder.loadTexts: cerentPt10GECard.setStatus('current')
if mibBuilder.loadTexts: cerentPt10GECard.setDescription('CPT System - TRIB Card')
cerentPtsaGECard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4755))
if mibBuilder.loadTexts: cerentPtsaGECard.setStatus('current')
if mibBuilder.loadTexts: cerentPtsaGECard.setDescription('CPT System - Satellite Box')
cerentMsIsc100tCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4085))
if mibBuilder.loadTexts: cerentMsIsc100tCard.setStatus('current')
if mibBuilder.loadTexts: cerentMsIsc100tCard.setDescription('ms-isc-100t.')
cerentMxpMr10DmeCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4090))
if mibBuilder.loadTexts: cerentMxpMr10DmeCard.setStatus('current')
if mibBuilder.loadTexts: cerentMxpMr10DmeCard.setDescription('mxp-mr-10dme.')
cerentCE1000Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4095))
if mibBuilder.loadTexts: cerentCE1000Card.setStatus('current')
if mibBuilder.loadTexts: cerentCE1000Card.setDescription('CE1000 card')
cerentCE1000EtherPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4100))
if mibBuilder.loadTexts: cerentCE1000EtherPort.setStatus('current')
if mibBuilder.loadTexts: cerentCE1000EtherPort.setDescription('Ether Port on CE1000 card')
cerentCE1000PosPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4105))
if mibBuilder.loadTexts: cerentCE1000PosPort.setStatus('current')
if mibBuilder.loadTexts: cerentCE1000PosPort.setDescription('POS Port on CE1000 card')
cerentPIM1PPM = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4110))
if mibBuilder.loadTexts: cerentPIM1PPM.setStatus('current')
if mibBuilder.loadTexts: cerentPIM1PPM.setDescription('Pluggable IO Module containing 1 Pluggable Port Modules.')
cerentCEMR454Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4115))
if mibBuilder.loadTexts: cerentCEMR454Card.setStatus('current')
if mibBuilder.loadTexts: cerentCEMR454Card.setDescription('CEMR 454 card')
cerentCEMR310Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4120))
if mibBuilder.loadTexts: cerentCEMR310Card.setStatus('current')
if mibBuilder.loadTexts: cerentCEMR310Card.setDescription('CEMR 310 card')
cerentCTX2500Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4125))
if mibBuilder.loadTexts: cerentCTX2500Card.setStatus('current')
if mibBuilder.loadTexts: cerentCTX2500Card.setDescription('CTX 2500 Card')
cerentDs128Ds3EC13LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4130))
if mibBuilder.loadTexts: cerentDs128Ds3EC13LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentDs128Ds3EC13LineCard.setDescription('DS1 28 ports, DS3 EC1 Line Card')
cerentDs184Ds3EC13LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4135))
if mibBuilder.loadTexts: cerentDs184Ds3EC13LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentDs184Ds3EC13LineCard.setDescription('DS1 84 ports, DS3 EC1 Line Card')
cerentDs3EC16LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4140))
if mibBuilder.loadTexts: cerentDs3EC16LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentDs3EC16LineCard.setDescription('DS3 EC1 Line Card')
cerentBicTelco = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4145))
if mibBuilder.loadTexts: cerentBicTelco.setStatus('current')
if mibBuilder.loadTexts: cerentBicTelco.setDescription('Backplane Interface Card -- Telco')
cerentBicCmn = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4150))
if mibBuilder.loadTexts: cerentBicCmn.setStatus('current')
if mibBuilder.loadTexts: cerentBicCmn.setDescription('Backplane Interface Card -- Cmn')
cerentRanSvcLineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4155))
if mibBuilder.loadTexts: cerentRanSvcLineCard.setStatus('current')
if mibBuilder.loadTexts: cerentRanSvcLineCard.setDescription('Radio Access Network Service Card')
cerentIlkPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4245))
if mibBuilder.loadTexts: cerentIlkPort.setStatus('current')
if mibBuilder.loadTexts: cerentIlkPort.setDescription('Interl Link Port on 10G ADM card')
cerentOc192Card4PortsDwdm = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4250))
if mibBuilder.loadTexts: cerentOc192Card4PortsDwdm.setStatus('current')
if mibBuilder.loadTexts: cerentOc192Card4PortsDwdm.setDescription('OC192 4Ports DWDM Card')
cerentMrc25G12LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4275))
if mibBuilder.loadTexts: cerentMrc25G12LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentMrc25G12LineCard.setDescription('Multi Rate Card 2.5G with 12 ports')
cerentMrc25G4LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4280))
if mibBuilder.loadTexts: cerentMrc25G4LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentMrc25G4LineCard.setDescription('Multi Rate Card 2.5G with 4 ports')
cerentE121E3DS33LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4295))
if mibBuilder.loadTexts: cerentE121E3DS33LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentE121E3DS33LineCard.setDescription('E1 21 ports, E3 DS3 Line Card')
cerentE163E3DS33LineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4300))
if mibBuilder.loadTexts: cerentE163E3DS33LineCard.setStatus('current')
if mibBuilder.loadTexts: cerentE163E3DS33LineCard.setDescription('E1 63 ports, E3 DS3 Line Card')
cerentMd40OddPassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4320))
if mibBuilder.loadTexts: cerentMd40OddPassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentMd40OddPassiveUnit.setDescription('Passive Mux Dmx Odd')
cerentMd40EvenPassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4325))
if mibBuilder.loadTexts: cerentMd40EvenPassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentMd40EvenPassiveUnit.setDescription('Passive Mux Dmx Even')
cerentMdId50PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4330))
if mibBuilder.loadTexts: cerentMdId50PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentMdId50PassiveUnit.setDescription('Passive interleav/deinterleav')
cerentPP4SMRPassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4335))
if mibBuilder.loadTexts: cerentPP4SMRPassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentPP4SMRPassiveUnit.setDescription('15216 PP 4 mesh unit')
cerentPPMESH4PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4340))
if mibBuilder.loadTexts: cerentPPMESH4PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentPPMESH4PassiveUnit.setDescription('15454 PP MESH 4 unit')
cerentPPMESH8PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4345))
if mibBuilder.loadTexts: cerentPPMESH8PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentPPMESH8PassiveUnit.setDescription('15454 PP MESH 8 unit')
cerentDcuPassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4350))
if mibBuilder.loadTexts: cerentDcuPassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentDcuPassiveUnit.setDescription('Passive DCU unit')
cerentCTDcuPassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4355))
if mibBuilder.loadTexts: cerentCTDcuPassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentCTDcuPassiveUnit.setDescription('Coarse Tunable DCU unit')
cerentFTDcuPassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4360))
if mibBuilder.loadTexts: cerentFTDcuPassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFTDcuPassiveUnit.setDescription('Fine Tunable DCU unit')
fortyGePort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4365))
if mibBuilder.loadTexts: fortyGePort.setStatus('current')
if mibBuilder.loadTexts: fortyGePort.setDescription('40 GBit/Sec Ethernet Port')
fc8gPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4370))
if mibBuilder.loadTexts: fc8gPort.setStatus('current')
if mibBuilder.loadTexts: fc8gPort.setDescription('8 GBit/Sec Fiber Channel Port')
cerentOtu3Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4375))
if mibBuilder.loadTexts: cerentOtu3Port.setStatus('current')
if mibBuilder.loadTexts: cerentOtu3Port.setDescription('OTU3 port.')
cerentOc768Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4380))
if mibBuilder.loadTexts: cerentOc768Port.setStatus('current')
if mibBuilder.loadTexts: cerentOc768Port.setDescription('Oc768 port.')
cerentMechanicalUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4385))
if mibBuilder.loadTexts: cerentMechanicalUnit.setStatus('current')
if mibBuilder.loadTexts: cerentMechanicalUnit.setDescription('Mechanical Unit.')
cerent40GTxpCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4390))
if mibBuilder.loadTexts: cerent40GTxpCard.setStatus('current')
if mibBuilder.loadTexts: cerent40GTxpCard.setDescription('40GBit/s. Transponder C Band.')
cerent40GMxpCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4395))
if mibBuilder.loadTexts: cerent40GMxpCard.setStatus('current')
if mibBuilder.loadTexts: cerent40GMxpCard.setDescription('40GBit/s. Muxponder C Band.')
cerent40EMxpCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4400))
if mibBuilder.loadTexts: cerent40EMxpCard.setStatus('current')
if mibBuilder.loadTexts: cerent40EMxpCard.setDescription('40GBit/s. Muxponder C Band.')
cerentArXpCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4535))
if mibBuilder.loadTexts: cerentArXpCard.setStatus('current')
if mibBuilder.loadTexts: cerentArXpCard.setDescription('Any Rate Transponder/MuxPonder Card')
cerentArMxpCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4545))
if mibBuilder.loadTexts: cerentArMxpCard.setStatus('current')
if mibBuilder.loadTexts: cerentArMxpCard.setDescription('Any Rate TXP/MXP Card')
cerent15216ID50PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4405))
if mibBuilder.loadTexts: cerent15216ID50PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerent15216ID50PassiveUnit.setDescription('15216 interleav/deinterleav')
cerent40ETxpCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4415))
if mibBuilder.loadTexts: cerent40ETxpCard.setStatus('current')
if mibBuilder.loadTexts: cerent40ETxpCard.setDescription('40GBit/s. Transponder C Band.')
cerentOtu1Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4725))
if mibBuilder.loadTexts: cerentOtu1Port.setStatus('current')
if mibBuilder.loadTexts: cerentOtu1Port.setDescription('OTU1 Port.')
cerentIsc3stp1gPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4732))
if mibBuilder.loadTexts: cerentIsc3stp1gPort.setStatus('current')
if mibBuilder.loadTexts: cerentIsc3stp1gPort.setDescription('ISC3STP1G Port.')
cerentIsc3stp2gPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4735))
if mibBuilder.loadTexts: cerentIsc3stp2gPort.setStatus('current')
if mibBuilder.loadTexts: cerentIsc3stp2gPort.setDescription('ISC3STP2G Port.')
cerentSdi3gvideoPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4742))
if mibBuilder.loadTexts: cerentSdi3gvideoPort.setStatus('current')
if mibBuilder.loadTexts: cerentSdi3gvideoPort.setDescription('SDI3GVIDEO Port.')
cerentAutoPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4747))
if mibBuilder.loadTexts: cerentAutoPort.setStatus('current')
if mibBuilder.loadTexts: cerentAutoPort.setDescription('AUTO Port.')
cerentOptEdfa17Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4420))
if mibBuilder.loadTexts: cerentOptEdfa17Card.setStatus('current')
if mibBuilder.loadTexts: cerentOptEdfa17Card.setDescription('Low Gain C-Band Edfa Amplifier.')
cerentOptEdfa24Card = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4425))
if mibBuilder.loadTexts: cerentOptEdfa24Card.setStatus('current')
if mibBuilder.loadTexts: cerentOptEdfa24Card.setDescription('High Gain C-Band Edfa Amplifier.')
cerentFld303PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4760))
if mibBuilder.loadTexts: cerentFld303PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFld303PassiveUnit.setDescription('Fld 303 Passive Unit')
cerentFld334PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4765))
if mibBuilder.loadTexts: cerentFld334PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFld334PassiveUnit.setDescription(' cerent Fld 334 Passive Unit')
cerentFld366PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4770))
if mibBuilder.loadTexts: cerentFld366PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFld366PassiveUnit.setDescription('cerent Fld 366 Passive Unit')
cerentFld397PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4775))
if mibBuilder.loadTexts: cerentFld397PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFld397PassiveUnit.setDescription('cerent Fld 397 Passive Unit')
cerentFld429PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4780))
if mibBuilder.loadTexts: cerentFld429PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFld429PassiveUnit.setDescription('cerent Fld 429 Passive Unit')
cerentFld461PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4785))
if mibBuilder.loadTexts: cerentFld461PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFld461PassiveUnit.setDescription('cerent Fld 461 Passive Unit')
cerentFld493PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4790))
if mibBuilder.loadTexts: cerentFld493PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFld493PassiveUnit.setDescription('cerent Fld 493 Passive Unit')
cerentFld525PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4795))
if mibBuilder.loadTexts: cerentFld525PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFld525PassiveUnit.setDescription('cerent Fld 525 Passive Unit')
cerentFld557PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4800))
if mibBuilder.loadTexts: cerentFld557PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFld557PassiveUnit.setDescription('cerent Fld 557 Passive Unit')
cerentFld589PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4805))
if mibBuilder.loadTexts: cerentFld589PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFld589PassiveUnit.setDescription('cerent Fld 589 Passive Unit')
cerentFldOscPassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4810))
if mibBuilder.loadTexts: cerentFldOscPassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFldOscPassiveUnit.setDescription('cerent Fld Osc Passive Unit')
cerentFlcCwdm8PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4815))
if mibBuilder.loadTexts: cerentFlcCwdm8PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFlcCwdm8PassiveUnit.setDescription('cerent Flc Cwdm8 Passive Unit')
cerentSdsdiPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4820))
if mibBuilder.loadTexts: cerentSdsdiPort.setStatus('current')
if mibBuilder.loadTexts: cerentSdsdiPort.setDescription('SDSDI Port')
cerentHdsdiPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4825))
if mibBuilder.loadTexts: cerentHdsdiPort.setStatus('current')
if mibBuilder.loadTexts: cerentHdsdiPort.setDescription('HDSDI Port')
cerentOptRampCTPCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4830))
if mibBuilder.loadTexts: cerentOptRampCTPCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptRampCTPCard.setDescription('cerent OPT RAMP CTP Card')
cerentOptRampCOPCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4835))
if mibBuilder.loadTexts: cerentOptRampCOPCard.setStatus('current')
if mibBuilder.loadTexts: cerentOptRampCOPCard.setDescription('cerent OPT RAMP COP Card')
cerentFbgdcu165PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4840))
if mibBuilder.loadTexts: cerentFbgdcu165PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFbgdcu165PassiveUnit.setDescription('Passive FBGDCU 165 unit')
cerentFbgdcu331PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4845))
if mibBuilder.loadTexts: cerentFbgdcu331PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFbgdcu331PassiveUnit.setDescription('Passive FBGDCU 331 unit')
cerentFbgdcu496PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4850))
if mibBuilder.loadTexts: cerentFbgdcu496PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFbgdcu496PassiveUnit.setDescription('Passive FBGDCU 496 unit')
cerentFbgdcu661PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4855))
if mibBuilder.loadTexts: cerentFbgdcu661PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFbgdcu661PassiveUnit.setDescription('Passive FBGDCU 661 unit')
cerentFbgdcu826PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4860))
if mibBuilder.loadTexts: cerentFbgdcu826PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFbgdcu826PassiveUnit.setDescription('Passive FBGDCU 826 unit')
cerentFbgdcu992PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4865))
if mibBuilder.loadTexts: cerentFbgdcu992PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFbgdcu992PassiveUnit.setDescription('Passive FBGDCU 992 unit')
cerentFbgdcu1157PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4870))
if mibBuilder.loadTexts: cerentFbgdcu1157PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFbgdcu1157PassiveUnit.setDescription('Passive FBGDCU 1157 unit')
cerentFbgdcu1322PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4875))
if mibBuilder.loadTexts: cerentFbgdcu1322PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFbgdcu1322PassiveUnit.setDescription('Passive FBGDCU 1322 unit')
cerentFbgdcu1653PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4880))
if mibBuilder.loadTexts: cerentFbgdcu1653PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFbgdcu1653PassiveUnit.setDescription('Passive FBGDCU 1653 unit')
cerentFbgdcu1983PassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4885))
if mibBuilder.loadTexts: cerentFbgdcu1983PassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentFbgdcu1983PassiveUnit.setDescription('Passive FBGDCU 1983 unit')
cerentMd48OddPassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4900))
if mibBuilder.loadTexts: cerentMd48OddPassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentMd48OddPassiveUnit.setDescription('Passive Mux Dmx 48 ODD')
cerentMd48EvenPassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4905))
if mibBuilder.loadTexts: cerentMd48EvenPassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentMd48EvenPassiveUnit.setDescription('Passive Mux Dmx 48 EVEN')
cerentMd48CmPassiveUnit = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4910))
if mibBuilder.loadTexts: cerentMd48CmPassiveUnit.setStatus('current')
if mibBuilder.loadTexts: cerentMd48CmPassiveUnit.setDescription('Passive 48 interleav/deinterleav')
cerentOtu4Port = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4915))
if mibBuilder.loadTexts: cerentOtu4Port.setStatus('current')
if mibBuilder.loadTexts: cerentOtu4Port.setDescription('OTU4 Port')
cerentOneHundredGePort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4920))
if mibBuilder.loadTexts: cerentOneHundredGePort.setStatus('current')
if mibBuilder.loadTexts: cerentOneHundredGePort.setDescription('One Hundred GE Port')
cerentHundredGigLineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4925))
if mibBuilder.loadTexts: cerentHundredGigLineCard.setStatus('current')
if mibBuilder.loadTexts: cerentHundredGigLineCard.setDescription('Hundred Gig Line Card')
cerentTENxTENGigLineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4930))
if mibBuilder.loadTexts: cerentTENxTENGigLineCard.setStatus('current')
if mibBuilder.loadTexts: cerentTENxTENGigLineCard.setDescription('TENxTEN Gig Line Card')
cerentCfpLineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4935))
if mibBuilder.loadTexts: cerentCfpLineCard.setStatus('current')
if mibBuilder.loadTexts: cerentCfpLineCard.setDescription('CFP Line Card')
cerentOTLPort = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4940))
if mibBuilder.loadTexts: cerentOTLPort.setStatus('current')
if mibBuilder.loadTexts: cerentOTLPort.setDescription('OTL Port')
cerentHundredgigPlim = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4945))
if mibBuilder.loadTexts: cerentHundredgigPlim.setStatus('current')
if mibBuilder.loadTexts: cerentHundredgigPlim.setDescription('Hundred gig PLIM')
cerentWseLineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4947))
if mibBuilder.loadTexts: cerentWseLineCard.setStatus('current')
if mibBuilder.loadTexts: cerentWseLineCard.setDescription('WSE Line Card')
cerentArXpeCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4950))
if mibBuilder.loadTexts: cerentArXpeCard.setStatus('current')
if mibBuilder.loadTexts: cerentArXpeCard.setDescription('Any Rate Xponder Card')
cerentCPAK100GLineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 5010))
if mibBuilder.loadTexts: cerentCPAK100GLineCard.setStatus('current')
if mibBuilder.loadTexts: cerentCPAK100GLineCard.setDescription('CPAK 100G Line Card')
cerentEDRA126C = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4955))
if mibBuilder.loadTexts: cerentEDRA126C.setStatus('current')
if mibBuilder.loadTexts: cerentEDRA126C.setDescription('EDRA1_26C')
cerentEDRA135C = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4960))
if mibBuilder.loadTexts: cerentEDRA135C.setStatus('current')
if mibBuilder.loadTexts: cerentEDRA135C.setDescription('EDRA1_35C')
cerentEDRA226C = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4965))
if mibBuilder.loadTexts: cerentEDRA226C.setStatus('current')
if mibBuilder.loadTexts: cerentEDRA226C.setDescription('EDRA2_26C')
cerentEDRA235C = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4970))
if mibBuilder.loadTexts: cerentEDRA235C.setStatus('current')
if mibBuilder.loadTexts: cerentEDRA235C.setDescription('EDRA2_35C')
cerentWXC16FSLineCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4975))
if mibBuilder.loadTexts: cerentWXC16FSLineCard.setStatus('current')
if mibBuilder.loadTexts: cerentWXC16FSLineCard.setDescription('WXC16 FS Line Card')
cerentPassiv1x16COFSC = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4980))
if mibBuilder.loadTexts: cerentPassiv1x16COFSC.setStatus('current')
if mibBuilder.loadTexts: cerentPassiv1x16COFSC.setDescription('Passive 1x16 COFS C')
cerentPassive4x4COFSC = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4985))
if mibBuilder.loadTexts: cerentPassive4x4COFSC.setStatus('current')
if mibBuilder.loadTexts: cerentPassive4x4COFSC.setDescription('Passive 4x4 COFS C')
cerentPassiveMODDEG5 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4990))
if mibBuilder.loadTexts: cerentPassiveMODDEG5.setStatus('current')
if mibBuilder.loadTexts: cerentPassiveMODDEG5.setDescription('Passive MOD DEG 5')
cerentPassiveMODUPG4 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4995))
if mibBuilder.loadTexts: cerentPassiveMODUPG4.setStatus('current')
if mibBuilder.loadTexts: cerentPassiveMODUPG4.setDescription('Passive MOD UPG 4')
cerentPassiveMPO8LCADPT = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 5000))
if mibBuilder.loadTexts: cerentPassiveMPO8LCADPT.setStatus('current')
if mibBuilder.loadTexts: cerentPassiveMPO8LCADPT.setDescription('Passive MPO 8LC ADPT')
cerentPassiveASTEDFA = ObjectIdentity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 5005))
if mibBuilder.loadTexts: cerentPassiveASTEDFA.setStatus('current')
if mibBuilder.loadTexts: cerentPassiveASTEDFA.setDescription('Passive AST EDFA')
mibBuilder.exportSymbols("CERENT-GLOBAL-REGISTRY", cerentTxpdP25GCard=cerentTxpdP25GCard, cerentDcuPassiveUnit=cerentDcuPassiveUnit, cerentPIM4PPM=cerentPIM4PPM, cerentAlmPwrSlot=cerentAlmPwrSlot, cerentTncUtsCard=cerentTncUtsCard, bicUniv=bicUniv, cerentFld525PassiveUnit=cerentFld525PassiveUnit, cerentHundredgigPlim=cerentHundredgigPlim, cerentTccSlot=cerentTccSlot, cerent310CE100t8LineCardOid=cerent310CE100t8LineCardOid, cerentAutoPort=cerentAutoPort, cerentBackPlaneM6=cerentBackPlaneM6, cerentTxpd25GCard=cerentTxpd25GCard, cerentE3Port=cerentE3Port, fc10gPort=fc10gPort, cerentPassiveMODUPG4=cerentPassiveMODUPG4, cerentCTX2500Card=cerentCTX2500Card, cerentFld557PassiveUnit=cerentFld557PassiveUnit, cerentFlcCwdm8PassiveUnit=cerentFlcCwdm8PassiveUnit, cerentCap=cerentCap, cerentStm1ePort=cerentStm1ePort, cerentFmec155e1To1Card=cerentFmec155e1To1Card, cerentOscCsmCard=cerentOscCsmCard, cerentFld493PassiveUnit=cerentFld493PassiveUnit, cerentMdId50PassiveUnit=cerentMdId50PassiveUnit, cerentMuxpdMr25GCard=cerentMuxpdMr25GCard, cerent454CE100t8LineCardOid=cerent454CE100t8LineCardOid, cerentCE1000EtherPort=cerentCE1000EtherPort, cerentOadm10GCard=cerentOadm10GCard, cerentBackplane15310MaAnsiOid=cerentBackplane15310MaAnsiOid, cerentDs3Xm12Card=cerentDs3Xm12Card, cerentDmx40LCard=cerentDmx40LCard, cerentUsbUtsPortCard=cerentUsbUtsPortCard, cerentML1000GenericCard=cerentML1000GenericCard, cerent15216OpmNode=cerent15216OpmNode, cerentOc3Port=cerentOc3Port, cerent15216OpmChassis=cerent15216OpmChassis, etrCloPort=etrCloPort, cerentGenericDummyObjects=cerentGenericDummyObjects, cerentWbeSlotOid=cerentWbeSlotOid, cerentG1K4Card=cerentG1K4Card, cerentMux40LCard=cerentMux40LCard, cerentOc48Port=cerentOc48Port, cerent15216EdfaSerialPort=cerent15216EdfaSerialPort, cerent454Node=cerent454Node, cerentOptMux32ChCard=cerentOptMux32ChCard, cerentSm1310Port=cerentSm1310Port, cerentCommunicationEquipment=cerentCommunicationEquipment, cerentMxpMr10DmeCard=cerentMxpMr10DmeCard, cerentStm1e12LineCard=cerentStm1e12LineCard, cerentOptDemux40ChCard=cerentOptDemux40ChCard, cerentMrc25G12LineCard=cerentMrc25G12LineCard, cerentMicExtCard=cerentMicExtCard, cerentVicDecoderPort=cerentVicDecoderPort, cerentFmecSmzE3=cerentFmecSmzE3, cerentBicCmn=cerentBicCmn, cerentEc1nCard=cerentEc1nCard, cerentEther100Port=cerentEther100Port, cerentDs1E156LineCard=cerentDs1E156LineCard, cerentComponents=cerentComponents, cerentOCHPort=cerentOCHPort, fortyGePort=fortyGePort, cerentE1n14=cerentE1n14, hdtvPort=hdtvPort, cerentEpos1000Card=cerentEpos1000Card, cerentOc192ItuCard=cerentOc192ItuCard, cerent454M2Node=cerent454M2Node, cerentOc768Port=cerentOc768Port, cerent15600ControllerSlot=cerent15600ControllerSlot, cerentEther1000Port=cerentEther1000Port, cerentOTLPort=cerentOTLPort, cerentOMSPort=cerentOMSPort, cerentOc3Card=cerentOc3Card, cerentVicTestPort=cerentVicTestPort, cerentBicTelco=cerentBicTelco, cerentOc192LrCard=cerentOc192LrCard, cerentOptRAmpCCard=cerentOptRAmpCCard, cerentFbgdcu331PassiveUnit=cerentFbgdcu331PassiveUnit, tenGePort=tenGePort, cerentFmecSlot=cerentFmecSlot, cerentCEMR310Card=cerentCEMR310Card, cerentPIMSlot=cerentPIMSlot, cerent310ML100t8LineCardOid=cerent310ML100t8LineCardOid, cerentOadm1ChCard=cerentOadm1ChCard, cerentOptAmpCCard=cerentOptAmpCCard, cerentFld429PassiveUnit=cerentFld429PassiveUnit, cerentG1000Port=cerentG1000Port, cerentXpdGECard=cerentXpdGECard, fc1gPort=fc1gPort, cerentBackplane15310MaEtsiOid=cerentBackplane15310MaEtsiOid, cerentMlEtherPort=cerentMlEtherPort, cerentMlPosPort=cerentMlPosPort, cerentFcb=cerentFcb, cerentTENxTENGigLineCard=cerentTENxTENGigLineCard, cerentXcVxlCard=cerentXcVxlCard, cerentCrftTmgSlot=cerentCrftTmgSlot, cerent15216OpmSlot=cerent15216OpmSlot, cerentBbeSlotOid=cerentBbeSlotOid, cerentMxpMr10DmexCard=cerentMxpMr10DmexCard, cerentChassisM2Ansi=cerentChassisM2Ansi, cerentOadm2ChCard=cerentOadm2ChCard, cerentFbgdcu1983PassiveUnit=cerentFbgdcu1983PassiveUnit, cerentBackPlane454=cerentBackPlane454, cerent40GTxpCard=cerent40GTxpCard, cerentOptBstLCard=cerentOptBstLCard, cerent=cerent, cerentPIM1PPM=cerentPIM1PPM, cerentLedIndicator=cerentLedIndicator, cerentProducts=cerentProducts, cerentWbeLineCardOid=cerentWbeLineCardOid, cerentAiciAep=cerentAiciAep, cerentPt10GECard=cerentPt10GECard, cerentAicOutUts=cerentAicOutUts, cerentFld303PassiveUnit=cerentFld303PassiveUnit, cerentArXpeCard=cerentArXpeCard, cerentCPAK100GLineCard=cerentCPAK100GLineCard, cerentOc192IrCard=cerentOc192IrCard, cerentExperimental=cerentExperimental, fc2gPort=fc2gPort, cerentEc1Card=cerentEc1Card, cerentDs3iPort=cerentDs3iPort, cerentXcVxl25GCard=cerentXcVxl25GCard, cerentOptAmp23Card=cerentOptAmp23Card, cerentIoSlot=cerentIoSlot, cerentE1nP42LineCard=cerentE1nP42LineCard, cerentFmec155e1To3Card=cerentFmec155e1To3Card, cerentFldOscPassiveUnit=cerentFldOscPassiveUnit, cerentBackPlaneM2=cerentBackPlaneM2, cerentMicCard=cerentMicCard, cerentIsc3stp2gPort=cerentIsc3stp2gPort, cerentDs3i=cerentDs3i, cerentFld366PassiveUnit=cerentFld366PassiveUnit, cerentAicCard=cerentAicCard, cerentPSMCard=cerentPSMCard, cerentMsIsc100tCard=cerentMsIsc100tCard, cerentIsc3stp1gPort=cerentIsc3stp1gPort, cerentAgentCapabilities=cerentAgentCapabilities, cerentOptWss32ChCard=cerentOptWss32ChCard, cerentFillerCard=cerentFillerCard, cerentChassis15327=cerentChassis15327, cerentBicBnc=cerentBicBnc, cerentTsc=cerentTsc, cerentOtu3Port=cerentOtu3Port, cerentDs3EC16LineCard=cerentDs3EC16LineCard, cerentFmecE1P42Type1To3W120bCard=cerentFmecE1P42Type1To3W120bCard, ficon1gport=ficon1gport, cerentFld589PassiveUnit=cerentFld589PassiveUnit, cerentDs128Ds3EC13LineCard=cerentDs128Ds3EC13LineCard, cerent15216OpmLedIndicator=cerent15216OpmLedIndicator, cerentEc1Port=cerentEc1Port, cerentMm850Port=cerentMm850Port, cerentRanSvcLineCard=cerentRanSvcLineCard, cerentOc48Card8Ports=cerentOc48Card8Ports, cerentChassisM6Ansi=cerentChassisM6Ansi, cerentPPM1Port=cerentPPM1Port, cerentSensorComponent=cerentSensorComponent, cerentOc12Port=cerentOc12Port, esconPort=esconPort, cerentTncFePort=cerentTncFePort, fc4gPort=fc4gPort, cerentDs3inCard=cerentDs3inCard, cerentChassis15310MaEtsiOid=cerentChassis15310MaEtsiOid, cerentFanSlot=cerentFanSlot, cerentCrftTmg=cerentCrftTmg, cerentMuxpdPMr25GCard=cerentMuxpdPMr25GCard, cerentMuxpd25G10XCard=cerentMuxpd25G10XCard, cerent15216EdfaNode=cerent15216EdfaNode, fc8gPort=fc8gPort, cerentOc192Port=cerentOc192Port, ds3Ec148LineCard=ds3Ec148LineCard, mrSlot=mrSlot, cerentDs184Ds3EC13LineCard=cerentDs184Ds3EC13LineCard, cerentFbgdcu826PassiveUnit=cerentFbgdcu826PassiveUnit, cerentSdsdiPort=cerentSdsdiPort, cerentAicSlot=cerentAicSlot, cerentChassisM6Etsi=cerentChassisM6Etsi, cerentEcuTray=cerentEcuTray, cerentIoUts=cerentIoUts, cerentCE1000PosPort=cerentCE1000PosPort, cerent40SMR1Card=cerent40SMR1Card, cerent15216EdfaChassis=cerent15216EdfaChassis, cerentFmecBlank=cerentFmecBlank, cerentOtu2Port=cerentOtu2Port, cerentBackPlane454SDH=cerentBackPlane454SDH, cerentOptBstECard=cerentOptBstECard, cerentHundredGigLineCard=cerentHundredGigLineCard, cerentFanTray=cerentFanTray, cerentUsbUts=cerentUsbUts, cerentOc12Card=cerentOc12Card, cerentAudibleAlarm=cerentAudibleAlarm, cerentFbgdcu1322PassiveUnit=cerentFbgdcu1322PassiveUnit, cerentMd48CmPassiveUnit=cerentMd48CmPassiveUnit, cerentCE1000Card=cerentCE1000Card, cerentOptWss40ChCard=cerentOptWss40ChCard, cerentE1P42LineCard=cerentE1P42LineCard, cerent310Node=cerent310Node, cerentDs3neCard=cerentDs3neCard, cerentAip=cerentAip, cerentEcuSlot=cerentEcuSlot, cerentBicSmb=cerentBicSmb, cerentFmecSmzE1=cerentFmecSmzE1, sdiD1VideoPort=sdiD1VideoPort, gfpPort=gfpPort, cerentL1PPosPortOid=cerentL1PPosPortOid, cerentOptPreCard=cerentOptPreCard, cerentFbgdcu661PassiveUnit=cerentFbgdcu661PassiveUnit, cerentFbgdcu496PassiveUnit=cerentFbgdcu496PassiveUnit, cerentCtxCardOid=cerentCtxCardOid, cerent15216OpmPcmciaSlot=cerent15216OpmPcmciaSlot, cerentOc48Card16Ports=cerentOc48Card16Ports, cerentCEMR454Card=cerentCEMR454Card, cerentOptRampCTPCard=cerentOptRampCTPCard, cerentXtcSlot=cerentXtcSlot, cerentEDRA226C=cerentEDRA226C, ape=ape, cerentPP4SMRPassiveUnit=cerentPP4SMRPassiveUnit, cerentWXC16FSLineCard=cerentWXC16FSLineCard, cerentVicDecoderLineCard=cerentVicDecoderLineCard, cerentADMs=cerentADMs, cerentPassive4x4COFSC=cerentPassive4x4COFSC, cerentMscIscUtsPort=cerentMscIscUtsPort, cerentDs1i14=cerentDs1i14, cerentL1PEtherPortOid=cerentL1PEtherPortOid, cerentWss40LCard=cerentWss40LCard, cerentCTDcuPassiveUnit=cerentCTDcuPassiveUnit, cerentWss32LCard=cerentWss32LCard, cerentOc3ir=cerentOc3ir, cerentFmecE1P42Type1To3W120aCard=cerentFmecE1P42Type1To3W120aCard, cerentOtu1Port=cerentOtu1Port, cerentCtxSlotOid=cerentCtxSlotOid, cerentEDRA235C=cerentEDRA235C, cerentPtSystem=cerentPtSystem, cerentAOTSPort=cerentAOTSPort, cerentFmecE1P42TypeUnprotW120Card=cerentFmecE1P42TypeUnprotW120Card, cerentEDRA135C=cerentEDRA135C, cerentSdi3gvideoPort=cerentSdi3gvideoPort, cerentOc12QuadCard=cerentOc12QuadCard, cerentOptDemux32RChCard=cerentOptDemux32RChCard, cerentDs3Port=cerentDs3Port, cerentDs1VtMappedPort=cerentDs1VtMappedPort, cerentOc12lr1310=cerentOc12lr1310, cerent40ETxpCard=cerent40ETxpCard, cerentDwdmTrunkPort=cerentDwdmTrunkPort, cerentML100GenericCard=cerentML100GenericCard, cerentPassiv1x16COFSC=cerentPassiv1x16COFSC, cerentCfpLineCard=cerentCfpLineCard, cerentMd40EvenPassiveUnit=cerentMd40EvenPassiveUnit, iscPort=iscPort, cerentEfca454Sdh=cerentEfca454Sdh, cerentXtcCard=cerentXtcCard, cerentMl100X8LineCard=cerentMl100X8LineCard, cerentModules=cerentModules, cerentMd48EvenPassiveUnit=cerentMd48EvenPassiveUnit, cerentMuxpd25G10ECard=cerentMuxpd25G10ECard)
mibBuilder.exportSymbols("CERENT-GLOBAL-REGISTRY", cerent15216OpmSerialPort=cerent15216OpmSerialPort, cerentFbgdcu1157PassiveUnit=cerentFbgdcu1157PassiveUnit, cerentPowerSupplyUts=cerentPowerSupplyUts, cerentEDRA126C=cerentEDRA126C, cerentXcVxc25GCard=cerentXcVxc25GCard, cerentAiciAie=cerentAiciAie, cerentMd48OddPassiveUnit=cerentMd48OddPassiveUnit, cerentMrc12LineCard=cerentMrc12LineCard, cerentG1000GenericCard=cerentG1000GenericCard, ficon4gport=ficon4gport, cerentXcSlot=cerentXcSlot, cerentOptAmpLCard=cerentOptAmpLCard, cerentOptMuxDemux4ChCard=cerentOptMuxDemux4ChCard, cerentMrc4LineCardOid=cerentMrc4LineCardOid, cerentXcVxcCard=cerentXcVxcCard, cerentAicInUts=cerentAicInUts, cerentXcVtCard=cerentXcVtCard, cerentDs1n14=cerentDs1n14, cerentE114=cerentE114, cerentOc48lr=cerentOc48lr, cerentDs3eCard=cerentDs3eCard, cerent15216OpmBackPlane=cerent15216OpmBackPlane, cerentOc192Card=cerentOc192Card, cerentOrderwirePort=cerentOrderwirePort, cerent40EMxpCard=cerent40EMxpCard, cerentDs3nCard=cerentDs3nCard, passThruPort=passThruPort, cerent15216ID50PassiveUnit=cerent15216ID50PassiveUnit, ficon2gport=ficon2gport, cerentOTSPort=cerentOTSPort, PYSNMP_MODULE_ID=cerentGlobalRegModule, cerentE1Port=cerentE1Port, cerentOc192Card4PortsDwdm=cerentOc192Card4PortsDwdm, cerentWseLineCard=cerentWseLineCard, cerent15216OpmOpticalSwitch=cerent15216OpmOpticalSwitch, cerentOadm4ChCard=cerentOadm4ChCard, cerentOadm1BnCard=cerentOadm1BnCard, cerentDs3XmPort=cerentDs3XmPort, cerent600Node=cerent600Node, cerentPPMSlot=cerentPPMSlot, cerentCxc=cerentCxc, cerentArMxpCard=cerentArMxpCard, cerentUdcVoipEmsUts=cerentUdcVoipEmsUts, cerentChassis15310ClOid=cerentChassis15310ClOid, cerent15216OpmController=cerent15216OpmController, cerentMrc25G4LineCard=cerentMrc25G4LineCard, cerentOptEdfa24Card=cerentOptEdfa24Card, cerentOptBstCard=cerentOptBstCard, cerentIscEqptUts=cerentIscEqptUts, cerentOc3n1Card=cerentOc3n1Card, cerentAlmPwr=cerentAlmPwr, cerentWxc40LCard=cerentWxc40LCard, cerentXP10G4LineCard=cerentXP10G4LineCard, isc3Peer1gPort=isc3Peer1gPort, cerentArXpCard=cerentArXpCard, cerentTxpd10EXCard=cerentTxpd10EXCard, cerentDs3XmCard=cerentDs3XmCard, cerentOc192XfpLineCard=cerentOc192XfpLineCard, cerentTxpdP10EXCard=cerentTxpdP10EXCard, cerentFld334PassiveUnit=cerentFld334PassiveUnit, cerentOtherComponent=cerentOtherComponent, cerentG1000QuadCard=cerentG1000QuadCard, cerentMicSlot=cerentMicSlot, cerentChassis600=cerentChassis600, cerentRegistry=cerentRegistry, cerentMMUCard=cerentMMUCard, cerentCxcSlot=cerentCxcSlot, cerent15216OpmPowerSupply=cerent15216OpmPowerSupply, cerentFmec155eUnprotCard=cerentFmec155eUnprotCard, cerentOc48ir=cerentOc48ir, cerentDs312=cerentDs312, cerentOc48Card=cerentOc48Card, cerentFudcPort=cerentFudcPort, cerentBackPlane454HD=cerentBackPlane454HD, cerentOscmCard=cerentOscmCard, cerentGlobalRegModule=cerentGlobalRegModule, cerentFlashUts=cerentFlashUts, cerentWssCE40Card=cerentWssCE40Card, cerentOc192Card4Ports=cerentOc192Card4Ports, cerentDmx32LCard=cerentDmx32LCard, cerent310MaEtsiNode=cerent310MaEtsiNode, cerentFld461PassiveUnit=cerentFld461PassiveUnit, isc3Peer2gPort=isc3Peer2gPort, cerent15216OpmSpectrometer=cerent15216OpmSpectrometer, cerentOptEdfa17Card=cerentOptEdfa17Card, cerentFbgdcu1653PassiveUnit=cerentFbgdcu1653PassiveUnit, cerentBackplane15310ClOid=cerentBackplane15310ClOid, cerent40SMR2Card=cerent40SMR2Card, cerentBackPlane15327=cerentBackPlane15327, cerentPowerSupply=cerentPowerSupply, cerentTcc=cerentTcc, cerentOptWxc40ChCard=cerentOptWxc40ChCard, cerentHdsdiPort=cerentHdsdiPort, cerentVicEncoderLineCard=cerentVicEncoderLineCard, cerentMechanicalUnit=cerentMechanicalUnit, cerent15216OpmRelay=cerent15216OpmRelay, cerentFmecDb=cerentFmecDb, cerentAlarmDryContactUts=cerentAlarmDryContactUts, cerentTxpd10ECard=cerentTxpd10ECard, cerentXpd10GECard=cerentXpd10GECard, cerentDwdmClientPort=cerentDwdmClientPort, cerentPtsaGECard=cerentPtsaGECard, cerentPPMESH4PassiveUnit=cerentPPMESH4PassiveUnit, cerentDs114=cerentDs114, cerentAsap4LineCardOid=cerentAsap4LineCardOid, cerentOptRAmpECard=cerentOptRAmpECard, cerent15216Edfa3ShelfController=cerent15216Edfa3ShelfController, cerentE312Card=cerentE312Card, cerentMd40OddPassiveUnit=cerentMd40OddPassiveUnit, cerent15216OpmOpticalPort=cerent15216OpmOpticalPort, cerentXc10g=cerentXc10g, cerentXc=cerentXc, cerentPassiveMODDEG5=cerentPassiveMODDEG5, cerentOc12ir=cerentOc12ir, cerentOtu4Port=cerentOtu4Port, cerentAici=cerentAici, cerentE121E3DS33LineCard=cerentE121E3DS33LineCard, cerentEpos100Card=cerentEpos100Card, cerent454M6Node=cerent454M6Node, cerentGeneric=cerentGeneric, isc3Port=isc3Port, cerentMuxpd25G10GCard=cerentMuxpd25G10GCard, cerentDccPort=cerentDccPort, cerentChassis15310MaAnsiOid=cerentChassis15310MaAnsiOid, cerentPassiveMPO8LCADPT=cerentPassiveMPO8LCADPT, cerentFcmrLineCard=cerentFcmrLineCard, cerent40GMxpCard=cerent40GMxpCard, cerentChassis454SDH=cerentChassis454SDH, cerentChassis454=cerentChassis454, cerentTncTscUtsSlot=cerentTncTscUtsSlot, cerentOc3OctaCard=cerentOc3OctaCard, cerentOptDemux32ChCard=cerentOptDemux32ChCard, cerentFanTrayUts=cerentFanTrayUts, cerentPassiveASTEDFA=cerentPassiveASTEDFA, cerentOadm4BnCard=cerentOadm4BnCard, cerentVicEncoderPort=cerentVicEncoderPort, cerentDwdmDevices=cerentDwdmDevices, cerentFbgdcu992PassiveUnit=cerentFbgdcu992PassiveUnit, cerent15216EdfaEtherPort=cerent15216EdfaEtherPort, cerentChassisM2Etsi=cerentChassisM2Etsi, cerentFTDcuPassiveUnit=cerentFTDcuPassiveUnit, cerentFmecDs1i14=cerentFmecDs1i14, cerentE163E3DS33LineCard=cerentE163E3DS33LineCard, dv6000Port=dv6000Port, cerentBackPlane600=cerentBackPlane600, cerentIlkPort=cerentIlkPort, cerentFcmrPort=cerentFcmrPort, cerentFld397PassiveUnit=cerentFld397PassiveUnit, cerentFbgdcu165PassiveUnit=cerentFbgdcu165PassiveUnit, cerentOptMux40ChCard=cerentOptMux40ChCard, cerentOneHundredGePort=cerentOneHundredGePort, cerentPPMESH8PassiveUnit=cerentPPMESH8PassiveUnit, cerentPtf10GECard=cerentPtf10GECard, cerentBitsUts=cerentBitsUts, cerentRequirements=cerentRequirements, oneGePort=oneGePort, cerentBbeLineCardOid=cerentBbeLineCardOid, cerentOptWxc80ChCard=cerentOptWxc80ChCard, cerent15216Edfa3OpticsModule=cerent15216Edfa3OpticsModule, cerentEnvironmentControl=cerentEnvironmentControl, cerentDmxCE40Card=cerentDmxCE40Card, cerent310MaAnsiNode=cerent310MaAnsiNode, bicUnknown=bicUnknown, cerentOptAmp17Card=cerentOptAmp17Card, cerentTxpd10GCard=cerentTxpd10GCard, cerentTscUtsCard=cerentTscUtsCard, cerent327Node=cerent327Node, cerentOptRampCOPCard=cerentOptRampCOPCard)
|
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, value_range_constraint, single_value_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ConstraintsUnion')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(integer32, ip_address, gauge32, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, enterprises, bits, time_ticks, iso, counter32, unsigned32, notification_type, counter64, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'IpAddress', 'Gauge32', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'enterprises', 'Bits', 'TimeTicks', 'iso', 'Counter32', 'Unsigned32', 'NotificationType', 'Counter64', 'ModuleIdentity')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
cerent_global_reg_module = module_identity((1, 3, 6, 1, 4, 1, 3607, 1, 10, 10))
cerentGlobalRegModule.setRevisions(('1904-10-01 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
cerentGlobalRegModule.setRevisionsDescriptions(('This file can be used with R5.0 release.',))
if mibBuilder.loadTexts:
cerentGlobalRegModule.setLastUpdated('0410010000Z')
if mibBuilder.loadTexts:
cerentGlobalRegModule.setOrganization('Cisco Systems')
if mibBuilder.loadTexts:
cerentGlobalRegModule.setContactInfo(' Support@Cisco.com Postal: Cisco Systems, Inc. 1450 N. McDowell Blvd. Petaluma, CA 94954 USA Tel: 1-877-323-7368')
if mibBuilder.loadTexts:
cerentGlobalRegModule.setDescription('This module provides the global registrations for all other Cisco OTBU MIB modules.')
cerent = object_identity((1, 3, 6, 1, 4, 1, 3607))
if mibBuilder.loadTexts:
cerent.setStatus('current')
if mibBuilder.loadTexts:
cerent.setDescription('Sub-tree for Cisco OTBU. Cerent enterprise OID provided by IANA is used.')
cerent_registry = object_identity((1, 3, 6, 1, 4, 1, 3607, 1))
if mibBuilder.loadTexts:
cerentRegistry.setStatus('current')
if mibBuilder.loadTexts:
cerentRegistry.setDescription('Sub-tree for registrations for all Cisco OTBU modules.')
cerent_generic = object_identity((1, 3, 6, 1, 4, 1, 3607, 2))
if mibBuilder.loadTexts:
cerentGeneric.setStatus('current')
if mibBuilder.loadTexts:
cerentGeneric.setDescription('Sub-tree for common object and event definitions.')
cerent_generic_dummy_objects = object_identity((1, 3, 6, 1, 4, 1, 3607, 2, 1))
if mibBuilder.loadTexts:
cerentGenericDummyObjects.setStatus('current')
if mibBuilder.loadTexts:
cerentGenericDummyObjects.setDescription('Sub-tree for object and event definitions which are defined for compilation compatibility reasons. These objects will never be implemented!')
cerent_experimental = object_identity((1, 3, 6, 1, 4, 1, 3607, 3))
if mibBuilder.loadTexts:
cerentExperimental.setStatus('current')
if mibBuilder.loadTexts:
cerentExperimental.setDescription('cerentExperimental provides a root object identifier from which experimental MIBs may be temporarily based. A MIB module in the cerentExperimental sub-tree will be moved under cerentGeneric or cerentProducts whenever the development of that module is deemed completed.')
cerent_agent_capabilities = object_identity((1, 3, 6, 1, 4, 1, 3607, 4))
if mibBuilder.loadTexts:
cerentAgentCapabilities.setStatus('current')
if mibBuilder.loadTexts:
cerentAgentCapabilities.setDescription('cerentAgentCaps provides a root object identifier from which AGENT-CAPABILITIES values may be assigned.')
cerent_requirements = object_identity((1, 3, 6, 1, 4, 1, 3607, 5))
if mibBuilder.loadTexts:
cerentRequirements.setStatus('current')
if mibBuilder.loadTexts:
cerentRequirements.setDescription('Sub-tree for management application requirements.')
cerent_products = object_identity((1, 3, 6, 1, 4, 1, 3607, 6))
if mibBuilder.loadTexts:
cerentProducts.setStatus('current')
if mibBuilder.loadTexts:
cerentProducts.setDescription('Sub-tree for specific object and event definitions.')
cerent_modules = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 10))
if mibBuilder.loadTexts:
cerentModules.setStatus('current')
if mibBuilder.loadTexts:
cerentModules.setDescription('Sub-tree to register MIB modules.')
cerent_communication_equipment = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20))
if mibBuilder.loadTexts:
cerentCommunicationEquipment.setStatus('current')
if mibBuilder.loadTexts:
cerentCommunicationEquipment.setDescription('Sub-tree to register all Cisco manufactured equipment (OTBU only).')
cerent_components = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30))
if mibBuilder.loadTexts:
cerentComponents.setStatus('current')
if mibBuilder.loadTexts:
cerentComponents.setDescription('Sub-tree to register all Cisco OTBU boards.')
cerent_ad_ms = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10))
if mibBuilder.loadTexts:
cerentADMs.setStatus('current')
if mibBuilder.loadTexts:
cerentADMs.setDescription('Sub-tree to register Cisco OTBU products - Switches.')
cerent_dwdm_devices = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 20))
if mibBuilder.loadTexts:
cerentDwdmDevices.setStatus('current')
if mibBuilder.loadTexts:
cerentDwdmDevices.setDescription('Sub-tree to register Cisco OTBU products - DWDM devices.')
cerent454_node = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 10))
if mibBuilder.loadTexts:
cerent454Node.setStatus('current')
if mibBuilder.loadTexts:
cerent454Node.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15454')
cerent327_node = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 20))
if mibBuilder.loadTexts:
cerent327Node.setStatus('current')
if mibBuilder.loadTexts:
cerent327Node.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15327')
cerent600_node = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 30))
if mibBuilder.loadTexts:
cerent600Node.setStatus('current')
if mibBuilder.loadTexts:
cerent600Node.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15600')
cerent310_node = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 40))
if mibBuilder.loadTexts:
cerent310Node.setStatus('current')
if mibBuilder.loadTexts:
cerent310Node.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15310')
cerent310_ma_ansi_node = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 50))
if mibBuilder.loadTexts:
cerent310MaAnsiNode.setStatus('current')
if mibBuilder.loadTexts:
cerent310MaAnsiNode.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15310-MA SONET MULTISERVICE PLATFORM')
cerent310_ma_etsi_node = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 60))
if mibBuilder.loadTexts:
cerent310MaEtsiNode.setStatus('current')
if mibBuilder.loadTexts:
cerent310MaEtsiNode.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15310-MA SDH MULTISERVICE PLATFORM')
cerent454_m6_node = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 70))
if mibBuilder.loadTexts:
cerent454M6Node.setStatus('current')
if mibBuilder.loadTexts:
cerent454M6Node.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15456-M6 MULTISERVICE PLATFORM')
cerent454_m2_node = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 10, 80))
if mibBuilder.loadTexts:
cerent454M2Node.setStatus('current')
if mibBuilder.loadTexts:
cerent454M2Node.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15456-M2 MULTISERVICE PLATFORM')
cerent15216_opm_node = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 20, 10))
if mibBuilder.loadTexts:
cerent15216OpmNode.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmNode.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15216 OPM')
cerent15216_edfa_node = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 20, 20, 20))
if mibBuilder.loadTexts:
cerent15216EdfaNode.setStatus('current')
if mibBuilder.loadTexts:
cerent15216EdfaNode.setDescription('The SNMP agent will return this as the value of sysObjectID of system group in MIB-II for Cisco ONS 15216 EDFA')
cerent_other_component = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1))
if mibBuilder.loadTexts:
cerentOtherComponent.setStatus('current')
if mibBuilder.loadTexts:
cerentOtherComponent.setDescription('An unknown component is installed or the component type is unavailable.')
cerent_tcc = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 10))
if mibBuilder.loadTexts:
cerentTcc.setStatus('current')
if mibBuilder.loadTexts:
cerentTcc.setDescription('The OID definition for Cisco OTBU Timing Communications and Control card.')
cerent_xc = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 20))
if mibBuilder.loadTexts:
cerentXc.setStatus('current')
if mibBuilder.loadTexts:
cerentXc.setDescription('The OID definition for Cross Connect card.')
cerent_ds114 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 30))
if mibBuilder.loadTexts:
cerentDs114.setStatus('current')
if mibBuilder.loadTexts:
cerentDs114.setDescription('The OID definition for DS1-14 card.')
cerent_ds1n14 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 40))
if mibBuilder.loadTexts:
cerentDs1n14.setStatus('current')
if mibBuilder.loadTexts:
cerentDs1n14.setDescription('The OID definition for DS1N-14 card.')
cerent_ds312 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 50))
if mibBuilder.loadTexts:
cerentDs312.setStatus('current')
if mibBuilder.loadTexts:
cerentDs312.setDescription('The OID definition for DS3-12 card.')
cerent_oc3ir = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 60))
if mibBuilder.loadTexts:
cerentOc3ir.setStatus('current')
if mibBuilder.loadTexts:
cerentOc3ir.setDescription('The OID definition for OC3-IR card.')
cerent_oc12ir = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 70))
if mibBuilder.loadTexts:
cerentOc12ir.setStatus('current')
if mibBuilder.loadTexts:
cerentOc12ir.setDescription('The OID definition for OC12-IR card.')
cerent_oc12lr1310 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 80))
if mibBuilder.loadTexts:
cerentOc12lr1310.setStatus('current')
if mibBuilder.loadTexts:
cerentOc12lr1310.setDescription('The OID definition for OC12-LR-1310 card.')
cerent_oc48ir = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 90))
if mibBuilder.loadTexts:
cerentOc48ir.setStatus('current')
if mibBuilder.loadTexts:
cerentOc48ir.setDescription('The OID definition for OC48-IR card.')
cerent_oc48lr = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 100))
if mibBuilder.loadTexts:
cerentOc48lr.setStatus('current')
if mibBuilder.loadTexts:
cerentOc48lr.setDescription('The OID definition for OC48-LR card.')
cerent_fan_tray = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 110))
if mibBuilder.loadTexts:
cerentFanTray.setStatus('current')
if mibBuilder.loadTexts:
cerentFanTray.setDescription('')
cerent_fan_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 120))
if mibBuilder.loadTexts:
cerentFanSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentFanSlot.setDescription('')
cerent_io_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 130))
if mibBuilder.loadTexts:
cerentIoSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentIoSlot.setDescription('')
cerent_xc_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 140))
if mibBuilder.loadTexts:
cerentXcSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentXcSlot.setDescription('')
cerent_aic_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 150))
if mibBuilder.loadTexts:
cerentAicSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentAicSlot.setDescription('')
cerent_tcc_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 160))
if mibBuilder.loadTexts:
cerentTccSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentTccSlot.setDescription('')
cerent_back_plane454 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 170))
if mibBuilder.loadTexts:
cerentBackPlane454.setStatus('current')
if mibBuilder.loadTexts:
cerentBackPlane454.setDescription('')
cerent_chassis454 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 180))
if mibBuilder.loadTexts:
cerentChassis454.setStatus('current')
if mibBuilder.loadTexts:
cerentChassis454.setDescription('')
cerent_power_supply = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1500))
if mibBuilder.loadTexts:
cerentPowerSupply.setStatus('current')
if mibBuilder.loadTexts:
cerentPowerSupply.setDescription('Power Supply')
cerent_ds3n_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 190))
if mibBuilder.loadTexts:
cerentDs3nCard.setStatus('current')
if mibBuilder.loadTexts:
cerentDs3nCard.setDescription('Ds3n card.')
cerent_ds3_xm_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 200))
if mibBuilder.loadTexts:
cerentDs3XmCard.setStatus('current')
if mibBuilder.loadTexts:
cerentDs3XmCard.setDescription('Ds3Xm card.')
cerent_oc3_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 210))
if mibBuilder.loadTexts:
cerentOc3Card.setStatus('current')
if mibBuilder.loadTexts:
cerentOc3Card.setDescription('Oc3 card.')
cerent_oc3_octa_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 212))
if mibBuilder.loadTexts:
cerentOc3OctaCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOc3OctaCard.setDescription('Oc3-8 card.')
cerent_oc12_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 220))
if mibBuilder.loadTexts:
cerentOc12Card.setStatus('current')
if mibBuilder.loadTexts:
cerentOc12Card.setDescription('Oc12 card.')
cerent_oc48_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 230))
if mibBuilder.loadTexts:
cerentOc48Card.setStatus('current')
if mibBuilder.loadTexts:
cerentOc48Card.setDescription('Oc48 card.')
cerent_ec1_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 240))
if mibBuilder.loadTexts:
cerentEc1Card.setStatus('current')
if mibBuilder.loadTexts:
cerentEc1Card.setDescription('Ec1 card.')
cerent_ec1n_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 250))
if mibBuilder.loadTexts:
cerentEc1nCard.setStatus('current')
if mibBuilder.loadTexts:
cerentEc1nCard.setDescription('Ec1n card.')
cerent_epos100_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 260))
if mibBuilder.loadTexts:
cerentEpos100Card.setStatus('current')
if mibBuilder.loadTexts:
cerentEpos100Card.setDescription('EPOS 100 card.')
cerent_epos1000_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 270))
if mibBuilder.loadTexts:
cerentEpos1000Card.setStatus('current')
if mibBuilder.loadTexts:
cerentEpos1000Card.setDescription('EPOS 1000 card.')
cerent_aic_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 280))
if mibBuilder.loadTexts:
cerentAicCard.setStatus('current')
if mibBuilder.loadTexts:
cerentAicCard.setDescription('AIC card.')
cerent_xc_vt_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 290))
if mibBuilder.loadTexts:
cerentXcVtCard.setStatus('current')
if mibBuilder.loadTexts:
cerentXcVtCard.setDescription('VT cross connect card.')
cerent_ether1000_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 300))
if mibBuilder.loadTexts:
cerentEther1000Port.setStatus('current')
if mibBuilder.loadTexts:
cerentEther1000Port.setDescription('Ether1000 port.')
cerent_ether100_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 310))
if mibBuilder.loadTexts:
cerentEther100Port.setStatus('current')
if mibBuilder.loadTexts:
cerentEther100Port.setDescription('Ether100 port.')
cerent_ds1_vt_mapped_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 320))
if mibBuilder.loadTexts:
cerentDs1VtMappedPort.setStatus('current')
if mibBuilder.loadTexts:
cerentDs1VtMappedPort.setDescription('Mapped Ds1-Vt port.')
cerent_ds3_xm_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 330))
if mibBuilder.loadTexts:
cerentDs3XmPort.setStatus('current')
if mibBuilder.loadTexts:
cerentDs3XmPort.setDescription('Ds3Xm port.')
cerent_ds3_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 340))
if mibBuilder.loadTexts:
cerentDs3Port.setStatus('current')
if mibBuilder.loadTexts:
cerentDs3Port.setDescription('Ds3 port.')
cerent_ec1_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 350))
if mibBuilder.loadTexts:
cerentEc1Port.setStatus('current')
if mibBuilder.loadTexts:
cerentEc1Port.setDescription('Ec1 port.')
cerent_oc3_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 360))
if mibBuilder.loadTexts:
cerentOc3Port.setStatus('current')
if mibBuilder.loadTexts:
cerentOc3Port.setDescription('Oc3 port.')
cerent_oc12_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 370))
if mibBuilder.loadTexts:
cerentOc12Port.setStatus('current')
if mibBuilder.loadTexts:
cerentOc12Port.setDescription('Oc12 port.')
cerent_ds1_e156_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1470))
if mibBuilder.loadTexts:
cerentDs1E156LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentDs1E156LineCard.setDescription('Cerent DS1 E1 56 Port Line Card')
cerent_mrc12_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1480))
if mibBuilder.loadTexts:
cerentMrc12LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMrc12LineCard.setDescription('Cerent Multirate 12 Port Line Card')
cerent_oc192_xfp_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1490))
if mibBuilder.loadTexts:
cerentOc192XfpLineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOc192XfpLineCard.setDescription('Cerent OC192 XFP Line card')
cerent_oc48_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 380))
if mibBuilder.loadTexts:
cerentOc48Port.setStatus('current')
if mibBuilder.loadTexts:
cerentOc48Port.setDescription('Oc48 port.')
cerent_orderwire_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 390))
if mibBuilder.loadTexts:
cerentOrderwirePort.setStatus('current')
if mibBuilder.loadTexts:
cerentOrderwirePort.setDescription('Orderwire port.')
cerent_sensor_component = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 400))
if mibBuilder.loadTexts:
cerentSensorComponent.setStatus('current')
if mibBuilder.loadTexts:
cerentSensorComponent.setDescription('Misc. sensor component.')
cerent_chassis15327 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 410))
if mibBuilder.loadTexts:
cerentChassis15327.setStatus('current')
if mibBuilder.loadTexts:
cerentChassis15327.setDescription('Chassis of 15327')
cerent_back_plane15327 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 420))
if mibBuilder.loadTexts:
cerentBackPlane15327.setStatus('current')
if mibBuilder.loadTexts:
cerentBackPlane15327.setDescription('Backplane of 15327')
cerent_xtc_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 430))
if mibBuilder.loadTexts:
cerentXtcCard.setStatus('current')
if mibBuilder.loadTexts:
cerentXtcCard.setDescription('Xtc Card')
cerent_mic_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 440))
if mibBuilder.loadTexts:
cerentMicCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMicCard.setDescription('Mic Card')
cerent_mic_ext_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 450))
if mibBuilder.loadTexts:
cerentMicExtCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMicExtCard.setDescription('Mic Ext Card')
cerent_xtc_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 460))
if mibBuilder.loadTexts:
cerentXtcSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentXtcSlot.setDescription('Xtc Slot')
cerent_mic_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 470))
if mibBuilder.loadTexts:
cerentMicSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentMicSlot.setDescription('Mic Slot')
cerent_vic_encoder_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 480))
if mibBuilder.loadTexts:
cerentVicEncoderLineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentVicEncoderLineCard.setDescription('Vic Encoder Line Card')
cerent_vic_decoder_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 490))
if mibBuilder.loadTexts:
cerentVicDecoderLineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentVicDecoderLineCard.setDescription('Vic Decoder Line Card')
cerent_vic_encoder_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 500))
if mibBuilder.loadTexts:
cerentVicEncoderPort.setStatus('current')
if mibBuilder.loadTexts:
cerentVicEncoderPort.setDescription('Vic Encoder Port')
cerent_vic_decoder_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 510))
if mibBuilder.loadTexts:
cerentVicDecoderPort.setStatus('current')
if mibBuilder.loadTexts:
cerentVicDecoderPort.setDescription('Vic Decoder Port')
cerent_vic_test_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 520))
if mibBuilder.loadTexts:
cerentVicTestPort.setStatus('current')
if mibBuilder.loadTexts:
cerentVicTestPort.setDescription('Vic Test Port')
cerent_aip = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 530))
if mibBuilder.loadTexts:
cerentAip.setStatus('current')
if mibBuilder.loadTexts:
cerentAip.setDescription('')
cerent_bic_smb = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 540))
if mibBuilder.loadTexts:
cerentBicSmb.setStatus('current')
if mibBuilder.loadTexts:
cerentBicSmb.setDescription('Backplane interface card - SMB connector')
cerent_bic_bnc = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 550))
if mibBuilder.loadTexts:
cerentBicBnc.setStatus('current')
if mibBuilder.loadTexts:
cerentBicBnc.setDescription('Backplane interface card - BNC connector')
cerent_fcb = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 560))
if mibBuilder.loadTexts:
cerentFcb.setStatus('current')
if mibBuilder.loadTexts:
cerentFcb.setDescription('')
cerent_environment_control = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 570))
if mibBuilder.loadTexts:
cerentEnvironmentControl.setStatus('current')
if mibBuilder.loadTexts:
cerentEnvironmentControl.setDescription('Environment Control')
cerent_led_indicator = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 580))
if mibBuilder.loadTexts:
cerentLedIndicator.setStatus('current')
if mibBuilder.loadTexts:
cerentLedIndicator.setDescription('LED Indicator')
cerent_audible_alarm = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 590))
if mibBuilder.loadTexts:
cerentAudibleAlarm.setStatus('current')
if mibBuilder.loadTexts:
cerentAudibleAlarm.setDescription('Audible Alarm')
cerent_xc10g = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 600))
if mibBuilder.loadTexts:
cerentXc10g.setStatus('current')
if mibBuilder.loadTexts:
cerentXc10g.setDescription('Cross Connect 192 card')
cerent_oc192_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 610))
if mibBuilder.loadTexts:
cerentOc192Card.setStatus('current')
if mibBuilder.loadTexts:
cerentOc192Card.setDescription('OC192 Card')
cerent_oc192_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 620))
if mibBuilder.loadTexts:
cerentOc192Port.setStatus('current')
if mibBuilder.loadTexts:
cerentOc192Port.setDescription('OC192 Port')
cerent_ds3e_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 630))
if mibBuilder.loadTexts:
cerentDs3eCard.setStatus('current')
if mibBuilder.loadTexts:
cerentDs3eCard.setDescription('DS3E Line Card')
cerent_ds3ne_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 640))
if mibBuilder.loadTexts:
cerentDs3neCard.setStatus('current')
if mibBuilder.loadTexts:
cerentDs3neCard.setDescription('DS3NE Line Card')
cerent15216_opm_chassis = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 650))
if mibBuilder.loadTexts:
cerent15216OpmChassis.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmChassis.setDescription('')
cerent15216_opm_back_plane = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 660))
if mibBuilder.loadTexts:
cerent15216OpmBackPlane.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmBackPlane.setDescription('')
cerent15216_opm_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 670))
if mibBuilder.loadTexts:
cerent15216OpmSlot.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmSlot.setDescription('')
cerent15216_opm_controller = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 680))
if mibBuilder.loadTexts:
cerent15216OpmController.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmController.setDescription('OPM Controller Module')
cerent15216_opm_spectrometer = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 690))
if mibBuilder.loadTexts:
cerent15216OpmSpectrometer.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmSpectrometer.setDescription('OPM Spectrometer Module')
cerent15216_opm_optical_switch = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 700))
if mibBuilder.loadTexts:
cerent15216OpmOpticalSwitch.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmOpticalSwitch.setDescription('OPM Optical Switch Module')
cerent15216_opm_optical_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 710))
if mibBuilder.loadTexts:
cerent15216OpmOpticalPort.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmOpticalPort.setDescription('OPM Optical Port')
cerent15216_opm_serial_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 720))
if mibBuilder.loadTexts:
cerent15216OpmSerialPort.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmSerialPort.setDescription('OPM RS-232 port for Craft')
cerent15216_opm_led_indicator = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 730))
if mibBuilder.loadTexts:
cerent15216OpmLedIndicator.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmLedIndicator.setDescription('OPM LED')
cerent15216_opm_relay = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 740))
if mibBuilder.loadTexts:
cerent15216OpmRelay.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmRelay.setDescription('OPM Relay')
cerent15216_opm_power_supply = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 750))
if mibBuilder.loadTexts:
cerent15216OpmPowerSupply.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmPowerSupply.setDescription('OPM Power Supply')
cerent15216_opm_pcmcia_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 760))
if mibBuilder.loadTexts:
cerent15216OpmPcmciaSlot.setStatus('current')
if mibBuilder.loadTexts:
cerent15216OpmPcmciaSlot.setDescription('OPM PCMCIA slot')
cerent_oc12_quad_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 770))
if mibBuilder.loadTexts:
cerentOc12QuadCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOc12QuadCard.setDescription('Four Port OC12 Line Card')
cerent_g1000_quad_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 780))
if mibBuilder.loadTexts:
cerentG1000QuadCard.setStatus('deprecated')
if mibBuilder.loadTexts:
cerentG1000QuadCard.setDescription('G1000-4 Card')
cerent_g1000_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 790))
if mibBuilder.loadTexts:
cerentG1000Port.setStatus('current')
if mibBuilder.loadTexts:
cerentG1000Port.setDescription('G1000 Port')
cerent_ml_ether_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 791))
if mibBuilder.loadTexts:
cerentMlEtherPort.setStatus('current')
if mibBuilder.loadTexts:
cerentMlEtherPort.setDescription('Ether Port on ML Series Ether card')
cerent_ml_pos_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 792))
if mibBuilder.loadTexts:
cerentMlPosPort.setStatus('current')
if mibBuilder.loadTexts:
cerentMlPosPort.setDescription('POS Port on ML Series Ether card')
cerent_g1000_generic_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 800))
if mibBuilder.loadTexts:
cerentG1000GenericCard.setStatus('current')
if mibBuilder.loadTexts:
cerentG1000GenericCard.setDescription('G1000 Card')
cerent_ml100_generic_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 801))
if mibBuilder.loadTexts:
cerentML100GenericCard.setStatus('current')
if mibBuilder.loadTexts:
cerentML100GenericCard.setDescription('ML100T ether Card')
cerent_ml1000_generic_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 802))
if mibBuilder.loadTexts:
cerentML1000GenericCard.setStatus('current')
if mibBuilder.loadTexts:
cerentML1000GenericCard.setDescription('ML1000T ether Card')
cerent_g1_k4_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 810))
if mibBuilder.loadTexts:
cerentG1K4Card.setStatus('current')
if mibBuilder.loadTexts:
cerentG1K4Card.setDescription('G1K-4 Card')
cerent_oc192_ir_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 820))
if mibBuilder.loadTexts:
cerentOc192IrCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOc192IrCard.setDescription('OC192 Intermediate Reach Card')
cerent_oc192_lr_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 830))
if mibBuilder.loadTexts:
cerentOc192LrCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOc192LrCard.setDescription('OC192 Long Reach Card')
cerent_oc192_itu_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 840))
if mibBuilder.loadTexts:
cerentOc192ItuCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOc192ItuCard.setDescription('OC192 ITU Card')
cerent_oc3n1_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 850))
if mibBuilder.loadTexts:
cerentOc3n1Card.setStatus('current')
if mibBuilder.loadTexts:
cerentOc3n1Card.setDescription('OC3 1-port Card')
ape = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 860))
if mibBuilder.loadTexts:
ape.setStatus('current')
if mibBuilder.loadTexts:
ape.setDescription('')
one_ge_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 870))
if mibBuilder.loadTexts:
oneGePort.setStatus('current')
if mibBuilder.loadTexts:
oneGePort.setDescription('1 GBit/Sec Ethernet Port')
ten_ge_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 880))
if mibBuilder.loadTexts:
tenGePort.setStatus('current')
if mibBuilder.loadTexts:
tenGePort.setDescription('10 GBit/Sec Ethernet Port')
escon_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 890))
if mibBuilder.loadTexts:
esconPort.setStatus('current')
if mibBuilder.loadTexts:
esconPort.setDescription('')
dv6000_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 900))
if mibBuilder.loadTexts:
dv6000Port.setStatus('current')
if mibBuilder.loadTexts:
dv6000Port.setDescription('')
cerent_e1n14 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 910))
if mibBuilder.loadTexts:
cerentE1n14.setStatus('current')
if mibBuilder.loadTexts:
cerentE1n14.setDescription('The OID definition for E1N-14 card.')
cerent_back_plane454_sdh = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 911))
if mibBuilder.loadTexts:
cerentBackPlane454SDH.setStatus('current')
if mibBuilder.loadTexts:
cerentBackPlane454SDH.setDescription('')
cerent_chassis454_sdh = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 912))
if mibBuilder.loadTexts:
cerentChassis454SDH.setStatus('current')
if mibBuilder.loadTexts:
cerentChassis454SDH.setDescription('')
cerent_ds3in_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 913))
if mibBuilder.loadTexts:
cerentDs3inCard.setStatus('current')
if mibBuilder.loadTexts:
cerentDs3inCard.setDescription('Ds3in card.')
cerent_e312_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 914))
if mibBuilder.loadTexts:
cerentE312Card.setStatus('current')
if mibBuilder.loadTexts:
cerentE312Card.setDescription('E3-12 card.')
cerent_e1_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 915))
if mibBuilder.loadTexts:
cerentE1Port.setStatus('current')
if mibBuilder.loadTexts:
cerentE1Port.setDescription('E1 port.')
cerent_ds3i_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 916))
if mibBuilder.loadTexts:
cerentDs3iPort.setStatus('current')
if mibBuilder.loadTexts:
cerentDs3iPort.setDescription('Ds3i port.')
cerent_e3_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 917))
if mibBuilder.loadTexts:
cerentE3Port.setStatus('current')
if mibBuilder.loadTexts:
cerentE3Port.setDescription('E3 port')
cerent_alm_pwr_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 918))
if mibBuilder.loadTexts:
cerentAlmPwrSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentAlmPwrSlot.setDescription('EFCA Alarm/Power slot')
cerent_crft_tmg_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 919))
if mibBuilder.loadTexts:
cerentCrftTmgSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentCrftTmgSlot.setDescription('EFCA Craft/Timing Slot')
cerent_alm_pwr = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 920))
if mibBuilder.loadTexts:
cerentAlmPwr.setStatus('current')
if mibBuilder.loadTexts:
cerentAlmPwr.setDescription('EFCA Alarm/Power Card')
cerent_crft_tmg = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 921))
if mibBuilder.loadTexts:
cerentCrftTmg.setStatus('current')
if mibBuilder.loadTexts:
cerentCrftTmg.setDescription('EFCA Craft/Timing Card')
cerent_fmec_db = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 922))
if mibBuilder.loadTexts:
cerentFmecDb.setStatus('current')
if mibBuilder.loadTexts:
cerentFmecDb.setDescription('FMEC-DB card')
cerent_fmec_smz_e1 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 923))
if mibBuilder.loadTexts:
cerentFmecSmzE1.setStatus('current')
if mibBuilder.loadTexts:
cerentFmecSmzE1.setDescription('FMEC-SMZ-E1 card')
cerent_fmec_blank = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 924))
if mibBuilder.loadTexts:
cerentFmecBlank.setStatus('current')
if mibBuilder.loadTexts:
cerentFmecBlank.setDescription('FMEC-BLANK card')
cerent_xc_vxl_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 925))
if mibBuilder.loadTexts:
cerentXcVxlCard.setStatus('current')
if mibBuilder.loadTexts:
cerentXcVxlCard.setDescription('VC cross connect card.')
cerent_efca454_sdh = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 926))
if mibBuilder.loadTexts:
cerentEfca454Sdh.setStatus('current')
if mibBuilder.loadTexts:
cerentEfca454Sdh.setDescription('EFCA')
cerent_fmec_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 927))
if mibBuilder.loadTexts:
cerentFmecSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentFmecSlot.setDescription('FMEC Slot')
cerent_fmec_smz_e3 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 928))
if mibBuilder.loadTexts:
cerentFmecSmzE3.setStatus('current')
if mibBuilder.loadTexts:
cerentFmecSmzE3.setDescription('FMEC Slot')
cerent_ds3i = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 929))
if mibBuilder.loadTexts:
cerentDs3i.setStatus('current')
if mibBuilder.loadTexts:
cerentDs3i.setDescription('FMEC Slot')
cerent15216_edfa_chassis = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 930))
if mibBuilder.loadTexts:
cerent15216EdfaChassis.setStatus('current')
if mibBuilder.loadTexts:
cerent15216EdfaChassis.setDescription('')
cerent_aici = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 931))
if mibBuilder.loadTexts:
cerentAici.setStatus('current')
if mibBuilder.loadTexts:
cerentAici.setDescription('Aici Card')
cerent_fudc_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 932))
if mibBuilder.loadTexts:
cerentFudcPort.setStatus('current')
if mibBuilder.loadTexts:
cerentFudcPort.setDescription('Aici F-UDC Port')
cerent_dcc_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 933))
if mibBuilder.loadTexts:
cerentDccPort.setStatus('current')
if mibBuilder.loadTexts:
cerentDccPort.setDescription('Aici DCC-UDC Port')
cerent_aici_aep = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 934))
if mibBuilder.loadTexts:
cerentAiciAep.setStatus('current')
if mibBuilder.loadTexts:
cerentAiciAep.setDescription('Aici Alarm Expansion Panel')
cerent_aici_aie = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 935))
if mibBuilder.loadTexts:
cerentAiciAie.setStatus('current')
if mibBuilder.loadTexts:
cerentAiciAie.setDescription('Aici Alarm Interface Extension')
cerent_xc_vxl25_g_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 936))
if mibBuilder.loadTexts:
cerentXcVxl25GCard.setStatus('current')
if mibBuilder.loadTexts:
cerentXcVxl25GCard.setDescription('XCVXL25G card')
cerent_e114 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 937))
if mibBuilder.loadTexts:
cerentE114.setStatus('current')
if mibBuilder.loadTexts:
cerentE114.setDescription('The OID definition for E1-14 card.')
cerent_pim_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 940))
if mibBuilder.loadTexts:
cerentPIMSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentPIMSlot.setDescription('Pluggable IO Module Slot')
cerent_pim4_ppm = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 950))
if mibBuilder.loadTexts:
cerentPIM4PPM.setStatus('current')
if mibBuilder.loadTexts:
cerentPIM4PPM.setDescription('Pluggable IO Module containing 4 Pluggable Port Modules.')
cerent_ppm_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 960))
if mibBuilder.loadTexts:
cerentPPMSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentPPMSlot.setDescription('Pluggable Port Module Slot')
cerent_ppm1_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 970))
if mibBuilder.loadTexts:
cerentPPM1Port.setStatus('current')
if mibBuilder.loadTexts:
cerentPPM1Port.setDescription('Pluggable Port Module containing one Port')
cerent_chassis15310_cl_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1000))
if mibBuilder.loadTexts:
cerentChassis15310ClOid.setStatus('current')
if mibBuilder.loadTexts:
cerentChassis15310ClOid.setDescription('Chassis of ONS15310 CL')
cerent_chassis15310_ma_ansi_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1010))
if mibBuilder.loadTexts:
cerentChassis15310MaAnsiOid.setStatus('current')
if mibBuilder.loadTexts:
cerentChassis15310MaAnsiOid.setDescription('Chassis of ONS15310 MA ANSI')
cerent_chassis15310_ma_etsi_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1020))
if mibBuilder.loadTexts:
cerentChassis15310MaEtsiOid.setStatus('current')
if mibBuilder.loadTexts:
cerentChassis15310MaEtsiOid.setDescription('Chassis of ONS15310 MA ETSI')
cerent_backplane15310_cl_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1030))
if mibBuilder.loadTexts:
cerentBackplane15310ClOid.setStatus('current')
if mibBuilder.loadTexts:
cerentBackplane15310ClOid.setDescription('Backplane of ONS15310 CL')
cerent_backplane15310_ma_ansi_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1040))
if mibBuilder.loadTexts:
cerentBackplane15310MaAnsiOid.setStatus('current')
if mibBuilder.loadTexts:
cerentBackplane15310MaAnsiOid.setDescription('Backplane of ONS15310 MA ANSI')
cerent_backplane15310_ma_etsi_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1050))
if mibBuilder.loadTexts:
cerentBackplane15310MaEtsiOid.setStatus('current')
if mibBuilder.loadTexts:
cerentBackplane15310MaEtsiOid.setDescription('Backplane of ONS15310 MA ETSI')
cerent_ctx_card_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1060))
if mibBuilder.loadTexts:
cerentCtxCardOid.setStatus('current')
if mibBuilder.loadTexts:
cerentCtxCardOid.setDescription('CTX Card')
cerent_bbe_line_card_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1070))
if mibBuilder.loadTexts:
cerentBbeLineCardOid.setStatus('current')
if mibBuilder.loadTexts:
cerentBbeLineCardOid.setDescription('BBE Line Card')
cerent_wbe_line_card_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1080))
if mibBuilder.loadTexts:
cerentWbeLineCardOid.setStatus('current')
if mibBuilder.loadTexts:
cerentWbeLineCardOid.setDescription('WBE Line Card')
cerent_ctx_slot_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1090))
if mibBuilder.loadTexts:
cerentCtxSlotOid.setStatus('current')
if mibBuilder.loadTexts:
cerentCtxSlotOid.setDescription('CTX Slot')
cerent_bbe_slot_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1100))
if mibBuilder.loadTexts:
cerentBbeSlotOid.setStatus('current')
if mibBuilder.loadTexts:
cerentBbeSlotOid.setDescription('BBE Slot')
cerent_wbe_slot_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1110))
if mibBuilder.loadTexts:
cerentWbeSlotOid.setStatus('current')
if mibBuilder.loadTexts:
cerentWbeSlotOid.setDescription('WBE Slot')
cerent_asap4_line_card_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1120))
if mibBuilder.loadTexts:
cerentAsap4LineCardOid.setStatus('current')
if mibBuilder.loadTexts:
cerentAsap4LineCardOid.setDescription('ASAP Four Ports Line Card')
cerent_mrc4_line_card_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1130))
if mibBuilder.loadTexts:
cerentMrc4LineCardOid.setStatus('current')
if mibBuilder.loadTexts:
cerentMrc4LineCardOid.setDescription('MRC Four ports Line Card')
cerent310_ce100t8_line_card_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1140))
if mibBuilder.loadTexts:
cerent310CE100t8LineCardOid.setStatus('current')
if mibBuilder.loadTexts:
cerent310CE100t8LineCardOid.setDescription('ML2 Mapper Line Card')
cerent310_ml100t8_line_card_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1150))
if mibBuilder.loadTexts:
cerent310ML100t8LineCardOid.setStatus('current')
if mibBuilder.loadTexts:
cerent310ML100t8LineCardOid.setDescription('ML2 L2L3 Line Card')
cerent_l1_p_pos_port_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1160))
if mibBuilder.loadTexts:
cerentL1PPosPortOid.setStatus('current')
if mibBuilder.loadTexts:
cerentL1PPosPortOid.setDescription('L1P POS port')
cerent_l1_p_ether_port_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1170))
if mibBuilder.loadTexts:
cerentL1PEtherPortOid.setStatus('current')
if mibBuilder.loadTexts:
cerentL1PEtherPortOid.setDescription('L1P Ether port')
fc10g_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1180))
if mibBuilder.loadTexts:
fc10gPort.setStatus('current')
if mibBuilder.loadTexts:
fc10gPort.setDescription('10 GBit/Sec Fiber Channel Port')
ficon1gport = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1190))
if mibBuilder.loadTexts:
ficon1gport.setStatus('current')
if mibBuilder.loadTexts:
ficon1gport.setDescription('')
ficon2gport = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1200))
if mibBuilder.loadTexts:
ficon2gport.setStatus('current')
if mibBuilder.loadTexts:
ficon2gport.setDescription('')
ficon4gport = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1710))
if mibBuilder.loadTexts:
ficon4gport.setStatus('current')
if mibBuilder.loadTexts:
ficon4gport.setDescription('')
cerent_oc192_card4_ports = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1210))
if mibBuilder.loadTexts:
cerentOc192Card4Ports.setStatus('current')
if mibBuilder.loadTexts:
cerentOc192Card4Ports.setDescription('ONS OC192 4 ports I/O card')
cerent_oc48_card8_ports = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1215))
if mibBuilder.loadTexts:
cerentOc48Card8Ports.setStatus('current')
if mibBuilder.loadTexts:
cerentOc48Card8Ports.setDescription('ONS OC48 8 ports I/O card')
cerent_oc48_card16_ports = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1220))
if mibBuilder.loadTexts:
cerentOc48Card16Ports.setStatus('current')
if mibBuilder.loadTexts:
cerentOc48Card16Ports.setDescription('ONS OC48 16 ports I/O card')
cerent15600_controller_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1225))
if mibBuilder.loadTexts:
cerent15600ControllerSlot.setStatus('current')
if mibBuilder.loadTexts:
cerent15600ControllerSlot.setDescription('ONS 15600 controller card slot')
cerent_tsc = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1230))
if mibBuilder.loadTexts:
cerentTsc.setStatus('current')
if mibBuilder.loadTexts:
cerentTsc.setDescription('ONS 15600 Timing Shelf Controller card')
cerent_chassis600 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1235))
if mibBuilder.loadTexts:
cerentChassis600.setStatus('current')
if mibBuilder.loadTexts:
cerentChassis600.setDescription('Chassis of ONS 15600')
cerent_back_plane600 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1240))
if mibBuilder.loadTexts:
cerentBackPlane600.setStatus('current')
if mibBuilder.loadTexts:
cerentBackPlane600.setDescription('Backplane of ONS 15600')
cerent_cap = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1245))
if mibBuilder.loadTexts:
cerentCap.setStatus('current')
if mibBuilder.loadTexts:
cerentCap.setDescription('ONS 15600 Customer Access Panel')
cerent_cxc = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1250))
if mibBuilder.loadTexts:
cerentCxc.setStatus('current')
if mibBuilder.loadTexts:
cerentCxc.setDescription('ONS 15600 Cross Connect Card')
cerent_cxc_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1255))
if mibBuilder.loadTexts:
cerentCxcSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentCxcSlot.setDescription('ONS 15600 Cross Connect Card Slot')
cerent_filler_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1260))
if mibBuilder.loadTexts:
cerentFillerCard.setStatus('current')
if mibBuilder.loadTexts:
cerentFillerCard.setDescription('ONS 15600 Filler Card')
cerent_fcmr_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1265))
if mibBuilder.loadTexts:
cerentFcmrLineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentFcmrLineCard.setDescription('')
cerent_fcmr_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1270))
if mibBuilder.loadTexts:
cerentFcmrPort.setStatus('current')
if mibBuilder.loadTexts:
cerentFcmrPort.setDescription('')
cerent_ds3_xm12_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1285))
if mibBuilder.loadTexts:
cerentDs3Xm12Card.setStatus('current')
if mibBuilder.loadTexts:
cerentDs3Xm12Card.setDescription('Ds3Xm12 card.')
ds3_ec148_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1290))
if mibBuilder.loadTexts:
ds3Ec148LineCard.setStatus('current')
if mibBuilder.loadTexts:
ds3Ec148LineCard.setDescription('')
gfp_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1300))
if mibBuilder.loadTexts:
gfpPort.setStatus('current')
if mibBuilder.loadTexts:
gfpPort.setDescription('')
cerent454_ce100t8_line_card_oid = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1310))
if mibBuilder.loadTexts:
cerent454CE100t8LineCardOid.setStatus('current')
if mibBuilder.loadTexts:
cerent454CE100t8LineCardOid.setDescription('')
bic_univ = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1320))
if mibBuilder.loadTexts:
bicUniv.setStatus('current')
if mibBuilder.loadTexts:
bicUniv.setDescription('')
bic_unknown = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1330))
if mibBuilder.loadTexts:
bicUnknown.setStatus('current')
if mibBuilder.loadTexts:
bicUnknown.setDescription('')
sdi_d1_video_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1340))
if mibBuilder.loadTexts:
sdiD1VideoPort.setStatus('current')
if mibBuilder.loadTexts:
sdiD1VideoPort.setDescription('')
hdtv_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1350))
if mibBuilder.loadTexts:
hdtvPort.setStatus('current')
if mibBuilder.loadTexts:
hdtvPort.setDescription('')
pass_thru_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1360))
if mibBuilder.loadTexts:
passThruPort.setStatus('current')
if mibBuilder.loadTexts:
passThruPort.setDescription('')
etr_clo_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1370))
if mibBuilder.loadTexts:
etrCloPort.setStatus('current')
if mibBuilder.loadTexts:
etrCloPort.setDescription('')
isc_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1380))
if mibBuilder.loadTexts:
iscPort.setStatus('current')
if mibBuilder.loadTexts:
iscPort.setDescription('')
fc1g_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1390))
if mibBuilder.loadTexts:
fc1gPort.setStatus('current')
if mibBuilder.loadTexts:
fc1gPort.setDescription('')
fc2g_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1400))
if mibBuilder.loadTexts:
fc2gPort.setStatus('current')
if mibBuilder.loadTexts:
fc2gPort.setDescription('')
fc4g_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1700))
if mibBuilder.loadTexts:
fc4gPort.setStatus('current')
if mibBuilder.loadTexts:
fc4gPort.setDescription('')
mr_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1410))
if mibBuilder.loadTexts:
mrSlot.setStatus('current')
if mibBuilder.loadTexts:
mrSlot.setDescription('')
isc3_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1420))
if mibBuilder.loadTexts:
isc3Port.setStatus('current')
if mibBuilder.loadTexts:
isc3Port.setDescription('')
isc3_peer1g_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1720))
if mibBuilder.loadTexts:
isc3Peer1gPort.setStatus('current')
if mibBuilder.loadTexts:
isc3Peer1gPort.setDescription('')
isc3_peer2g_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1730))
if mibBuilder.loadTexts:
isc3Peer2gPort.setStatus('current')
if mibBuilder.loadTexts:
isc3Peer2gPort.setDescription('')
cerent_ds1i14 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1430))
if mibBuilder.loadTexts:
cerentDs1i14.setStatus('current')
if mibBuilder.loadTexts:
cerentDs1i14.setDescription('The OID definition for DS1I-14 card.')
cerent_fmec_ds1i14 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1440))
if mibBuilder.loadTexts:
cerentFmecDs1i14.setStatus('current')
if mibBuilder.loadTexts:
cerentFmecDs1i14.setDescription('The OID definition for FMEC-SMZ-DS1I-14 card.')
cerent_back_plane454_hd = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1450))
if mibBuilder.loadTexts:
cerentBackPlane454HD.setStatus('current')
if mibBuilder.loadTexts:
cerentBackPlane454HD.setDescription('15454 High Density Backplane')
cerent_txpd10_g_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1550))
if mibBuilder.loadTexts:
cerentTxpd10GCard.setStatus('current')
if mibBuilder.loadTexts:
cerentTxpd10GCard.setDescription('TXP_MR_10G_LINE_CARD')
cerent_txpd10_e_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1275))
if mibBuilder.loadTexts:
cerentTxpd10ECard.setStatus('current')
if mibBuilder.loadTexts:
cerentTxpd10ECard.setDescription('TXP_MR_10E_LINE_CARD')
cerent_txpd25_g_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1560))
if mibBuilder.loadTexts:
cerentTxpd25GCard.setStatus('current')
if mibBuilder.loadTexts:
cerentTxpd25GCard.setDescription('TXP_MR_2_5G_LINE_CARD')
cerent_txpd_p25_g_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1570))
if mibBuilder.loadTexts:
cerentTxpdP25GCard.setStatus('current')
if mibBuilder.loadTexts:
cerentTxpdP25GCard.setDescription('TXPP_MR_2_5G_LINE_CARD')
cerent_txpd10_ex_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4160))
if mibBuilder.loadTexts:
cerentTxpd10EXCard.setStatus('current')
if mibBuilder.loadTexts:
cerentTxpd10EXCard.setDescription('TXP-MR-10EX_LINE_CARD')
cerent_otu2_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4220))
if mibBuilder.loadTexts:
cerentOtu2Port.setStatus('current')
if mibBuilder.loadTexts:
cerentOtu2Port.setDescription('Otu2 port.')
cerent_txpd_p10_ex_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4165))
if mibBuilder.loadTexts:
cerentTxpdP10EXCard.setStatus('current')
if mibBuilder.loadTexts:
cerentTxpdP10EXCard.setDescription('TXPP-MR-10EX_LINE_CARD')
cerent_muxpd25_g10_g_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1580))
if mibBuilder.loadTexts:
cerentMuxpd25G10GCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMuxpd25G10GCard.setDescription('MXP_2_5G_10G_LINE_CARD')
cerent_muxpd25_g10_e_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1280))
if mibBuilder.loadTexts:
cerentMuxpd25G10ECard.setStatus('current')
if mibBuilder.loadTexts:
cerentMuxpd25G10ECard.setDescription('MXP_2_5G_10E_LINE_CARD')
cerent_muxpd25_g10_x_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4170))
if mibBuilder.loadTexts:
cerentMuxpd25G10XCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMuxpd25G10XCard.setDescription('MXP_2_5G_10X_LINE_CARD')
cerent_dwdm_client_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1590))
if mibBuilder.loadTexts:
cerentDwdmClientPort.setStatus('current')
if mibBuilder.loadTexts:
cerentDwdmClientPort.setDescription('DWDM client port.')
cerent_dwdm_trunk_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1600))
if mibBuilder.loadTexts:
cerentDwdmTrunkPort.setStatus('current')
if mibBuilder.loadTexts:
cerentDwdmTrunkPort.setDescription('DWDM trunk port.')
cerent_muxpd_mr25_g_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1610))
if mibBuilder.loadTexts:
cerentMuxpdMr25GCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMuxpdMr25GCard.setDescription('MXP_MR_2_5G_LINE_CARD.')
cerent_muxpd_p_mr25_g_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1620))
if mibBuilder.loadTexts:
cerentMuxpdPMr25GCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMuxpdPMr25GCard.setDescription('MXPP_MR_2_5G_LINE_CARD.')
cerent_mxp_mr10_dmex_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4270))
if mibBuilder.loadTexts:
cerentMxpMr10DmexCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMxpMr10DmexCard.setDescription('MXP-MR-10DMEX card.')
cerent_xpd_ge_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4210))
if mibBuilder.loadTexts:
cerentXpdGECard.setStatus('current')
if mibBuilder.loadTexts:
cerentXpdGECard.setDescription('GE_XP_LINE_CARD.')
cerent_xpd10_ge_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4205))
if mibBuilder.loadTexts:
cerentXpd10GECard.setStatus('current')
if mibBuilder.loadTexts:
cerentXpd10GECard.setDescription('10GE_XP_LINE_CARD.')
cerent_mm850_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1630))
if mibBuilder.loadTexts:
cerentMm850Port.setStatus('current')
if mibBuilder.loadTexts:
cerentMm850Port.setDescription('MM_850_PORT.')
cerent_sm1310_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1640))
if mibBuilder.loadTexts:
cerentSm1310Port.setStatus('current')
if mibBuilder.loadTexts:
cerentSm1310Port.setDescription('SM_1310_PORT.')
cerent_xc_vxc_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1670))
if mibBuilder.loadTexts:
cerentXcVxcCard.setStatus('current')
if mibBuilder.loadTexts:
cerentXcVxcCard.setDescription('VC cross connect card.')
cerent_xc_vxc25_g_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1680))
if mibBuilder.loadTexts:
cerentXcVxc25GCard.setStatus('current')
if mibBuilder.loadTexts:
cerentXcVxc25GCard.setDescription('XCVXC 2.5G card')
cerent_opt_bst_e_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 1690))
if mibBuilder.loadTexts:
cerentOptBstECard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptBstECard.setDescription('Enhanced Optical Booster Card.')
cerent_e1_p42_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4000))
if mibBuilder.loadTexts:
cerentE1P42LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentE1P42LineCard.setDescription('E1_42_LINE_CARD.')
cerent_e1n_p42_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4005))
if mibBuilder.loadTexts:
cerentE1nP42LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentE1nP42LineCard.setDescription('E1N_42_LINE_CARD.')
cerent_fmec_e1_p42_type_unprot_w120_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4010))
if mibBuilder.loadTexts:
cerentFmecE1P42TypeUnprotW120Card.setStatus('current')
if mibBuilder.loadTexts:
cerentFmecE1P42TypeUnprotW120Card.setDescription('FMEC_E1_42_UNPROT_120_CARD.')
cerent_fmec_e1_p42_type1_to3_w120a_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4015))
if mibBuilder.loadTexts:
cerentFmecE1P42Type1To3W120aCard.setStatus('current')
if mibBuilder.loadTexts:
cerentFmecE1P42Type1To3W120aCard.setDescription('FMEC_E1_42_1TO3_120A_CARD.')
cerent_fmec_e1_p42_type1_to3_w120b_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4020))
if mibBuilder.loadTexts:
cerentFmecE1P42Type1To3W120bCard.setStatus('current')
if mibBuilder.loadTexts:
cerentFmecE1P42Type1To3W120bCard.setDescription('FMEC_E1_42_1TO3_120B_CARD.')
cerent_stm1e12_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4025))
if mibBuilder.loadTexts:
cerentStm1e12LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentStm1e12LineCard.setDescription('STM1E_12_LINE_CARD.')
cerent_stm1e_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4030))
if mibBuilder.loadTexts:
cerentStm1ePort.setStatus('current')
if mibBuilder.loadTexts:
cerentStm1ePort.setDescription('STM1E_PORT.')
cerent_fmec155e_unprot_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4035))
if mibBuilder.loadTexts:
cerentFmec155eUnprotCard.setStatus('current')
if mibBuilder.loadTexts:
cerentFmec155eUnprotCard.setDescription('FMEC_155E_CARD_UNPROT.')
cerent_fmec155e1_to1_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4040))
if mibBuilder.loadTexts:
cerentFmec155e1To1Card.setStatus('current')
if mibBuilder.loadTexts:
cerentFmec155e1To1Card.setDescription('FMEC_155E_CARD_1TO1.')
cerent_fmec155e1_to3_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4045))
if mibBuilder.loadTexts:
cerentFmec155e1To3Card.setStatus('current')
if mibBuilder.loadTexts:
cerentFmec155e1To3Card.setDescription('FMEC_155E_CARD_1TO3.')
cerent15216_edfa3_shelf_controller = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4050))
if mibBuilder.loadTexts:
cerent15216Edfa3ShelfController.setStatus('current')
if mibBuilder.loadTexts:
cerent15216Edfa3ShelfController.setDescription('')
cerent15216_edfa3_optics_module = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4051))
if mibBuilder.loadTexts:
cerent15216Edfa3OpticsModule.setStatus('current')
if mibBuilder.loadTexts:
cerent15216Edfa3OpticsModule.setDescription('')
cerent15216_edfa_ether_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4052))
if mibBuilder.loadTexts:
cerent15216EdfaEtherPort.setStatus('current')
if mibBuilder.loadTexts:
cerent15216EdfaEtherPort.setDescription('Ether port.')
cerent15216_edfa_serial_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4053))
if mibBuilder.loadTexts:
cerent15216EdfaSerialPort.setStatus('current')
if mibBuilder.loadTexts:
cerent15216EdfaSerialPort.setDescription('Serial port.')
cerent_ml100_x8_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4055))
if mibBuilder.loadTexts:
cerentMl100X8LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMl100X8LineCard.setDescription('ML-100X 8-ports Card.')
cerent_oscm_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3200))
if mibBuilder.loadTexts:
cerentOscmCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOscmCard.setDescription('Optical Service Channel Module Card.')
cerent_osc_csm_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3205))
if mibBuilder.loadTexts:
cerentOscCsmCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOscCsmCard.setDescription('Optical Service Channel with COmbiner/Separator module Card.')
cerent_opt_pre_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3210))
if mibBuilder.loadTexts:
cerentOptPreCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptPreCard.setDescription('Optical Pre-Amplifier Card.')
cerent_opt_bst_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3215))
if mibBuilder.loadTexts:
cerentOptBstCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptBstCard.setDescription('Optical Booster Card.')
cerent_opt_amp17_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4175))
if mibBuilder.loadTexts:
cerentOptAmp17Card.setStatus('current')
if mibBuilder.loadTexts:
cerentOptAmp17Card.setDescription('Low Gain C-Band Amplifier.')
cerent_opt_amp23_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4180))
if mibBuilder.loadTexts:
cerentOptAmp23Card.setStatus('current')
if mibBuilder.loadTexts:
cerentOptAmp23Card.setDescription('High Gain C-Band Amplifier.')
cerent_opt_demux32_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3220))
if mibBuilder.loadTexts:
cerentOptDemux32ChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptDemux32ChCard.setDescription('Optical De-Mutiplexer 32 Channels Card.')
cerent_opt_demux40_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4195))
if mibBuilder.loadTexts:
cerentOptDemux40ChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptDemux40ChCard.setDescription('Optical De-Mutiplexer 40 Channels Card.')
cerent_opt_mux32_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3225))
if mibBuilder.loadTexts:
cerentOptMux32ChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptMux32ChCard.setDescription('Optical Mutiplexer 32 Channels Card.')
cerent_opt_mux40_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4190))
if mibBuilder.loadTexts:
cerentOptMux40ChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptMux40ChCard.setDescription('Optical Mutiplexer 40 Channels Card.')
cerent_opt_wxc40_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4200))
if mibBuilder.loadTexts:
cerentOptWxc40ChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptWxc40ChCard.setDescription('Optical Wavelenght Cross Connect 40 Channels Card.')
cerent_opt_mux_demux4_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3230))
if mibBuilder.loadTexts:
cerentOptMuxDemux4ChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptMuxDemux4ChCard.setDescription('Optical Multiplexer/De-Mutiplexer 4 Channels Card.')
cerent_oadm1_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3235))
if mibBuilder.loadTexts:
cerentOadm1ChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOadm1ChCard.setDescription('Optical ADM with 1 Channel Card.')
cerent_oadm2_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3240))
if mibBuilder.loadTexts:
cerentOadm2ChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOadm2ChCard.setDescription('Optical ADM with 2 Channels Card.')
cerent_oadm4_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3245))
if mibBuilder.loadTexts:
cerentOadm4ChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOadm4ChCard.setDescription('Optical ADM with 4 Channels Card.')
cerent_oadm1_bn_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3250))
if mibBuilder.loadTexts:
cerentOadm1BnCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOadm1BnCard.setDescription('Optical ADM with 1 Band Card.')
cerent_oadm10_g_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4215))
if mibBuilder.loadTexts:
cerentOadm10GCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOadm10GCard.setDescription('Optical ADM 10G Card.')
cerent_oadm4_bn_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3255))
if mibBuilder.loadTexts:
cerentOadm4BnCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOadm4BnCard.setDescription('Optical ADM with 4 Bands Card.')
cerent_opt_demux32_r_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 980))
if mibBuilder.loadTexts:
cerentOptDemux32RChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptDemux32RChCard.setDescription('Optical De-Mutiplexer 32 Channels Reconfigurable Card.')
cerent_opt_wss32_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 990))
if mibBuilder.loadTexts:
cerentOptWss32ChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptWss32ChCard.setDescription('Optical Wavelenght Selectable Switch 32 Channels Reconfigurable Card.')
cerent_opt_wss40_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4185))
if mibBuilder.loadTexts:
cerentOptWss40ChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptWss40ChCard.setDescription('Optical Wavelenght Selectable Switch 40 Channels Reconfigurable Card.')
cerent_ots_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3260))
if mibBuilder.loadTexts:
cerentOTSPort.setStatus('current')
if mibBuilder.loadTexts:
cerentOTSPort.setDescription('Optical Transport Port.')
cerent_aots_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3265))
if mibBuilder.loadTexts:
cerentAOTSPort.setStatus('current')
if mibBuilder.loadTexts:
cerentAOTSPort.setDescription('Optical Amplifier Transport Port.')
cerent_oms_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3270))
if mibBuilder.loadTexts:
cerentOMSPort.setStatus('current')
if mibBuilder.loadTexts:
cerentOMSPort.setDescription('Optical Multiplex Section Port.')
cerent_och_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 3275))
if mibBuilder.loadTexts:
cerentOCHPort.setStatus('current')
if mibBuilder.loadTexts:
cerentOCHPort.setDescription('Optical Channel Port.')
cerent_opt_bst_l_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4060))
if mibBuilder.loadTexts:
cerentOptBstLCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptBstLCard.setDescription('L-band amplifier.')
cerent_opt_amp_l_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4065))
if mibBuilder.loadTexts:
cerentOptAmpLCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptAmpLCard.setDescription('L-band pre-amplifier.')
cerent_opt_amp_c_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4255))
if mibBuilder.loadTexts:
cerentOptAmpCCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptAmpCCard.setDescription('C-band amplifier.')
cerent_opt_r_amp_c_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4285))
if mibBuilder.loadTexts:
cerentOptRAmpCCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptRAmpCCard.setDescription('C-band RAMAN amplifier.')
cerent_opt_r_amp_e_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4287))
if mibBuilder.loadTexts:
cerentOptRAmpECard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptRAmpECard.setDescription('C-band Enhanced RAMAN amplifier.')
cerent_dmx32_l_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4070))
if mibBuilder.loadTexts:
cerentDmx32LCard.setStatus('current')
if mibBuilder.loadTexts:
cerentDmx32LCard.setDescription('L-band 32 ch. demux.')
cerent_wss32_l_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4075))
if mibBuilder.loadTexts:
cerentWss32LCard.setStatus('current')
if mibBuilder.loadTexts:
cerentWss32LCard.setDescription('L-band 32 ch. WSS.')
cerent_wss40_l_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4225))
if mibBuilder.loadTexts:
cerentWss40LCard.setStatus('current')
if mibBuilder.loadTexts:
cerentWss40LCard.setDescription('L-band 40 ch. WSS.')
cerent_wss_ce40_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4260))
if mibBuilder.loadTexts:
cerentWssCE40Card.setStatus('current')
if mibBuilder.loadTexts:
cerentWssCE40Card.setDescription('CE 40 ch. WSS.')
cerent_mux40_l_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4230))
if mibBuilder.loadTexts:
cerentMux40LCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMux40LCard.setDescription('L-band 40 ch. MUX.')
cerent_dmx40_l_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4235))
if mibBuilder.loadTexts:
cerentDmx40LCard.setStatus('current')
if mibBuilder.loadTexts:
cerentDmx40LCard.setDescription('L-band 40 ch. DMX.')
cerent_dmx_ce40_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4265))
if mibBuilder.loadTexts:
cerentDmxCE40Card.setStatus('current')
if mibBuilder.loadTexts:
cerentDmxCE40Card.setDescription('CE 40 ch. DMX.')
cerent_wxc40_l_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4240))
if mibBuilder.loadTexts:
cerentWxc40LCard.setStatus('current')
if mibBuilder.loadTexts:
cerentWxc40LCard.setDescription('L-band 40 ch. WXC.')
cerent_mmu_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4080))
if mibBuilder.loadTexts:
cerentMMUCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMMUCard.setDescription('MMU.')
cerent_psm_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4282))
if mibBuilder.loadTexts:
cerentPSMCard.setStatus('current')
if mibBuilder.loadTexts:
cerentPSMCard.setDescription('PSM.')
cerent_xp10_g4_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4290))
if mibBuilder.loadTexts:
cerentXP10G4LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentXP10G4LineCard.setDescription('XP_4_10G_LINE_CARD.')
cerent40_smr1_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4305))
if mibBuilder.loadTexts:
cerent40SMR1Card.setStatus('current')
if mibBuilder.loadTexts:
cerent40SMR1Card.setDescription('40 SMR1 C')
cerent40_smr2_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4310))
if mibBuilder.loadTexts:
cerent40SMR2Card.setStatus('current')
if mibBuilder.loadTexts:
cerent40SMR2Card.setDescription('40 SMR2 C')
cerent_opt_wxc80_ch_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4315))
if mibBuilder.loadTexts:
cerentOptWxc80ChCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptWxc80ChCard.setDescription('Optical Wavelenght Cross Connect 80 Channels Card.')
cerent_back_plane_m2 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4510))
if mibBuilder.loadTexts:
cerentBackPlaneM2.setStatus('current')
if mibBuilder.loadTexts:
cerentBackPlaneM2.setDescription('Backplane for UTS-TNC M2 platform')
cerent_chassis_m2_ansi = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4520))
if mibBuilder.loadTexts:
cerentChassisM2Ansi.setStatus('current')
if mibBuilder.loadTexts:
cerentChassisM2Ansi.setDescription('Chassis for UTS-TNC M2 ANSI platform')
cerent_chassis_m2_etsi = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4530))
if mibBuilder.loadTexts:
cerentChassisM2Etsi.setStatus('current')
if mibBuilder.loadTexts:
cerentChassisM2Etsi.setDescription('Backplane for UTS-TNC M2 SDH platform')
cerent_back_plane_m6 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4540))
if mibBuilder.loadTexts:
cerentBackPlaneM6.setStatus('current')
if mibBuilder.loadTexts:
cerentBackPlaneM6.setDescription('Back plane for M6')
cerent_chassis_m6_ansi = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4550))
if mibBuilder.loadTexts:
cerentChassisM6Ansi.setStatus('current')
if mibBuilder.loadTexts:
cerentChassisM6Ansi.setDescription('Cerent Chassis M6 Ansi')
cerent_chassis_m6_etsi = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4560))
if mibBuilder.loadTexts:
cerentChassisM6Etsi.setStatus('current')
if mibBuilder.loadTexts:
cerentChassisM6Etsi.setDescription('Chassis for UTS-TNC M6 platform')
cerent_power_supply_uts = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4570))
if mibBuilder.loadTexts:
cerentPowerSupplyUts.setStatus('current')
if mibBuilder.loadTexts:
cerentPowerSupplyUts.setDescription('Power supply for UTS mounted on ECU')
cerent_flash_uts = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4580))
if mibBuilder.loadTexts:
cerentFlashUts.setStatus('current')
if mibBuilder.loadTexts:
cerentFlashUts.setDescription('FALSH unit for UTS mounted on ECU')
cerent_aic_in_uts = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4590))
if mibBuilder.loadTexts:
cerentAicInUts.setStatus('current')
if mibBuilder.loadTexts:
cerentAicInUts.setDescription('AIC IN on ECU ')
cerent_aic_out_uts = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4600))
if mibBuilder.loadTexts:
cerentAicOutUts.setStatus('current')
if mibBuilder.loadTexts:
cerentAicOutUts.setDescription('AIC OUT for ECU')
cerent_isc_eqpt_uts = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4610))
if mibBuilder.loadTexts:
cerentIscEqptUts.setStatus('current')
if mibBuilder.loadTexts:
cerentIscEqptUts.setDescription('ISC eqpt on ECU')
cerent_udc_voip_ems_uts = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4620))
if mibBuilder.loadTexts:
cerentUdcVoipEmsUts.setStatus('current')
if mibBuilder.loadTexts:
cerentUdcVoipEmsUts.setDescription('UDC VOIP unit on ECU')
cerent_bits_uts = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4630))
if mibBuilder.loadTexts:
cerentBitsUts.setStatus('current')
if mibBuilder.loadTexts:
cerentBitsUts.setDescription('BITS unit on ECU')
cerent_fan_tray_uts = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4640))
if mibBuilder.loadTexts:
cerentFanTrayUts.setStatus('current')
if mibBuilder.loadTexts:
cerentFanTrayUts.setDescription('FAN Tray UTS')
cerent_alarm_dry_contact_uts = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4645))
if mibBuilder.loadTexts:
cerentAlarmDryContactUts.setStatus('current')
if mibBuilder.loadTexts:
cerentAlarmDryContactUts.setDescription('Alarm Dry Contact UTS')
cerent_io_uts = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4660))
if mibBuilder.loadTexts:
cerentIoUts.setStatus('current')
if mibBuilder.loadTexts:
cerentIoUts.setDescription('IO UTS')
cerent_ecu_tray = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4670))
if mibBuilder.loadTexts:
cerentEcuTray.setStatus('current')
if mibBuilder.loadTexts:
cerentEcuTray.setDescription('ECU Tray')
cerent_tnc_uts_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4680))
if mibBuilder.loadTexts:
cerentTncUtsCard.setStatus('current')
if mibBuilder.loadTexts:
cerentTncUtsCard.setDescription('Transport Node Controller UTS card')
cerent_tsc_uts_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4690))
if mibBuilder.loadTexts:
cerentTscUtsCard.setStatus('current')
if mibBuilder.loadTexts:
cerentTscUtsCard.setDescription('Transport Shelf Controller UTS card')
cerent_usb_uts_port_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4655))
if mibBuilder.loadTexts:
cerentUsbUtsPortCard.setStatus('current')
if mibBuilder.loadTexts:
cerentUsbUtsPortCard.setDescription('UTS USB Port ')
cerent_usb_uts = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4650))
if mibBuilder.loadTexts:
cerentUsbUts.setStatus('current')
if mibBuilder.loadTexts:
cerentUsbUts.setDescription('UTS USB Module ')
cerent_tnc_tsc_uts_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4700))
if mibBuilder.loadTexts:
cerentTncTscUtsSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentTncTscUtsSlot.setDescription('Transport Node Controller Universal Transport Shelf Slot')
cerent_ecu_slot = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4710))
if mibBuilder.loadTexts:
cerentEcuSlot.setStatus('current')
if mibBuilder.loadTexts:
cerentEcuSlot.setDescription('ECU slot')
cerent_msc_isc_uts_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4720))
if mibBuilder.loadTexts:
cerentMscIscUtsPort.setStatus('current')
if mibBuilder.loadTexts:
cerentMscIscUtsPort.setDescription('Multi Shelf Controller - Inter shelf Controller')
cerent_tnc_fe_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4730))
if mibBuilder.loadTexts:
cerentTncFePort.setStatus('current')
if mibBuilder.loadTexts:
cerentTncFePort.setDescription('FE Port')
cerent_pt_system = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4740))
if mibBuilder.loadTexts:
cerentPtSystem.setStatus('current')
if mibBuilder.loadTexts:
cerentPtSystem.setDescription('CPT System - NGXP System')
cerent_ptf10_ge_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4745))
if mibBuilder.loadTexts:
cerentPtf10GECard.setStatus('current')
if mibBuilder.loadTexts:
cerentPtf10GECard.setDescription('CPT System - Uplink Card')
cerent_pt10_ge_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4750))
if mibBuilder.loadTexts:
cerentPt10GECard.setStatus('current')
if mibBuilder.loadTexts:
cerentPt10GECard.setDescription('CPT System - TRIB Card')
cerent_ptsa_ge_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4755))
if mibBuilder.loadTexts:
cerentPtsaGECard.setStatus('current')
if mibBuilder.loadTexts:
cerentPtsaGECard.setDescription('CPT System - Satellite Box')
cerent_ms_isc100t_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4085))
if mibBuilder.loadTexts:
cerentMsIsc100tCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMsIsc100tCard.setDescription('ms-isc-100t.')
cerent_mxp_mr10_dme_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4090))
if mibBuilder.loadTexts:
cerentMxpMr10DmeCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMxpMr10DmeCard.setDescription('mxp-mr-10dme.')
cerent_ce1000_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4095))
if mibBuilder.loadTexts:
cerentCE1000Card.setStatus('current')
if mibBuilder.loadTexts:
cerentCE1000Card.setDescription('CE1000 card')
cerent_ce1000_ether_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4100))
if mibBuilder.loadTexts:
cerentCE1000EtherPort.setStatus('current')
if mibBuilder.loadTexts:
cerentCE1000EtherPort.setDescription('Ether Port on CE1000 card')
cerent_ce1000_pos_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4105))
if mibBuilder.loadTexts:
cerentCE1000PosPort.setStatus('current')
if mibBuilder.loadTexts:
cerentCE1000PosPort.setDescription('POS Port on CE1000 card')
cerent_pim1_ppm = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4110))
if mibBuilder.loadTexts:
cerentPIM1PPM.setStatus('current')
if mibBuilder.loadTexts:
cerentPIM1PPM.setDescription('Pluggable IO Module containing 1 Pluggable Port Modules.')
cerent_cemr454_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4115))
if mibBuilder.loadTexts:
cerentCEMR454Card.setStatus('current')
if mibBuilder.loadTexts:
cerentCEMR454Card.setDescription('CEMR 454 card')
cerent_cemr310_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4120))
if mibBuilder.loadTexts:
cerentCEMR310Card.setStatus('current')
if mibBuilder.loadTexts:
cerentCEMR310Card.setDescription('CEMR 310 card')
cerent_ctx2500_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4125))
if mibBuilder.loadTexts:
cerentCTX2500Card.setStatus('current')
if mibBuilder.loadTexts:
cerentCTX2500Card.setDescription('CTX 2500 Card')
cerent_ds128_ds3_ec13_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4130))
if mibBuilder.loadTexts:
cerentDs128Ds3EC13LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentDs128Ds3EC13LineCard.setDescription('DS1 28 ports, DS3 EC1 Line Card')
cerent_ds184_ds3_ec13_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4135))
if mibBuilder.loadTexts:
cerentDs184Ds3EC13LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentDs184Ds3EC13LineCard.setDescription('DS1 84 ports, DS3 EC1 Line Card')
cerent_ds3_ec16_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4140))
if mibBuilder.loadTexts:
cerentDs3EC16LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentDs3EC16LineCard.setDescription('DS3 EC1 Line Card')
cerent_bic_telco = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4145))
if mibBuilder.loadTexts:
cerentBicTelco.setStatus('current')
if mibBuilder.loadTexts:
cerentBicTelco.setDescription('Backplane Interface Card -- Telco')
cerent_bic_cmn = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4150))
if mibBuilder.loadTexts:
cerentBicCmn.setStatus('current')
if mibBuilder.loadTexts:
cerentBicCmn.setDescription('Backplane Interface Card -- Cmn')
cerent_ran_svc_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4155))
if mibBuilder.loadTexts:
cerentRanSvcLineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentRanSvcLineCard.setDescription('Radio Access Network Service Card')
cerent_ilk_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4245))
if mibBuilder.loadTexts:
cerentIlkPort.setStatus('current')
if mibBuilder.loadTexts:
cerentIlkPort.setDescription('Interl Link Port on 10G ADM card')
cerent_oc192_card4_ports_dwdm = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4250))
if mibBuilder.loadTexts:
cerentOc192Card4PortsDwdm.setStatus('current')
if mibBuilder.loadTexts:
cerentOc192Card4PortsDwdm.setDescription('OC192 4Ports DWDM Card')
cerent_mrc25_g12_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4275))
if mibBuilder.loadTexts:
cerentMrc25G12LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMrc25G12LineCard.setDescription('Multi Rate Card 2.5G with 12 ports')
cerent_mrc25_g4_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4280))
if mibBuilder.loadTexts:
cerentMrc25G4LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentMrc25G4LineCard.setDescription('Multi Rate Card 2.5G with 4 ports')
cerent_e121_e3_ds33_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4295))
if mibBuilder.loadTexts:
cerentE121E3DS33LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentE121E3DS33LineCard.setDescription('E1 21 ports, E3 DS3 Line Card')
cerent_e163_e3_ds33_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4300))
if mibBuilder.loadTexts:
cerentE163E3DS33LineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentE163E3DS33LineCard.setDescription('E1 63 ports, E3 DS3 Line Card')
cerent_md40_odd_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4320))
if mibBuilder.loadTexts:
cerentMd40OddPassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentMd40OddPassiveUnit.setDescription('Passive Mux Dmx Odd')
cerent_md40_even_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4325))
if mibBuilder.loadTexts:
cerentMd40EvenPassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentMd40EvenPassiveUnit.setDescription('Passive Mux Dmx Even')
cerent_md_id50_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4330))
if mibBuilder.loadTexts:
cerentMdId50PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentMdId50PassiveUnit.setDescription('Passive interleav/deinterleav')
cerent_pp4_smr_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4335))
if mibBuilder.loadTexts:
cerentPP4SMRPassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentPP4SMRPassiveUnit.setDescription('15216 PP 4 mesh unit')
cerent_ppmesh4_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4340))
if mibBuilder.loadTexts:
cerentPPMESH4PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentPPMESH4PassiveUnit.setDescription('15454 PP MESH 4 unit')
cerent_ppmesh8_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4345))
if mibBuilder.loadTexts:
cerentPPMESH8PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentPPMESH8PassiveUnit.setDescription('15454 PP MESH 8 unit')
cerent_dcu_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4350))
if mibBuilder.loadTexts:
cerentDcuPassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentDcuPassiveUnit.setDescription('Passive DCU unit')
cerent_ct_dcu_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4355))
if mibBuilder.loadTexts:
cerentCTDcuPassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentCTDcuPassiveUnit.setDescription('Coarse Tunable DCU unit')
cerent_ft_dcu_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4360))
if mibBuilder.loadTexts:
cerentFTDcuPassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFTDcuPassiveUnit.setDescription('Fine Tunable DCU unit')
forty_ge_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4365))
if mibBuilder.loadTexts:
fortyGePort.setStatus('current')
if mibBuilder.loadTexts:
fortyGePort.setDescription('40 GBit/Sec Ethernet Port')
fc8g_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4370))
if mibBuilder.loadTexts:
fc8gPort.setStatus('current')
if mibBuilder.loadTexts:
fc8gPort.setDescription('8 GBit/Sec Fiber Channel Port')
cerent_otu3_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4375))
if mibBuilder.loadTexts:
cerentOtu3Port.setStatus('current')
if mibBuilder.loadTexts:
cerentOtu3Port.setDescription('OTU3 port.')
cerent_oc768_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4380))
if mibBuilder.loadTexts:
cerentOc768Port.setStatus('current')
if mibBuilder.loadTexts:
cerentOc768Port.setDescription('Oc768 port.')
cerent_mechanical_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4385))
if mibBuilder.loadTexts:
cerentMechanicalUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentMechanicalUnit.setDescription('Mechanical Unit.')
cerent40_g_txp_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4390))
if mibBuilder.loadTexts:
cerent40GTxpCard.setStatus('current')
if mibBuilder.loadTexts:
cerent40GTxpCard.setDescription('40GBit/s. Transponder C Band.')
cerent40_g_mxp_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4395))
if mibBuilder.loadTexts:
cerent40GMxpCard.setStatus('current')
if mibBuilder.loadTexts:
cerent40GMxpCard.setDescription('40GBit/s. Muxponder C Band.')
cerent40_e_mxp_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4400))
if mibBuilder.loadTexts:
cerent40EMxpCard.setStatus('current')
if mibBuilder.loadTexts:
cerent40EMxpCard.setDescription('40GBit/s. Muxponder C Band.')
cerent_ar_xp_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4535))
if mibBuilder.loadTexts:
cerentArXpCard.setStatus('current')
if mibBuilder.loadTexts:
cerentArXpCard.setDescription('Any Rate Transponder/MuxPonder Card')
cerent_ar_mxp_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4545))
if mibBuilder.loadTexts:
cerentArMxpCard.setStatus('current')
if mibBuilder.loadTexts:
cerentArMxpCard.setDescription('Any Rate TXP/MXP Card')
cerent15216_id50_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4405))
if mibBuilder.loadTexts:
cerent15216ID50PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerent15216ID50PassiveUnit.setDescription('15216 interleav/deinterleav')
cerent40_e_txp_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4415))
if mibBuilder.loadTexts:
cerent40ETxpCard.setStatus('current')
if mibBuilder.loadTexts:
cerent40ETxpCard.setDescription('40GBit/s. Transponder C Band.')
cerent_otu1_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4725))
if mibBuilder.loadTexts:
cerentOtu1Port.setStatus('current')
if mibBuilder.loadTexts:
cerentOtu1Port.setDescription('OTU1 Port.')
cerent_isc3stp1g_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4732))
if mibBuilder.loadTexts:
cerentIsc3stp1gPort.setStatus('current')
if mibBuilder.loadTexts:
cerentIsc3stp1gPort.setDescription('ISC3STP1G Port.')
cerent_isc3stp2g_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4735))
if mibBuilder.loadTexts:
cerentIsc3stp2gPort.setStatus('current')
if mibBuilder.loadTexts:
cerentIsc3stp2gPort.setDescription('ISC3STP2G Port.')
cerent_sdi3gvideo_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4742))
if mibBuilder.loadTexts:
cerentSdi3gvideoPort.setStatus('current')
if mibBuilder.loadTexts:
cerentSdi3gvideoPort.setDescription('SDI3GVIDEO Port.')
cerent_auto_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4747))
if mibBuilder.loadTexts:
cerentAutoPort.setStatus('current')
if mibBuilder.loadTexts:
cerentAutoPort.setDescription('AUTO Port.')
cerent_opt_edfa17_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4420))
if mibBuilder.loadTexts:
cerentOptEdfa17Card.setStatus('current')
if mibBuilder.loadTexts:
cerentOptEdfa17Card.setDescription('Low Gain C-Band Edfa Amplifier.')
cerent_opt_edfa24_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4425))
if mibBuilder.loadTexts:
cerentOptEdfa24Card.setStatus('current')
if mibBuilder.loadTexts:
cerentOptEdfa24Card.setDescription('High Gain C-Band Edfa Amplifier.')
cerent_fld303_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4760))
if mibBuilder.loadTexts:
cerentFld303PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFld303PassiveUnit.setDescription('Fld 303 Passive Unit')
cerent_fld334_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4765))
if mibBuilder.loadTexts:
cerentFld334PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFld334PassiveUnit.setDescription(' cerent Fld 334 Passive Unit')
cerent_fld366_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4770))
if mibBuilder.loadTexts:
cerentFld366PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFld366PassiveUnit.setDescription('cerent Fld 366 Passive Unit')
cerent_fld397_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4775))
if mibBuilder.loadTexts:
cerentFld397PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFld397PassiveUnit.setDescription('cerent Fld 397 Passive Unit')
cerent_fld429_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4780))
if mibBuilder.loadTexts:
cerentFld429PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFld429PassiveUnit.setDescription('cerent Fld 429 Passive Unit')
cerent_fld461_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4785))
if mibBuilder.loadTexts:
cerentFld461PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFld461PassiveUnit.setDescription('cerent Fld 461 Passive Unit')
cerent_fld493_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4790))
if mibBuilder.loadTexts:
cerentFld493PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFld493PassiveUnit.setDescription('cerent Fld 493 Passive Unit')
cerent_fld525_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4795))
if mibBuilder.loadTexts:
cerentFld525PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFld525PassiveUnit.setDescription('cerent Fld 525 Passive Unit')
cerent_fld557_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4800))
if mibBuilder.loadTexts:
cerentFld557PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFld557PassiveUnit.setDescription('cerent Fld 557 Passive Unit')
cerent_fld589_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4805))
if mibBuilder.loadTexts:
cerentFld589PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFld589PassiveUnit.setDescription('cerent Fld 589 Passive Unit')
cerent_fld_osc_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4810))
if mibBuilder.loadTexts:
cerentFldOscPassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFldOscPassiveUnit.setDescription('cerent Fld Osc Passive Unit')
cerent_flc_cwdm8_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4815))
if mibBuilder.loadTexts:
cerentFlcCwdm8PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFlcCwdm8PassiveUnit.setDescription('cerent Flc Cwdm8 Passive Unit')
cerent_sdsdi_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4820))
if mibBuilder.loadTexts:
cerentSdsdiPort.setStatus('current')
if mibBuilder.loadTexts:
cerentSdsdiPort.setDescription('SDSDI Port')
cerent_hdsdi_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4825))
if mibBuilder.loadTexts:
cerentHdsdiPort.setStatus('current')
if mibBuilder.loadTexts:
cerentHdsdiPort.setDescription('HDSDI Port')
cerent_opt_ramp_ctp_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4830))
if mibBuilder.loadTexts:
cerentOptRampCTPCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptRampCTPCard.setDescription('cerent OPT RAMP CTP Card')
cerent_opt_ramp_cop_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4835))
if mibBuilder.loadTexts:
cerentOptRampCOPCard.setStatus('current')
if mibBuilder.loadTexts:
cerentOptRampCOPCard.setDescription('cerent OPT RAMP COP Card')
cerent_fbgdcu165_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4840))
if mibBuilder.loadTexts:
cerentFbgdcu165PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFbgdcu165PassiveUnit.setDescription('Passive FBGDCU 165 unit')
cerent_fbgdcu331_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4845))
if mibBuilder.loadTexts:
cerentFbgdcu331PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFbgdcu331PassiveUnit.setDescription('Passive FBGDCU 331 unit')
cerent_fbgdcu496_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4850))
if mibBuilder.loadTexts:
cerentFbgdcu496PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFbgdcu496PassiveUnit.setDescription('Passive FBGDCU 496 unit')
cerent_fbgdcu661_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4855))
if mibBuilder.loadTexts:
cerentFbgdcu661PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFbgdcu661PassiveUnit.setDescription('Passive FBGDCU 661 unit')
cerent_fbgdcu826_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4860))
if mibBuilder.loadTexts:
cerentFbgdcu826PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFbgdcu826PassiveUnit.setDescription('Passive FBGDCU 826 unit')
cerent_fbgdcu992_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4865))
if mibBuilder.loadTexts:
cerentFbgdcu992PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFbgdcu992PassiveUnit.setDescription('Passive FBGDCU 992 unit')
cerent_fbgdcu1157_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4870))
if mibBuilder.loadTexts:
cerentFbgdcu1157PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFbgdcu1157PassiveUnit.setDescription('Passive FBGDCU 1157 unit')
cerent_fbgdcu1322_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4875))
if mibBuilder.loadTexts:
cerentFbgdcu1322PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFbgdcu1322PassiveUnit.setDescription('Passive FBGDCU 1322 unit')
cerent_fbgdcu1653_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4880))
if mibBuilder.loadTexts:
cerentFbgdcu1653PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFbgdcu1653PassiveUnit.setDescription('Passive FBGDCU 1653 unit')
cerent_fbgdcu1983_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4885))
if mibBuilder.loadTexts:
cerentFbgdcu1983PassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentFbgdcu1983PassiveUnit.setDescription('Passive FBGDCU 1983 unit')
cerent_md48_odd_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4900))
if mibBuilder.loadTexts:
cerentMd48OddPassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentMd48OddPassiveUnit.setDescription('Passive Mux Dmx 48 ODD')
cerent_md48_even_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4905))
if mibBuilder.loadTexts:
cerentMd48EvenPassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentMd48EvenPassiveUnit.setDescription('Passive Mux Dmx 48 EVEN')
cerent_md48_cm_passive_unit = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4910))
if mibBuilder.loadTexts:
cerentMd48CmPassiveUnit.setStatus('current')
if mibBuilder.loadTexts:
cerentMd48CmPassiveUnit.setDescription('Passive 48 interleav/deinterleav')
cerent_otu4_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4915))
if mibBuilder.loadTexts:
cerentOtu4Port.setStatus('current')
if mibBuilder.loadTexts:
cerentOtu4Port.setDescription('OTU4 Port')
cerent_one_hundred_ge_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4920))
if mibBuilder.loadTexts:
cerentOneHundredGePort.setStatus('current')
if mibBuilder.loadTexts:
cerentOneHundredGePort.setDescription('One Hundred GE Port')
cerent_hundred_gig_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4925))
if mibBuilder.loadTexts:
cerentHundredGigLineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentHundredGigLineCard.setDescription('Hundred Gig Line Card')
cerent_te_nx_ten_gig_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4930))
if mibBuilder.loadTexts:
cerentTENxTENGigLineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentTENxTENGigLineCard.setDescription('TENxTEN Gig Line Card')
cerent_cfp_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4935))
if mibBuilder.loadTexts:
cerentCfpLineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentCfpLineCard.setDescription('CFP Line Card')
cerent_otl_port = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4940))
if mibBuilder.loadTexts:
cerentOTLPort.setStatus('current')
if mibBuilder.loadTexts:
cerentOTLPort.setDescription('OTL Port')
cerent_hundredgig_plim = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4945))
if mibBuilder.loadTexts:
cerentHundredgigPlim.setStatus('current')
if mibBuilder.loadTexts:
cerentHundredgigPlim.setDescription('Hundred gig PLIM')
cerent_wse_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4947))
if mibBuilder.loadTexts:
cerentWseLineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentWseLineCard.setDescription('WSE Line Card')
cerent_ar_xpe_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4950))
if mibBuilder.loadTexts:
cerentArXpeCard.setStatus('current')
if mibBuilder.loadTexts:
cerentArXpeCard.setDescription('Any Rate Xponder Card')
cerent_cpak100_g_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 5010))
if mibBuilder.loadTexts:
cerentCPAK100GLineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentCPAK100GLineCard.setDescription('CPAK 100G Line Card')
cerent_edra126_c = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4955))
if mibBuilder.loadTexts:
cerentEDRA126C.setStatus('current')
if mibBuilder.loadTexts:
cerentEDRA126C.setDescription('EDRA1_26C')
cerent_edra135_c = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4960))
if mibBuilder.loadTexts:
cerentEDRA135C.setStatus('current')
if mibBuilder.loadTexts:
cerentEDRA135C.setDescription('EDRA1_35C')
cerent_edra226_c = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4965))
if mibBuilder.loadTexts:
cerentEDRA226C.setStatus('current')
if mibBuilder.loadTexts:
cerentEDRA226C.setDescription('EDRA2_26C')
cerent_edra235_c = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4970))
if mibBuilder.loadTexts:
cerentEDRA235C.setStatus('current')
if mibBuilder.loadTexts:
cerentEDRA235C.setDescription('EDRA2_35C')
cerent_wxc16_fs_line_card = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4975))
if mibBuilder.loadTexts:
cerentWXC16FSLineCard.setStatus('current')
if mibBuilder.loadTexts:
cerentWXC16FSLineCard.setDescription('WXC16 FS Line Card')
cerent_passiv1x16_cofsc = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4980))
if mibBuilder.loadTexts:
cerentPassiv1x16COFSC.setStatus('current')
if mibBuilder.loadTexts:
cerentPassiv1x16COFSC.setDescription('Passive 1x16 COFS C')
cerent_passive4x4_cofsc = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4985))
if mibBuilder.loadTexts:
cerentPassive4x4COFSC.setStatus('current')
if mibBuilder.loadTexts:
cerentPassive4x4COFSC.setDescription('Passive 4x4 COFS C')
cerent_passive_moddeg5 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4990))
if mibBuilder.loadTexts:
cerentPassiveMODDEG5.setStatus('current')
if mibBuilder.loadTexts:
cerentPassiveMODDEG5.setDescription('Passive MOD DEG 5')
cerent_passive_modupg4 = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 4995))
if mibBuilder.loadTexts:
cerentPassiveMODUPG4.setStatus('current')
if mibBuilder.loadTexts:
cerentPassiveMODUPG4.setDescription('Passive MOD UPG 4')
cerent_passive_mpo8_lcadpt = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 5000))
if mibBuilder.loadTexts:
cerentPassiveMPO8LCADPT.setStatus('current')
if mibBuilder.loadTexts:
cerentPassiveMPO8LCADPT.setDescription('Passive MPO 8LC ADPT')
cerent_passive_astedfa = object_identity((1, 3, 6, 1, 4, 1, 3607, 1, 30, 5005))
if mibBuilder.loadTexts:
cerentPassiveASTEDFA.setStatus('current')
if mibBuilder.loadTexts:
cerentPassiveASTEDFA.setDescription('Passive AST EDFA')
mibBuilder.exportSymbols('CERENT-GLOBAL-REGISTRY', cerentTxpdP25GCard=cerentTxpdP25GCard, cerentDcuPassiveUnit=cerentDcuPassiveUnit, cerentPIM4PPM=cerentPIM4PPM, cerentAlmPwrSlot=cerentAlmPwrSlot, cerentTncUtsCard=cerentTncUtsCard, bicUniv=bicUniv, cerentFld525PassiveUnit=cerentFld525PassiveUnit, cerentHundredgigPlim=cerentHundredgigPlim, cerentTccSlot=cerentTccSlot, cerent310CE100t8LineCardOid=cerent310CE100t8LineCardOid, cerentAutoPort=cerentAutoPort, cerentBackPlaneM6=cerentBackPlaneM6, cerentTxpd25GCard=cerentTxpd25GCard, cerentE3Port=cerentE3Port, fc10gPort=fc10gPort, cerentPassiveMODUPG4=cerentPassiveMODUPG4, cerentCTX2500Card=cerentCTX2500Card, cerentFld557PassiveUnit=cerentFld557PassiveUnit, cerentFlcCwdm8PassiveUnit=cerentFlcCwdm8PassiveUnit, cerentCap=cerentCap, cerentStm1ePort=cerentStm1ePort, cerentFmec155e1To1Card=cerentFmec155e1To1Card, cerentOscCsmCard=cerentOscCsmCard, cerentFld493PassiveUnit=cerentFld493PassiveUnit, cerentMdId50PassiveUnit=cerentMdId50PassiveUnit, cerentMuxpdMr25GCard=cerentMuxpdMr25GCard, cerent454CE100t8LineCardOid=cerent454CE100t8LineCardOid, cerentCE1000EtherPort=cerentCE1000EtherPort, cerentOadm10GCard=cerentOadm10GCard, cerentBackplane15310MaAnsiOid=cerentBackplane15310MaAnsiOid, cerentDs3Xm12Card=cerentDs3Xm12Card, cerentDmx40LCard=cerentDmx40LCard, cerentUsbUtsPortCard=cerentUsbUtsPortCard, cerentML1000GenericCard=cerentML1000GenericCard, cerent15216OpmNode=cerent15216OpmNode, cerentOc3Port=cerentOc3Port, cerent15216OpmChassis=cerent15216OpmChassis, etrCloPort=etrCloPort, cerentGenericDummyObjects=cerentGenericDummyObjects, cerentWbeSlotOid=cerentWbeSlotOid, cerentG1K4Card=cerentG1K4Card, cerentMux40LCard=cerentMux40LCard, cerentOc48Port=cerentOc48Port, cerent15216EdfaSerialPort=cerent15216EdfaSerialPort, cerent454Node=cerent454Node, cerentOptMux32ChCard=cerentOptMux32ChCard, cerentSm1310Port=cerentSm1310Port, cerentCommunicationEquipment=cerentCommunicationEquipment, cerentMxpMr10DmeCard=cerentMxpMr10DmeCard, cerentStm1e12LineCard=cerentStm1e12LineCard, cerentOptDemux40ChCard=cerentOptDemux40ChCard, cerentMrc25G12LineCard=cerentMrc25G12LineCard, cerentMicExtCard=cerentMicExtCard, cerentVicDecoderPort=cerentVicDecoderPort, cerentFmecSmzE3=cerentFmecSmzE3, cerentBicCmn=cerentBicCmn, cerentEc1nCard=cerentEc1nCard, cerentEther100Port=cerentEther100Port, cerentDs1E156LineCard=cerentDs1E156LineCard, cerentComponents=cerentComponents, cerentOCHPort=cerentOCHPort, fortyGePort=fortyGePort, cerentE1n14=cerentE1n14, hdtvPort=hdtvPort, cerentEpos1000Card=cerentEpos1000Card, cerentOc192ItuCard=cerentOc192ItuCard, cerent454M2Node=cerent454M2Node, cerentOc768Port=cerentOc768Port, cerent15600ControllerSlot=cerent15600ControllerSlot, cerentEther1000Port=cerentEther1000Port, cerentOTLPort=cerentOTLPort, cerentOMSPort=cerentOMSPort, cerentOc3Card=cerentOc3Card, cerentVicTestPort=cerentVicTestPort, cerentBicTelco=cerentBicTelco, cerentOc192LrCard=cerentOc192LrCard, cerentOptRAmpCCard=cerentOptRAmpCCard, cerentFbgdcu331PassiveUnit=cerentFbgdcu331PassiveUnit, tenGePort=tenGePort, cerentFmecSlot=cerentFmecSlot, cerentCEMR310Card=cerentCEMR310Card, cerentPIMSlot=cerentPIMSlot, cerent310ML100t8LineCardOid=cerent310ML100t8LineCardOid, cerentOadm1ChCard=cerentOadm1ChCard, cerentOptAmpCCard=cerentOptAmpCCard, cerentFld429PassiveUnit=cerentFld429PassiveUnit, cerentG1000Port=cerentG1000Port, cerentXpdGECard=cerentXpdGECard, fc1gPort=fc1gPort, cerentBackplane15310MaEtsiOid=cerentBackplane15310MaEtsiOid, cerentMlEtherPort=cerentMlEtherPort, cerentMlPosPort=cerentMlPosPort, cerentFcb=cerentFcb, cerentTENxTENGigLineCard=cerentTENxTENGigLineCard, cerentXcVxlCard=cerentXcVxlCard, cerentCrftTmgSlot=cerentCrftTmgSlot, cerent15216OpmSlot=cerent15216OpmSlot, cerentBbeSlotOid=cerentBbeSlotOid, cerentMxpMr10DmexCard=cerentMxpMr10DmexCard, cerentChassisM2Ansi=cerentChassisM2Ansi, cerentOadm2ChCard=cerentOadm2ChCard, cerentFbgdcu1983PassiveUnit=cerentFbgdcu1983PassiveUnit, cerentBackPlane454=cerentBackPlane454, cerent40GTxpCard=cerent40GTxpCard, cerentOptBstLCard=cerentOptBstLCard, cerent=cerent, cerentPIM1PPM=cerentPIM1PPM, cerentLedIndicator=cerentLedIndicator, cerentProducts=cerentProducts, cerentWbeLineCardOid=cerentWbeLineCardOid, cerentAiciAep=cerentAiciAep, cerentPt10GECard=cerentPt10GECard, cerentAicOutUts=cerentAicOutUts, cerentFld303PassiveUnit=cerentFld303PassiveUnit, cerentArXpeCard=cerentArXpeCard, cerentCPAK100GLineCard=cerentCPAK100GLineCard, cerentOc192IrCard=cerentOc192IrCard, cerentExperimental=cerentExperimental, fc2gPort=fc2gPort, cerentEc1Card=cerentEc1Card, cerentDs3iPort=cerentDs3iPort, cerentXcVxl25GCard=cerentXcVxl25GCard, cerentOptAmp23Card=cerentOptAmp23Card, cerentIoSlot=cerentIoSlot, cerentE1nP42LineCard=cerentE1nP42LineCard, cerentFmec155e1To3Card=cerentFmec155e1To3Card, cerentFldOscPassiveUnit=cerentFldOscPassiveUnit, cerentBackPlaneM2=cerentBackPlaneM2, cerentMicCard=cerentMicCard, cerentIsc3stp2gPort=cerentIsc3stp2gPort, cerentDs3i=cerentDs3i, cerentFld366PassiveUnit=cerentFld366PassiveUnit, cerentAicCard=cerentAicCard, cerentPSMCard=cerentPSMCard, cerentMsIsc100tCard=cerentMsIsc100tCard, cerentIsc3stp1gPort=cerentIsc3stp1gPort, cerentAgentCapabilities=cerentAgentCapabilities, cerentOptWss32ChCard=cerentOptWss32ChCard, cerentFillerCard=cerentFillerCard, cerentChassis15327=cerentChassis15327, cerentBicBnc=cerentBicBnc, cerentTsc=cerentTsc, cerentOtu3Port=cerentOtu3Port, cerentDs3EC16LineCard=cerentDs3EC16LineCard, cerentFmecE1P42Type1To3W120bCard=cerentFmecE1P42Type1To3W120bCard, ficon1gport=ficon1gport, cerentFld589PassiveUnit=cerentFld589PassiveUnit, cerentDs128Ds3EC13LineCard=cerentDs128Ds3EC13LineCard, cerent15216OpmLedIndicator=cerent15216OpmLedIndicator, cerentEc1Port=cerentEc1Port, cerentMm850Port=cerentMm850Port, cerentRanSvcLineCard=cerentRanSvcLineCard, cerentOc48Card8Ports=cerentOc48Card8Ports, cerentChassisM6Ansi=cerentChassisM6Ansi, cerentPPM1Port=cerentPPM1Port, cerentSensorComponent=cerentSensorComponent, cerentOc12Port=cerentOc12Port, esconPort=esconPort, cerentTncFePort=cerentTncFePort, fc4gPort=fc4gPort, cerentDs3inCard=cerentDs3inCard, cerentChassis15310MaEtsiOid=cerentChassis15310MaEtsiOid, cerentFanSlot=cerentFanSlot, cerentCrftTmg=cerentCrftTmg, cerentMuxpdPMr25GCard=cerentMuxpdPMr25GCard, cerentMuxpd25G10XCard=cerentMuxpd25G10XCard, cerent15216EdfaNode=cerent15216EdfaNode, fc8gPort=fc8gPort, cerentOc192Port=cerentOc192Port, ds3Ec148LineCard=ds3Ec148LineCard, mrSlot=mrSlot, cerentDs184Ds3EC13LineCard=cerentDs184Ds3EC13LineCard, cerentFbgdcu826PassiveUnit=cerentFbgdcu826PassiveUnit, cerentSdsdiPort=cerentSdsdiPort, cerentAicSlot=cerentAicSlot, cerentChassisM6Etsi=cerentChassisM6Etsi, cerentEcuTray=cerentEcuTray, cerentIoUts=cerentIoUts, cerentCE1000PosPort=cerentCE1000PosPort, cerent40SMR1Card=cerent40SMR1Card, cerent15216EdfaChassis=cerent15216EdfaChassis, cerentFmecBlank=cerentFmecBlank, cerentOtu2Port=cerentOtu2Port, cerentBackPlane454SDH=cerentBackPlane454SDH, cerentOptBstECard=cerentOptBstECard, cerentHundredGigLineCard=cerentHundredGigLineCard, cerentFanTray=cerentFanTray, cerentUsbUts=cerentUsbUts, cerentOc12Card=cerentOc12Card, cerentAudibleAlarm=cerentAudibleAlarm, cerentFbgdcu1322PassiveUnit=cerentFbgdcu1322PassiveUnit, cerentMd48CmPassiveUnit=cerentMd48CmPassiveUnit, cerentCE1000Card=cerentCE1000Card, cerentOptWss40ChCard=cerentOptWss40ChCard, cerentE1P42LineCard=cerentE1P42LineCard, cerent310Node=cerent310Node, cerentDs3neCard=cerentDs3neCard, cerentAip=cerentAip, cerentEcuSlot=cerentEcuSlot, cerentBicSmb=cerentBicSmb, cerentFmecSmzE1=cerentFmecSmzE1, sdiD1VideoPort=sdiD1VideoPort, gfpPort=gfpPort, cerentL1PPosPortOid=cerentL1PPosPortOid, cerentOptPreCard=cerentOptPreCard, cerentFbgdcu661PassiveUnit=cerentFbgdcu661PassiveUnit, cerentFbgdcu496PassiveUnit=cerentFbgdcu496PassiveUnit, cerentCtxCardOid=cerentCtxCardOid, cerent15216OpmPcmciaSlot=cerent15216OpmPcmciaSlot, cerentOc48Card16Ports=cerentOc48Card16Ports, cerentCEMR454Card=cerentCEMR454Card, cerentOptRampCTPCard=cerentOptRampCTPCard, cerentXtcSlot=cerentXtcSlot, cerentEDRA226C=cerentEDRA226C, ape=ape, cerentPP4SMRPassiveUnit=cerentPP4SMRPassiveUnit, cerentWXC16FSLineCard=cerentWXC16FSLineCard, cerentVicDecoderLineCard=cerentVicDecoderLineCard, cerentADMs=cerentADMs, cerentPassive4x4COFSC=cerentPassive4x4COFSC, cerentMscIscUtsPort=cerentMscIscUtsPort, cerentDs1i14=cerentDs1i14, cerentL1PEtherPortOid=cerentL1PEtherPortOid, cerentWss40LCard=cerentWss40LCard, cerentCTDcuPassiveUnit=cerentCTDcuPassiveUnit, cerentWss32LCard=cerentWss32LCard, cerentOc3ir=cerentOc3ir, cerentFmecE1P42Type1To3W120aCard=cerentFmecE1P42Type1To3W120aCard, cerentOtu1Port=cerentOtu1Port, cerentCtxSlotOid=cerentCtxSlotOid, cerentEDRA235C=cerentEDRA235C, cerentPtSystem=cerentPtSystem, cerentAOTSPort=cerentAOTSPort, cerentFmecE1P42TypeUnprotW120Card=cerentFmecE1P42TypeUnprotW120Card, cerentEDRA135C=cerentEDRA135C, cerentSdi3gvideoPort=cerentSdi3gvideoPort, cerentOc12QuadCard=cerentOc12QuadCard, cerentOptDemux32RChCard=cerentOptDemux32RChCard, cerentDs3Port=cerentDs3Port, cerentDs1VtMappedPort=cerentDs1VtMappedPort, cerentOc12lr1310=cerentOc12lr1310, cerent40ETxpCard=cerent40ETxpCard, cerentDwdmTrunkPort=cerentDwdmTrunkPort, cerentML100GenericCard=cerentML100GenericCard, cerentPassiv1x16COFSC=cerentPassiv1x16COFSC, cerentCfpLineCard=cerentCfpLineCard, cerentMd40EvenPassiveUnit=cerentMd40EvenPassiveUnit, iscPort=iscPort, cerentEfca454Sdh=cerentEfca454Sdh, cerentXtcCard=cerentXtcCard, cerentMl100X8LineCard=cerentMl100X8LineCard, cerentModules=cerentModules, cerentMd48EvenPassiveUnit=cerentMd48EvenPassiveUnit, cerentMuxpd25G10ECard=cerentMuxpd25G10ECard)
mibBuilder.exportSymbols('CERENT-GLOBAL-REGISTRY', cerent15216OpmSerialPort=cerent15216OpmSerialPort, cerentFbgdcu1157PassiveUnit=cerentFbgdcu1157PassiveUnit, cerentPowerSupplyUts=cerentPowerSupplyUts, cerentEDRA126C=cerentEDRA126C, cerentXcVxc25GCard=cerentXcVxc25GCard, cerentAiciAie=cerentAiciAie, cerentMd48OddPassiveUnit=cerentMd48OddPassiveUnit, cerentMrc12LineCard=cerentMrc12LineCard, cerentG1000GenericCard=cerentG1000GenericCard, ficon4gport=ficon4gport, cerentXcSlot=cerentXcSlot, cerentOptAmpLCard=cerentOptAmpLCard, cerentOptMuxDemux4ChCard=cerentOptMuxDemux4ChCard, cerentMrc4LineCardOid=cerentMrc4LineCardOid, cerentXcVxcCard=cerentXcVxcCard, cerentAicInUts=cerentAicInUts, cerentXcVtCard=cerentXcVtCard, cerentDs1n14=cerentDs1n14, cerentE114=cerentE114, cerentOc48lr=cerentOc48lr, cerentDs3eCard=cerentDs3eCard, cerent15216OpmBackPlane=cerent15216OpmBackPlane, cerentOc192Card=cerentOc192Card, cerentOrderwirePort=cerentOrderwirePort, cerent40EMxpCard=cerent40EMxpCard, cerentDs3nCard=cerentDs3nCard, passThruPort=passThruPort, cerent15216ID50PassiveUnit=cerent15216ID50PassiveUnit, ficon2gport=ficon2gport, cerentOTSPort=cerentOTSPort, PYSNMP_MODULE_ID=cerentGlobalRegModule, cerentE1Port=cerentE1Port, cerentOc192Card4PortsDwdm=cerentOc192Card4PortsDwdm, cerentWseLineCard=cerentWseLineCard, cerent15216OpmOpticalSwitch=cerent15216OpmOpticalSwitch, cerentOadm4ChCard=cerentOadm4ChCard, cerentOadm1BnCard=cerentOadm1BnCard, cerentDs3XmPort=cerentDs3XmPort, cerent600Node=cerent600Node, cerentPPMSlot=cerentPPMSlot, cerentCxc=cerentCxc, cerentArMxpCard=cerentArMxpCard, cerentUdcVoipEmsUts=cerentUdcVoipEmsUts, cerentChassis15310ClOid=cerentChassis15310ClOid, cerent15216OpmController=cerent15216OpmController, cerentMrc25G4LineCard=cerentMrc25G4LineCard, cerentOptEdfa24Card=cerentOptEdfa24Card, cerentOptBstCard=cerentOptBstCard, cerentIscEqptUts=cerentIscEqptUts, cerentOc3n1Card=cerentOc3n1Card, cerentAlmPwr=cerentAlmPwr, cerentWxc40LCard=cerentWxc40LCard, cerentXP10G4LineCard=cerentXP10G4LineCard, isc3Peer1gPort=isc3Peer1gPort, cerentArXpCard=cerentArXpCard, cerentTxpd10EXCard=cerentTxpd10EXCard, cerentDs3XmCard=cerentDs3XmCard, cerentOc192XfpLineCard=cerentOc192XfpLineCard, cerentTxpdP10EXCard=cerentTxpdP10EXCard, cerentFld334PassiveUnit=cerentFld334PassiveUnit, cerentOtherComponent=cerentOtherComponent, cerentG1000QuadCard=cerentG1000QuadCard, cerentMicSlot=cerentMicSlot, cerentChassis600=cerentChassis600, cerentRegistry=cerentRegistry, cerentMMUCard=cerentMMUCard, cerentCxcSlot=cerentCxcSlot, cerent15216OpmPowerSupply=cerent15216OpmPowerSupply, cerentFmec155eUnprotCard=cerentFmec155eUnprotCard, cerentOc48ir=cerentOc48ir, cerentDs312=cerentDs312, cerentOc48Card=cerentOc48Card, cerentFudcPort=cerentFudcPort, cerentBackPlane454HD=cerentBackPlane454HD, cerentOscmCard=cerentOscmCard, cerentGlobalRegModule=cerentGlobalRegModule, cerentFlashUts=cerentFlashUts, cerentWssCE40Card=cerentWssCE40Card, cerentOc192Card4Ports=cerentOc192Card4Ports, cerentDmx32LCard=cerentDmx32LCard, cerent310MaEtsiNode=cerent310MaEtsiNode, cerentFld461PassiveUnit=cerentFld461PassiveUnit, isc3Peer2gPort=isc3Peer2gPort, cerent15216OpmSpectrometer=cerent15216OpmSpectrometer, cerentOptEdfa17Card=cerentOptEdfa17Card, cerentFbgdcu1653PassiveUnit=cerentFbgdcu1653PassiveUnit, cerentBackplane15310ClOid=cerentBackplane15310ClOid, cerent40SMR2Card=cerent40SMR2Card, cerentBackPlane15327=cerentBackPlane15327, cerentPowerSupply=cerentPowerSupply, cerentTcc=cerentTcc, cerentOptWxc40ChCard=cerentOptWxc40ChCard, cerentHdsdiPort=cerentHdsdiPort, cerentVicEncoderLineCard=cerentVicEncoderLineCard, cerentMechanicalUnit=cerentMechanicalUnit, cerent15216OpmRelay=cerent15216OpmRelay, cerentFmecDb=cerentFmecDb, cerentAlarmDryContactUts=cerentAlarmDryContactUts, cerentTxpd10ECard=cerentTxpd10ECard, cerentXpd10GECard=cerentXpd10GECard, cerentDwdmClientPort=cerentDwdmClientPort, cerentPtsaGECard=cerentPtsaGECard, cerentPPMESH4PassiveUnit=cerentPPMESH4PassiveUnit, cerentDs114=cerentDs114, cerentAsap4LineCardOid=cerentAsap4LineCardOid, cerentOptRAmpECard=cerentOptRAmpECard, cerent15216Edfa3ShelfController=cerent15216Edfa3ShelfController, cerentE312Card=cerentE312Card, cerentMd40OddPassiveUnit=cerentMd40OddPassiveUnit, cerent15216OpmOpticalPort=cerent15216OpmOpticalPort, cerentXc10g=cerentXc10g, cerentXc=cerentXc, cerentPassiveMODDEG5=cerentPassiveMODDEG5, cerentOc12ir=cerentOc12ir, cerentOtu4Port=cerentOtu4Port, cerentAici=cerentAici, cerentE121E3DS33LineCard=cerentE121E3DS33LineCard, cerentEpos100Card=cerentEpos100Card, cerent454M6Node=cerent454M6Node, cerentGeneric=cerentGeneric, isc3Port=isc3Port, cerentMuxpd25G10GCard=cerentMuxpd25G10GCard, cerentDccPort=cerentDccPort, cerentChassis15310MaAnsiOid=cerentChassis15310MaAnsiOid, cerentPassiveMPO8LCADPT=cerentPassiveMPO8LCADPT, cerentFcmrLineCard=cerentFcmrLineCard, cerent40GMxpCard=cerent40GMxpCard, cerentChassis454SDH=cerentChassis454SDH, cerentChassis454=cerentChassis454, cerentTncTscUtsSlot=cerentTncTscUtsSlot, cerentOc3OctaCard=cerentOc3OctaCard, cerentOptDemux32ChCard=cerentOptDemux32ChCard, cerentFanTrayUts=cerentFanTrayUts, cerentPassiveASTEDFA=cerentPassiveASTEDFA, cerentOadm4BnCard=cerentOadm4BnCard, cerentVicEncoderPort=cerentVicEncoderPort, cerentDwdmDevices=cerentDwdmDevices, cerentFbgdcu992PassiveUnit=cerentFbgdcu992PassiveUnit, cerent15216EdfaEtherPort=cerent15216EdfaEtherPort, cerentChassisM2Etsi=cerentChassisM2Etsi, cerentFTDcuPassiveUnit=cerentFTDcuPassiveUnit, cerentFmecDs1i14=cerentFmecDs1i14, cerentE163E3DS33LineCard=cerentE163E3DS33LineCard, dv6000Port=dv6000Port, cerentBackPlane600=cerentBackPlane600, cerentIlkPort=cerentIlkPort, cerentFcmrPort=cerentFcmrPort, cerentFld397PassiveUnit=cerentFld397PassiveUnit, cerentFbgdcu165PassiveUnit=cerentFbgdcu165PassiveUnit, cerentOptMux40ChCard=cerentOptMux40ChCard, cerentOneHundredGePort=cerentOneHundredGePort, cerentPPMESH8PassiveUnit=cerentPPMESH8PassiveUnit, cerentPtf10GECard=cerentPtf10GECard, cerentBitsUts=cerentBitsUts, cerentRequirements=cerentRequirements, oneGePort=oneGePort, cerentBbeLineCardOid=cerentBbeLineCardOid, cerentOptWxc80ChCard=cerentOptWxc80ChCard, cerent15216Edfa3OpticsModule=cerent15216Edfa3OpticsModule, cerentEnvironmentControl=cerentEnvironmentControl, cerentDmxCE40Card=cerentDmxCE40Card, cerent310MaAnsiNode=cerent310MaAnsiNode, bicUnknown=bicUnknown, cerentOptAmp17Card=cerentOptAmp17Card, cerentTxpd10GCard=cerentTxpd10GCard, cerentTscUtsCard=cerentTscUtsCard, cerent327Node=cerent327Node, cerentOptRampCOPCard=cerentOptRampCOPCard)
|
def metade(valor, formatar=False):
valor = valor / 2
if formatar:
valor = moeda(valor)
return valor
def dobro(valor, formatar=False):
valor *= 2
if formatar:
return moeda(valor)
return valor
def aumentar(valor, porcentagem, formatar=False):
aumenta = valor * (porcentagem / 100)
valor += aumenta
if formatar:
return moeda(valor)
return valor
def diminuir(valor, porcentagem, formatar=False):
diminui = valor * (porcentagem / 100)
valor -= diminui
if formatar:
return moeda(valor)
return valor
def moeda(valor_em_reais):
valor_final = f'R${valor_em_reais:.2f} '
return valor_final
def resumo(valor, porcentagem1, porcentagem2):
print(f'{"RESUMO":-^30}')
print('-' * 30)
print(f'Preco analisado: {moeda(valor)}\n'
f'Dobro do preco: {dobro(valor, True)}\n'
f'Metade do preco: {metade(valor, True)}\n'
f'{porcentagem1}% de aumento: {aumentar(valor, porcentagem1, True)}\n'
f'{porcentagem2}% de reducao: {diminuir(valor, porcentagem2, True)}')
print('-' * 30)
|
def metade(valor, formatar=False):
valor = valor / 2
if formatar:
valor = moeda(valor)
return valor
def dobro(valor, formatar=False):
valor *= 2
if formatar:
return moeda(valor)
return valor
def aumentar(valor, porcentagem, formatar=False):
aumenta = valor * (porcentagem / 100)
valor += aumenta
if formatar:
return moeda(valor)
return valor
def diminuir(valor, porcentagem, formatar=False):
diminui = valor * (porcentagem / 100)
valor -= diminui
if formatar:
return moeda(valor)
return valor
def moeda(valor_em_reais):
valor_final = f'R${valor_em_reais:.2f} '
return valor_final
def resumo(valor, porcentagem1, porcentagem2):
print(f"{'RESUMO':-^30}")
print('-' * 30)
print(f'Preco analisado: {moeda(valor)}\nDobro do preco: {dobro(valor, True)}\nMetade do preco: {metade(valor, True)}\n{porcentagem1}% de aumento: {aumentar(valor, porcentagem1, True)}\n{porcentagem2}% de reducao: {diminuir(valor, porcentagem2, True)}')
print('-' * 30)
|
print('Accessing private members in Class:')
print('-'*35)
class Human():
# Private var
__privateVar = "this is __private variable"
# Constructor method
def __init__(self):
self.className = "Human class constructor"
self.__privateVar = "this is redefined __private variable"
# Public method
def showName(self, name):
self.name = name
return self.__privateVar + " with name: " + name
# Private method
def __privateMethod(self):
return "Private method"
def _protectedMethod(self):
return 'Protected Method'
# Public method that returns a private variable
def showPrivate(self):
return self.__privateMethod()
def showProtecded(self):
return self._protectedMethod()
class Male(Human):
def showClassName(self):
return "Male"
def showPrivate(self):
return self.__privateMethod()
def showProtected(self):
return self._protectedMethod()
class Female(Human):
def showClassName(self):
return "Female"
def showPrivate(self):
return self.__privateMethod()
human = Human()
print(f'\nCalling the: {human.className} from the Human class.')
print(f'\nAccessing the public method of Human class: {human.showName("Ling-Ling")}')
print(f'\nAccessing the private method of the Human class: {human.showPrivate()}, from Human Class.')
# print(f'Acessing the protected Method of the Human Class : {human.showProtected()},from Human Class.') -->AttributeError:'Human' object has no attribute 'showProtected'
male = Male()
print(f'\ncalling the {male.className} from the Male class')
print(f'\nAccessing the Public method of Male class: {male.showClassName()}, from male class')
print(f'\nAccessing the protected method of Male class: {male.showProtected()}, from male class.')
# print(f'Accessing the private method of Male class: {male.Human__showPrivate()}, from male Class.') --> AttributeError: 'Male' object has no attribute '_Male__privateMethod'
female = Female()
print(f'\ncalling the {female.className} from the Female class')
print(f'\nAccessing the Public method of female class: {female.showClassName()}, from Female class')
# print(f'Accessing the protected method of female class: {female.showProtected()}, from Female class.') --> AttributeError: 'Female' object has no attribute 'showProtected'
# print(f'Accessing the private method of female class: {female.showPrivate()}, from Female Class.') AttributeError: 'Female' object has no attribute '_Female__privateMethod'
print('\n'+'-'*25+"Method 2 -- Accessing private members in Class"+'-'*25)
print('\n'+'Example: Public Attributes: ')
print('-'*20)
class Employee:
def __init__(self,name,sal):
self.name=name #Public attribute
self.salary=sal #Public attribute
e1=Employee('Ling1',30000)
print(f'Accessing the Public Attributes: {e1.name} : {e1.salary}')
# if attribute is public then the value can be modified too
e1.salary=40000
print(f'Accessing the Public Attributes after modifying: {e1.name} : {e1.salary}')
print('\n'+'Example: Protected Attributes: ')
'''Python's convention to make an instance variable protected is to add a prefix _ (single underscore) to it.
This effectively prevents it to be accessed, unless it is from within a sub-class.'''
print('-'*25)
class Employee:
def __init__(self,name,sal):
self._name=name #protected attribute
self._salary=sal #protected attribute
e2=Employee('Ling2',50000)
print(f'Accessing the Protected Attributes: {e2._name} : {e2._salary}')
#even if attribute is protected the value can be modified too
e2._salary=44000
print(f'Accessing the Protected Attributes after modifying: {e2._name} : {e2._salary}')
print('\n'+'Example: Private Attributes: ')
'''a double underscore __ prefixed to a variable makes it private.
It gives a strong suggestion not to touch it from outside the class.
Any attempt to do so will result in an AttributeError.'''
print('-'*25)
class Employee:
def __init__(self,name,sal):
self.__name=name # private attribute
self.__salary=sal # private attribute
e3=Employee('Ling3',60000)
# print(f'Accessing the Privated Attributes: {e3.__name} : {e3.__salary}') --> AttributeError: 'Employee' object has no attribute '__name
'''In order to access the attributes, Python performs name mangling of private variables.
Every member with double underscore will be changed to _object._class__variable.'''
print(f'Accessing the Private Attributes: {e3._Employee__name} : {e3._Employee__salary}')
#even if attribute is protected the value can be modified too
e3._Employee__salary=15000
print(f'Accessing the Protected Attributes after modifying: {e3._Employee__name} : {e3._Employee__salary}')
|
print('Accessing private members in Class:')
print('-' * 35)
class Human:
__private_var = 'this is __private variable'
def __init__(self):
self.className = 'Human class constructor'
self.__privateVar = 'this is redefined __private variable'
def show_name(self, name):
self.name = name
return self.__privateVar + ' with name: ' + name
def __private_method(self):
return 'Private method'
def _protected_method(self):
return 'Protected Method'
def show_private(self):
return self.__privateMethod()
def show_protecded(self):
return self._protectedMethod()
class Male(Human):
def show_class_name(self):
return 'Male'
def show_private(self):
return self.__privateMethod()
def show_protected(self):
return self._protectedMethod()
class Female(Human):
def show_class_name(self):
return 'Female'
def show_private(self):
return self.__privateMethod()
human = human()
print(f'\nCalling the: {human.className} from the Human class.')
print(f"\nAccessing the public method of Human class: {human.showName('Ling-Ling')}")
print(f'\nAccessing the private method of the Human class: {human.showPrivate()}, from Human Class.')
male = male()
print(f'\ncalling the {male.className} from the Male class')
print(f'\nAccessing the Public method of Male class: {male.showClassName()}, from male class')
print(f'\nAccessing the protected method of Male class: {male.showProtected()}, from male class.')
female = female()
print(f'\ncalling the {female.className} from the Female class')
print(f'\nAccessing the Public method of female class: {female.showClassName()}, from Female class')
print('\n' + '-' * 25 + 'Method 2 -- Accessing private members in Class' + '-' * 25)
print('\n' + 'Example: Public Attributes: ')
print('-' * 20)
class Employee:
def __init__(self, name, sal):
self.name = name
self.salary = sal
e1 = employee('Ling1', 30000)
print(f'Accessing the Public Attributes: {e1.name} : {e1.salary}')
e1.salary = 40000
print(f'Accessing the Public Attributes after modifying: {e1.name} : {e1.salary}')
print('\n' + 'Example: Protected Attributes: ')
"Python's convention to make an instance variable protected is to add a prefix _ (single underscore) to it. \nThis effectively prevents it to be accessed, unless it is from within a sub-class."
print('-' * 25)
class Employee:
def __init__(self, name, sal):
self._name = name
self._salary = sal
e2 = employee('Ling2', 50000)
print(f'Accessing the Protected Attributes: {e2._name} : {e2._salary}')
e2._salary = 44000
print(f'Accessing the Protected Attributes after modifying: {e2._name} : {e2._salary}')
print('\n' + 'Example: Private Attributes: ')
'a double underscore __ prefixed to a variable makes it private. \nIt gives a strong suggestion not to touch it from outside the class. \nAny attempt to do so will result in an AttributeError.'
print('-' * 25)
class Employee:
def __init__(self, name, sal):
self.__name = name
self.__salary = sal
e3 = employee('Ling3', 60000)
'In order to access the attributes, Python performs name mangling of private variables. \nEvery member with double underscore will be changed to _object._class__variable.'
print(f'Accessing the Private Attributes: {e3._Employee__name} : {e3._Employee__salary}')
e3._Employee__salary = 15000
print(f'Accessing the Protected Attributes after modifying: {e3._Employee__name} : {e3._Employee__salary}')
|
def CheckPairSum(Arr, Total):
n = len(Arr)
dict_of_numbers = [0] * 1000
# print("Start of loop")
for i in range (n):
difference = Total - Arr[i]
# print difference
if dict_of_numbers[difference] == 1:
print("The pair is", Arr[i], "and", difference)
dict_of_numbers[Arr[i]] = 1
Arr = [1,2,4,5,7,8,10,-1,6]
Total = 9
CheckPairSum(Arr, Total)
|
def check_pair_sum(Arr, Total):
n = len(Arr)
dict_of_numbers = [0] * 1000
for i in range(n):
difference = Total - Arr[i]
if dict_of_numbers[difference] == 1:
print('The pair is', Arr[i], 'and', difference)
dict_of_numbers[Arr[i]] = 1
arr = [1, 2, 4, 5, 7, 8, 10, -1, 6]
total = 9
check_pair_sum(Arr, Total)
|
# NOTE: # noinspection - prefixed comments are for pycharm editor only
# for ignoring PEP 8 style highlights
class PageTitleMixin:
"""Page title mixin class
- for class based views
:argument: -page_title
:methods: - get_page_title()
- get_context_data()
"""
page_title = ''
def get_page_title(self):
return self.page_title
def get_context_data(self, **kwargs):
# noinspection PyUnresolvedReferences
context = super().get_context_data(**kwargs)
context['page_title'] = self.get_page_title()
return context
|
class Pagetitlemixin:
"""Page title mixin class
- for class based views
:argument: -page_title
:methods: - get_page_title()
- get_context_data()
"""
page_title = ''
def get_page_title(self):
return self.page_title
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['page_title'] = self.get_page_title()
return context
|
# Variant DBScan analysis item
# Set variants
vdbscan_variants = pd.DataFrame({'eps': [2,2,3,3], 'mp' : [4,4,5,5]})
# Set column names
vdbscan_column_names = ('ra', 'dec')
# Create Variant DBScan analysis item
ana_vdbscan = skdiscovery.data_structure.table.analysis.VDBScan('VDBScan',vdbscan_variants, vdbscan_column_names)
# Create stage container for Variant DBScan analysis
sc_vdbscan = StageContainer(ana_vdbscan)
|
vdbscan_variants = pd.DataFrame({'eps': [2, 2, 3, 3], 'mp': [4, 4, 5, 5]})
vdbscan_column_names = ('ra', 'dec')
ana_vdbscan = skdiscovery.data_structure.table.analysis.VDBScan('VDBScan', vdbscan_variants, vdbscan_column_names)
sc_vdbscan = stage_container(ana_vdbscan)
|
n=int(input("enter number of elements: "))
l=[]
for i in range(n):
l.append(int(input(f"enter l[{i}]: ")))
print(l)
'''
output:
enter number of elements: 6
enter l[0]: 23
enter l[1]: 11
enter l[2]: 67
enter l[3]: 889
enter l[4]: 342
enter l[5]: 23
[23, 11, 67, 889, 342, 23]
'''
|
n = int(input('enter number of elements: '))
l = []
for i in range(n):
l.append(int(input(f'enter l[{i}]: ')))
print(l)
'\noutput:\nenter number of elements: 6\nenter l[0]: 23\nenter l[1]: 11\nenter l[2]: 67\nenter l[3]: 889\nenter l[4]: 342\nenter l[5]: 23\n[23, 11, 67, 889, 342, 23]\n'
|
"""Top-level package for wyeusk."""
__author__ = """Steve Betts"""
__email__ = 'stevo.betts@gmail.com'
__version__ = '0.1.0'
|
"""Top-level package for wyeusk."""
__author__ = 'Steve Betts'
__email__ = 'stevo.betts@gmail.com'
__version__ = '0.1.0'
|
nun = [[], []]
val = 0
for c in range(0, 8):
val = int(input('Digite um numero: '))
if val % 2 == 0:
num[0].append(val)
else:
num[1].append(val)
|
nun = [[], []]
val = 0
for c in range(0, 8):
val = int(input('Digite um numero: '))
if val % 2 == 0:
num[0].append(val)
else:
num[1].append(val)
|
# you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")
def prefix(A):
pref = [0] * (len(A)+1)
for i in range(1, len(A)+1):
pref[i] = pref[i-1] + A[i-1]
return pref
def countTotal(P, left, right):
return P[right] - P[left]
def solution(A):
pref = prefix(A)
n = len(A)
pairs = 0
for i in range(len(A)):
if A[i] == 0:
pairs += countTotal(pref, i, n)
if pairs > 1000000000:
return -1
return pairs
if __name__ == '__main__':
#print(solution([0,0,0,0,1,1,1,0,1,0,1,0,1,0]))
print(solution([0,1,0,1,1]))
|
def prefix(A):
pref = [0] * (len(A) + 1)
for i in range(1, len(A) + 1):
pref[i] = pref[i - 1] + A[i - 1]
return pref
def count_total(P, left, right):
return P[right] - P[left]
def solution(A):
pref = prefix(A)
n = len(A)
pairs = 0
for i in range(len(A)):
if A[i] == 0:
pairs += count_total(pref, i, n)
if pairs > 1000000000:
return -1
return pairs
if __name__ == '__main__':
print(solution([0, 1, 0, 1, 1]))
|
# https://codeforces.com/problemset/problem/584/A
n, t = map(int, input().split())
if n == 1:
if t < 10:
print(t)
else:
print(-1)
else:
if t < 10:
print(str(t)+'0'*(n-1))
else:
print('1'+'0'*(n-1))
|
(n, t) = map(int, input().split())
if n == 1:
if t < 10:
print(t)
else:
print(-1)
elif t < 10:
print(str(t) + '0' * (n - 1))
else:
print('1' + '0' * (n - 1))
|
# Quick Sort
# Time Complexity: O(n^2)
# Space Complexity: O(log(n))
# In-place quick sort does not create subsequences
# its subsequence of the input is represented by a leftmost and rightmost index
def quick_Sort(lst, first, last):
print(lst)
if first >= last: # the lst is sorted
return
pivot = lst[last] # last element of range is pivot
lo = first # scan from first to last
hi = last - 1 # scan from last to first
while lo <= hi:
while lo <= hi and lst[lo] < pivot: # scan until reaching value >= pivot
lo += 1
while lo <= hi and pivot < lst[hi]: # scan until reaching value <= pivot
hi -= 1
if lo <= hi: # check if scans did cross
lst[lo], lst[hi] = lst[hi], lst[lo] # swap
# shrink range
lo += 1
hi -= 1
lst[lo], lst[last] = lst[last], lst[lo] # re-setting pivot
quick_Sort(lst, first, lo - 1)
quick_Sort(lst, lo + 1, last)
return lst
|
def quick__sort(lst, first, last):
print(lst)
if first >= last:
return
pivot = lst[last]
lo = first
hi = last - 1
while lo <= hi:
while lo <= hi and lst[lo] < pivot:
lo += 1
while lo <= hi and pivot < lst[hi]:
hi -= 1
if lo <= hi:
(lst[lo], lst[hi]) = (lst[hi], lst[lo])
lo += 1
hi -= 1
(lst[lo], lst[last]) = (lst[last], lst[lo])
quick__sort(lst, first, lo - 1)
quick__sort(lst, lo + 1, last)
return lst
|
# Fibonacci numbers module
def greeting(name="stranger"):
print("Hi {}".format(name))
|
def greeting(name='stranger'):
print('Hi {}'.format(name))
|
#split function is used for creat string in to list of String's
# String="10 11 12 13 14 15 16"
#we have to give Raguler Expression as argument of split function
#Know split function will split over string with respact" "
#l=["10","11","12","13","14","15","16"]
# l=String.split(" ")
# String=" 10 12 13 "
#strip function is used for remove Extra space in given string
#befor function String =" 10 12 13 "
#after function String="10 12 13"
# String.strip()
# code..
s=input("Enter String to Split!!!:")
c=input("Enter Char which Respact to Split!!:")
print("List:",s.split(c))
s=input("Enter String :")
print("After Strip String:"+s.strip())
|
s = input('Enter String to Split!!!:')
c = input('Enter Char which Respact to Split!!:')
print('List:', s.split(c))
s = input('Enter String :')
print('After Strip String:' + s.strip())
|
def power(number, power=2):
return number ** power
print(power(2, 3)) # 2 * 2 * 2 = 8
print(power(3)) # 3 * 2 = 9
print("------------------")
def showFullName(first, last):
return f"{first} {last}"
print(showFullName(last="Golchinpour", first="Milad"))
|
def power(number, power=2):
return number ** power
print(power(2, 3))
print(power(3))
print('------------------')
def show_full_name(first, last):
return f'{first} {last}'
print(show_full_name(last='Golchinpour', first='Milad'))
|
data = {}
individual = {}
info = input().split(" -> ")
while "no more time" not in info:
name = info[0]
contest = info[1]
points = int(info[2])
already_in = False
if contest in data:
for i in range(len(data[contest])):
if name == data[contest][i][0]:
already_in = True
if points > data[contest][i][1]:
diff = points - data[contest][i][1]
data[contest][i][1] = points
individual[name] += diff
if not already_in:
data[contest].append([name, points])
if name in individual:
individual[name] += points
else:
individual[name] = points
else:
data[contest] = []
data[contest].append([name, points])
if name in individual:
individual[name] += points
else:
individual[name] = points
info = input().split(" -> ")
for contest in data:
print(f"{contest}: {len(data[contest])} participants")
sorted_contest = sorted(data[contest], key=lambda x: (-x[1], x[0]))
for i in range(len(data[contest])):
print(f"{i+1}. {sorted_contest[i][0]} <::> {sorted_contest[i][1]}")
print(f"Individual standings:")
sorted_individual = sorted(individual.items(), key=lambda x: (-x[1], x[0]))
for i in range(len(sorted_individual)):
print(f"{i+1}. {sorted_individual[i][0]} -> {sorted_individual[i][1]}")
|
data = {}
individual = {}
info = input().split(' -> ')
while 'no more time' not in info:
name = info[0]
contest = info[1]
points = int(info[2])
already_in = False
if contest in data:
for i in range(len(data[contest])):
if name == data[contest][i][0]:
already_in = True
if points > data[contest][i][1]:
diff = points - data[contest][i][1]
data[contest][i][1] = points
individual[name] += diff
if not already_in:
data[contest].append([name, points])
if name in individual:
individual[name] += points
else:
individual[name] = points
else:
data[contest] = []
data[contest].append([name, points])
if name in individual:
individual[name] += points
else:
individual[name] = points
info = input().split(' -> ')
for contest in data:
print(f'{contest}: {len(data[contest])} participants')
sorted_contest = sorted(data[contest], key=lambda x: (-x[1], x[0]))
for i in range(len(data[contest])):
print(f'{i + 1}. {sorted_contest[i][0]} <::> {sorted_contest[i][1]}')
print(f'Individual standings:')
sorted_individual = sorted(individual.items(), key=lambda x: (-x[1], x[0]))
for i in range(len(sorted_individual)):
print(f'{i + 1}. {sorted_individual[i][0]} -> {sorted_individual[i][1]}')
|
# -*-coding: utf-8 -*-
cg_notexists = '15019'
cg_zip_failed = '15009'
vray_notmatch = '15020'
cginfo_failed = '15002'
conflict_multiscatter_vray = '15021'
cg_notmatch = '15013'
camera_duplicat = '15015'
element_duplicat = '15016'
vrmesh_ext_null = "15018"
proxy_enable = "15010"
renderer_notsupport = "15004"
# -----------outputname_null="15007"
camera_null = "15006"
task_folder_failed = "15011"
task_create_failed = "15012"
multiframe_notsupport = "10015" # Irradiance map mode : \"Multiframe incremental\" not supported
addtocmap_notsupport = "10014" # Irradiance map mode : Add to current map not supported
ppt_notsupport = "10016" # "Light cache mode : \"Progressive path tracing\" not supported "
vray_hdri_notsupport = "999"
gamma_on = "10013"
xreffiles = "10025"
xrefobj = "10026"
vdb_missing = "10028"
realflow_version = "15022"
missing_file = "10012"
vrmesh_missing = '10030'
hdri_missing = "10012"
vrmap_missing = "10023"
vrlmap_missing = "10024"
fumefx_missing = "10011"
phoenifx_missing = "10022"
firesmokesim_missing = "10022"
liquidsim_missing = "10022"
kk_missing = "10019"
abc_missing = "10018"
xmesh_missing = "10020"
animation_map_missing = "10027"
realflow_missing = "10021"
bad_material = "10010"
vrimg_undefined = "10017" # --"\"Render to V-Ray raw image file\" Checked but *.vrimg is undefined "
channel_file_undefined = "15017" # --"Save separate render channels Checked but channels file is error"
not_english_max = '10033'
dup_texture = '15023'
unknow_err = '999'
hair_missing = '10032'
renderer_missing = '15005'
pl_open_failed = "15028"
pl_content_exception = "15029"
max_privilege_high = "15030"
task_get_failed = "15031"
material_path_long = "15032"
max_name_illegal = "15033"
# add
analyse_fail = "tips_code todo"
contain_chinese = "tips_code todo"
|
cg_notexists = '15019'
cg_zip_failed = '15009'
vray_notmatch = '15020'
cginfo_failed = '15002'
conflict_multiscatter_vray = '15021'
cg_notmatch = '15013'
camera_duplicat = '15015'
element_duplicat = '15016'
vrmesh_ext_null = '15018'
proxy_enable = '15010'
renderer_notsupport = '15004'
camera_null = '15006'
task_folder_failed = '15011'
task_create_failed = '15012'
multiframe_notsupport = '10015'
addtocmap_notsupport = '10014'
ppt_notsupport = '10016'
vray_hdri_notsupport = '999'
gamma_on = '10013'
xreffiles = '10025'
xrefobj = '10026'
vdb_missing = '10028'
realflow_version = '15022'
missing_file = '10012'
vrmesh_missing = '10030'
hdri_missing = '10012'
vrmap_missing = '10023'
vrlmap_missing = '10024'
fumefx_missing = '10011'
phoenifx_missing = '10022'
firesmokesim_missing = '10022'
liquidsim_missing = '10022'
kk_missing = '10019'
abc_missing = '10018'
xmesh_missing = '10020'
animation_map_missing = '10027'
realflow_missing = '10021'
bad_material = '10010'
vrimg_undefined = '10017'
channel_file_undefined = '15017'
not_english_max = '10033'
dup_texture = '15023'
unknow_err = '999'
hair_missing = '10032'
renderer_missing = '15005'
pl_open_failed = '15028'
pl_content_exception = '15029'
max_privilege_high = '15030'
task_get_failed = '15031'
material_path_long = '15032'
max_name_illegal = '15033'
analyse_fail = 'tips_code todo'
contain_chinese = 'tips_code todo'
|
"""Test's routes definition."""
routes = [
{'name': 'index', 'pattern': '/'},
{'name': 'secret', 'pattern': '/secret'},
{'name': 'very_secret', 'pattern': '/secret/very'},
]
|
"""Test's routes definition."""
routes = [{'name': 'index', 'pattern': '/'}, {'name': 'secret', 'pattern': '/secret'}, {'name': 'very_secret', 'pattern': '/secret/very'}]
|
#!/usr/bin/env python3
with open("input.txt", "r") as f:
all_groups = [x.strip().split("\n") for x in f.read().split("\n\n")]
anyone = 0
everyone = 0
for group in all_groups:
all = set(group[0])
any = set(group[0])
for person in group[1:]:
all = all.intersection(person)
any.update(*person)
everyone += len(all)
anyone += len(any)
print(f"part 1: ", anyone)
print(f"part 2: ", everyone)
|
with open('input.txt', 'r') as f:
all_groups = [x.strip().split('\n') for x in f.read().split('\n\n')]
anyone = 0
everyone = 0
for group in all_groups:
all = set(group[0])
any = set(group[0])
for person in group[1:]:
all = all.intersection(person)
any.update(*person)
everyone += len(all)
anyone += len(any)
print(f'part 1: ', anyone)
print(f'part 2: ', everyone)
|
class Solution:
def maxScore(self, arr, k):
dp = {'l':[0], 'r':[0]}
curr_sum_left = 0
curr_sum_right = 0
for index in range(0, k):
# for left
curr_sum_left += arr[index]
dp['l'].append(curr_sum_left)
# for right
j = len(arr) - 1 - index
curr_sum_right += arr[j]
dp['r'].append(curr_sum_right)
maximum = -1
left = 0
right = k
while k >= 0:
curr_sum = dp['l'][left] + dp['r'][right]
left += 1
right -= 1
maximum = max(curr_sum, maximum)
k -= 1
return maximum
s = Solution()
print(s.maxScore([30,88,33,37,18,77,54,73,31,88,93,25,18,31,71,8,97,20,98,16,65,40,18,25,13,51,59], 26))
|
class Solution:
def max_score(self, arr, k):
dp = {'l': [0], 'r': [0]}
curr_sum_left = 0
curr_sum_right = 0
for index in range(0, k):
curr_sum_left += arr[index]
dp['l'].append(curr_sum_left)
j = len(arr) - 1 - index
curr_sum_right += arr[j]
dp['r'].append(curr_sum_right)
maximum = -1
left = 0
right = k
while k >= 0:
curr_sum = dp['l'][left] + dp['r'][right]
left += 1
right -= 1
maximum = max(curr_sum, maximum)
k -= 1
return maximum
s = solution()
print(s.maxScore([30, 88, 33, 37, 18, 77, 54, 73, 31, 88, 93, 25, 18, 31, 71, 8, 97, 20, 98, 16, 65, 40, 18, 25, 13, 51, 59], 26))
|
"""
********************
Singleton Pattern
********************
Description from Wikipedia:
*"the singleton pattern is a software design pattern that
restricts the instantiation of a class to one 'single' instance.
This is useful when exactly one object is needed to coordinate
actions across the system."*
.. warning:: *"Critics consider the singleton to be an anti-pattern
in that it is frequently used in scenarios where it is not beneficial,
introduces unnecessary restrictions in situations where a sole instance
of a class is not actually required, and introduces global state into an application."*
Source: https://en.wikipedia.org/wiki/Singleton_pattern
The more pythonic way to implement a singleton is by creating
a decorator to store the decorated class instances.
"""
def singleton(cls):
"""
This decorator ensures that only one instance of
the decorated class will be created in runtime.
:param cls: a class to be decorated as singleton
:type cls: class
Example:
A decorated class that displays its own `id(self)`
will always return the same value.
>>> @singleton
>>> class SingletonExample:
>>> def __init__(self):
>>> self.own_id: int = id(self)
>>> def __repr__(self):
>>> return f"{self.__class__.__name__}(id={self.own_id})"
>>>
>>> SingletonExample()
SingletonExample(id=140472046362688)
>>> SingletonExample()
SingletonExample(id=140472046362688)
>>> SingletonExample() is SingletonExample()
True
"""
instances = {}
def wrapper(*args, **kwargs):
if cls not in instances:
instances[cls] = cls(*args, **kwargs)
return instances[cls]
return wrapper
@singleton
class SingletonExample:
"""
SingletonExample
A class that stores a value of its id.
"""
def __init__(self):
self.own_id: int = id(self)
def __repr__(self):
return f"{self.__class__.__name__}(id={self.own_id})"
|
"""
********************
Singleton Pattern
********************
Description from Wikipedia:
*"the singleton pattern is a software design pattern that
restricts the instantiation of a class to one 'single' instance.
This is useful when exactly one object is needed to coordinate
actions across the system."*
.. warning:: *"Critics consider the singleton to be an anti-pattern
in that it is frequently used in scenarios where it is not beneficial,
introduces unnecessary restrictions in situations where a sole instance
of a class is not actually required, and introduces global state into an application."*
Source: https://en.wikipedia.org/wiki/Singleton_pattern
The more pythonic way to implement a singleton is by creating
a decorator to store the decorated class instances.
"""
def singleton(cls):
"""
This decorator ensures that only one instance of
the decorated class will be created in runtime.
:param cls: a class to be decorated as singleton
:type cls: class
Example:
A decorated class that displays its own `id(self)`
will always return the same value.
>>> @singleton
>>> class SingletonExample:
>>> def __init__(self):
>>> self.own_id: int = id(self)
>>> def __repr__(self):
>>> return f"{self.__class__.__name__}(id={self.own_id})"
>>>
>>> SingletonExample()
SingletonExample(id=140472046362688)
>>> SingletonExample()
SingletonExample(id=140472046362688)
>>> SingletonExample() is SingletonExample()
True
"""
instances = {}
def wrapper(*args, **kwargs):
if cls not in instances:
instances[cls] = cls(*args, **kwargs)
return instances[cls]
return wrapper
@singleton
class Singletonexample:
"""
SingletonExample
A class that stores a value of its id.
"""
def __init__(self):
self.own_id: int = id(self)
def __repr__(self):
return f'{self.__class__.__name__}(id={self.own_id})'
|
# date: 18/06/2020
# Description:
# Given a 32-bit integer,
# swap the 1st and 2nd bit,
# 3rd and 4th bit, up til the 31st and 32nd bit.
# convert from decimal to binary
def convert_to_binary(num):
result=''
while num != 0:
remainder = num % 2 # gives the exact remainder
num = num // 2
result = str(remainder) + result
return result
# swap 0s with 1s
def swap_bits(num):
results = list(convert_to_binary(num))
out =''
for i in range(len(results)):
if results[i] == '1':
out += '0'
else:
out += '1'
return '0b'+out
print(f"{swap_bits(0b10101010101010101010101010101010)}")
|
def convert_to_binary(num):
result = ''
while num != 0:
remainder = num % 2
num = num // 2
result = str(remainder) + result
return result
def swap_bits(num):
results = list(convert_to_binary(num))
out = ''
for i in range(len(results)):
if results[i] == '1':
out += '0'
else:
out += '1'
return '0b' + out
print(f'{swap_bits(2863311530)}')
|
vectors = { 'NW': (-1, -1), 'N': (-1, 0), 'NE': (-1, 1),
'W' : ( 0, -1), '' : ( 0, 0), 'E' : ( 0, 1),
'SW': ( 1, -1), 'S': ( 1, 0), 'SE': ( 1, 1),
}
class Board:
def __init__(self,grid,directions):
self._nb_row,self._nb_col=(len(grid),len(grid[0]))
self._size=max(self._nb_row,self._nb_col)
self._final=self._nb_row*self._nb_col
self._successors=dict()
self._predecessors=dict()
self._values=dict()
self._positions=dict()
positions=[(x,y) for x in range(self._nb_row) for y in range(self._nb_col)]
self._next={pos:None for pos in positions}
self._before={pos:None for pos in positions}
self._possible_next={pos:[] for pos in positions}
self._possible_before={pos:[] for pos in positions}
self._positions={val:None for val in range(1,self._final)}
self._values={pos:0 for pos in positions}
for x, row in enumerate(grid):
for y,val in enumerate(row):
M=(x,y)
if val!=0:
self._positions[val]=M
self._values[M]=val
if val==1:
self._start=M
if val==self._final:
self._end=M
for x in range(self._nb_row):
for y in range(self._nb_col):
dx,dy=vectors[directions[x][y]]
for n in range(1,self._size):
if 0<=x+n*dx<self._nb_row and 0<=y+n*dy<self._nb_col:
if (x+n*dx,y+n*dy)!=self._start and (x,y)!=self._end:
self._possible_next[(x,y)].append((x+n*dx,y+n*dy))
self._possible_before[(x+n*dx,y+n*dy)].append((x,y))
def _link(self,B,C):
# Actually Link B to C
self._next[B]=C
self._before[C]=B
# Remove B and C as options for other links
for A in self._possible_next[B]:
self._possible_before[A].remove(B)
self._possible_next[B]=[]
for A in self._possible_before[C]:
self._possible_next[A].remove(C)
self._possible_before[C]=[]
# Let see if we learned some values
if self._values[B] and not self._values[C]:
val=self._values[B]
prev_pos=B
while self._next[B] and not self._values[self._next[B]]:
val+=1
next_pos=self._next[B]
self._values[next_pos]=val
self._positions[val]=next_pos
prev_pos=next_pos
# Check if we know where val+1 is
if self._positions[val+1]:
self._link(next_pos,self._positions[val+1])
elif self._values[C] and not self._values[B]:
val=self._values[C]
next_pos=C
while self._before[C] and not self._values[self._before[C]]:
val-=1
prev_pos=self._before[C]
self._values[prev_pos]=val
self._positions[val]=prev_pos
next_pos=prev_pos
# Check if we know where val-1 is
if self._positions[val-1]:
self._link(self._positions[val-1],next_pos)
def _paths(self,start,stop):
A,B=self._positions[start],self._positions[stop]
paths=[[A]] # All paths start at A
length=stop-start
current_pos=A
for _ in range(length-1):
# We want to stop just before last step (as we will control that all positions in path are empty
next_paths=[]
for path in paths:
last_pos=path[-1]
next_pos=self._next[last_pos]
if next_pos:
if not self._values[next_pos] and next_pos not in path:
# If next_pos already has a value, it can not be a valid path
# loops are not possible too
next_paths.append(path+[next_pos])
else:
for next_pos in self._possible_next[last_pos]:
if not self._values[next_pos] and not next_pos in path:
# If next_pos already has a value, it can not be a valid path
# loops are not possible too
next_paths.append(path+[next_pos])
paths=next_paths
# We reach the end, time to remove any path that won't terminate in B
next_paths=[]
for path in paths:
last_pos=path[-1]
next_pos=self._next[last_pos]
if B==next_pos or B in self._possible_next[last_pos]:
# This terminate in B
next_paths.append(path+[B])
# We are done
paths=next_paths
if len(paths)>1:
return []
else:
return paths[0]
def solve(self):
# Linking pairs of numbers first
numbers=[n for n,v in self._positions.items() if v]
pairs=[(n-1,n) for n in numbers if n-1 in numbers]
for p,n in pairs:
self._link(self._positions[p],self._positions[n])
# Start a loop until all positions have a defined value
while not all(self._positions.values()):
for pos,successor in [(pos,possible_next[0])
for pos,possible_next in self._possible_next.items()
if possible_next and len(possible_next)==1]:
# Only one successor
self._link(pos,successor)
for pos,predecessor in [(pos,possible_before[0])
for pos,possible_before in self._possible_before.items()
if possible_before and len(possible_before)==1]:
# Only one predecessor
self._link(predecessor,pos)
# Let's search for paths between numbers with smallest gap
numbers=[n for n,v in self._positions.items() if v]
gaps=[(numbers[i-1],n) for i,n in enumerate(numbers) if i>0 and n-numbers[i-1]>1]
distances=sorted([stop-start for start,stop in gaps])
for limit in distances:
paths=[path for path in [self._paths(start,stop) for start,stop in gaps if stop-start==limit] if path]
if paths:
# At Least one valid path, time to stop, else continue with longer paths
break
# We have a valid path
for path in paths:
for prev_pos,next_pos in zip(path[:-1],path[1:]):
val=self._values[prev_pos]+1
self._values[next_pos]=val
self._positions[val]=next_pos
self._link(prev_pos,next_pos)
# End of while loop, hopefully we are done
return [[self._values[(x,y)] if (x,y) in self._values else 0 for y in range(self._nb_col)] for x in range(self._nb_row)]
def signpost(grid, directions):
return Board(grid,directions).solve()
|
vectors = {'NW': (-1, -1), 'N': (-1, 0), 'NE': (-1, 1), 'W': (0, -1), '': (0, 0), 'E': (0, 1), 'SW': (1, -1), 'S': (1, 0), 'SE': (1, 1)}
class Board:
def __init__(self, grid, directions):
(self._nb_row, self._nb_col) = (len(grid), len(grid[0]))
self._size = max(self._nb_row, self._nb_col)
self._final = self._nb_row * self._nb_col
self._successors = dict()
self._predecessors = dict()
self._values = dict()
self._positions = dict()
positions = [(x, y) for x in range(self._nb_row) for y in range(self._nb_col)]
self._next = {pos: None for pos in positions}
self._before = {pos: None for pos in positions}
self._possible_next = {pos: [] for pos in positions}
self._possible_before = {pos: [] for pos in positions}
self._positions = {val: None for val in range(1, self._final)}
self._values = {pos: 0 for pos in positions}
for (x, row) in enumerate(grid):
for (y, val) in enumerate(row):
m = (x, y)
if val != 0:
self._positions[val] = M
self._values[M] = val
if val == 1:
self._start = M
if val == self._final:
self._end = M
for x in range(self._nb_row):
for y in range(self._nb_col):
(dx, dy) = vectors[directions[x][y]]
for n in range(1, self._size):
if 0 <= x + n * dx < self._nb_row and 0 <= y + n * dy < self._nb_col:
if (x + n * dx, y + n * dy) != self._start and (x, y) != self._end:
self._possible_next[x, y].append((x + n * dx, y + n * dy))
self._possible_before[x + n * dx, y + n * dy].append((x, y))
def _link(self, B, C):
self._next[B] = C
self._before[C] = B
for a in self._possible_next[B]:
self._possible_before[A].remove(B)
self._possible_next[B] = []
for a in self._possible_before[C]:
self._possible_next[A].remove(C)
self._possible_before[C] = []
if self._values[B] and (not self._values[C]):
val = self._values[B]
prev_pos = B
while self._next[B] and (not self._values[self._next[B]]):
val += 1
next_pos = self._next[B]
self._values[next_pos] = val
self._positions[val] = next_pos
prev_pos = next_pos
if self._positions[val + 1]:
self._link(next_pos, self._positions[val + 1])
elif self._values[C] and (not self._values[B]):
val = self._values[C]
next_pos = C
while self._before[C] and (not self._values[self._before[C]]):
val -= 1
prev_pos = self._before[C]
self._values[prev_pos] = val
self._positions[val] = prev_pos
next_pos = prev_pos
if self._positions[val - 1]:
self._link(self._positions[val - 1], next_pos)
def _paths(self, start, stop):
(a, b) = (self._positions[start], self._positions[stop])
paths = [[A]]
length = stop - start
current_pos = A
for _ in range(length - 1):
next_paths = []
for path in paths:
last_pos = path[-1]
next_pos = self._next[last_pos]
if next_pos:
if not self._values[next_pos] and next_pos not in path:
next_paths.append(path + [next_pos])
else:
for next_pos in self._possible_next[last_pos]:
if not self._values[next_pos] and (not next_pos in path):
next_paths.append(path + [next_pos])
paths = next_paths
next_paths = []
for path in paths:
last_pos = path[-1]
next_pos = self._next[last_pos]
if B == next_pos or B in self._possible_next[last_pos]:
next_paths.append(path + [B])
paths = next_paths
if len(paths) > 1:
return []
else:
return paths[0]
def solve(self):
numbers = [n for (n, v) in self._positions.items() if v]
pairs = [(n - 1, n) for n in numbers if n - 1 in numbers]
for (p, n) in pairs:
self._link(self._positions[p], self._positions[n])
while not all(self._positions.values()):
for (pos, successor) in [(pos, possible_next[0]) for (pos, possible_next) in self._possible_next.items() if possible_next and len(possible_next) == 1]:
self._link(pos, successor)
for (pos, predecessor) in [(pos, possible_before[0]) for (pos, possible_before) in self._possible_before.items() if possible_before and len(possible_before) == 1]:
self._link(predecessor, pos)
numbers = [n for (n, v) in self._positions.items() if v]
gaps = [(numbers[i - 1], n) for (i, n) in enumerate(numbers) if i > 0 and n - numbers[i - 1] > 1]
distances = sorted([stop - start for (start, stop) in gaps])
for limit in distances:
paths = [path for path in [self._paths(start, stop) for (start, stop) in gaps if stop - start == limit] if path]
if paths:
break
for path in paths:
for (prev_pos, next_pos) in zip(path[:-1], path[1:]):
val = self._values[prev_pos] + 1
self._values[next_pos] = val
self._positions[val] = next_pos
self._link(prev_pos, next_pos)
return [[self._values[x, y] if (x, y) in self._values else 0 for y in range(self._nb_col)] for x in range(self._nb_row)]
def signpost(grid, directions):
return board(grid, directions).solve()
|
def findDecision(obj): #obj[0]: Passanger, obj[1]: Weather, obj[2]: Time, obj[3]: Coupon, obj[4]: Coupon_validity, obj[5]: Gender, obj[6]: Age, obj[7]: Maritalstatus, obj[8]: Children, obj[9]: Education, obj[10]: Occupation, obj[11]: Income, obj[12]: Bar, obj[13]: Coffeehouse, obj[14]: Restaurant20to50, obj[15]: Direction_same, obj[16]: Distance
# {"feature": "Age", "instances": 23, "metric_value": 0.9986, "depth": 1}
if obj[6]<=6:
# {"feature": "Occupation", "instances": 20, "metric_value": 0.971, "depth": 2}
if obj[10]>3:
# {"feature": "Income", "instances": 17, "metric_value": 0.874, "depth": 3}
if obj[11]>0:
# {"feature": "Restaurant20to50", "instances": 15, "metric_value": 0.7219, "depth": 4}
if obj[14]<=1.0:
# {"feature": "Time", "instances": 8, "metric_value": 0.9544, "depth": 5}
if obj[2]<=2:
# {"feature": "Coupon", "instances": 4, "metric_value": 0.8113, "depth": 6}
if obj[3]<=2:
return 'False'
elif obj[3]>2:
# {"feature": "Maritalstatus", "instances": 2, "metric_value": 1.0, "depth": 7}
if obj[7]<=0:
return 'False'
elif obj[7]>0:
return 'True'
else: return 'True'
else: return 'False'
elif obj[2]>2:
return 'True'
else: return 'True'
elif obj[14]>1.0:
return 'True'
else: return 'True'
elif obj[11]<=0:
return 'False'
else: return 'False'
elif obj[10]<=3:
return 'False'
else: return 'False'
elif obj[6]>6:
return 'False'
else: return 'False'
|
def find_decision(obj):
if obj[6] <= 6:
if obj[10] > 3:
if obj[11] > 0:
if obj[14] <= 1.0:
if obj[2] <= 2:
if obj[3] <= 2:
return 'False'
elif obj[3] > 2:
if obj[7] <= 0:
return 'False'
elif obj[7] > 0:
return 'True'
else:
return 'True'
else:
return 'False'
elif obj[2] > 2:
return 'True'
else:
return 'True'
elif obj[14] > 1.0:
return 'True'
else:
return 'True'
elif obj[11] <= 0:
return 'False'
else:
return 'False'
elif obj[10] <= 3:
return 'False'
else:
return 'False'
elif obj[6] > 6:
return 'False'
else:
return 'False'
|
class Solution:
def solveNQueens(self, n: int) -> List[List[str]]:
def findPositions(i, j, attackedColumn = set(), attackedHill = set(), attackedDale = set()):
if i == n-1:
return [[j]]
i += 1
validPos_list = []
for k in range(n):
if not (k in attackedColumn or i+k in attackedHill or i-k in attackedDale):
valid = findPositions(i, k, attackedColumn|{k}, attackedHill|{i+k}, attackedDale|{i-k})
if valid and len(valid) > 0:
validPos_list.extend(valid)
if len(validPos_list) == 0:
return None
return [validPos + [j] for validPos in validPos_list]
validPos_list = []
for j in range(n):
valid = findPositions(0,j, {j}, {j}, {-j})
if valid:
validPos_list.extend(valid)
results = []
for validPos in validPos_list:
result = []
for j in validPos:
row = ['.']*n
row[j] = 'Q'
result = [''.join(row)] + result
results.append(result)
return results
|
class Solution:
def solve_n_queens(self, n: int) -> List[List[str]]:
def find_positions(i, j, attackedColumn=set(), attackedHill=set(), attackedDale=set()):
if i == n - 1:
return [[j]]
i += 1
valid_pos_list = []
for k in range(n):
if not (k in attackedColumn or i + k in attackedHill or i - k in attackedDale):
valid = find_positions(i, k, attackedColumn | {k}, attackedHill | {i + k}, attackedDale | {i - k})
if valid and len(valid) > 0:
validPos_list.extend(valid)
if len(validPos_list) == 0:
return None
return [validPos + [j] for valid_pos in validPos_list]
valid_pos_list = []
for j in range(n):
valid = find_positions(0, j, {j}, {j}, {-j})
if valid:
validPos_list.extend(valid)
results = []
for valid_pos in validPos_list:
result = []
for j in validPos:
row = ['.'] * n
row[j] = 'Q'
result = [''.join(row)] + result
results.append(result)
return results
|
"""Component for the Somfy MyLink device supporting the Synergy API."""
CONF_ENTITY_CONFIG = "entity_config"
CONF_SYSTEM_ID = "system_id"
CONF_REVERSE = "reverse"
CONF_DEFAULT_REVERSE = "default_reverse"
DEFAULT_CONF_DEFAULT_REVERSE = False
DATA_SOMFY_MYLINK = "somfy_mylink_data"
MYLINK_STATUS = "mylink_status"
MYLINK_ENTITY_IDS = "mylink_entity_ids"
DOMAIN = "somfy_mylink"
SOMFY_MYLINK_COMPONENTS = ["cover"]
MANUFACTURER = "Somfy"
DEFAULT_PORT = 44100
|
"""Component for the Somfy MyLink device supporting the Synergy API."""
conf_entity_config = 'entity_config'
conf_system_id = 'system_id'
conf_reverse = 'reverse'
conf_default_reverse = 'default_reverse'
default_conf_default_reverse = False
data_somfy_mylink = 'somfy_mylink_data'
mylink_status = 'mylink_status'
mylink_entity_ids = 'mylink_entity_ids'
domain = 'somfy_mylink'
somfy_mylink_components = ['cover']
manufacturer = 'Somfy'
default_port = 44100
|
#! /usr/bin/env python3
with open("input", "r") as fd :
instructions = [x.split(' ') for x in fd.read().split('\n')]
acc = 0
done = [False] * len(instructions)
i = 0
while 0 <= i < len(instructions) and not done[i] :
done[i] = True
instruction, value = instructions[i]
if instruction == "acc" :
acc += int(value)
if instruction == "jmp" :
i += int(value)
else :
i += 1
print(f"Accumulator: {acc}")
|
with open('input', 'r') as fd:
instructions = [x.split(' ') for x in fd.read().split('\n')]
acc = 0
done = [False] * len(instructions)
i = 0
while 0 <= i < len(instructions) and (not done[i]):
done[i] = True
(instruction, value) = instructions[i]
if instruction == 'acc':
acc += int(value)
if instruction == 'jmp':
i += int(value)
else:
i += 1
print(f'Accumulator: {acc}')
|
class Point3:
"""A point in three-dimensional space."""
def __init__(self, x=0, y=0, z=0):
self.x=x
self.y=y
self.z=z
def __repr__(self):
return f"({self.x},{self.y},{self.z})"
def __str__(self):
return self.__repr__()
def __add__(self, other):
return Point3(self.x+other.x, self.y+other.y, self.z+other.z)
def __sub__(self, other):
return Point3(self.x-other.x, self.y-other.y, self.z-other.z)
def __mul__(self, k):
return Point3(k*self.x, k*self.y, k*self.z)
def __neg__(self):
return Point3(-self.x, -self.y, -self.z)
def length(self):
return (self.x**2+self.y**2+self.z**2)**0.5
def normalize(self):
s = 1/self.length()
return Point3(s*self.x, s*self.y, s*self.z)
def tuple(self):
return (self.x, self.y, self.z)
@staticmethod
def dot(a,b):
return a.x*b.x + a.y*b.y + a.z*b.z
@staticmethod
def cross(a,b):
return Point3(a.y*b.z-a.z*b.y, a.z*b.x-a.x*b.z, a.x*b.y-a.y*b.x)
@staticmethod
def lerp(a,b,t):
it = 1.0-t
return Point3(it*a.x+t*b.x, it*a.y+t*b.y, it*a.z+t*b.z)
class Point2:
"""A point in two-dimensional space."""
def __init__(self, x=0, y=0):
self.x=x
self.y=y
def __repr__(self):
return f"({self.x},{self.y})"
def __str__(self):
return self.__repr__()
def __add__(self, other):
return Point2(self.x+other.x, self.y+other.y)
def __sub__(self, other):
return Point2(self.x-other.x, self.y-other.y)
def __mul__(self, k):
return Point2(k*self.x, k*self.y)
def length(self):
return (self.x**2+self.y**2)**0.5
def normalize(self):
s = 1/self.length()
return Point2(s*self.x, s*self.y)
def __neg__(self):
return Point2(-self.x, -self.y)
def rotate90(self):
return Point2(-self.y, self.x)
def rotate270(self):
return Point2(self.y, -self.x)
def tuple(self):
return (self.x, self.y)
@staticmethod
def dot(a,b):
return a.x*b.x + a.y*b.y
@staticmethod
def lerp(a,b,t):
it = 1.0-t
return Point2(it*a.x+t*b.x, it*a.y+t*b.y)
class Plane:
"""A plane three-dimensional space; set of (x,y,z): a*x+b*y+c*z+d==0."""
def __init__(self, a,b,c,d):
self.a = a
self.b = b
self.c = c
self.d = d
def comp(self, p):
return self.a*p.x+self.b*p.y+self.c*p.z+self.d
def __neg__(self):
return Plane(-self.a, -self.b, -self.c, -self.d)
class Polyhedron:
"""A polyhedron."""
class Face:
"""Polyhedron face: a list of m indices and a color."""
def __init__(self, indices, color=1):
self.color = color
self.indices = indices
self.m = len(indices)
def __repl__(self):
ii = ",".join([str(i) for i in self.indices])
return f"face({ii})"
def __str__(self):
return self.__repl__()
def __init__(self, vertices, faces):
self.vertices = vertices
self.faces = faces
def get_face_center(self, face_index):
assert 0<=face_index<len(self.faces)
face = self.faces[face_index]
sc = 1/face.m
p = sum([self.vertices[i] for i in face.indices], Point3(0,0,0))*sc
return p
def get_face_by_edge(self, a, b): # return (face-index, edge-index)
for i,face in enumerate(self.faces):
indices = face.indices
for j in range(face.m):
c,d = indices[j], indices[(j+1)%face.m]
if (c,d) == (a,b):
return (i,j)
return None,None
def assert_integrity(self):
edges = set()
for face in self.faces:
m = face.m
assert len(face.indices) == m
assert m>=3
assert len(set(face.indices)) == m
for i in range(m):
a, b = face.indices[i], face.indices[(i+1)%m]
edge = a,b
assert edge not in edges, "Polyhedron with duplicated edges or misoriented faces"
edges.add(edge)
for a,b in edges:
# assert (b,a) in edges, "Polyhedron with holes"
pass
for face in self.faces:
pts = [self.vertices[j] for j in face.indices]
fc = sum(pts,Point3(0,0,0)) * (1.0/len(pts))
e0 = (pts[0]-fc).normalize()
e1 = pts[1]-fc
e1 = (e1-e0*Point3.dot(e0,e1)).normalize()
e2 = Point3.cross(e0,e1).normalize()
assert Point3.dot(Point3(0,0,0) - fc, e2) > 0.0
for i,p in enumerate(self.vertices):
w = Point3.dot(p-fc, e2)
assert w >= -1.0e-10, "Bad face orientation"
# create a cube
def create_tetrahedron():
u = 1
vertices = [Point3(x,y,z) for (x,y,z) in [
( u, u, u),(-u,-u, u),(-u, u,-u),( u,-u,-u)]]
faces = [Polyhedron.Face(ii) for ii in [
(0,1,2),(1,0,3),(2,1,3),(0,2,3)]]
ph = Polyhedron(vertices, faces)
ph.assert_integrity()
return ph
def create_cube():
u = 1
vertices = [Point3(x,y,z) for (x,y,z) in [
(-u,-u,-u),( u,-u,-u),(-u, u,-u),(u, u,-u),
(-u,-u, u),( u,-u, u),(-u, u, u),(u, u, u)]]
faces = [Polyhedron.Face(ii) for ii in [
(0,1,3,2),(4,6,7,5),(1,0,4,5),
(3,1,5,7),(2,3,7,6),(0,2,6,4)]]
ph = Polyhedron(vertices, faces)
ph.assert_integrity()
return ph
def create_octahedron():
u = 1
vertices = [Point3(x,y,z) for (x,y,z) in [
( 0, u, 0),( u, 0, 0),(-u, 0, 0),
( 0, 0, u),( 0, 0,-u),( 0,-u, 0)]]
faces = [Polyhedron.Face(ii) for ii in [
(0,1,3),(0,3,2),(0,2,4),(0,4,1),
(5,3,1),(5,2,3),(5,4,2),(5,1,4)]]
ph = Polyhedron(vertices, faces)
ph.assert_integrity()
return ph
def create_icosahedron():
u = 1
f = (-1+5**0.5)/2
vertices = [Point3(x,y,z) for (x,y,z) in [
(-f, u, 0),( f, u, 0),(-f,-u, 0),( f,-u, 0),
(-1, 0, f),(-1, 0,-f),( 1, 0, f),( 1, 0,-f),
( 0,-f, 1),( 0, f, 1),( 0,-f,-1),( 0, f,-1)]]
faces = [Polyhedron.Face(ii) for ii in [
(9,0,1),(9,1,6),(9,6,8),(9,8,4),(9,4,0),
(8,6,3),(8,3,2),(8,2,4),(2,3,10),(0,11,1),
(1,11,7),(6,1,7),(3,6,7),(10,3,7),(11,10,7),
(5,11,0),(5,0,4),(5,4,2),(5,2,10),(5,10,11)
]]
ph = Polyhedron(vertices, faces)
ph.assert_integrity()
return ph
class Clipper:
"""The class cuts polyhedron across a plane."""
def clip(self, ph, plane):
"""Main method. Returns the (possibly empty) polyhedron part below the plane."""
self.ph = ph
self.plane = plane
self.ws = [plane.comp(p) for p in ph.vertices]
epsilon = 1.0e-8
self.ws = [w if abs(w)>epsilon else 0.0 for w in self.ws]
self.vertices = []
self.faces = []
self.vtb = {} # old-vertex => new-vertex
self.etb = {} # old-edge(a,b) => new-vertex
self.section_face_tb = {} #
for i,face in enumerate(ph.faces):
self._process_face(i,face)
self._add_section_face()
result = Polyhedron(self.vertices, self.faces)
return result
def _vp(self, i):
if i in self.vtb: return self.vtb[i]
j = len(self.vertices)
self.vertices.append(self.ph.vertices[i])
self.vtb[i] = j
return j
def _ep(self, a,b):
if a>b: a,b=b,a
edge = (a,b)
wa = self.ws[a]
wb = self.ws[b]
assert wa * wb < 0.0
if edge in self.etb: return self.etb[edge]
pa = self.ph.vertices[a]
pb = self.ph.vertices[b]
t = -wa/(wb-wa)
j = len(self.vertices)
self.vertices.append(Point3.lerp(pa, pb, t))
self.etb[edge] = j
return j
def _process_zero_face(self, i, face):
new_face = [self._vp(j) for j in face.indices]
self.faces.append(Polyhedron.Face(new_face, face.color))
def _process_face(self, i, face):
m = face.m
ws = self.ws
face_ws = [ws[j] for j in face.indices]
zm,inm,outm = 0,0,0
for w in [ws[j] for j in face.indices]:
if w>0.0: outm += 1
elif w<0.0: inm += 1
else: zm += 0
if zm >= 3:
# face belong to cutting plane => pass it
assert inm == outm == 0
self._process_zero_face(i, face)
return
new_face = []
new_a, new_b = None, None
for j in range(m):
a,b = face.indices[j], face.indices[(j+1)%m]
if ws[a]<0:
if ws[b]<0:
j = self._vp(b)
new_face.append(j)
elif ws[b]>0:
j = self._ep(a, b)
new_face.append(j)
assert new_b == None
new_b = j
else: # ws[b]==0
j = self._vp(b)
new_face.append(j)
assert new_b == None
new_b = j
elif ws[a]>0:
if ws[b]<0:
j = self._ep(a, b)
new_face.append(j)
jb = self._vp(b)
new_face.append(jb)
assert new_a == None
new_a = j
elif ws[b]==0:
jb = self._vp(b)
new_face.append(jb)
assert new_a == None
new_a = jb
else: # ws[a] == 0
if ws[b]<0:
j = self._vp(b)
new_face.append(j)
elif ws[b] == 0:
# segment a,b belongs to the cutting plane
if inm > 0:
j = self._vp(b)
new_face.append(j)
# assert new_b == None
new_a = j
if new_face != [] and len(new_face)>=3:
self.faces.append(Polyhedron.Face(new_face, face.color))
# print(" new face : ", ", ".join([str(self.vertices[j]) for j in new_face]))
# assert (new_a is None) == (new_b is None)
# print(" new edge : ", new_a, new_b)
if new_a is not None and new_b is not None and new_a != new_b:
assert new_a not in self.section_face_tb
self.section_face_tb[new_a] = new_b
def _add_section_face(self):
# print("section face: ", self.section_face_tb)
if len(self.section_face_tb) >= 3:
section_face = [next(iter(self.section_face_tb))]
while True:
j = self.section_face_tb.get(section_face[-1],None)
if j == None: break
if j == section_face[0]: break
section_face.append(j)
if j == section_face[0]:
self.faces.append(Polyhedron.Face(section_face, 2))
def clip(ph, plane):
clipper = Clipper()
return clipper.clip(ph,plane)
|
class Point3:
"""A point in three-dimensional space."""
def __init__(self, x=0, y=0, z=0):
self.x = x
self.y = y
self.z = z
def __repr__(self):
return f'({self.x},{self.y},{self.z})'
def __str__(self):
return self.__repr__()
def __add__(self, other):
return point3(self.x + other.x, self.y + other.y, self.z + other.z)
def __sub__(self, other):
return point3(self.x - other.x, self.y - other.y, self.z - other.z)
def __mul__(self, k):
return point3(k * self.x, k * self.y, k * self.z)
def __neg__(self):
return point3(-self.x, -self.y, -self.z)
def length(self):
return (self.x ** 2 + self.y ** 2 + self.z ** 2) ** 0.5
def normalize(self):
s = 1 / self.length()
return point3(s * self.x, s * self.y, s * self.z)
def tuple(self):
return (self.x, self.y, self.z)
@staticmethod
def dot(a, b):
return a.x * b.x + a.y * b.y + a.z * b.z
@staticmethod
def cross(a, b):
return point3(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x)
@staticmethod
def lerp(a, b, t):
it = 1.0 - t
return point3(it * a.x + t * b.x, it * a.y + t * b.y, it * a.z + t * b.z)
class Point2:
"""A point in two-dimensional space."""
def __init__(self, x=0, y=0):
self.x = x
self.y = y
def __repr__(self):
return f'({self.x},{self.y})'
def __str__(self):
return self.__repr__()
def __add__(self, other):
return point2(self.x + other.x, self.y + other.y)
def __sub__(self, other):
return point2(self.x - other.x, self.y - other.y)
def __mul__(self, k):
return point2(k * self.x, k * self.y)
def length(self):
return (self.x ** 2 + self.y ** 2) ** 0.5
def normalize(self):
s = 1 / self.length()
return point2(s * self.x, s * self.y)
def __neg__(self):
return point2(-self.x, -self.y)
def rotate90(self):
return point2(-self.y, self.x)
def rotate270(self):
return point2(self.y, -self.x)
def tuple(self):
return (self.x, self.y)
@staticmethod
def dot(a, b):
return a.x * b.x + a.y * b.y
@staticmethod
def lerp(a, b, t):
it = 1.0 - t
return point2(it * a.x + t * b.x, it * a.y + t * b.y)
class Plane:
"""A plane three-dimensional space; set of (x,y,z): a*x+b*y+c*z+d==0."""
def __init__(self, a, b, c, d):
self.a = a
self.b = b
self.c = c
self.d = d
def comp(self, p):
return self.a * p.x + self.b * p.y + self.c * p.z + self.d
def __neg__(self):
return plane(-self.a, -self.b, -self.c, -self.d)
class Polyhedron:
"""A polyhedron."""
class Face:
"""Polyhedron face: a list of m indices and a color."""
def __init__(self, indices, color=1):
self.color = color
self.indices = indices
self.m = len(indices)
def __repl__(self):
ii = ','.join([str(i) for i in self.indices])
return f'face({ii})'
def __str__(self):
return self.__repl__()
def __init__(self, vertices, faces):
self.vertices = vertices
self.faces = faces
def get_face_center(self, face_index):
assert 0 <= face_index < len(self.faces)
face = self.faces[face_index]
sc = 1 / face.m
p = sum([self.vertices[i] for i in face.indices], point3(0, 0, 0)) * sc
return p
def get_face_by_edge(self, a, b):
for (i, face) in enumerate(self.faces):
indices = face.indices
for j in range(face.m):
(c, d) = (indices[j], indices[(j + 1) % face.m])
if (c, d) == (a, b):
return (i, j)
return (None, None)
def assert_integrity(self):
edges = set()
for face in self.faces:
m = face.m
assert len(face.indices) == m
assert m >= 3
assert len(set(face.indices)) == m
for i in range(m):
(a, b) = (face.indices[i], face.indices[(i + 1) % m])
edge = (a, b)
assert edge not in edges, 'Polyhedron with duplicated edges or misoriented faces'
edges.add(edge)
for (a, b) in edges:
pass
for face in self.faces:
pts = [self.vertices[j] for j in face.indices]
fc = sum(pts, point3(0, 0, 0)) * (1.0 / len(pts))
e0 = (pts[0] - fc).normalize()
e1 = pts[1] - fc
e1 = (e1 - e0 * Point3.dot(e0, e1)).normalize()
e2 = Point3.cross(e0, e1).normalize()
assert Point3.dot(point3(0, 0, 0) - fc, e2) > 0.0
for (i, p) in enumerate(self.vertices):
w = Point3.dot(p - fc, e2)
assert w >= -1e-10, 'Bad face orientation'
def create_tetrahedron():
u = 1
vertices = [point3(x, y, z) for (x, y, z) in [(u, u, u), (-u, -u, u), (-u, u, -u), (u, -u, -u)]]
faces = [Polyhedron.Face(ii) for ii in [(0, 1, 2), (1, 0, 3), (2, 1, 3), (0, 2, 3)]]
ph = polyhedron(vertices, faces)
ph.assert_integrity()
return ph
def create_cube():
u = 1
vertices = [point3(x, y, z) for (x, y, z) in [(-u, -u, -u), (u, -u, -u), (-u, u, -u), (u, u, -u), (-u, -u, u), (u, -u, u), (-u, u, u), (u, u, u)]]
faces = [Polyhedron.Face(ii) for ii in [(0, 1, 3, 2), (4, 6, 7, 5), (1, 0, 4, 5), (3, 1, 5, 7), (2, 3, 7, 6), (0, 2, 6, 4)]]
ph = polyhedron(vertices, faces)
ph.assert_integrity()
return ph
def create_octahedron():
u = 1
vertices = [point3(x, y, z) for (x, y, z) in [(0, u, 0), (u, 0, 0), (-u, 0, 0), (0, 0, u), (0, 0, -u), (0, -u, 0)]]
faces = [Polyhedron.Face(ii) for ii in [(0, 1, 3), (0, 3, 2), (0, 2, 4), (0, 4, 1), (5, 3, 1), (5, 2, 3), (5, 4, 2), (5, 1, 4)]]
ph = polyhedron(vertices, faces)
ph.assert_integrity()
return ph
def create_icosahedron():
u = 1
f = (-1 + 5 ** 0.5) / 2
vertices = [point3(x, y, z) for (x, y, z) in [(-f, u, 0), (f, u, 0), (-f, -u, 0), (f, -u, 0), (-1, 0, f), (-1, 0, -f), (1, 0, f), (1, 0, -f), (0, -f, 1), (0, f, 1), (0, -f, -1), (0, f, -1)]]
faces = [Polyhedron.Face(ii) for ii in [(9, 0, 1), (9, 1, 6), (9, 6, 8), (9, 8, 4), (9, 4, 0), (8, 6, 3), (8, 3, 2), (8, 2, 4), (2, 3, 10), (0, 11, 1), (1, 11, 7), (6, 1, 7), (3, 6, 7), (10, 3, 7), (11, 10, 7), (5, 11, 0), (5, 0, 4), (5, 4, 2), (5, 2, 10), (5, 10, 11)]]
ph = polyhedron(vertices, faces)
ph.assert_integrity()
return ph
class Clipper:
"""The class cuts polyhedron across a plane."""
def clip(self, ph, plane):
"""Main method. Returns the (possibly empty) polyhedron part below the plane."""
self.ph = ph
self.plane = plane
self.ws = [plane.comp(p) for p in ph.vertices]
epsilon = 1e-08
self.ws = [w if abs(w) > epsilon else 0.0 for w in self.ws]
self.vertices = []
self.faces = []
self.vtb = {}
self.etb = {}
self.section_face_tb = {}
for (i, face) in enumerate(ph.faces):
self._process_face(i, face)
self._add_section_face()
result = polyhedron(self.vertices, self.faces)
return result
def _vp(self, i):
if i in self.vtb:
return self.vtb[i]
j = len(self.vertices)
self.vertices.append(self.ph.vertices[i])
self.vtb[i] = j
return j
def _ep(self, a, b):
if a > b:
(a, b) = (b, a)
edge = (a, b)
wa = self.ws[a]
wb = self.ws[b]
assert wa * wb < 0.0
if edge in self.etb:
return self.etb[edge]
pa = self.ph.vertices[a]
pb = self.ph.vertices[b]
t = -wa / (wb - wa)
j = len(self.vertices)
self.vertices.append(Point3.lerp(pa, pb, t))
self.etb[edge] = j
return j
def _process_zero_face(self, i, face):
new_face = [self._vp(j) for j in face.indices]
self.faces.append(Polyhedron.Face(new_face, face.color))
def _process_face(self, i, face):
m = face.m
ws = self.ws
face_ws = [ws[j] for j in face.indices]
(zm, inm, outm) = (0, 0, 0)
for w in [ws[j] for j in face.indices]:
if w > 0.0:
outm += 1
elif w < 0.0:
inm += 1
else:
zm += 0
if zm >= 3:
assert inm == outm == 0
self._process_zero_face(i, face)
return
new_face = []
(new_a, new_b) = (None, None)
for j in range(m):
(a, b) = (face.indices[j], face.indices[(j + 1) % m])
if ws[a] < 0:
if ws[b] < 0:
j = self._vp(b)
new_face.append(j)
elif ws[b] > 0:
j = self._ep(a, b)
new_face.append(j)
assert new_b == None
new_b = j
else:
j = self._vp(b)
new_face.append(j)
assert new_b == None
new_b = j
elif ws[a] > 0:
if ws[b] < 0:
j = self._ep(a, b)
new_face.append(j)
jb = self._vp(b)
new_face.append(jb)
assert new_a == None
new_a = j
elif ws[b] == 0:
jb = self._vp(b)
new_face.append(jb)
assert new_a == None
new_a = jb
elif ws[b] < 0:
j = self._vp(b)
new_face.append(j)
elif ws[b] == 0:
if inm > 0:
j = self._vp(b)
new_face.append(j)
new_a = j
if new_face != [] and len(new_face) >= 3:
self.faces.append(Polyhedron.Face(new_face, face.color))
if new_a is not None and new_b is not None and (new_a != new_b):
assert new_a not in self.section_face_tb
self.section_face_tb[new_a] = new_b
def _add_section_face(self):
if len(self.section_face_tb) >= 3:
section_face = [next(iter(self.section_face_tb))]
while True:
j = self.section_face_tb.get(section_face[-1], None)
if j == None:
break
if j == section_face[0]:
break
section_face.append(j)
if j == section_face[0]:
self.faces.append(Polyhedron.Face(section_face, 2))
def clip(ph, plane):
clipper = clipper()
return clipper.clip(ph, plane)
|
def ben_update():
return
def ben_random_tick():
return
|
def ben_update():
return
def ben_random_tick():
return
|
class Rectangle:
def __init__(self, width, height):
self.width = width
self.height = height
def set_width(self, n):
self.width = n
def set_height(self, n):
self.height = n
def get_area(self):
return self.height * self.width
def get_perimeter(self):
return 2 * self.width + 2 * self.height
def get_diagonal(self):
return (self.width ** 2 + self.height ** 2) ** 0.5
def get_picture(self):
if self.width > 50 or self.height > 50:
return "Too big for picture."
else:
lines = []
for n in range(self.height):
lines.append('*' * self.width)
lines = '\n'.join(lines) + '\n'
return lines
def get_amount_inside(self, other):
return self.get_area() // other.get_area()
def __str__(self):
return f"Rectangle(width={self.width}, height={self.height})"
class Square(Rectangle):
def __init__(self, width):
super().__init__(width, width)
def set_side(self, n):
self.set_width(n)
self.set_height(n)
def set_height(self, n):
self.height = n
self.width = n
def set_width(self, n):
self.width = n
self.height = n
def __str__(self):
return f"Square(side={self.height})"
|
class Rectangle:
def __init__(self, width, height):
self.width = width
self.height = height
def set_width(self, n):
self.width = n
def set_height(self, n):
self.height = n
def get_area(self):
return self.height * self.width
def get_perimeter(self):
return 2 * self.width + 2 * self.height
def get_diagonal(self):
return (self.width ** 2 + self.height ** 2) ** 0.5
def get_picture(self):
if self.width > 50 or self.height > 50:
return 'Too big for picture.'
else:
lines = []
for n in range(self.height):
lines.append('*' * self.width)
lines = '\n'.join(lines) + '\n'
return lines
def get_amount_inside(self, other):
return self.get_area() // other.get_area()
def __str__(self):
return f'Rectangle(width={self.width}, height={self.height})'
class Square(Rectangle):
def __init__(self, width):
super().__init__(width, width)
def set_side(self, n):
self.set_width(n)
self.set_height(n)
def set_height(self, n):
self.height = n
self.width = n
def set_width(self, n):
self.width = n
self.height = n
def __str__(self):
return f'Square(side={self.height})'
|
'''
Duplicate the elements of a list.
Example:
* (dupli '(a b c c d))
(A A B B C C C C D D)
'''
#taking input of list elements at a single time seperating by space and splitting each by split() method
demo_list = input("Enter elements seperated by space: ").split()
duplicates_list = list()
list_length = len(demo_list)
index = 0
while index < list_length:
for _ in range(2):
duplicates_list.append(demo_list[index]) #adding every item twice to new list
index += 1
print(f"old list {demo_list}")
print(f"duplicates list {duplicates_list}")
|
"""
Duplicate the elements of a list.
Example:
* (dupli '(a b c c d))
(A A B B C C C C D D)
"""
demo_list = input('Enter elements seperated by space: ').split()
duplicates_list = list()
list_length = len(demo_list)
index = 0
while index < list_length:
for _ in range(2):
duplicates_list.append(demo_list[index])
index += 1
print(f'old list {demo_list}')
print(f'duplicates list {duplicates_list}')
|
n = int(input())
max_num = -1000000000000
for i in range(n):
num = int(input())
if num > max_num:
max_num = num
print(max_num)
|
n = int(input())
max_num = -1000000000000
for i in range(n):
num = int(input())
if num > max_num:
max_num = num
print(max_num)
|
with open("day-08.txt") as f:
lines = f.read().rstrip().splitlines()
ans = 0
for line in lines:
_, output = line.split(" | ")
for digit in output.split(maxsplit=3):
ans += len(digit) in (2, 3, 4, 7)
print(ans)
|
with open('day-08.txt') as f:
lines = f.read().rstrip().splitlines()
ans = 0
for line in lines:
(_, output) = line.split(' | ')
for digit in output.split(maxsplit=3):
ans += len(digit) in (2, 3, 4, 7)
print(ans)
|
"""
This file is included in all files
"""
# THIS FILE IS INCLUDED IN ALL FILES
RELEASE = 'Created by BFM v. 5.1'
PATH_MAX = 255
stderr = 0
stdout = 6
# HANDY FOR WRITING
def STDOUT(text):
print(text)
def STDERR(text):
print(text)
# STANDARD OUTPUT FOR PARALLEL COMPUTATION
def LEVEL0():
STDERR('')
def LEVEL1():
STDERR(' ')
def LEVEL2():
STDERR(' ')
def LEVEL3():
STDERR(' ')
def LEVEL4():
STDERR(' ')
def FATAL():
STDERR('FATAL ERROR: ')
def LINE():
print('------------------------------------------------------------------------')
# SHAPE OF VARIABLES
POINT = 0
Z_SHAPE = 1
T_SHAPE = 2
XY_SHAPE = 3
XYT_SHAPE = 4
XYZT_SHAPE = 5
OCET_SHAPE = 6
SURFT_SHAPE = 7
BOTT_SHAPE = 8
G_SHAPE = 9
XYZ_SHAPE = 10
# CONSTANTS FOR AVERAGE COMPUTATIONS
INIT = 0
MEAN = 1
RESET = 2
ACCUMULATE = 10
# TO AVOID DIVIDING BY ZERO
SMALL = 1E-08
# WHAT PRECISION WE WILL USE IN THIS COMPILATION
_ZERO_ = 0.0
_ONE_ = 1.0
|
"""
This file is included in all files
"""
release = 'Created by BFM v. 5.1'
path_max = 255
stderr = 0
stdout = 6
def stdout(text):
print(text)
def stderr(text):
print(text)
def level0():
stderr('')
def level1():
stderr(' ')
def level2():
stderr(' ')
def level3():
stderr(' ')
def level4():
stderr(' ')
def fatal():
stderr('FATAL ERROR: ')
def line():
print('------------------------------------------------------------------------')
point = 0
z_shape = 1
t_shape = 2
xy_shape = 3
xyt_shape = 4
xyzt_shape = 5
ocet_shape = 6
surft_shape = 7
bott_shape = 8
g_shape = 9
xyz_shape = 10
init = 0
mean = 1
reset = 2
accumulate = 10
small = 1e-08
_zero_ = 0.0
_one_ = 1.0
|
'''MIT License
Copyright (c) 2022 Carlos M.C.G. Fernandes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. '''
class GEAR:
"""Library with gear geometries and input prompt for new gear geometries"""
def __init__(self, GEAR_TYPE):
default = 'No Gear Selected Input'
getattr(self, GEAR_TYPE, lambda: default)()
def NEW(self):
self.GEAR_NAME = input('Gear name: ').upper()
self.alpha = float(
input('Pressure angle (default: 20) / \u00b0: ') or '20')
self.beta = float(input('Helix angle / \u00b0: '))
self.m = float(input('Gear module / mm: '))
self.z = [float(input('z1: ')), float(input('z2: '))]
self.x = [float(input('Pinion profile shift x1: ')),
float(input('Wheel profile shift x2: '))]
self.b = [float(input('Pinion facewith b1: ')),
float(input('Wheel facewith b2: '))]
self.dshaft = [float(input('Pinion shaft ds1: ')),
float(input('Wheel shaft ds2: '))]
self.al = None
self.haP = float(input('Addendum coefficient (default: 1): ') or '1')
self.hfP = float(
input('Deddendum coefficient (default: 1.25): ') or '1.25')
self.rfP = float(
input('Root radius coefficient (default: 0.38): ') or '0.38')
print('Gear surface finishing:')
self.Ra = [float(input('Ra1 (default: 0.6) / \u03BCm: ') or '0.6'),
float(input('Ra2 (default: 0.6) / \u03BCm: ') or '0.6')]
self.Rq = [float(input('Rq1 (default: 0.7) / \u03BCm: ') or '0.7'),
float(input('Rq2 (default: 0.7) / \u03BCm: ') or '0.7')]
self.Rz = [float(input('Rz1 (default: 4.8) / \u03BCm: ') or '4.8'),
float(input('Rz2 (default: 4.8) / \u03BCm: ') or '4.8')]
def C14(self):
self.GEAR_NAME = 'C14'
self.alpha = 20.0
self.beta = 0.0
self.m = 4.5
self.z = [16, 24]
self.x = [0.1817, 0.1715]
self.b = [14., 14.]
self.dshaft = [30., 30.]
self.al = None
self.haP = 1.
self.hfP = 1.25
self.rfP = 0.38
self.Ra = [0.6, 0.6]
self.Rq = [0.7, 0.7]
self.Rz = [4.8, 4.8]
def H501(self):
self.GEAR_NAME = 'H501'
self.alpha = 20.
self.beta = 15.
self.m = 3.5
self.z = [20, 30]
self.x = [0.1809, 0.0891]
self.b = [23., 23.]
self.dshaft = [30., 30.]
self.al = None
self.haP = 1.
self.hfP = 1.25
self.rfP = 0.38
self.Ra = [0.6, 0.6]
self.Rq = [0.7, 0.7]
self.Rz = [4.8, 4.8]
def H701(self):
self.GEAR_NAME = 'H701'
self.alpha = 20.
self.beta = 15.
self.m = 2.5
self.z = [28, 42]
self.x = [0.2290, 0.1489]
self.b = [17., 17.]
self.dshaft = [30., 30.]
self.al = None
self.haP = 1.
self.hfP = 1.25
self.rfP = 0.38
self.Ra = [0.6, 0.6]
self.Rq = [0.7, 0.7]
self.Rz = [4.8, 4.8]
def H951(self):
self.GEAR_NAME = 'H951'
self.alpha = 20.
self.beta = 15.
self.m = 1.75
self.z = [38, 57]
self.x = [1.6915, 2.0003]
self.b = [21.2418, 21.2418]
self.dshaft = [30., 30.]
self.al = None
self.haP = 1.
self.hfP = 1.25
self.rfP = 0.38
self.Ra = [0.6, 0.6]
self.Rq = [0.7, 0.7]
self.Rz = [4.8, 4.8]
|
"""MIT License
Copyright (c) 2022 Carlos M.C.G. Fernandes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. """
class Gear:
"""Library with gear geometries and input prompt for new gear geometries"""
def __init__(self, GEAR_TYPE):
default = 'No Gear Selected Input'
getattr(self, GEAR_TYPE, lambda : default)()
def new(self):
self.GEAR_NAME = input('Gear name: ').upper()
self.alpha = float(input('Pressure angle (default: 20) / °: ') or '20')
self.beta = float(input('Helix angle / °: '))
self.m = float(input('Gear module / mm: '))
self.z = [float(input('z1: ')), float(input('z2: '))]
self.x = [float(input('Pinion profile shift x1: ')), float(input('Wheel profile shift x2: '))]
self.b = [float(input('Pinion facewith b1: ')), float(input('Wheel facewith b2: '))]
self.dshaft = [float(input('Pinion shaft ds1: ')), float(input('Wheel shaft ds2: '))]
self.al = None
self.haP = float(input('Addendum coefficient (default: 1): ') or '1')
self.hfP = float(input('Deddendum coefficient (default: 1.25): ') or '1.25')
self.rfP = float(input('Root radius coefficient (default: 0.38): ') or '0.38')
print('Gear surface finishing:')
self.Ra = [float(input('Ra1 (default: 0.6) / μm: ') or '0.6'), float(input('Ra2 (default: 0.6) / μm: ') or '0.6')]
self.Rq = [float(input('Rq1 (default: 0.7) / μm: ') or '0.7'), float(input('Rq2 (default: 0.7) / μm: ') or '0.7')]
self.Rz = [float(input('Rz1 (default: 4.8) / μm: ') or '4.8'), float(input('Rz2 (default: 4.8) / μm: ') or '4.8')]
def c14(self):
self.GEAR_NAME = 'C14'
self.alpha = 20.0
self.beta = 0.0
self.m = 4.5
self.z = [16, 24]
self.x = [0.1817, 0.1715]
self.b = [14.0, 14.0]
self.dshaft = [30.0, 30.0]
self.al = None
self.haP = 1.0
self.hfP = 1.25
self.rfP = 0.38
self.Ra = [0.6, 0.6]
self.Rq = [0.7, 0.7]
self.Rz = [4.8, 4.8]
def h501(self):
self.GEAR_NAME = 'H501'
self.alpha = 20.0
self.beta = 15.0
self.m = 3.5
self.z = [20, 30]
self.x = [0.1809, 0.0891]
self.b = [23.0, 23.0]
self.dshaft = [30.0, 30.0]
self.al = None
self.haP = 1.0
self.hfP = 1.25
self.rfP = 0.38
self.Ra = [0.6, 0.6]
self.Rq = [0.7, 0.7]
self.Rz = [4.8, 4.8]
def h701(self):
self.GEAR_NAME = 'H701'
self.alpha = 20.0
self.beta = 15.0
self.m = 2.5
self.z = [28, 42]
self.x = [0.229, 0.1489]
self.b = [17.0, 17.0]
self.dshaft = [30.0, 30.0]
self.al = None
self.haP = 1.0
self.hfP = 1.25
self.rfP = 0.38
self.Ra = [0.6, 0.6]
self.Rq = [0.7, 0.7]
self.Rz = [4.8, 4.8]
def h951(self):
self.GEAR_NAME = 'H951'
self.alpha = 20.0
self.beta = 15.0
self.m = 1.75
self.z = [38, 57]
self.x = [1.6915, 2.0003]
self.b = [21.2418, 21.2418]
self.dshaft = [30.0, 30.0]
self.al = None
self.haP = 1.0
self.hfP = 1.25
self.rfP = 0.38
self.Ra = [0.6, 0.6]
self.Rq = [0.7, 0.7]
self.Rz = [4.8, 4.8]
|
class ApplyMaskBase(object):
def __init__(self):
pass
def apply_mask(self, *arg, **kwargs):
raise NotImplementedError("Please implement in subclass")
|
class Applymaskbase(object):
def __init__(self):
pass
def apply_mask(self, *arg, **kwargs):
raise not_implemented_error('Please implement in subclass')
|
#
# # Recursive + memo (top-down)
# class Solution(object):
# def rob(self, nums):
# """
# :type nums: List[int]
# :rtype: int
# """
# cache = [-1] * len(nums)
# return self.robHelper(nums, len(nums) - 1, cache)
#
# def robHelper(self, nums, currentHouse, cache):
# if currentHouse < 0:
# return 0
# if cache[currentHouse] >= 0:
# return cache[currentHouse]
# robbedMoney = max(self.robHelper(nums, currentHouse - 2, cache) + nums[currentHouse],
# self.robHelper(nums, currentHouse - 1, cache))
# cache[currentHouse] = robbedMoney
# return robbedMoney
# Iterative + 2 variables (bottom-up)
class Solution(object):
def rob(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
if len(nums) <= 0:
return 0
previousRobbedMoney, currentRobbedMoney = 0, nums[0]
for i in range(1, len(nums)):
currentRobbedMoneyHolder = currentRobbedMoney
currentRobbedMoney = max(nums[i] + previousRobbedMoney, currentRobbedMoney)
previousRobbedMoney = currentRobbedMoneyHolder
return currentRobbedMoney
sol = Solution()
nums = [1,2,3,1]
out = sol.rob(nums)
print("Res: ", out)
|
class Solution(object):
def rob(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
if len(nums) <= 0:
return 0
(previous_robbed_money, current_robbed_money) = (0, nums[0])
for i in range(1, len(nums)):
current_robbed_money_holder = currentRobbedMoney
current_robbed_money = max(nums[i] + previousRobbedMoney, currentRobbedMoney)
previous_robbed_money = currentRobbedMoneyHolder
return currentRobbedMoney
sol = solution()
nums = [1, 2, 3, 1]
out = sol.rob(nums)
print('Res: ', out)
|
a == b
a != b
a < b
a <= b
a > b
a >= b
a is b
a is not b
a in b
a not in b
|
a == b
a != b
a < b
a <= b
a > b
a >= b
a is b
a is not b
a in b
a not in b
|
# iterator_protocol.py
print("""
The iterator protocol specifies two special methods to be implemented for any object to allow iteration
1. For any object to be iterated over, it must implement the __iter__ method which returns an iterator object.
Any object that returns an iterator is an iterable.
2. An iterator must implement the __next__ method which returns the next item when called. This method should raise
StopIteration exception when items are exhausted.
3. An iterator must also implement __iter__ method returning self, so that it behaves like an iterable.
""")
|
print('\nThe iterator protocol specifies two special methods to be implemented for any object to allow iteration\n\n1. For any object to be iterated over, it must implement the __iter__ method which returns an iterator object.\nAny object that returns an iterator is an iterable.\n\n2. An iterator must implement the __next__ method which returns the next item when called. This method should raise\nStopIteration exception when items are exhausted.\n\n3. An iterator must also implement __iter__ method returning self, so that it behaves like an iterable.\n')
|
def quickshort(a,start,end):
if start<end:
pindex = partition(a,start,end)
quickshort(a,start,pindex-1)
quickshort(a,pindex+1,end)
def partition(a,start,end):
middle = int(end/2)
pivot = a[middle]
pindex = start
for i in range(start,middle):
if a[i]>=pivot:
a[i],a[pindex]=a[pindex],a[i]
pindex = pindex + 1
a[pindex],a[middle]=a[middle],a[pindex]
print(a)
return pindex
a = [23,7,32,99,4,15,11,20]
quickshort(a,0,len(a)-1)
|
def quickshort(a, start, end):
if start < end:
pindex = partition(a, start, end)
quickshort(a, start, pindex - 1)
quickshort(a, pindex + 1, end)
def partition(a, start, end):
middle = int(end / 2)
pivot = a[middle]
pindex = start
for i in range(start, middle):
if a[i] >= pivot:
(a[i], a[pindex]) = (a[pindex], a[i])
pindex = pindex + 1
(a[pindex], a[middle]) = (a[middle], a[pindex])
print(a)
return pindex
a = [23, 7, 32, 99, 4, 15, 11, 20]
quickshort(a, 0, len(a) - 1)
|
"""Functions for creating `XcodeProjInfo` providers."""
load("@bazel_skylib//lib:paths.bzl", "paths")
load("@bazel_skylib//lib:sets.bzl", "sets")
load(
"@build_bazel_rules_apple//apple:providers.bzl",
"AppleBundleInfo",
"AppleFrameworkImportInfo",
"IosXcTestBundleInfo",
)
load("@build_bazel_rules_swift//swift:swift.bzl", "SwiftInfo")
load(
":build_settings.bzl",
"get_product_module_name",
"get_targeted_device_family",
"set_if_true",
)
load(":collections.bzl", "flatten", "uniq")
load(
":files.bzl",
"file_path",
"join_paths_ignoring_empty",
"parsed_file_path",
)
load(":input_files.bzl", "input_files")
load(":opts.bzl", "create_opts_search_paths", "process_opts")
load(":platform.bzl", "process_platform")
load(":providers.bzl", "XcodeProjInfo")
# Configuration
def _calculate_configuration(*, bin_dir_path):
"""Calculates a configuration string from `ctx.bin_dir`.
Args:
bin_dir_path: `ctx.bin_dir.path`.
Returns:
A string that represents a configuration.
"""
path_components = bin_dir_path.split("/")
if len(path_components) > 2:
return path_components[1]
return ""
def _get_configuration(ctx):
"""Generates a configuration identifier for a target.
`ConfiguredTarget.getConfigurationKey()` isn't exposed to Starlark, so we
are using the output directory as a proxy.
Args:
ctx: The aspect context.
Returns:
A string that uniquely identifies the configuration of a target.
"""
return _calculate_configuration(bin_dir_path = ctx.bin_dir.path)
# Target ID
def _get_id(*, label, configuration):
"""Generates a unique identifier for a target.
Args:
label: The `Label` of the `Target`.
configuration: The value returned from `_get_configuration()`.
Returns:
An opaque string that uniquely identifies the target.
"""
return "{} {}".format(label, configuration)
# Product
def _get_linker_inputs(*, cc_info):
return cc_info.linking_context.linker_inputs
def _get_static_libraries(*, linker_inputs):
return [
library.static_library
for library in flatten([
input.libraries
for input in linker_inputs.to_list()
])
]
def _get_static_library(*, linker_inputs):
for input in linker_inputs.to_list():
# Ideally we would only return the static library that is owned by this
# target, but sometimes another rule creates the output and this rule
# outputs it. So far the first library has always been the correct one.
return input.libraries[0].static_library.path
return None
def _process_product(
*,
target,
product_name,
product_type,
bundle_path,
linker_inputs,
build_settings):
"""Generates information about the target's product.
Args:
target: The `Target` the product information is gathered from.
product_name: The name of the product (i.e. the "PRODUCT_NAME" build
setting).
product_type: A PBXProductType string. See
https://github.com/tuist/XcodeProj/blob/main/Sources/XcodeProj/Objects/Targets/PBXProductType.swift
for examples.
bundle_path: If the product is a bundle, this is the the path to the
bundle, otherwise `None`.
linker_inputs: A `depset` of `LinkerInput`s for this target.
build_settings: A mutable `dict` that will be updated with Xcode build
settings.
"""
if bundle_path:
path = bundle_path
elif target[DefaultInfo].files_to_run.executable:
path = target[DefaultInfo].files_to_run.executable.path
elif CcInfo in target or SwiftInfo in target:
path = _get_static_library(linker_inputs = linker_inputs)
else:
path = None
if not path:
fail("Could not find product for target {}".format(target.label))
build_settings["PRODUCT_NAME"] = product_name
return {
"name": product_name,
"path": path,
"type": product_type,
}
# Outputs
def _process_outputs(target):
"""Generates information about the target's outputs.
Args:
target: The `Target` the output information is gathered from.
Returns:
A `dict` containing the targets output information. See `Output` in
`//tools/generator/src:DTO.swift` for what it transforms into.
"""
outputs = {}
if OutputGroupInfo in target:
if "dsyms" in target[OutputGroupInfo]:
outputs["dsyms"] = [
file.path
for file in target[OutputGroupInfo].dsyms.to_list()
]
if SwiftInfo in target:
outputs["swift_module"] = _swift_module_output([
module
for module in target[SwiftInfo].direct_modules
if module.swift
][0])
return outputs
def _swift_module_output(module):
"""Generates information about the target's Swift module.
Args:
module: The value returned from `swift_common.create_module()`. See
https://github.com/bazelbuild/rules_swift/blob/master/doc/api.md#swift_commoncreate_module.
Returns:
A `dict` containing the Swift module's output information. See
`Output.SwiftModule` in `//tools/generator/src:DTO.swift` for what it
transforms into.
"""
swift = module.swift
output = {
"name": module.name + ".swiftmodule",
"swiftdoc": swift.swiftdoc.path,
"swiftmodule": swift.swiftmodule.path,
}
if swift.swiftsourceinfo:
output["swiftsourceinfo"] = swift.swiftsourceinfo.path
if swift.swiftinterface:
output["swiftinterface"] = swift.swiftinterface.path
return output
# Processed target
def _processed_target(
*,
defines,
dependencies,
inputs,
linker_inputs,
potential_target_merges,
required_links,
search_paths,
target,
xcode_target):
"""Generates the return value for target processing functions.
Args:
defines: The value returned from `_process_defines()`.
dependencies: A `list` of target ids of direct dependencies of this
target.
inputs: A value as returned from `input_files.collect()` that will
provide values for the `XcodeProjInfo.inputs` field.
linker_inputs: A `depset` of `LinkerInput`s for this target.
potential_target_merges: An optional `list` of `struct`s that will be in
the `XcodeProjInfo.potential_target_merges` `depset`.
required_links: An optional `list` of strings that will be in the
`XcodeProjInfo.required_links` `depset`.
search_paths: The value value returned from `_process_search_paths()`.
target: An optional `XcodeProjInfo.target` `struct`.
xcode_target: An optional string that will be in the
`XcodeProjInfo.xcode_targets` `depset`.
Returns:
A `struct` containing fields for each argument.
"""
return struct(
defines = defines,
dependencies = dependencies,
inputs = inputs,
linker_inputs = linker_inputs,
potential_target_merges = potential_target_merges,
required_links = required_links,
search_paths = search_paths,
target = target,
xcode_targets = [xcode_target] if xcode_target else None,
)
def _xcode_target(
*,
id,
name,
label,
configuration,
bin_dir_path,
platform,
product,
is_swift,
test_host,
build_settings,
search_paths,
frameworks,
modulemaps,
swiftmodules,
inputs,
links,
dependencies,
outputs):
"""Generates the partial json string representation of an Xcode target.
Args:
id: A unique identifier. No two `_xcode_target` will have the same `id`.
This won't be user facing, the generator will use other fields to
generate a unique name for a target.
name: The base name that the Xcode target should use. Multiple
`_xcode_target`s can have the same name; the generator will
disambiguate them.
label: The `Label` of the `Target`.
configuration: The configuration of the `Target`.
bin_dir_path: `ctx.bin_dir.path`.
platform: The value returned from `process_platform()`.
product: The value returned from `_process_product()`.
is_swift: Whether the target compiles Swift code.
test_host: The `id` of the target that is the test host for this
target, or `None` if this target does not have a test host.
build_settings: A `dict` of Xcode build settings for the target.
search_paths: The value returned from `_process_search_paths()`.
frameworks: The value returned from `_process_frameworks().
modulemaps: The value returned from `_process_modulemaps()`.
swiftmodules: The value returned from `_process_swiftmodules()`.
inputs: The value returned from `input_files.collect()`.
links: A `list` of file paths for libraries that the target links
against.
dependencies: A `list` of `id`s of targets that this target depends on.
outputs: The value returned from `_process_outputs()`.
Returns:
An element of a json array string. This should be wrapped with `"[{}]"`
to create a json array string, possibly joining multiples of these
strings with `","`.
"""
target = json.encode(struct(
name = name,
label = str(label),
configuration = configuration,
package_bin_dir = join_paths_ignoring_empty(
bin_dir_path,
label.workspace_root,
label.package,
),
platform = platform,
product = product,
is_swift = is_swift,
test_host = test_host,
build_settings = build_settings,
search_paths = search_paths,
frameworks = frameworks,
modulemaps = modulemaps.file_paths,
swiftmodules = swiftmodules,
inputs = input_files.to_dto(inputs),
links = links,
dependencies = dependencies,
outputs = outputs,
))
# Since we use a custom dictionary key type in
# `//tools/generator/src:DTO.swift`, we need to use alternating keys and
# values to get the correct dictionary representation.
return '"{id}",{target}'.format(id = id, target = target)
# Top-level targets
def _process_top_level_properties(
*,
target_name,
files,
bundle_info,
tree_artifact_enabled,
build_settings):
if bundle_info:
product_name = bundle_info.bundle_name
product_type = bundle_info.product_type
minimum_deployment_version = bundle_info.minimum_deployment_os_version
if tree_artifact_enabled:
bundle_path = bundle_info.archive.path
else:
bundle_extension = bundle_info.bundle_extension
bundle = "{}{}".format(bundle_info.bundle_name, bundle_extension)
if bundle_extension == ".app":
bundle_path = paths.join(
bundle_info.archive_root,
"Payload",
bundle,
)
else:
bundle_path = paths.join(bundle_info.archive_root, bundle)
build_settings["GENERATE_INFOPLIST_FILE"] = True
build_settings["PRODUCT_BUNDLE_IDENTIFIER"] = bundle_info.bundle_id
else:
product_name = target_name
minimum_deployment_version = None
xctest = None
for file in files:
if ".xctest/" in file.short_path:
xctest = file.short_path
break
if xctest:
# This is something like `swift_test`: it creates an xctest bundle
product_type = "com.apple.product-type.bundle.unit-test"
build_settings["GENERATE_INFOPLIST_FILE"] = True
# "some/test.xctest/binary" -> "some/test.xctest"
bundle_path = xctest[:-(len(xctest.split(".xctest/")[1]) + 1)]
else:
product_type = "com.apple.product-type.tool"
bundle_path = None
build_settings["PRODUCT_MODULE_NAME"] = "_{}_".format(product_name)
return struct(
bundle_path = bundle_path,
minimum_deployment_os_version = minimum_deployment_version,
product_name = product_name,
product_type = product_type,
)
def _process_libraries(
*,
product_type,
test_host_libraries,
links,
required_links):
if (test_host_libraries and
product_type == "com.apple.product-type.bundle.unit-test"):
# Unit tests have their test host as a bundle loader. So the
# test host and its dependencies should be removed from the
# unit test's links.
avoid_links = [
file.path
for file in test_host_libraries
]
def remove_avoided(links):
return sets.to_list(
sets.difference(sets.make(links), sets.make(avoid_links)),
)
links = [file for file in remove_avoided(links)]
required_links = [file for file in remove_avoided(required_links)]
return links, required_links
def _process_test_host(test_host):
if test_host:
return test_host[XcodeProjInfo]
return None
def _process_top_level_target(*, ctx, target, bundle_info, transitive_infos):
"""Gathers information about a top-level target.
Args:
ctx: The aspect context.
target: The `Target` to process.
bundle_info: The `AppleBundleInfo` provider for `target`, or `None`.
transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
transitive dependencies of `target`.
Returns:
The value returned from `_processed_target()`.
"""
configuration = _get_configuration(ctx)
id = _get_id(label = target.label, configuration = configuration)
inputs = input_files.collect(
ctx = ctx,
target = target,
transitive_infos = transitive_infos,
)
dependencies = _process_dependencies(transitive_infos = transitive_infos)
test_host = getattr(ctx.rule.attr, "test_host", None)
deps = getattr(ctx.rule.attr, "deps", [])
framework_import_infos = [
dep[AppleFrameworkImportInfo]
for dep in deps
if AppleFrameworkImportInfo in dep
]
avoid_framework_import_infos = [
dep[AppleFrameworkImportInfo]
for dep in ([test_host] if test_host else [])
if AppleFrameworkImportInfo in dep
]
library_dep_targets = [
dep[XcodeProjInfo].target
for dep in deps
if dep[XcodeProjInfo].target and dep[XcodeProjInfo].linker_inputs
]
linker_inputs = depset(
transitive = [
dep[XcodeProjInfo].linker_inputs
for dep in deps
],
)
if len(library_dep_targets) == 1 and not inputs.srcs:
mergeable_target = library_dep_targets[0]
mergeable_label = mergeable_target.label
potential_target_merges = [
struct(src = mergeable_target.id, dest = id),
]
elif bundle_info and len(library_dep_targets) > 1:
fail("""\
The xcodeproj rule requires {} rules to have a single library dep. {} has {}.\
""".format(ctx.rule.kind, target.label, len(library_dep_targets)))
else:
potential_target_merges = None
mergeable_label = None
build_settings = {}
opts_search_paths = process_opts(
ctx = ctx,
target = target,
build_settings = build_settings,
)
tree_artifact_enabled = (
ctx.var.get("apple.experimental.tree_artifact_outputs", "").lower() in
("true", "yes", "1")
)
props = _process_top_level_properties(
target_name = ctx.rule.attr.name,
# The common case is to have a `bundle_info`, so this check prevents
# expanding the `depset` unless needed. Yes, this uses knowledge of what
# `_process_top_level_properties()` does internally.
files = [] if bundle_info else target.files.to_list(),
bundle_info = bundle_info,
tree_artifact_enabled = tree_artifact_enabled,
build_settings = build_settings,
)
test_host_target_info = _process_test_host(test_host)
if test_host_target_info:
test_host_libraries = _get_static_libraries(
linker_inputs = test_host_target_info.linker_inputs,
)
else:
test_host_libraries = None
libraries = _get_static_libraries(linker_inputs = linker_inputs)
links, required_links = _process_libraries(
product_type = props.product_type,
test_host_libraries = test_host_libraries,
links = [
library.path
for library in libraries
],
required_links = [
library.path
for library in libraries
if mergeable_label and library.owner != mergeable_label
],
)
build_settings["OTHER_LDFLAGS"] = ["-ObjC"] + build_settings.get(
"OTHER_LDFLAGS",
[],
)
set_if_true(
build_settings,
"TARGETED_DEVICE_FAMILY",
get_targeted_device_family(getattr(ctx.rule.attr, "families", [])),
)
platform = process_platform(
ctx = ctx,
minimum_deployment_os_version = props.minimum_deployment_os_version,
build_settings = build_settings,
)
modulemaps = _process_modulemaps(
swift_info = target[SwiftInfo] if SwiftInfo in target else None,
)
inputs = input_files.collect(
ctx = ctx,
target = target,
additional_files = modulemaps.files,
transitive_infos = transitive_infos,
)
is_swift = SwiftInfo in target
swift_info = target[SwiftInfo] if is_swift else None
modulemaps = _process_modulemaps(swift_info = swift_info)
search_paths = _process_search_paths(
cc_info = target[CcInfo] if CcInfo in target else None,
opts_search_paths = opts_search_paths,
)
return _processed_target(
defines = _process_defines(
is_swift = is_swift,
defines = getattr(ctx.rule.attr, "defines", []),
local_defines = getattr(ctx.rule.attr, "local_defines", []),
transitive_infos = transitive_infos,
build_settings = build_settings,
),
dependencies = dependencies,
inputs = inputs,
linker_inputs = linker_inputs,
potential_target_merges = potential_target_merges,
required_links = required_links,
search_paths = search_paths,
target = struct(
id = id,
label = target.label,
),
xcode_target = _xcode_target(
id = id,
name = ctx.rule.attr.name,
label = target.label,
configuration = configuration,
bin_dir_path = ctx.bin_dir.path,
platform = platform,
product = _process_product(
target = target,
product_name = props.product_name,
product_type = props.product_type,
bundle_path = props.bundle_path,
linker_inputs = linker_inputs,
build_settings = build_settings,
),
is_swift = is_swift,
test_host = (
test_host_target_info.target.id if test_host_target_info else None
),
build_settings = build_settings,
search_paths = search_paths,
frameworks = _process_frameworks(
framework_import_infos = framework_import_infos,
avoid_framework_import_infos = avoid_framework_import_infos,
),
modulemaps = modulemaps,
swiftmodules = _process_swiftmodules(swift_info = swift_info),
inputs = inputs,
links = links,
dependencies = dependencies,
outputs = _process_outputs(target),
),
)
# Library targets
def _process_library_target(*, ctx, target, transitive_infos):
"""Gathers information about a library target.
Args:
ctx: The aspect context.
target: The `Target` to process.
transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
transitive dependencies of `target`.
Returns:
The value returned from `_processed_target()`.
"""
configuration = _get_configuration(ctx)
id = _get_id(label = target.label, configuration = configuration)
build_settings = {}
opts_search_paths = process_opts(
ctx = ctx,
target = target,
build_settings = build_settings,
)
product_name = ctx.rule.attr.name
build_settings["PRODUCT_MODULE_NAME"] = get_product_module_name(
ctx = ctx,
target = target,
)
dependencies = _process_dependencies(transitive_infos = transitive_infos)
linker_inputs = _get_linker_inputs(cc_info = target[CcInfo])
cpp = ctx.fragments.cpp
# TODO: Get the value for device builds, even when active config is not for
# device, as Xcode only uses this value for device builds
build_settings["ENABLE_BITCODE"] = str(cpp.apple_bitcode_mode) != "none"
debug_format = "dwarf-with-dsym" if cpp.apple_generate_dsym else "dwarf"
build_settings["DEBUG_INFORMATION_FORMAT"] = debug_format
set_if_true(
build_settings,
"CLANG_ENABLE_MODULES",
getattr(ctx.rule.attr, "enable_modules", False),
)
set_if_true(
build_settings,
"ENABLE_TESTING_SEARCH_PATHS",
getattr(ctx.rule.attr, "testonly", False),
)
platform = process_platform(
ctx = ctx,
minimum_deployment_os_version = None,
build_settings = build_settings,
)
is_swift = SwiftInfo in target
swift_info = target[SwiftInfo] if is_swift else None
modulemaps = _process_modulemaps(swift_info = swift_info)
inputs = input_files.collect(
ctx = ctx,
target = target,
additional_files = modulemaps.files,
transitive_infos = transitive_infos,
)
search_paths = _process_search_paths(
cc_info = target[CcInfo] if CcInfo in target else None,
opts_search_paths = opts_search_paths,
)
return _processed_target(
defines = _process_defines(
is_swift = SwiftInfo in target,
defines = getattr(ctx.rule.attr, "defines", []),
local_defines = getattr(ctx.rule.attr, "local_defines", []),
transitive_infos = transitive_infos,
build_settings = build_settings,
),
dependencies = dependencies,
inputs = inputs,
linker_inputs = linker_inputs,
potential_target_merges = None,
required_links = None,
search_paths = search_paths,
target = struct(
id = id,
label = target.label,
),
xcode_target = _xcode_target(
id = id,
name = ctx.rule.attr.name,
label = target.label,
configuration = configuration,
bin_dir_path = ctx.bin_dir.path,
platform = platform,
product = _process_product(
target = target,
product_name = product_name,
product_type = "com.apple.product-type.library.static",
bundle_path = None,
linker_inputs = linker_inputs,
build_settings = build_settings,
),
is_swift = is_swift,
test_host = None,
build_settings = build_settings,
search_paths = search_paths,
frameworks = _process_frameworks(framework_import_infos = []),
modulemaps = modulemaps,
swiftmodules = _process_swiftmodules(swift_info = swift_info),
inputs = inputs,
links = [],
dependencies = dependencies,
outputs = _process_outputs(target),
),
)
# Non-Xcode targets
def _process_non_xcode_target(*, ctx, target, transitive_infos):
"""Gathers information about a non-Xcode target.
Args:
ctx: The aspect context.
target: The `Target` to process.
transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
transitive dependencies of `target`.
Returns:
The value returned from `_processed_target()`.
"""
if CcInfo in target:
linker_inputs = _get_linker_inputs(cc_info = target[CcInfo])
else:
linker_inputs = depset()
inputs = input_files.collect(
ctx = ctx,
target = target,
transitive_infos = transitive_infos,
)
return _processed_target(
defines = _process_defines(
is_swift = SwiftInfo in target,
defines = getattr(ctx.rule.attr, "defines", []),
local_defines = getattr(ctx.rule.attr, "local_defines", []),
transitive_infos = transitive_infos,
build_settings = None,
),
dependencies = _process_dependencies(
transitive_infos = transitive_infos,
),
inputs = inputs,
linker_inputs = linker_inputs,
potential_target_merges = None,
required_links = None,
search_paths = _process_search_paths(
cc_info = target[CcInfo] if CcInfo in target else None,
opts_search_paths = create_opts_search_paths(
quote_includes = [],
includes = [],
),
),
target = None,
xcode_target = None,
)
# Creating `XcodeProjInfo`
def _should_become_xcode_target(target):
"""Determines if the given target should be included in the Xcode project.
Args:
target: The `Target` to check.
Returns:
`False` if `target` shouldn't become an actual target in the generated
Xcode project. Resource bundles are a current example of this, as we
only include their files in the project, but we don't create targets
for them.
"""
# Top-level bundles
if AppleBundleInfo in target:
return True
# Libraries
# Targets that don't produce files are ignored (e.g. imports)
if CcInfo in target and target.files != depset():
return True
# Command-line tools
executable = target[DefaultInfo].files_to_run.executable
if executable and not executable.is_source:
return True
return False
def _should_skip_target(*, ctx, target):
"""Determines if the given target should be skipped for target generation.
There are some rules, like the test runners for iOS tests, that we want to
ignore. Nothing from those rules are considered.
Args:
ctx: The aspect context.
target: The `Target` to check.
Returns:
`True` if `target` should be skipped for target generation.
"""
# TODO: Find a way to detect TestEnvironment instead
return (
IosXcTestBundleInfo in target and
len(ctx.rule.attr.deps) == 1 and
IosXcTestBundleInfo in ctx.rule.attr.deps[0]
)
def _target_info_fields(
*,
defines,
dependencies,
inputs,
linker_inputs,
potential_target_merges,
required_links,
search_paths,
target,
xcode_targets):
"""Generates target specific fields for the `XcodeProjInfo`.
This should be merged with other fields to fully create an `XcodeProjInfo`.
Args:
defines: Maps to `XcodeProjInfo.defines`.
dependencies: Maps to the `XcodeProjInfo.dependencies` field.
inputs: Maps to the `XcodeProjInfo.inputs` field.
linker_inputs: Maps to the `XcodeProjInfo.linker_inputs` field.
potential_target_merges: Maps to the
`XcodeProjInfo.potential_target_merges` field.
required_links: Maps to the `XcodeProjInfo.required_links` field.
search_paths: Maps to the `XcodeProjInfo.search_paths` field.
target: Maps to the `XcodeProjInfo.target` field.
xcode_targets: Maps to the `XcodeProjInfo.xcode_targets` field.
Returns:
A `dict` containing the following fields:
* `defines`
* `dependencies`
* `extra_files`
* `generated_inputs`
* `inputs`
* `linker_inputs`
* `potential_target_merges`
* `required_links`
* `search_paths`
* `target`
* `xcode_targets`
"""
return {
"defines": defines,
"dependencies": dependencies,
"inputs": inputs,
"linker_inputs": linker_inputs,
"potential_target_merges": potential_target_merges,
"required_links": required_links,
"search_paths": search_paths,
"target": target,
"xcode_targets": xcode_targets,
}
def _skip_target(*, transitive_infos):
"""Passes through existing target info fields, not collecting new ones.
Merges `XcodeProjInfo`s for the dependencies of the current target, and
forwards them on, not collecting any information for the current target.
Args:
transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
transitive dependencies of `target`.
Returns:
The return value of `_target_info_fields()`, with values merged from
`transitive_infos`.
"""
return _target_info_fields(
defines = _process_defines(
is_swift = False,
defines = [],
local_defines = [],
transitive_infos = transitive_infos,
build_settings = None,
),
dependencies = _process_dependencies(
transitive_infos = transitive_infos,
),
inputs = input_files.merge(
transitive_infos = transitive_infos,
),
linker_inputs = depset(
transitive = [
info.linker_inputs
for info in transitive_infos
],
),
potential_target_merges = depset(
transitive = [
info.potential_target_merges
for info in transitive_infos
],
),
required_links = depset(
transitive = [info.required_links for info in transitive_infos],
),
search_paths = _process_search_paths(
cc_info = None,
opts_search_paths = create_opts_search_paths(
quote_includes = [],
includes = [],
),
),
target = None,
xcode_targets = depset(
transitive = [info.xcode_targets for info in transitive_infos],
),
)
def _process_dependencies(*, transitive_infos):
return [
dependency
for dependency in flatten([
# We pass on the next level of dependencies if the previous target
# didn't create an Xcode target.
[info.target.id] if info.target else info.dependencies
for info in transitive_infos
])
]
def _process_defines(
*,
is_swift,
defines,
local_defines,
transitive_infos,
build_settings):
transitive_cc_defines = []
for info in transitive_infos:
transitive_defines = info.defines
transitive_cc_defines.extend(transitive_defines.cc_defines)
# We only want to use this target's defines if it's a Swift target
if is_swift:
cc_defines = transitive_cc_defines
else:
transitive_cc_defines.extend(defines)
cc_defines = transitive_cc_defines + local_defines
if build_settings:
# We don't set `SWIFT_ACTIVE_COMPILATION_CONDITIONS` because the way we
# process Swift compile options already accounts for `defines`
# We need to prepend, in case `process_opts` has already set them
setting = cc_defines + build_settings.get(
"GCC_PREPROCESSOR_DEFINITIONS",
[],
)
# Remove duplicates
setting = reversed(uniq(reversed(setting)))
set_if_true(build_settings, "GCC_PREPROCESSOR_DEFINITIONS", setting)
return struct(
cc_defines = transitive_cc_defines,
)
def _process_search_paths(
*,
cc_info,
opts_search_paths):
search_paths = {}
if cc_info:
compilation_context = cc_info.compilation_context
set_if_true(
search_paths,
"framework_includes",
[
parsed_file_path(path)
for path in compilation_context.framework_includes.to_list()
],
)
set_if_true(
search_paths,
"quote_includes",
[
parsed_file_path(path)
for path in compilation_context.quote_includes.to_list() +
opts_search_paths.quote_includes
],
)
set_if_true(
search_paths,
"includes",
[
parsed_file_path(path)
for path in (compilation_context.includes.to_list() +
opts_search_paths.includes)
],
)
return search_paths
def _farthest_parent_file_path(file, extension):
"""Returns the part of a file path with the given extension closest to the root.
For example, if `file` is `"foo/bar.bundle/baz.bundle"`, passing `".bundle"`
as the extension will return `"foo/bar.bundle"`.
Args:
file: The `File`.
extension: The extension of the directory to find.
Returns:
A `FilePath` with the portion of the path that ends in the given
extension that is closest to the root of the path.
"""
prefix, ext, _ = file.path.partition("." + extension)
if ext:
return file_path(file, prefix + ext)
fail("Expected file.path %r to contain %r, but it did not" % (
file,
"." + extension,
))
def _process_frameworks(
*,
framework_import_infos,
avoid_framework_import_infos = []):
framework_imports = depset(transitive = [
info.framework_imports
for info in framework_import_infos
if hasattr(info, "framework_imports")
])
avoid_framework_imports = depset(transitive = [
info.framework_imports
for info in avoid_framework_import_infos
if hasattr(info, "framework_imports")
])
avoid_files = avoid_framework_imports.to_list()
framework_paths = uniq([
_farthest_parent_file_path(file, "framework")
for file in framework_imports.to_list()
if file not in avoid_files
])
return framework_paths
def _process_modulemaps(*, swift_info):
if not swift_info:
return struct(
file_paths = [],
files = [],
)
modulemap_file_paths = []
modulemap_files = []
for module in swift_info.transitive_modules.to_list():
clang_module = module.clang
if not clang_module:
continue
module_map = clang_module.module_map
if not module_map:
continue
if type(module_map) == "File":
modulemap = file_path(module_map)
modulemap_files.append(module_map)
else:
modulemap = module_map
modulemap_file_paths.append(modulemap)
# Different modules might be defined in the same modulemap file, so we need
# to deduplicate them.
return struct(
file_paths = uniq(modulemap_file_paths),
files = uniq(modulemap_files),
)
def _process_swiftmodules(*, swift_info):
if not swift_info:
return []
direct_modules = swift_info.direct_modules
file_paths = []
for module in swift_info.transitive_modules.to_list():
if module in direct_modules:
continue
swift_module = module.swift
if not swift_module:
continue
file_paths.append(file_path(swift_module.swiftmodule))
return file_paths
def _process_target(*, ctx, target, transitive_infos):
"""Creates the target portion of an `XcodeProjInfo` for a `Target`.
Args:
ctx: The aspect context.
target: The `Target` to process.
transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
transitive dependencies of `target`.
Returns:
A `dict` of fields to be merged into the `XcodeProjInfo`. See
`_target_info_fields()`.
"""
if not _should_become_xcode_target(target):
processed_target = _process_non_xcode_target(
ctx = ctx,
target = target,
transitive_infos = transitive_infos,
)
elif AppleBundleInfo in target:
processed_target = _process_top_level_target(
ctx = ctx,
target = target,
bundle_info = target[AppleBundleInfo],
transitive_infos = transitive_infos,
)
elif target[DefaultInfo].files_to_run.executable:
processed_target = _process_top_level_target(
ctx = ctx,
target = target,
bundle_info = None,
transitive_infos = transitive_infos,
)
else:
processed_target = _process_library_target(
ctx = ctx,
target = target,
transitive_infos = transitive_infos,
)
return _target_info_fields(
defines = processed_target.defines,
dependencies = processed_target.dependencies,
inputs = input_files.merge(
processed_target.inputs,
transitive_infos = transitive_infos,
),
linker_inputs = processed_target.linker_inputs,
potential_target_merges = depset(
processed_target.potential_target_merges,
transitive = [
info.potential_target_merges
for info in transitive_infos
],
),
required_links = depset(
processed_target.required_links,
transitive = [info.required_links for info in transitive_infos],
),
search_paths = processed_target.search_paths,
target = processed_target.target,
xcode_targets = depset(
processed_target.xcode_targets,
transitive = [info.xcode_targets for info in transitive_infos],
),
)
# API
def process_target(*, ctx, target, transitive_infos):
"""Creates an `XcodeProjInfo` for the given target.
Args:
ctx: The aspect context.
target: The `Target` to process.
transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
transitive dependencies of `target`.
Returns:
An `XcodeProjInfo` populated with information from `target` and
`transitive_infos`.
"""
if _should_skip_target(ctx = ctx, target = target):
info_fields = _skip_target(
transitive_infos = transitive_infos,
)
else:
info_fields = _process_target(
ctx = ctx,
target = target,
transitive_infos = transitive_infos,
)
return XcodeProjInfo(
**info_fields
)
# These functions are exposed only for access in unit tests.
testable = struct(
calculate_configuration = _calculate_configuration,
process_libraries = _process_libraries,
process_top_level_properties = _process_top_level_properties,
)
|
"""Functions for creating `XcodeProjInfo` providers."""
load('@bazel_skylib//lib:paths.bzl', 'paths')
load('@bazel_skylib//lib:sets.bzl', 'sets')
load('@build_bazel_rules_apple//apple:providers.bzl', 'AppleBundleInfo', 'AppleFrameworkImportInfo', 'IosXcTestBundleInfo')
load('@build_bazel_rules_swift//swift:swift.bzl', 'SwiftInfo')
load(':build_settings.bzl', 'get_product_module_name', 'get_targeted_device_family', 'set_if_true')
load(':collections.bzl', 'flatten', 'uniq')
load(':files.bzl', 'file_path', 'join_paths_ignoring_empty', 'parsed_file_path')
load(':input_files.bzl', 'input_files')
load(':opts.bzl', 'create_opts_search_paths', 'process_opts')
load(':platform.bzl', 'process_platform')
load(':providers.bzl', 'XcodeProjInfo')
def _calculate_configuration(*, bin_dir_path):
"""Calculates a configuration string from `ctx.bin_dir`.
Args:
bin_dir_path: `ctx.bin_dir.path`.
Returns:
A string that represents a configuration.
"""
path_components = bin_dir_path.split('/')
if len(path_components) > 2:
return path_components[1]
return ''
def _get_configuration(ctx):
"""Generates a configuration identifier for a target.
`ConfiguredTarget.getConfigurationKey()` isn't exposed to Starlark, so we
are using the output directory as a proxy.
Args:
ctx: The aspect context.
Returns:
A string that uniquely identifies the configuration of a target.
"""
return _calculate_configuration(bin_dir_path=ctx.bin_dir.path)
def _get_id(*, label, configuration):
"""Generates a unique identifier for a target.
Args:
label: The `Label` of the `Target`.
configuration: The value returned from `_get_configuration()`.
Returns:
An opaque string that uniquely identifies the target.
"""
return '{} {}'.format(label, configuration)
def _get_linker_inputs(*, cc_info):
return cc_info.linking_context.linker_inputs
def _get_static_libraries(*, linker_inputs):
return [library.static_library for library in flatten([input.libraries for input in linker_inputs.to_list()])]
def _get_static_library(*, linker_inputs):
for input in linker_inputs.to_list():
return input.libraries[0].static_library.path
return None
def _process_product(*, target, product_name, product_type, bundle_path, linker_inputs, build_settings):
"""Generates information about the target's product.
Args:
target: The `Target` the product information is gathered from.
product_name: The name of the product (i.e. the "PRODUCT_NAME" build
setting).
product_type: A PBXProductType string. See
https://github.com/tuist/XcodeProj/blob/main/Sources/XcodeProj/Objects/Targets/PBXProductType.swift
for examples.
bundle_path: If the product is a bundle, this is the the path to the
bundle, otherwise `None`.
linker_inputs: A `depset` of `LinkerInput`s for this target.
build_settings: A mutable `dict` that will be updated with Xcode build
settings.
"""
if bundle_path:
path = bundle_path
elif target[DefaultInfo].files_to_run.executable:
path = target[DefaultInfo].files_to_run.executable.path
elif CcInfo in target or SwiftInfo in target:
path = _get_static_library(linker_inputs=linker_inputs)
else:
path = None
if not path:
fail('Could not find product for target {}'.format(target.label))
build_settings['PRODUCT_NAME'] = product_name
return {'name': product_name, 'path': path, 'type': product_type}
def _process_outputs(target):
"""Generates information about the target's outputs.
Args:
target: The `Target` the output information is gathered from.
Returns:
A `dict` containing the targets output information. See `Output` in
`//tools/generator/src:DTO.swift` for what it transforms into.
"""
outputs = {}
if OutputGroupInfo in target:
if 'dsyms' in target[OutputGroupInfo]:
outputs['dsyms'] = [file.path for file in target[OutputGroupInfo].dsyms.to_list()]
if SwiftInfo in target:
outputs['swift_module'] = _swift_module_output([module for module in target[SwiftInfo].direct_modules if module.swift][0])
return outputs
def _swift_module_output(module):
"""Generates information about the target's Swift module.
Args:
module: The value returned from `swift_common.create_module()`. See
https://github.com/bazelbuild/rules_swift/blob/master/doc/api.md#swift_commoncreate_module.
Returns:
A `dict` containing the Swift module's output information. See
`Output.SwiftModule` in `//tools/generator/src:DTO.swift` for what it
transforms into.
"""
swift = module.swift
output = {'name': module.name + '.swiftmodule', 'swiftdoc': swift.swiftdoc.path, 'swiftmodule': swift.swiftmodule.path}
if swift.swiftsourceinfo:
output['swiftsourceinfo'] = swift.swiftsourceinfo.path
if swift.swiftinterface:
output['swiftinterface'] = swift.swiftinterface.path
return output
def _processed_target(*, defines, dependencies, inputs, linker_inputs, potential_target_merges, required_links, search_paths, target, xcode_target):
"""Generates the return value for target processing functions.
Args:
defines: The value returned from `_process_defines()`.
dependencies: A `list` of target ids of direct dependencies of this
target.
inputs: A value as returned from `input_files.collect()` that will
provide values for the `XcodeProjInfo.inputs` field.
linker_inputs: A `depset` of `LinkerInput`s for this target.
potential_target_merges: An optional `list` of `struct`s that will be in
the `XcodeProjInfo.potential_target_merges` `depset`.
required_links: An optional `list` of strings that will be in the
`XcodeProjInfo.required_links` `depset`.
search_paths: The value value returned from `_process_search_paths()`.
target: An optional `XcodeProjInfo.target` `struct`.
xcode_target: An optional string that will be in the
`XcodeProjInfo.xcode_targets` `depset`.
Returns:
A `struct` containing fields for each argument.
"""
return struct(defines=defines, dependencies=dependencies, inputs=inputs, linker_inputs=linker_inputs, potential_target_merges=potential_target_merges, required_links=required_links, search_paths=search_paths, target=target, xcode_targets=[xcode_target] if xcode_target else None)
def _xcode_target(*, id, name, label, configuration, bin_dir_path, platform, product, is_swift, test_host, build_settings, search_paths, frameworks, modulemaps, swiftmodules, inputs, links, dependencies, outputs):
"""Generates the partial json string representation of an Xcode target.
Args:
id: A unique identifier. No two `_xcode_target` will have the same `id`.
This won't be user facing, the generator will use other fields to
generate a unique name for a target.
name: The base name that the Xcode target should use. Multiple
`_xcode_target`s can have the same name; the generator will
disambiguate them.
label: The `Label` of the `Target`.
configuration: The configuration of the `Target`.
bin_dir_path: `ctx.bin_dir.path`.
platform: The value returned from `process_platform()`.
product: The value returned from `_process_product()`.
is_swift: Whether the target compiles Swift code.
test_host: The `id` of the target that is the test host for this
target, or `None` if this target does not have a test host.
build_settings: A `dict` of Xcode build settings for the target.
search_paths: The value returned from `_process_search_paths()`.
frameworks: The value returned from `_process_frameworks().
modulemaps: The value returned from `_process_modulemaps()`.
swiftmodules: The value returned from `_process_swiftmodules()`.
inputs: The value returned from `input_files.collect()`.
links: A `list` of file paths for libraries that the target links
against.
dependencies: A `list` of `id`s of targets that this target depends on.
outputs: The value returned from `_process_outputs()`.
Returns:
An element of a json array string. This should be wrapped with `"[{}]"`
to create a json array string, possibly joining multiples of these
strings with `","`.
"""
target = json.encode(struct(name=name, label=str(label), configuration=configuration, package_bin_dir=join_paths_ignoring_empty(bin_dir_path, label.workspace_root, label.package), platform=platform, product=product, is_swift=is_swift, test_host=test_host, build_settings=build_settings, search_paths=search_paths, frameworks=frameworks, modulemaps=modulemaps.file_paths, swiftmodules=swiftmodules, inputs=input_files.to_dto(inputs), links=links, dependencies=dependencies, outputs=outputs))
return '"{id}",{target}'.format(id=id, target=target)
def _process_top_level_properties(*, target_name, files, bundle_info, tree_artifact_enabled, build_settings):
if bundle_info:
product_name = bundle_info.bundle_name
product_type = bundle_info.product_type
minimum_deployment_version = bundle_info.minimum_deployment_os_version
if tree_artifact_enabled:
bundle_path = bundle_info.archive.path
else:
bundle_extension = bundle_info.bundle_extension
bundle = '{}{}'.format(bundle_info.bundle_name, bundle_extension)
if bundle_extension == '.app':
bundle_path = paths.join(bundle_info.archive_root, 'Payload', bundle)
else:
bundle_path = paths.join(bundle_info.archive_root, bundle)
build_settings['GENERATE_INFOPLIST_FILE'] = True
build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = bundle_info.bundle_id
else:
product_name = target_name
minimum_deployment_version = None
xctest = None
for file in files:
if '.xctest/' in file.short_path:
xctest = file.short_path
break
if xctest:
product_type = 'com.apple.product-type.bundle.unit-test'
build_settings['GENERATE_INFOPLIST_FILE'] = True
bundle_path = xctest[:-(len(xctest.split('.xctest/')[1]) + 1)]
else:
product_type = 'com.apple.product-type.tool'
bundle_path = None
build_settings['PRODUCT_MODULE_NAME'] = '_{}_'.format(product_name)
return struct(bundle_path=bundle_path, minimum_deployment_os_version=minimum_deployment_version, product_name=product_name, product_type=product_type)
def _process_libraries(*, product_type, test_host_libraries, links, required_links):
if test_host_libraries and product_type == 'com.apple.product-type.bundle.unit-test':
avoid_links = [file.path for file in test_host_libraries]
def remove_avoided(links):
return sets.to_list(sets.difference(sets.make(links), sets.make(avoid_links)))
links = [file for file in remove_avoided(links)]
required_links = [file for file in remove_avoided(required_links)]
return (links, required_links)
def _process_test_host(test_host):
if test_host:
return test_host[XcodeProjInfo]
return None
def _process_top_level_target(*, ctx, target, bundle_info, transitive_infos):
"""Gathers information about a top-level target.
Args:
ctx: The aspect context.
target: The `Target` to process.
bundle_info: The `AppleBundleInfo` provider for `target`, or `None`.
transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
transitive dependencies of `target`.
Returns:
The value returned from `_processed_target()`.
"""
configuration = _get_configuration(ctx)
id = _get_id(label=target.label, configuration=configuration)
inputs = input_files.collect(ctx=ctx, target=target, transitive_infos=transitive_infos)
dependencies = _process_dependencies(transitive_infos=transitive_infos)
test_host = getattr(ctx.rule.attr, 'test_host', None)
deps = getattr(ctx.rule.attr, 'deps', [])
framework_import_infos = [dep[AppleFrameworkImportInfo] for dep in deps if AppleFrameworkImportInfo in dep]
avoid_framework_import_infos = [dep[AppleFrameworkImportInfo] for dep in ([test_host] if test_host else []) if AppleFrameworkImportInfo in dep]
library_dep_targets = [dep[XcodeProjInfo].target for dep in deps if dep[XcodeProjInfo].target and dep[XcodeProjInfo].linker_inputs]
linker_inputs = depset(transitive=[dep[XcodeProjInfo].linker_inputs for dep in deps])
if len(library_dep_targets) == 1 and (not inputs.srcs):
mergeable_target = library_dep_targets[0]
mergeable_label = mergeable_target.label
potential_target_merges = [struct(src=mergeable_target.id, dest=id)]
elif bundle_info and len(library_dep_targets) > 1:
fail('The xcodeproj rule requires {} rules to have a single library dep. {} has {}.'.format(ctx.rule.kind, target.label, len(library_dep_targets)))
else:
potential_target_merges = None
mergeable_label = None
build_settings = {}
opts_search_paths = process_opts(ctx=ctx, target=target, build_settings=build_settings)
tree_artifact_enabled = ctx.var.get('apple.experimental.tree_artifact_outputs', '').lower() in ('true', 'yes', '1')
props = _process_top_level_properties(target_name=ctx.rule.attr.name, files=[] if bundle_info else target.files.to_list(), bundle_info=bundle_info, tree_artifact_enabled=tree_artifact_enabled, build_settings=build_settings)
test_host_target_info = _process_test_host(test_host)
if test_host_target_info:
test_host_libraries = _get_static_libraries(linker_inputs=test_host_target_info.linker_inputs)
else:
test_host_libraries = None
libraries = _get_static_libraries(linker_inputs=linker_inputs)
(links, required_links) = _process_libraries(product_type=props.product_type, test_host_libraries=test_host_libraries, links=[library.path for library in libraries], required_links=[library.path for library in libraries if mergeable_label and library.owner != mergeable_label])
build_settings['OTHER_LDFLAGS'] = ['-ObjC'] + build_settings.get('OTHER_LDFLAGS', [])
set_if_true(build_settings, 'TARGETED_DEVICE_FAMILY', get_targeted_device_family(getattr(ctx.rule.attr, 'families', [])))
platform = process_platform(ctx=ctx, minimum_deployment_os_version=props.minimum_deployment_os_version, build_settings=build_settings)
modulemaps = _process_modulemaps(swift_info=target[SwiftInfo] if SwiftInfo in target else None)
inputs = input_files.collect(ctx=ctx, target=target, additional_files=modulemaps.files, transitive_infos=transitive_infos)
is_swift = SwiftInfo in target
swift_info = target[SwiftInfo] if is_swift else None
modulemaps = _process_modulemaps(swift_info=swift_info)
search_paths = _process_search_paths(cc_info=target[CcInfo] if CcInfo in target else None, opts_search_paths=opts_search_paths)
return _processed_target(defines=_process_defines(is_swift=is_swift, defines=getattr(ctx.rule.attr, 'defines', []), local_defines=getattr(ctx.rule.attr, 'local_defines', []), transitive_infos=transitive_infos, build_settings=build_settings), dependencies=dependencies, inputs=inputs, linker_inputs=linker_inputs, potential_target_merges=potential_target_merges, required_links=required_links, search_paths=search_paths, target=struct(id=id, label=target.label), xcode_target=_xcode_target(id=id, name=ctx.rule.attr.name, label=target.label, configuration=configuration, bin_dir_path=ctx.bin_dir.path, platform=platform, product=_process_product(target=target, product_name=props.product_name, product_type=props.product_type, bundle_path=props.bundle_path, linker_inputs=linker_inputs, build_settings=build_settings), is_swift=is_swift, test_host=test_host_target_info.target.id if test_host_target_info else None, build_settings=build_settings, search_paths=search_paths, frameworks=_process_frameworks(framework_import_infos=framework_import_infos, avoid_framework_import_infos=avoid_framework_import_infos), modulemaps=modulemaps, swiftmodules=_process_swiftmodules(swift_info=swift_info), inputs=inputs, links=links, dependencies=dependencies, outputs=_process_outputs(target)))
def _process_library_target(*, ctx, target, transitive_infos):
"""Gathers information about a library target.
Args:
ctx: The aspect context.
target: The `Target` to process.
transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
transitive dependencies of `target`.
Returns:
The value returned from `_processed_target()`.
"""
configuration = _get_configuration(ctx)
id = _get_id(label=target.label, configuration=configuration)
build_settings = {}
opts_search_paths = process_opts(ctx=ctx, target=target, build_settings=build_settings)
product_name = ctx.rule.attr.name
build_settings['PRODUCT_MODULE_NAME'] = get_product_module_name(ctx=ctx, target=target)
dependencies = _process_dependencies(transitive_infos=transitive_infos)
linker_inputs = _get_linker_inputs(cc_info=target[CcInfo])
cpp = ctx.fragments.cpp
build_settings['ENABLE_BITCODE'] = str(cpp.apple_bitcode_mode) != 'none'
debug_format = 'dwarf-with-dsym' if cpp.apple_generate_dsym else 'dwarf'
build_settings['DEBUG_INFORMATION_FORMAT'] = debug_format
set_if_true(build_settings, 'CLANG_ENABLE_MODULES', getattr(ctx.rule.attr, 'enable_modules', False))
set_if_true(build_settings, 'ENABLE_TESTING_SEARCH_PATHS', getattr(ctx.rule.attr, 'testonly', False))
platform = process_platform(ctx=ctx, minimum_deployment_os_version=None, build_settings=build_settings)
is_swift = SwiftInfo in target
swift_info = target[SwiftInfo] if is_swift else None
modulemaps = _process_modulemaps(swift_info=swift_info)
inputs = input_files.collect(ctx=ctx, target=target, additional_files=modulemaps.files, transitive_infos=transitive_infos)
search_paths = _process_search_paths(cc_info=target[CcInfo] if CcInfo in target else None, opts_search_paths=opts_search_paths)
return _processed_target(defines=_process_defines(is_swift=SwiftInfo in target, defines=getattr(ctx.rule.attr, 'defines', []), local_defines=getattr(ctx.rule.attr, 'local_defines', []), transitive_infos=transitive_infos, build_settings=build_settings), dependencies=dependencies, inputs=inputs, linker_inputs=linker_inputs, potential_target_merges=None, required_links=None, search_paths=search_paths, target=struct(id=id, label=target.label), xcode_target=_xcode_target(id=id, name=ctx.rule.attr.name, label=target.label, configuration=configuration, bin_dir_path=ctx.bin_dir.path, platform=platform, product=_process_product(target=target, product_name=product_name, product_type='com.apple.product-type.library.static', bundle_path=None, linker_inputs=linker_inputs, build_settings=build_settings), is_swift=is_swift, test_host=None, build_settings=build_settings, search_paths=search_paths, frameworks=_process_frameworks(framework_import_infos=[]), modulemaps=modulemaps, swiftmodules=_process_swiftmodules(swift_info=swift_info), inputs=inputs, links=[], dependencies=dependencies, outputs=_process_outputs(target)))
def _process_non_xcode_target(*, ctx, target, transitive_infos):
"""Gathers information about a non-Xcode target.
Args:
ctx: The aspect context.
target: The `Target` to process.
transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
transitive dependencies of `target`.
Returns:
The value returned from `_processed_target()`.
"""
if CcInfo in target:
linker_inputs = _get_linker_inputs(cc_info=target[CcInfo])
else:
linker_inputs = depset()
inputs = input_files.collect(ctx=ctx, target=target, transitive_infos=transitive_infos)
return _processed_target(defines=_process_defines(is_swift=SwiftInfo in target, defines=getattr(ctx.rule.attr, 'defines', []), local_defines=getattr(ctx.rule.attr, 'local_defines', []), transitive_infos=transitive_infos, build_settings=None), dependencies=_process_dependencies(transitive_infos=transitive_infos), inputs=inputs, linker_inputs=linker_inputs, potential_target_merges=None, required_links=None, search_paths=_process_search_paths(cc_info=target[CcInfo] if CcInfo in target else None, opts_search_paths=create_opts_search_paths(quote_includes=[], includes=[])), target=None, xcode_target=None)
def _should_become_xcode_target(target):
"""Determines if the given target should be included in the Xcode project.
Args:
target: The `Target` to check.
Returns:
`False` if `target` shouldn't become an actual target in the generated
Xcode project. Resource bundles are a current example of this, as we
only include their files in the project, but we don't create targets
for them.
"""
if AppleBundleInfo in target:
return True
if CcInfo in target and target.files != depset():
return True
executable = target[DefaultInfo].files_to_run.executable
if executable and (not executable.is_source):
return True
return False
def _should_skip_target(*, ctx, target):
"""Determines if the given target should be skipped for target generation.
There are some rules, like the test runners for iOS tests, that we want to
ignore. Nothing from those rules are considered.
Args:
ctx: The aspect context.
target: The `Target` to check.
Returns:
`True` if `target` should be skipped for target generation.
"""
return IosXcTestBundleInfo in target and len(ctx.rule.attr.deps) == 1 and (IosXcTestBundleInfo in ctx.rule.attr.deps[0])
def _target_info_fields(*, defines, dependencies, inputs, linker_inputs, potential_target_merges, required_links, search_paths, target, xcode_targets):
"""Generates target specific fields for the `XcodeProjInfo`.
This should be merged with other fields to fully create an `XcodeProjInfo`.
Args:
defines: Maps to `XcodeProjInfo.defines`.
dependencies: Maps to the `XcodeProjInfo.dependencies` field.
inputs: Maps to the `XcodeProjInfo.inputs` field.
linker_inputs: Maps to the `XcodeProjInfo.linker_inputs` field.
potential_target_merges: Maps to the
`XcodeProjInfo.potential_target_merges` field.
required_links: Maps to the `XcodeProjInfo.required_links` field.
search_paths: Maps to the `XcodeProjInfo.search_paths` field.
target: Maps to the `XcodeProjInfo.target` field.
xcode_targets: Maps to the `XcodeProjInfo.xcode_targets` field.
Returns:
A `dict` containing the following fields:
* `defines`
* `dependencies`
* `extra_files`
* `generated_inputs`
* `inputs`
* `linker_inputs`
* `potential_target_merges`
* `required_links`
* `search_paths`
* `target`
* `xcode_targets`
"""
return {'defines': defines, 'dependencies': dependencies, 'inputs': inputs, 'linker_inputs': linker_inputs, 'potential_target_merges': potential_target_merges, 'required_links': required_links, 'search_paths': search_paths, 'target': target, 'xcode_targets': xcode_targets}
def _skip_target(*, transitive_infos):
"""Passes through existing target info fields, not collecting new ones.
Merges `XcodeProjInfo`s for the dependencies of the current target, and
forwards them on, not collecting any information for the current target.
Args:
transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
transitive dependencies of `target`.
Returns:
The return value of `_target_info_fields()`, with values merged from
`transitive_infos`.
"""
return _target_info_fields(defines=_process_defines(is_swift=False, defines=[], local_defines=[], transitive_infos=transitive_infos, build_settings=None), dependencies=_process_dependencies(transitive_infos=transitive_infos), inputs=input_files.merge(transitive_infos=transitive_infos), linker_inputs=depset(transitive=[info.linker_inputs for info in transitive_infos]), potential_target_merges=depset(transitive=[info.potential_target_merges for info in transitive_infos]), required_links=depset(transitive=[info.required_links for info in transitive_infos]), search_paths=_process_search_paths(cc_info=None, opts_search_paths=create_opts_search_paths(quote_includes=[], includes=[])), target=None, xcode_targets=depset(transitive=[info.xcode_targets for info in transitive_infos]))
def _process_dependencies(*, transitive_infos):
return [dependency for dependency in flatten([[info.target.id] if info.target else info.dependencies for info in transitive_infos])]
def _process_defines(*, is_swift, defines, local_defines, transitive_infos, build_settings):
transitive_cc_defines = []
for info in transitive_infos:
transitive_defines = info.defines
transitive_cc_defines.extend(transitive_defines.cc_defines)
if is_swift:
cc_defines = transitive_cc_defines
else:
transitive_cc_defines.extend(defines)
cc_defines = transitive_cc_defines + local_defines
if build_settings:
setting = cc_defines + build_settings.get('GCC_PREPROCESSOR_DEFINITIONS', [])
setting = reversed(uniq(reversed(setting)))
set_if_true(build_settings, 'GCC_PREPROCESSOR_DEFINITIONS', setting)
return struct(cc_defines=transitive_cc_defines)
def _process_search_paths(*, cc_info, opts_search_paths):
search_paths = {}
if cc_info:
compilation_context = cc_info.compilation_context
set_if_true(search_paths, 'framework_includes', [parsed_file_path(path) for path in compilation_context.framework_includes.to_list()])
set_if_true(search_paths, 'quote_includes', [parsed_file_path(path) for path in compilation_context.quote_includes.to_list() + opts_search_paths.quote_includes])
set_if_true(search_paths, 'includes', [parsed_file_path(path) for path in compilation_context.includes.to_list() + opts_search_paths.includes])
return search_paths
def _farthest_parent_file_path(file, extension):
"""Returns the part of a file path with the given extension closest to the root.
For example, if `file` is `"foo/bar.bundle/baz.bundle"`, passing `".bundle"`
as the extension will return `"foo/bar.bundle"`.
Args:
file: The `File`.
extension: The extension of the directory to find.
Returns:
A `FilePath` with the portion of the path that ends in the given
extension that is closest to the root of the path.
"""
(prefix, ext, _) = file.path.partition('.' + extension)
if ext:
return file_path(file, prefix + ext)
fail('Expected file.path %r to contain %r, but it did not' % (file, '.' + extension))
def _process_frameworks(*, framework_import_infos, avoid_framework_import_infos=[]):
framework_imports = depset(transitive=[info.framework_imports for info in framework_import_infos if hasattr(info, 'framework_imports')])
avoid_framework_imports = depset(transitive=[info.framework_imports for info in avoid_framework_import_infos if hasattr(info, 'framework_imports')])
avoid_files = avoid_framework_imports.to_list()
framework_paths = uniq([_farthest_parent_file_path(file, 'framework') for file in framework_imports.to_list() if file not in avoid_files])
return framework_paths
def _process_modulemaps(*, swift_info):
if not swift_info:
return struct(file_paths=[], files=[])
modulemap_file_paths = []
modulemap_files = []
for module in swift_info.transitive_modules.to_list():
clang_module = module.clang
if not clang_module:
continue
module_map = clang_module.module_map
if not module_map:
continue
if type(module_map) == 'File':
modulemap = file_path(module_map)
modulemap_files.append(module_map)
else:
modulemap = module_map
modulemap_file_paths.append(modulemap)
return struct(file_paths=uniq(modulemap_file_paths), files=uniq(modulemap_files))
def _process_swiftmodules(*, swift_info):
if not swift_info:
return []
direct_modules = swift_info.direct_modules
file_paths = []
for module in swift_info.transitive_modules.to_list():
if module in direct_modules:
continue
swift_module = module.swift
if not swift_module:
continue
file_paths.append(file_path(swift_module.swiftmodule))
return file_paths
def _process_target(*, ctx, target, transitive_infos):
"""Creates the target portion of an `XcodeProjInfo` for a `Target`.
Args:
ctx: The aspect context.
target: The `Target` to process.
transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
transitive dependencies of `target`.
Returns:
A `dict` of fields to be merged into the `XcodeProjInfo`. See
`_target_info_fields()`.
"""
if not _should_become_xcode_target(target):
processed_target = _process_non_xcode_target(ctx=ctx, target=target, transitive_infos=transitive_infos)
elif AppleBundleInfo in target:
processed_target = _process_top_level_target(ctx=ctx, target=target, bundle_info=target[AppleBundleInfo], transitive_infos=transitive_infos)
elif target[DefaultInfo].files_to_run.executable:
processed_target = _process_top_level_target(ctx=ctx, target=target, bundle_info=None, transitive_infos=transitive_infos)
else:
processed_target = _process_library_target(ctx=ctx, target=target, transitive_infos=transitive_infos)
return _target_info_fields(defines=processed_target.defines, dependencies=processed_target.dependencies, inputs=input_files.merge(processed_target.inputs, transitive_infos=transitive_infos), linker_inputs=processed_target.linker_inputs, potential_target_merges=depset(processed_target.potential_target_merges, transitive=[info.potential_target_merges for info in transitive_infos]), required_links=depset(processed_target.required_links, transitive=[info.required_links for info in transitive_infos]), search_paths=processed_target.search_paths, target=processed_target.target, xcode_targets=depset(processed_target.xcode_targets, transitive=[info.xcode_targets for info in transitive_infos]))
def process_target(*, ctx, target, transitive_infos):
"""Creates an `XcodeProjInfo` for the given target.
Args:
ctx: The aspect context.
target: The `Target` to process.
transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
transitive dependencies of `target`.
Returns:
An `XcodeProjInfo` populated with information from `target` and
`transitive_infos`.
"""
if _should_skip_target(ctx=ctx, target=target):
info_fields = _skip_target(transitive_infos=transitive_infos)
else:
info_fields = _process_target(ctx=ctx, target=target, transitive_infos=transitive_infos)
return xcode_proj_info(**info_fields)
testable = struct(calculate_configuration=_calculate_configuration, process_libraries=_process_libraries, process_top_level_properties=_process_top_level_properties)
|
"""
A module to show off a long-running function.
This module reads a very large text file and counts the
number of times each word appears in that file
Author: Walker M. White
Date: November 2, 2020
"""
def add_word(word,counts):
"""
Adds a word to a word-count dictionary.
The keys of the dictionaries are strings, and the values
are integers. If the word is already in the dictionary,
adding it will increase the value by 1. Otherwise it
will add the key and assign it a value for 1.
Example: If count = ['a':1,'b':1}, add_word('a',count)
alters count to be {'a':2,'b':1}
Parameter word: The word to add
Precondition: word is a string
Parameter counts: The word-count dictionary
Precondition: count is a dictionary with string keys and integer values
"""
if word in counts:
counts[word] = counts[word]+1
else:
counts[word] = 1
def wordcount(fname):
"""
Returns a dictionary with the individual word count of
fname
The is function opens the specified text file and creates
a dictionary from it. The keys of the dictionaries are
words (i.e. adjacent letters with no spaces or
punctuation). For example, in the string 'Who are you?',
the words are 'Who', 'are', and 'you'. The values are
the number of times that word (paying attention to
capitalization) appears in the file.
Parameter fname: The file name
Precondition: fname is a string and the name of a text
file
"""
# Load the entire file into a single string
file = open(fname)
text = file.read()
file.close()
counts = {}
word = '' # Accumulator to build a word
for pos in range(len(text)):
# Build up the word, one letter at a time
x = text[pos]
if x.isalpha():
word = word+x
else: # Word ends
# Add it if not empty
if word != '':
add_word(word,counts)
word = '' # Reset the accumulator
# Add the last word
if word != '':
add_word(word,counts)
return counts
def loadfile(fname):
"""
Creates a word-count dictionary for fname and prints its
size
The size of the word-count dictionary is the number of
distinct words in the file.
Parameter fname: The file name
Precondition: fname is a string and the name of a text
file
"""
result = wordcount(fname)
print('Read a total of '+str(len(result))+' words.')
if __name__ == '__main__':
loadfile('warpeace10.txt')
|
"""
A module to show off a long-running function.
This module reads a very large text file and counts the
number of times each word appears in that file
Author: Walker M. White
Date: November 2, 2020
"""
def add_word(word, counts):
"""
Adds a word to a word-count dictionary.
The keys of the dictionaries are strings, and the values
are integers. If the word is already in the dictionary,
adding it will increase the value by 1. Otherwise it
will add the key and assign it a value for 1.
Example: If count = ['a':1,'b':1}, add_word('a',count)
alters count to be {'a':2,'b':1}
Parameter word: The word to add
Precondition: word is a string
Parameter counts: The word-count dictionary
Precondition: count is a dictionary with string keys and integer values
"""
if word in counts:
counts[word] = counts[word] + 1
else:
counts[word] = 1
def wordcount(fname):
"""
Returns a dictionary with the individual word count of
fname
The is function opens the specified text file and creates
a dictionary from it. The keys of the dictionaries are
words (i.e. adjacent letters with no spaces or
punctuation). For example, in the string 'Who are you?',
the words are 'Who', 'are', and 'you'. The values are
the number of times that word (paying attention to
capitalization) appears in the file.
Parameter fname: The file name
Precondition: fname is a string and the name of a text
file
"""
file = open(fname)
text = file.read()
file.close()
counts = {}
word = ''
for pos in range(len(text)):
x = text[pos]
if x.isalpha():
word = word + x
else:
if word != '':
add_word(word, counts)
word = ''
if word != '':
add_word(word, counts)
return counts
def loadfile(fname):
"""
Creates a word-count dictionary for fname and prints its
size
The size of the word-count dictionary is the number of
distinct words in the file.
Parameter fname: The file name
Precondition: fname is a string and the name of a text
file
"""
result = wordcount(fname)
print('Read a total of ' + str(len(result)) + ' words.')
if __name__ == '__main__':
loadfile('warpeace10.txt')
|
#
# Problem: Compare original text vs what was altered and return a dict of
# indexes match_index_mapping the matching elements from the original text
# array to the altered text array.
#
# Algorithm should maximize the number of matches in sequential order.
#
# TODO: consider using dicts/tree instead of arrays
#
class MatchIndexMapping:
def __init__(self, key, value):
self.key = key
self.value = value
def __str__(self):
return f"({self.key}, {self.value})"
def print_all_results(all_results):
print("\nAll Results:")
for index, result in enumerate(all_results):
print(str(index) + ":")
for match_index_mapping in result:
print(match_index_mapping)
def get_all_possible_mappings(orig, alt):
"""
Creates a list of lists that contains the mappings of the items in orig
to all possible indexes from alt.
:param orig: a list of items
:param alt: a list of items
:return: a list of lists, each element represents a list of indexes in the
altered list that the original list item matches.
"""
all_mappings = []
for index_orig, item_orig in enumerate(orig):
indexes = []
for index_alt, item_alt in enumerate(alt):
if item_orig == item_alt:
indexes.append(index_alt)
all_mappings.append(indexes)
return all_mappings
def compare_text(orig, alt, debug=False):
"""
Gets the maximum length sequential intersection of data from org to alt.
This is represented in a list of indexes from orig to alt.
:param orig: the original data
:param alt: the altered data
:param debug: boolean indicating whether to print out debug info
:return: a list of MatchIndexMapping that contains a key (the index of
the value in the orig data) and a value (the index of the data mapped to)
in the alt data
"""
# Convert lists of data to list of lists mapping indexes from orig to
# indexes in alt.
all_mappings = get_all_possible_mappings(orig, alt)
if debug:
print("\nAll Mappings:\n" + str(all_mappings))
results = []
for i, index_list in enumerate(all_mappings):
# If our index list is empty, then the data point in orig that
# this index represents doesn't map to any data point in alt, so
# proceed to next match_index_mapping array
if not index_list:
continue
# If there are no results yet, create one from the first item in
# this index list
if not results:
results.append([MatchIndexMapping(i, index_list[0])])
continue
# For each index list, append the lowest possible index from the list
# to each result.
#
# This will result in either:
# 1. Simply appending the index to the end of a result or
# 2. Inserting the index into the middle of a result. In this case
# we'll fork the result creating a copy and insert it into the copy
# which also blows away the indexes after it. This needs to be done
# because there is no guarantee that simply appending an index on the
# end of a result will achieve our goal of getting the longest
# possible sequential intersection.
forked_results = []
for result in results:
next_result = False
for index in index_list:
for mim_index, match_index_mapping in reversed(
list(enumerate(result))):
if index > match_index_mapping.value:
if len(result) - 1 == mim_index:
# Append this to the end of the result and go to the
# next result
result.append(MatchIndexMapping(i, index))
next_result = True
break
else:
# Fork the result and insert this in the middle,
# blowing away the other results. Proceed to the
# next index to see if we need to fork again
forked_list = result[:mim_index + 1]
forked_list.append(MatchIndexMapping(i, index))
forked_results.append(forked_list)
break
if next_result:
break
if forked_results:
results.extend(forked_results)
# If nothing in this index was added to an existing result, then
# create a new result if no results exist whose initial value is less
# than the smallest value in the index list
for result in results:
initial_value = result[0].value
first_value_from_index_list = index_list[0]
if initial_value <= first_value_from_index_list:
break
else:
results.append([MatchIndexMapping(i, index_list[0])])
if debug:
print_all_results(results)
# Return the result of the longest length
return max(results, key=len)
if __name__ == "__main__":
l1 = [1, 2, 3, 4, 5]
l2 = [1, 2, 4, 5, 3]
print("\nList 1: " + str(l1))
print("\nList 2: " + str(l2))
test_result = compare_text(l1, l2, True)
print("\nFinal Result:")
for mim in test_result:
print(mim)
|
class Matchindexmapping:
def __init__(self, key, value):
self.key = key
self.value = value
def __str__(self):
return f'({self.key}, {self.value})'
def print_all_results(all_results):
print('\nAll Results:')
for (index, result) in enumerate(all_results):
print(str(index) + ':')
for match_index_mapping in result:
print(match_index_mapping)
def get_all_possible_mappings(orig, alt):
"""
Creates a list of lists that contains the mappings of the items in orig
to all possible indexes from alt.
:param orig: a list of items
:param alt: a list of items
:return: a list of lists, each element represents a list of indexes in the
altered list that the original list item matches.
"""
all_mappings = []
for (index_orig, item_orig) in enumerate(orig):
indexes = []
for (index_alt, item_alt) in enumerate(alt):
if item_orig == item_alt:
indexes.append(index_alt)
all_mappings.append(indexes)
return all_mappings
def compare_text(orig, alt, debug=False):
"""
Gets the maximum length sequential intersection of data from org to alt.
This is represented in a list of indexes from orig to alt.
:param orig: the original data
:param alt: the altered data
:param debug: boolean indicating whether to print out debug info
:return: a list of MatchIndexMapping that contains a key (the index of
the value in the orig data) and a value (the index of the data mapped to)
in the alt data
"""
all_mappings = get_all_possible_mappings(orig, alt)
if debug:
print('\nAll Mappings:\n' + str(all_mappings))
results = []
for (i, index_list) in enumerate(all_mappings):
if not index_list:
continue
if not results:
results.append([match_index_mapping(i, index_list[0])])
continue
forked_results = []
for result in results:
next_result = False
for index in index_list:
for (mim_index, match_index_mapping) in reversed(list(enumerate(result))):
if index > match_index_mapping.value:
if len(result) - 1 == mim_index:
result.append(match_index_mapping(i, index))
next_result = True
break
else:
forked_list = result[:mim_index + 1]
forked_list.append(match_index_mapping(i, index))
forked_results.append(forked_list)
break
if next_result:
break
if forked_results:
results.extend(forked_results)
for result in results:
initial_value = result[0].value
first_value_from_index_list = index_list[0]
if initial_value <= first_value_from_index_list:
break
else:
results.append([match_index_mapping(i, index_list[0])])
if debug:
print_all_results(results)
return max(results, key=len)
if __name__ == '__main__':
l1 = [1, 2, 3, 4, 5]
l2 = [1, 2, 4, 5, 3]
print('\nList 1: ' + str(l1))
print('\nList 2: ' + str(l2))
test_result = compare_text(l1, l2, True)
print('\nFinal Result:')
for mim in test_result:
print(mim)
|
# -*- coding: utf-8 -*-
"""
Looping Examples
Intro to Python Workshop
"""
## Iteration 1 - Iconic lyrics
n = 5
while n > 0:
print ("Hello "*3)
print ("How low")
print ("Entertain us!")
## Iteration 2 - Iconic lyrics
n = 0
while n > 0:
print ("Hello"*3)
print ("How low")
print ("Entertain us!")
# Using Breaks in Loops - Evaluating User Input
while True:
line = input('>Enter something: ')
if line == 'all done':
break
print (line)
print ('All Done!')
# Definite Loop - Basic/Numeric
# The 'i' character is called an iteration variable #
# It "iterates" through a sequence - an ordered set #
# Iteration variable moves through ALL values in that sequence#
NVPopulations2017 = [54745,24230,2204079,48309,52649,850,1961,16826,5693,5223,54122,4457,44202,6508,4006,460587,9592]
for i in NVPopulations2017:
print (i)
print ("That's Nevada!")
# Definite Loop - Basic/Numeric
NVcounties = " Washoe, Clark, Lyon, Carson City, Pershing, Douglas, White Pine, Nye, Humboldt, Lincoln, Esmeralda, Mineral, Elko, Storey, Eureka, Churchill, Lander"
NVList = NVcounties.split(",")
NVList.sort()
for i in NVList:
x = i.strip()
print (x,"County")
# What do we do about Carson City?? #
print ("That's Nevada!")
# Evaluating Values from an ordered set
# Find the largest population value! Looking at you, Vegas...#
largest_pop = -99
print ('Start', largest_pop)
for i in NVPopulations2017:
if i > largest_pop:
largest_pop = i
print (largest_pop, i)
print ('End', largest_pop)
# Setting a counter #
county_count = 0
print ('Start the count!')
for i in NVPopulations2017:
county_count = county_count + 1
print (county_count, i)
print ("It's over!", county_count)
# Setting a counter and calculating incremental sums#
state_pop = 0
print ('Start the tabulating!')
for i in NVPopulations2017:
state_pop = state_pop + i
print (i, state_pop)
print ("It's over! Nevada's population is...", state_pop)
# To find the smallest number, run this code, and then edit to get meaningful answer #
smallest_pop = 300000000
print ('Start the tabulating!')
for i in NVPopulations2017:
if i < smallest_pop:
smallest_pop = i
print (smallest_pop, i)
print ('End', smallest_pop)
|
"""
Looping Examples
Intro to Python Workshop
"""
n = 5
while n > 0:
print('Hello ' * 3)
print('How low')
print('Entertain us!')
n = 0
while n > 0:
print('Hello' * 3)
print('How low')
print('Entertain us!')
while True:
line = input('>Enter something: ')
if line == 'all done':
break
print(line)
print('All Done!')
nv_populations2017 = [54745, 24230, 2204079, 48309, 52649, 850, 1961, 16826, 5693, 5223, 54122, 4457, 44202, 6508, 4006, 460587, 9592]
for i in NVPopulations2017:
print(i)
print("That's Nevada!")
n_vcounties = ' Washoe, Clark, Lyon, Carson City, Pershing, Douglas, White Pine, Nye, Humboldt, Lincoln, Esmeralda, Mineral, Elko, Storey, Eureka, Churchill, Lander'
nv_list = NVcounties.split(',')
NVList.sort()
for i in NVList:
x = i.strip()
print(x, 'County')
print("That's Nevada!")
largest_pop = -99
print('Start', largest_pop)
for i in NVPopulations2017:
if i > largest_pop:
largest_pop = i
print(largest_pop, i)
print('End', largest_pop)
county_count = 0
print('Start the count!')
for i in NVPopulations2017:
county_count = county_count + 1
print(county_count, i)
print("It's over!", county_count)
state_pop = 0
print('Start the tabulating!')
for i in NVPopulations2017:
state_pop = state_pop + i
print(i, state_pop)
print("It's over! Nevada's population is...", state_pop)
smallest_pop = 300000000
print('Start the tabulating!')
for i in NVPopulations2017:
if i < smallest_pop:
smallest_pop = i
print(smallest_pop, i)
print('End', smallest_pop)
|
#!/usr/bin/python3
given_list = [['87', '90', '78', '94'], ['78', '98', '92', '67']]
students = ['Chris', 'Eva']
names_classes = ['Math', 'Chemistry', 'Physics', 'English']
def printing(given_list, name_classes):
"""Printing catalog pandas style but without pandas"""
maxi_names = max(len(str(students[i])) for i in range(len(students)))
print(f'|\033[1;4m{"Student":>{maxi_names * 2}}\033[0m|', end='')
for k in range(len(names_classes)):
print(f"\033[1;4m{names_classes[k].rjust(maxi_names * 2)}\033[0m|", end='')
print()
for i in range(len(given_list)):
print(f'|\033[1;4m{students[i].rjust(maxi_names * 2)}\033[0m|', end='')
for j in range(len(given_list[i])):
print(f'\033[1;4m{given_list[i][j].rjust(maxi_names * 2)}\033[0m|', end='')
print()
printing(given_list, names_classes)
|
given_list = [['87', '90', '78', '94'], ['78', '98', '92', '67']]
students = ['Chris', 'Eva']
names_classes = ['Math', 'Chemistry', 'Physics', 'English']
def printing(given_list, name_classes):
"""Printing catalog pandas style but without pandas"""
maxi_names = max((len(str(students[i])) for i in range(len(students))))
print(f"|\x1b[1;4m{'Student':>{maxi_names * 2}}\x1b[0m|", end='')
for k in range(len(names_classes)):
print(f'\x1b[1;4m{names_classes[k].rjust(maxi_names * 2)}\x1b[0m|', end='')
print()
for i in range(len(given_list)):
print(f'|\x1b[1;4m{students[i].rjust(maxi_names * 2)}\x1b[0m|', end='')
for j in range(len(given_list[i])):
print(f'\x1b[1;4m{given_list[i][j].rjust(maxi_names * 2)}\x1b[0m|', end='')
print()
printing(given_list, names_classes)
|
"""
Basic GLS Syntax
Version 0.0.1
Josh Goldberg
"""
# Function Definitions
def sayHello():
print("Hello world!")
def combineStrings(a, b):
return a + b
# Class Declarations
class Point:
x = None
y = None
def __init__(self, x, y):
self.x = x
self.y = y
def setX(self, x):
self.x = x
def setY(self, y):
self.y = y
def getX(self):
return self.x
def getY(self):
return self.y
def getManhattanTotal(self):
return self.x + self.y
# Main
if __name__ == '__main__':
# Basic Usage
print("Hello world!") # Basic printing here...
# Variables
a = "Hello world!"
b = 7
c = 11.7
d = True
# Operations
e = 1 + 2
f = b < c
# If Statements
if d:
print("d is true!")
if c < 14:
print("c is less than 14!")
# While Loops
while d:
print("d is", d)
d = False
while c > 3:
print("c is", c)
c -= 1
# For Loops
for i in range(0, 7):
print("i plus one is", i + 1)
# Calling Functions
sayHello()
combineStrings("hello", "world")
combineStrings("hello" + " ", "world")
combineStrings(combineStrings("hello", "world"), "world")
# Class Usage
g = Point(3, 7)
g.setX(4)
print(g.getManhattanTotal())
# fin
|
"""
Basic GLS Syntax
Version 0.0.1
Josh Goldberg
"""
def say_hello():
print('Hello world!')
def combine_strings(a, b):
return a + b
class Point:
x = None
y = None
def __init__(self, x, y):
self.x = x
self.y = y
def set_x(self, x):
self.x = x
def set_y(self, y):
self.y = y
def get_x(self):
return self.x
def get_y(self):
return self.y
def get_manhattan_total(self):
return self.x + self.y
if __name__ == '__main__':
print('Hello world!')
a = 'Hello world!'
b = 7
c = 11.7
d = True
e = 1 + 2
f = b < c
if d:
print('d is true!')
if c < 14:
print('c is less than 14!')
while d:
print('d is', d)
d = False
while c > 3:
print('c is', c)
c -= 1
for i in range(0, 7):
print('i plus one is', i + 1)
say_hello()
combine_strings('hello', 'world')
combine_strings('hello' + ' ', 'world')
combine_strings(combine_strings('hello', 'world'), 'world')
g = point(3, 7)
g.setX(4)
print(g.getManhattanTotal())
|
N, C = map(int, input().split())
l = [tuple(map(int, input().split())) for i in range(N)]
s = set()
for a, b, c in l:
s.add(a)
s.add(b + 1)
d = {}
s = sorted(list(s))
for i, j in enumerate(s):
d[j] = i
m = [0] * (len(s) + 1)
for a, b, c in l:
m[d[a]] += c
m[d[b + 1]] -= c
ans = 0
for i in range(len(s) - 1):
c = m[i] if m[i] < C else C
ans += (s[i + 1] - s[i]) * c
m[i + 1] += m[i]
print(ans)
|
(n, c) = map(int, input().split())
l = [tuple(map(int, input().split())) for i in range(N)]
s = set()
for (a, b, c) in l:
s.add(a)
s.add(b + 1)
d = {}
s = sorted(list(s))
for (i, j) in enumerate(s):
d[j] = i
m = [0] * (len(s) + 1)
for (a, b, c) in l:
m[d[a]] += c
m[d[b + 1]] -= c
ans = 0
for i in range(len(s) - 1):
c = m[i] if m[i] < C else C
ans += (s[i + 1] - s[i]) * c
m[i + 1] += m[i]
print(ans)
|
print( 1 == 1 or 2 == 2 )
print( 1 == 1 or 2 == 3 )
print( 1 != 1 or 2 == 2 )
print( 2 < 1 or 3 > 6 )
|
print(1 == 1 or 2 == 2)
print(1 == 1 or 2 == 3)
print(1 != 1 or 2 == 2)
print(2 < 1 or 3 > 6)
|
class Node:
def __init__(self, data):
self.data = data
self.next = None
class llist:
def __init__(self):
self.head = None
def reverse(self, head):
if head is None or head.next is None:
return head
rest = self.reverse(head.next)
head.next.next = head
head.next = None
return rest
def __str__(self):
llistStr = ""
temp = self.head
while temp:
llistStr = (llistStr + str(temp.data) + " ")
temp = temp.next
return llistStr
def push(self, data):
temp = Node(data)
temp.next = self.head
self.head = temp
llist = llist()
llist.push(98)
llist.push(10)
llist.push(15)
llist.push(23)
llist.push(24)
llist.push(76)
llist.push(13)
print("Given linked list")
print(llist)
llist.head = llist.reverse(llist.head)
print("Reversed linked list")
print(llist)
|
class Node:
def __init__(self, data):
self.data = data
self.next = None
class Llist:
def __init__(self):
self.head = None
def reverse(self, head):
if head is None or head.next is None:
return head
rest = self.reverse(head.next)
head.next.next = head
head.next = None
return rest
def __str__(self):
llist_str = ''
temp = self.head
while temp:
llist_str = llistStr + str(temp.data) + ' '
temp = temp.next
return llistStr
def push(self, data):
temp = node(data)
temp.next = self.head
self.head = temp
llist = llist()
llist.push(98)
llist.push(10)
llist.push(15)
llist.push(23)
llist.push(24)
llist.push(76)
llist.push(13)
print('Given linked list')
print(llist)
llist.head = llist.reverse(llist.head)
print('Reversed linked list')
print(llist)
|
texto = input("Ingrese su texto: ")
def SpaceToDash(texto):
return texto.replace(" ", "-")
print (SpaceToDash(texto))
|
texto = input('Ingrese su texto: ')
def space_to_dash(texto):
return texto.replace(' ', '-')
print(space_to_dash(texto))
|
nome = 'Fabio Rodrigues Dias'
cores = {'limpa':'\033[m',
'azul':'\033[1;7;34m',
'amarelo':'\033[33m',
'pretoebranco': '\033[7;30m'}
print('Ola!! Muito prazer em te conhecer, {}{}{}'.format(cores['azul'], nome , cores['limpa']))
|
nome = 'Fabio Rodrigues Dias'
cores = {'limpa': '\x1b[m', 'azul': '\x1b[1;7;34m', 'amarelo': '\x1b[33m', 'pretoebranco': '\x1b[7;30m'}
print('Ola!! Muito prazer em te conhecer, {}{}{}'.format(cores['azul'], nome, cores['limpa']))
|
"""Warnings"""
# Authors: Jeffrey Wang
# License: BSD 3 clause
class ConvergenceWarning(UserWarning):
"""
Custom warning to capture convergence issues.
"""
class InitializationWarning(UserWarning):
"""
Custom warning to capture initialization issues.
"""
class StabilizationWarning(UserWarning):
"""
Custom warning to capture stabilization issues.
"""
|
"""Warnings"""
class Convergencewarning(UserWarning):
"""
Custom warning to capture convergence issues.
"""
class Initializationwarning(UserWarning):
"""
Custom warning to capture initialization issues.
"""
class Stabilizationwarning(UserWarning):
"""
Custom warning to capture stabilization issues.
"""
|
# Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
def CheckDoNotMerge(input_api, output_api):
for l in input_api.change.FullDescriptionText().splitlines():
if l.lower().startswith('do not merge'):
msg = 'Your cl contains: \'Do not merge\' - this will break WIP bots'
return [output_api.PresubmitPromptWarning(msg, [])]
return []
def CheckChangeOnUpload(input_api, output_api):
results = []
results.extend(CheckDoNotMerge(input_api, output_api))
return results
|
def check_do_not_merge(input_api, output_api):
for l in input_api.change.FullDescriptionText().splitlines():
if l.lower().startswith('do not merge'):
msg = "Your cl contains: 'Do not merge' - this will break WIP bots"
return [output_api.PresubmitPromptWarning(msg, [])]
return []
def check_change_on_upload(input_api, output_api):
results = []
results.extend(check_do_not_merge(input_api, output_api))
return results
|
# I wouldn't be able to say if this question was hard or easy. It uses the fundamental stuff. No modules.
# However changing the rules of math was mind-boggling
def Part1(part2):
calc = list()
with open("Day18.txt") as f:
for line in f:
operation = line.strip().replace(" ", "")
start = 0
parentheses = list()
while(True):
# Taking the parenthesis and removing (.pop()) them from the list
for i in range(start, len(operation)):
if operation[i] == "(":
parentheses.append(i)
elif operation[i] == ")":
parenthsis_i = parentheses.pop()
# Calling the change function in order the change the laws of the math
val = change(operation[parenthsis_i+1:i], part2)
start = parenthsis_i
operation = operation[:parenthsis_i] + \
str(val) + operation[i+1:]
break
if operation.count("(") == 0:
calc.append(change(operation, part2))
break
return sum(calc)
# The function that does it all
def change(operation, part2):
n = 0
while(True):
opi = -1
op = None
opfound = False
if part2:
n1i = 0
n2i = -1
for i, c in enumerate(operation):
if c == "+" or c == "*":
if opfound:
n2i = i
break
else:
if part2:
if not (c == "+" or operation.count("+") == 0):
n1i = i + 1
else:
opfound = True
opi = i
op = c
else:
opfound = True
opi = i
op = c
if i == len(operation) - 1:
n2i = i + 1
if part2:
n1 = int(operation[n1i:opi])
n2 = int(operation[opi+1:n2i])
else:
n1 = int(operation[0:opi])
n2 = 0
n2 = int(operation[opi+1:n2i])
if op == "+":
n = n1 + n2
elif op == "*":
n = n1 * n2
if part2:
operation = operation[:n1i] + str(n) + operation[n2i:]
if operation.count("+") + operation.count("*") == 0:
return n
else:
if len(operation[n2i:]) == 0:
return n
operation = str(n) + operation[n2i:]
print(f"Q1: {Part1(False)}")
print(f"Q2: {Part1(True)}")
|
def part1(part2):
calc = list()
with open('Day18.txt') as f:
for line in f:
operation = line.strip().replace(' ', '')
start = 0
parentheses = list()
while True:
for i in range(start, len(operation)):
if operation[i] == '(':
parentheses.append(i)
elif operation[i] == ')':
parenthsis_i = parentheses.pop()
val = change(operation[parenthsis_i + 1:i], part2)
start = parenthsis_i
operation = operation[:parenthsis_i] + str(val) + operation[i + 1:]
break
if operation.count('(') == 0:
calc.append(change(operation, part2))
break
return sum(calc)
def change(operation, part2):
n = 0
while True:
opi = -1
op = None
opfound = False
if part2:
n1i = 0
n2i = -1
for (i, c) in enumerate(operation):
if c == '+' or c == '*':
if opfound:
n2i = i
break
elif part2:
if not (c == '+' or operation.count('+') == 0):
n1i = i + 1
else:
opfound = True
opi = i
op = c
else:
opfound = True
opi = i
op = c
if i == len(operation) - 1:
n2i = i + 1
if part2:
n1 = int(operation[n1i:opi])
n2 = int(operation[opi + 1:n2i])
else:
n1 = int(operation[0:opi])
n2 = 0
n2 = int(operation[opi + 1:n2i])
if op == '+':
n = n1 + n2
elif op == '*':
n = n1 * n2
if part2:
operation = operation[:n1i] + str(n) + operation[n2i:]
if operation.count('+') + operation.count('*') == 0:
return n
else:
if len(operation[n2i:]) == 0:
return n
operation = str(n) + operation[n2i:]
print(f'Q1: {part1(False)}')
print(f'Q2: {part1(True)}')
|
class VCard():
def __init__(self, filename:str):
self.filename = filename
def create(self, display_name:list, full_name:str, number:str, email:str=None):
'''Create a vcf card'''
bp = [1, 2, 0]
pp = [0, 1, 2]
rn = []
for i, j in zip(bp, pp):
rn.insert(i, display_name[j]+";")
fd = self.filename
f = open(fd, "w")
f.write("BEGIN:VCARD\n")
f.write("VERSION:2.1\n")
f.write("N:")
for i in rn:
f.write("{}".format(i))
f.write("\n")
f.write("FN:{}\n".format(full_name))
f.write("TEL;CELL;PREF:{}\n".format(number))
f.write("EMAIL;HOME:{}\n".format(email))
f.write("END:VCARD")
f.close()
def read(self, att:str):
'''Read a card'''
global name, full_name, number, email
filenameWithDirectory = self.filename
bp = [1, 2, 0]
pp = [0, 1, 2]
oriname = []
nameind, fnind, phind, emind = None, None, None, None
with open(filenameWithDirectory, 'r') as f:
card = [line.strip() for line in f]
for i in card:
if "N:" in i:
nameind = card.index(i)
if "FN:" in i:
fnind = card.index(i)
if "TEL;CELL;PREF:" in i:
phind = card.index(i)
if "TEL;CELL:" in i:
phind = card.index(i)
if "EMAIL;HOME:" in i:
emind = card.index(i)
if nameind != None:
name = card[fnind]
name = name[2:len(name)]
name = name.replace(":","")
name = name[0:len(name)]
namel = name.split(";")
if fnind != None:
full_name = card[nameind]
full_name = full_name[3:len(full_name)]
if phind != None:
number = card[phind]
try:
number = str(number).replace("TEL;CELL:","")
number = int(number)
except:
number = str(number).replace("TEL;CELL;PREF:","")
number = int(number)
if emind != None:
email = card[emind]
email = email[11:len(email)]
elif emind == None:
email = None
info = {}
infol = ["name", "full_name", "number", "email"]
infola = [name, full_name, number, email]
for i, j in zip(infol, infola):
info[i] = j
return info[att]
@property
def number(self):
return self.read("number")
@property
def name(self):
return self.read("name")
@property
def fullName(self):
return self.read("full_name")
@property
def email(self):
return self.read("email")
|
class Vcard:
def __init__(self, filename: str):
self.filename = filename
def create(self, display_name: list, full_name: str, number: str, email: str=None):
"""Create a vcf card"""
bp = [1, 2, 0]
pp = [0, 1, 2]
rn = []
for (i, j) in zip(bp, pp):
rn.insert(i, display_name[j] + ';')
fd = self.filename
f = open(fd, 'w')
f.write('BEGIN:VCARD\n')
f.write('VERSION:2.1\n')
f.write('N:')
for i in rn:
f.write('{}'.format(i))
f.write('\n')
f.write('FN:{}\n'.format(full_name))
f.write('TEL;CELL;PREF:{}\n'.format(number))
f.write('EMAIL;HOME:{}\n'.format(email))
f.write('END:VCARD')
f.close()
def read(self, att: str):
"""Read a card"""
global name, full_name, number, email
filename_with_directory = self.filename
bp = [1, 2, 0]
pp = [0, 1, 2]
oriname = []
(nameind, fnind, phind, emind) = (None, None, None, None)
with open(filenameWithDirectory, 'r') as f:
card = [line.strip() for line in f]
for i in card:
if 'N:' in i:
nameind = card.index(i)
if 'FN:' in i:
fnind = card.index(i)
if 'TEL;CELL;PREF:' in i:
phind = card.index(i)
if 'TEL;CELL:' in i:
phind = card.index(i)
if 'EMAIL;HOME:' in i:
emind = card.index(i)
if nameind != None:
name = card[fnind]
name = name[2:len(name)]
name = name.replace(':', '')
name = name[0:len(name)]
namel = name.split(';')
if fnind != None:
full_name = card[nameind]
full_name = full_name[3:len(full_name)]
if phind != None:
number = card[phind]
try:
number = str(number).replace('TEL;CELL:', '')
number = int(number)
except:
number = str(number).replace('TEL;CELL;PREF:', '')
number = int(number)
if emind != None:
email = card[emind]
email = email[11:len(email)]
elif emind == None:
email = None
info = {}
infol = ['name', 'full_name', 'number', 'email']
infola = [name, full_name, number, email]
for (i, j) in zip(infol, infola):
info[i] = j
return info[att]
@property
def number(self):
return self.read('number')
@property
def name(self):
return self.read('name')
@property
def full_name(self):
return self.read('full_name')
@property
def email(self):
return self.read('email')
|
#!/usr/bin/env python3
"""genomehubs version."""
__version__ = "2.2.0"
|
"""genomehubs version."""
__version__ = '2.2.0'
|
#
# Copyright (c) 2017 Joy Diamond. All rights reserved.
#
@gem('Quartz.Parse1')
def gem():
require_gem('Quartz.Match')
require_gem('Quartz.Core')
show = true
@share
def parse1_mysql_from_path(path):
data = read_text_from_path(path)
many = []
append = many.append
iterate_lines = z_initialize(path, data)
for s in iterate_lines:
m1 = mysql_line_match(s)
if m1 is none:
raise_unknown_line()
identifier_s = m1.group('identifier')
if identifier_s is not none:
identifier = lookup_identifier(identifier_s)
if identifier is none:
lower = identifier_s.lower()
line('lower: %s', lower)
identifier_start = m1.start('identifier')
line('identifier_start: %d', identifier_start)
line('identifier: %r', identifier)
line('identifier_s: %r', identifier)
comment_start = m1.end('pound_sign')
if comment_start is -1:
#
# '+ 1' due to the required space after --.
#
comment_start = m1.end('dash_dash') + 1
if comment_start is 0: # '0' instead of '-1' due to the '+ 1' above.
append(EmptyLine(s))
continue
comment_end = m1.end('dash_dash_comment')
if comment_end is -1:
append(conjure_comment_newline(s))
continue
append(conjure_tree_comment(s[:comment_start], s[comment_start : comment_end], s[comment_end:]))
continue
comment_end = m1.end('pound_sign_comment')
if comment_end is -1:
append(conjure_comment_newline(s))
continue
append(conjure_tree_comment(s[:comment_start], s[comment_start : comment_end], s[comment_end:]))
continue
if show:
for v in many:
line('%r', v)
with create_StringOutput() as f:
w = f.write
for v in many:
v.write(w)
if data != f.result:
with create_DelayedFileOutput('oops.txt') as oops:
oops.write(f.result)
raise_runtime_error('mismatch on %r: output saved in %r', path, 'oops.txt')
|
@gem('Quartz.Parse1')
def gem():
require_gem('Quartz.Match')
require_gem('Quartz.Core')
show = true
@share
def parse1_mysql_from_path(path):
data = read_text_from_path(path)
many = []
append = many.append
iterate_lines = z_initialize(path, data)
for s in iterate_lines:
m1 = mysql_line_match(s)
if m1 is none:
raise_unknown_line()
identifier_s = m1.group('identifier')
if identifier_s is not none:
identifier = lookup_identifier(identifier_s)
if identifier is none:
lower = identifier_s.lower()
line('lower: %s', lower)
identifier_start = m1.start('identifier')
line('identifier_start: %d', identifier_start)
line('identifier: %r', identifier)
line('identifier_s: %r', identifier)
comment_start = m1.end('pound_sign')
if comment_start is -1:
comment_start = m1.end('dash_dash') + 1
if comment_start is 0:
append(empty_line(s))
continue
comment_end = m1.end('dash_dash_comment')
if comment_end is -1:
append(conjure_comment_newline(s))
continue
append(conjure_tree_comment(s[:comment_start], s[comment_start:comment_end], s[comment_end:]))
continue
comment_end = m1.end('pound_sign_comment')
if comment_end is -1:
append(conjure_comment_newline(s))
continue
append(conjure_tree_comment(s[:comment_start], s[comment_start:comment_end], s[comment_end:]))
continue
if show:
for v in many:
line('%r', v)
with create__string_output() as f:
w = f.write
for v in many:
v.write(w)
if data != f.result:
with create__delayed_file_output('oops.txt') as oops:
oops.write(f.result)
raise_runtime_error('mismatch on %r: output saved in %r', path, 'oops.txt')
|
#!/usr/bin/env python3
"""Front Back.
Given a string, return a new string where the
first and last chars have been exchanged.
front_back('code') == 'eodc'
front_back('a') == 'a'
front_back('ab') == 'ba'
"""
def front_back(str_: str) -> str:
"""Swap the first and last characters of a string."""
if len(str_) > 1:
return f'{str_[-1]}{str_[1:-1]}{str_[0]}'
return str_
if __name__ == "__main__":
assert front_back('code') == 'eodc'
assert front_back('a') == 'a'
assert front_back('ab') == 'ba'
assert front_back('abc') == 'cba'
assert front_back('') == ''
assert front_back('Chocolate') == 'ehocolatC'
assert front_back('aavJ') == 'Java'
assert front_back('hello') == 'oellh'
print('Passed')
|
"""Front Back.
Given a string, return a new string where the
first and last chars have been exchanged.
front_back('code') == 'eodc'
front_back('a') == 'a'
front_back('ab') == 'ba'
"""
def front_back(str_: str) -> str:
"""Swap the first and last characters of a string."""
if len(str_) > 1:
return f'{str_[-1]}{str_[1:-1]}{str_[0]}'
return str_
if __name__ == '__main__':
assert front_back('code') == 'eodc'
assert front_back('a') == 'a'
assert front_back('ab') == 'ba'
assert front_back('abc') == 'cba'
assert front_back('') == ''
assert front_back('Chocolate') == 'ehocolatC'
assert front_back('aavJ') == 'Java'
assert front_back('hello') == 'oellh'
print('Passed')
|
# https://leetcode.com/problems/encode-and-decode-strings/
class Codec:
def encode(self, strs):
"""Encodes a list of strings to a single string.
:type strs: List[str]
:rtype: str
"""
return ''.join(s.replace('|', '||') + ' | ' for s in strs)
def decode(self, s):
"""Decodes a single string to a list of strings.
:type s: str
:rtype: List[str]
"""
return [x.replace('||', '|') for x in s.split(' | ')[:-1]]
# Your Codec object will be instantiated and called as such:
# codec = Codec()
# codec.decode(codec.encode(strs))
|
class Codec:
def encode(self, strs):
"""Encodes a list of strings to a single string.
:type strs: List[str]
:rtype: str
"""
return ''.join((s.replace('|', '||') + ' | ' for s in strs))
def decode(self, s):
"""Decodes a single string to a list of strings.
:type s: str
:rtype: List[str]
"""
return [x.replace('||', '|') for x in s.split(' | ')[:-1]]
|
a = range(2, 10, 2)
b = list(a)
c = [a]
print('')
|
a = range(2, 10, 2)
b = list(a)
c = [a]
print('')
|
# This si a hello worls script
# written in Python
def main():
print("Hello, world")
if __name__ == "__main__":
main()
|
def main():
print('Hello, world')
if __name__ == '__main__':
main()
|
# Your code below:
number_list = range(9)
print(list(number_list))
zero_to_seven = range(8)
print(list(zero_to_seven))
|
number_list = range(9)
print(list(number_list))
zero_to_seven = range(8)
print(list(zero_to_seven))
|
# Solution to problem 6 #
#Student: Niamh O'Leary#
#ID: G00376339#
#Write a program that takes a user input string and outputs every second word#
string = "The quick broen fox jumps over the lazy dog"
even_words = string.split(' ')[::2] #split the original string. Then use slice to select every second word#
# For method and refernces please see accompying README file in GITHUB repository #
|
string = 'The quick broen fox jumps over the lazy dog'
even_words = string.split(' ')[::2]
|
#
# This file is part of pySMT.
#
# Copyright 2014 Andrea Micheli and Marco Gario
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
class Interpolator(object):
def __init__(self):
self._destroyed = False
def binary_interpolant(self, a, b):
"""Returns a binary interpolant for the pair (a, b), if And(a, b) is
unsatisfaiable, or None if And(a, b) is satisfiable.
"""
raise NotImplementedError
def sequence_interpolant(self, formulas):
"""Returns a sequence interpolant for the conjunction of formulas, or
None if the problem is satisfiable.
"""
raise NotImplementedError
def __enter__(self):
"""Manage entering a Context (i.e., with statement)"""
return self
def __exit__(self, exc_type, exc_val, exc_tb):
"""Manage exiting from Context (i.e., with statement)
The default behaviour is to explicitely destroy the interpolator to
free the associated resources.
"""
self.exit()
def exit(self):
"""Destroys the solver and closes associated resources."""
if not self._destroyed:
self._exit()
self._destroyed = True
def _exit(self):
"""Destroys the solver and closes associated resources."""
raise NotImplementedError
|
class Interpolator(object):
def __init__(self):
self._destroyed = False
def binary_interpolant(self, a, b):
"""Returns a binary interpolant for the pair (a, b), if And(a, b) is
unsatisfaiable, or None if And(a, b) is satisfiable.
"""
raise NotImplementedError
def sequence_interpolant(self, formulas):
"""Returns a sequence interpolant for the conjunction of formulas, or
None if the problem is satisfiable.
"""
raise NotImplementedError
def __enter__(self):
"""Manage entering a Context (i.e., with statement)"""
return self
def __exit__(self, exc_type, exc_val, exc_tb):
"""Manage exiting from Context (i.e., with statement)
The default behaviour is to explicitely destroy the interpolator to
free the associated resources.
"""
self.exit()
def exit(self):
"""Destroys the solver and closes associated resources."""
if not self._destroyed:
self._exit()
self._destroyed = True
def _exit(self):
"""Destroys the solver and closes associated resources."""
raise NotImplementedError
|
def left(i):
return 2*i+1
def right(i):
return 2*i+2
def max_heapify(data, size, i):
l = left(i)
r = right(i)
val = data[i]
largest = i
if l < size and data[l] > data[largest]:
largest = l
if r < size and data[r] > data[largest]:
largest = r
if largest != i:
data[largest], data[i] = data[i], data[largest]
max_heapify(data, size, largest)
def build_max_heap(data):
n = len(data)//2-1
for i in range(n, -1, -1):
max_heapify(data, len(data), i)
def heapsort(data, k):
build_max_heap(data)
size = len(data)
for i in range(size-1, k-1, -1):
data[i], data[0] = data[0], data[i]
size -= 1
max_heapify(data, size, 0)
def solution(a, k):
heapsort(a, k)
return a
if __name__ == "__main__":
r = solution([4, 1, 3, 2, 16, 9, 10, 14, 8, 7], 1)
print(r)
|
def left(i):
return 2 * i + 1
def right(i):
return 2 * i + 2
def max_heapify(data, size, i):
l = left(i)
r = right(i)
val = data[i]
largest = i
if l < size and data[l] > data[largest]:
largest = l
if r < size and data[r] > data[largest]:
largest = r
if largest != i:
(data[largest], data[i]) = (data[i], data[largest])
max_heapify(data, size, largest)
def build_max_heap(data):
n = len(data) // 2 - 1
for i in range(n, -1, -1):
max_heapify(data, len(data), i)
def heapsort(data, k):
build_max_heap(data)
size = len(data)
for i in range(size - 1, k - 1, -1):
(data[i], data[0]) = (data[0], data[i])
size -= 1
max_heapify(data, size, 0)
def solution(a, k):
heapsort(a, k)
return a
if __name__ == '__main__':
r = solution([4, 1, 3, 2, 16, 9, 10, 14, 8, 7], 1)
print(r)
|
# Calculate the standard deviation by taking the square root
port_standard_dev = np.sqrt(np.dot(weights.T, np.dot(cov_matrix, weights)))
# Print the results
print(str(np.round(port_standard_dev, 4) * 100) + '%')
|
port_standard_dev = np.sqrt(np.dot(weights.T, np.dot(cov_matrix, weights)))
print(str(np.round(port_standard_dev, 4) * 100) + '%')
|
class Solution:
def diameterOfBinaryTree(self, root: TreeNode) -> int:
if not root:
return 0
self.res = 0
self.dfs(root)
return self.res-1
def dfs(self, root):
if not root:
return 0
left = self.dfs(root.left)
right = self.dfs(root.right)
self.res = max(self.res, left+right+1)
return max(left, right) +1
|
class Solution:
def diameter_of_binary_tree(self, root: TreeNode) -> int:
if not root:
return 0
self.res = 0
self.dfs(root)
return self.res - 1
def dfs(self, root):
if not root:
return 0
left = self.dfs(root.left)
right = self.dfs(root.right)
self.res = max(self.res, left + right + 1)
return max(left, right) + 1
|
def _set_status(task_list, task_name, status):
task = task_list.get_task(task_name)
task.status = status
def done(task_list, args):
_set_status(task_list, args.task, "completed")
return
def start(task_list, args):
_set_status(task_list, args.task, "started")
return
def pause(task_list, args):
_set_status(task_list, args.task, "paused")
return
|
def _set_status(task_list, task_name, status):
task = task_list.get_task(task_name)
task.status = status
def done(task_list, args):
_set_status(task_list, args.task, 'completed')
return
def start(task_list, args):
_set_status(task_list, args.task, 'started')
return
def pause(task_list, args):
_set_status(task_list, args.task, 'paused')
return
|
# coding: utf-8
class ArrayBasedQueue:
def __init__(self):
self.array = []
def __len__(self):
return len(self.array)
def __iter__(self):
for item in self.array:
yield item
# O(1)
def enqueue(self, value):
self.array.append(value)
# O(n)
def dequeue(self):
try:
return self.array.pop(0)
except IndexError:
raise ValueError('queue is empty')
|
class Arraybasedqueue:
def __init__(self):
self.array = []
def __len__(self):
return len(self.array)
def __iter__(self):
for item in self.array:
yield item
def enqueue(self, value):
self.array.append(value)
def dequeue(self):
try:
return self.array.pop(0)
except IndexError:
raise value_error('queue is empty')
|
#1. Create a greeting for your program.
print("\nSimple Name Generator\n")
#2. Ask the user for the city that they grew up in.
#raw_input() for python v2 , input() for python v3
# Make sure the input cursor shows on a new line
raw_input("Press enter : ")
print("\nSimple Name Generator\n")
city = raw_input("What is the name of the city you grew up ? : ")
#3. Ask the user for the name of a pet.
# Make sure the input cursor shows on a new line
family_name = raw_input("What is your family name ? : ")
#4. Combine the name of their city and pet and show them their brand name.
print("The name of your new brand is: \n" + city + " " + family_name )
|
print('\nSimple Name Generator\n')
raw_input('Press enter : ')
print('\nSimple Name Generator\n')
city = raw_input('What is the name of the city you grew up ? : ')
family_name = raw_input('What is your family name ? : ')
print('The name of your new brand is: \n' + city + ' ' + family_name)
|
class Solution:
def solve(self, height, blacklist):
blacklist = set(blacklist)
if height in blacklist: return 0
dp = [[0,1]]
MOD = int(1e9+7)
for i in range(1,height+1):
if height-i in blacklist:
dp.append([0,0])
continue
ans0,ans1 = 0,0
ans0 += dp[i-1][1] if i-1>=0 else 0
ans0 += dp[i-2][1] if i-2>=0 else 0
ans0 += dp[i-4][1] if i-4>=0 else 0
ans0 %= MOD
ans1 += dp[i-1][0] if i-1>=0 else 0
ans1 += dp[i-3][0] if i-3>=0 else 0
ans1 += dp[i-4][0] if i-4>=0 else 0
ans1 %= MOD
dp.append([ans0,ans1])
# print(dp)
return sum(dp[-1])%MOD
|
class Solution:
def solve(self, height, blacklist):
blacklist = set(blacklist)
if height in blacklist:
return 0
dp = [[0, 1]]
mod = int(1000000000.0 + 7)
for i in range(1, height + 1):
if height - i in blacklist:
dp.append([0, 0])
continue
(ans0, ans1) = (0, 0)
ans0 += dp[i - 1][1] if i - 1 >= 0 else 0
ans0 += dp[i - 2][1] if i - 2 >= 0 else 0
ans0 += dp[i - 4][1] if i - 4 >= 0 else 0
ans0 %= MOD
ans1 += dp[i - 1][0] if i - 1 >= 0 else 0
ans1 += dp[i - 3][0] if i - 3 >= 0 else 0
ans1 += dp[i - 4][0] if i - 4 >= 0 else 0
ans1 %= MOD
dp.append([ans0, ans1])
return sum(dp[-1]) % MOD
|
"""
[A. Is it rated?](https://codeforces.com/contest/1331/problem/A)
"""
print("No") # The contest was not rated
|
"""
[A. Is it rated?](https://codeforces.com/contest/1331/problem/A)
"""
print('No')
|
def addFeatureDataStruc(data):
data['LenCarName']=data['car name'].apply(lambda x: len(x.split()))
newFeat=[ 'cylinders', 'displacement', 'horsepower', 'weight','acceleration','lrScore','LenCarName']
return data[newFeat],data[['mpg']]
|
def add_feature_data_struc(data):
data['LenCarName'] = data['car name'].apply(lambda x: len(x.split()))
new_feat = ['cylinders', 'displacement', 'horsepower', 'weight', 'acceleration', 'lrScore', 'LenCarName']
return (data[newFeat], data[['mpg']])
|
#!/usr/bin/env python
# encoding: utf-8
'''
@author: Jason Lee
@license: (C) Copyright @ Jason Lee
@contact: jiansenll@163.com
@file: min_heap.py
@time: 2019/4/29 20:23
@desc:
'''
# please see the comments in max_heap.py
def min_heap(array):
if not array:
return None
length = len(array)
if length == 1:
return array
for i in range(length // 2 - 1, -1, -1):
current_idx = i
temp = array[current_idx]
flag = False
while not flag and 2 * current_idx + 1 < length:
left_idx = 2 * current_idx + 1
idx = left_idx
if left_idx + 1 < length and array[left_idx] > array[left_idx + 1]:
idx = left_idx + 1
if temp > array[idx]:
array[current_idx] = array[idx]
current_idx = idx
else:
flag = True
array[current_idx] = temp
if __name__ == '__main__':
array = [7,6,5,4,3,2,1]
min_heap(array)
print(array)
|
"""
@author: Jason Lee
@license: (C) Copyright @ Jason Lee
@contact: jiansenll@163.com
@file: min_heap.py
@time: 2019/4/29 20:23
@desc:
"""
def min_heap(array):
if not array:
return None
length = len(array)
if length == 1:
return array
for i in range(length // 2 - 1, -1, -1):
current_idx = i
temp = array[current_idx]
flag = False
while not flag and 2 * current_idx + 1 < length:
left_idx = 2 * current_idx + 1
idx = left_idx
if left_idx + 1 < length and array[left_idx] > array[left_idx + 1]:
idx = left_idx + 1
if temp > array[idx]:
array[current_idx] = array[idx]
current_idx = idx
else:
flag = True
array[current_idx] = temp
if __name__ == '__main__':
array = [7, 6, 5, 4, 3, 2, 1]
min_heap(array)
print(array)
|
# -*- coding: utf-8 -*-
#Lists
myList = [1, 2, 3, 4, 5, "Hello"]
print(myList)
print(myList[2])
print(myList[-1])
myList.append("Simo")
print(myList)
#Tuples - like lists, but you cannot modify their values.
monthsOf = ("Jan","Feb","Mar","Apr")
print(monthsOf)
#Dictionary - a collection of related data PAIRS
myDict = {"One":1.35, 2.5:"Two Point Five", 3:"+", 7.9:2}
print(myDict)
del myDict["One"]
print(myDict)
|
my_list = [1, 2, 3, 4, 5, 'Hello']
print(myList)
print(myList[2])
print(myList[-1])
myList.append('Simo')
print(myList)
months_of = ('Jan', 'Feb', 'Mar', 'Apr')
print(monthsOf)
my_dict = {'One': 1.35, 2.5: 'Two Point Five', 3: '+', 7.9: 2}
print(myDict)
del myDict['One']
print(myDict)
|
SCAN_COMMANDS = {'arp', 'arp-scan', 'fping', 'nmap'}
def rule(event):
# Filter out commands
if event['event'] == 'session.command' and not event.get('argv'):
return False
# Check that the program is in our watch list
return event.get('program') in SCAN_COMMANDS
def title(event):
return 'User [{}] has issued a network scan with [{}]'.format(
event.get('user', 'USER_NOT_FOUND'),
event.get('program', 'PROGRAM_NOT_FOUND'))
|
scan_commands = {'arp', 'arp-scan', 'fping', 'nmap'}
def rule(event):
if event['event'] == 'session.command' and (not event.get('argv')):
return False
return event.get('program') in SCAN_COMMANDS
def title(event):
return 'User [{}] has issued a network scan with [{}]'.format(event.get('user', 'USER_NOT_FOUND'), event.get('program', 'PROGRAM_NOT_FOUND'))
|
def getPeopleHarvest(req):
try:
# result = req.get("result")
# username = "pescettoe@amvbbdo.com"
# password = "Welcome1!"
# top_level_url = "https://xlaboration.harvestapp.com/people/1514150"
#
# # create an authorization handler
# p = urllib.request.HTTPPasswordMgrWithDefaultRealm()
# p.add_password(None, top_level_url, username, password);
# auth_handler = urllib.request.HTTPBasicAuthHandler(p)
# opener = urllib.request.build_opener(auth_handler)
# opener.addheaders = [("Authorization", "Basic cGVzY2V0dG9lQGFtdmJiZG8uY29tOldlbGNvbWUxIQ==")]
# opener.addheaders = [("Accept", "application/json")]
# opener.addheaders = [("Content-Type", "application/json")]
# # opener.add_header("Accept", "application/json")
# # opener.add_header("Content-Type", "application/json")
# urllib.request.install_opener(opener)
# result = opener.open(top_level_url)
# a = result.read()
# data = json.loads(a)
# res = makeWebhookHarvestPeople(data)
# return res
q = Request("https://xlaboration.harvestapp.com/people/1514150")
q.add_header("Authorization", "Basic cGVzY2V0dG9lQGFtdmJiZG8uY29tOldlbGNvbWUxIQ==")
q.add_header("Accept", "application/json")
q.add_header("Content-Type", "application/json")
a = urlopen(q).read()
data = json.loads(a)
res = makeWebhookResult(data)
return res
except:
speech = sys.exc_info()[0]
displayText = traceback.print_exc()
print("Response:")
print(speech)
return {
"speech": speech,
"displayText": displayText,
# "data": data,
# "contextOut": [],
"source": "apiai-weather-webhook-sample"
}
|
def get_people_harvest(req):
try:
q = request('https://xlaboration.harvestapp.com/people/1514150')
q.add_header('Authorization', 'Basic cGVzY2V0dG9lQGFtdmJiZG8uY29tOldlbGNvbWUxIQ==')
q.add_header('Accept', 'application/json')
q.add_header('Content-Type', 'application/json')
a = urlopen(q).read()
data = json.loads(a)
res = make_webhook_result(data)
return res
except:
speech = sys.exc_info()[0]
display_text = traceback.print_exc()
print('Response:')
print(speech)
return {'speech': speech, 'displayText': displayText, 'source': 'apiai-weather-webhook-sample'}
|
"""
URL: https://codeforces.com/problemset/problem/1421/A
Author: Safiul Kabir [safiulanik at gmail.com]
Tags: bitmasks, math
"""
t = int(input())
for _ in range(t):
a, b = map(int, input().split())
print(a ^ b)
|
"""
URL: https://codeforces.com/problemset/problem/1421/A
Author: Safiul Kabir [safiulanik at gmail.com]
Tags: bitmasks, math
"""
t = int(input())
for _ in range(t):
(a, b) = map(int, input().split())
print(a ^ b)
|
ASCII = [c for c in (chr(i) for i in range(32, 127))]
def cipher(text, key, decode):
op = ''
for i, j in enumerate(text):
if j not in ASCII:
op += j
else:
text_index = ASCII.index(j)
k = key[i % len(key)]
key_index = ASCII.index(k)
if decode:
key_index *= -1
code = ASCII[(text_index + key_index) % len(ASCII)]
op += code
return op
def main():
print(cipher('Aditya', 'Upadhyay', 0))
print(cipher('vUKYb[', 'Upadhyay', 1))
main()
|
ascii = [c for c in (chr(i) for i in range(32, 127))]
def cipher(text, key, decode):
op = ''
for (i, j) in enumerate(text):
if j not in ASCII:
op += j
else:
text_index = ASCII.index(j)
k = key[i % len(key)]
key_index = ASCII.index(k)
if decode:
key_index *= -1
code = ASCII[(text_index + key_index) % len(ASCII)]
op += code
return op
def main():
print(cipher('Aditya', 'Upadhyay', 0))
print(cipher('vUKYb[', 'Upadhyay', 1))
main()
|
"""This is a 'Hello, world' program."""
def hello():
"""Say, hello."""
print("Hello, World!")
if __name__ == "__main__":
hello()
|
"""This is a 'Hello, world' program."""
def hello():
"""Say, hello."""
print('Hello, World!')
if __name__ == '__main__':
hello()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.