content
stringlengths 7
1.05M
| fixed_cases
stringlengths 1
1.28M
|
---|---|
# settings.py
# sdNum = subdomain number
# p1 = spatial bandwidth
# p2 = temporal bandwidth
# p3 = spatial resolution
# p4 = temporal resolution
# p5 = number of points threshold (T1)
# p6 = buffer ratio threshold (T2)
# dir1 = point files (resulting from decomposition)
# dir2 = time files (resulting from decomposition)
# cList = keeps track of the number of cut circles for each candidate split
# pList = stores the number of times each candidate split was chosen
def init():
global sdNum, p1, p2, p3, p4, p5, p6, dir1, dir2, pList, cList
sdNum, p1, p2, p3, p4, p5, p6, dir1, dir2, pList, cList = 0, 0, 0, 0, 0, 0, 0, 0, 0, [0,0,0,0,0], [0,0,0,0,0]
|
def init():
global sdNum, p1, p2, p3, p4, p5, p6, dir1, dir2, pList, cList
(sd_num, p1, p2, p3, p4, p5, p6, dir1, dir2, p_list, c_list) = (0, 0, 0, 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0], [0, 0, 0, 0, 0])
|
# -*- coding: utf-8 -*-
"""
pip_services_runtime.State
~~~~~~~~~~~~~~~~~~~~~~~~~~
Component state enumeration
:copyright: Digital Living Software Corp. 2015-2016, see AUTHORS for more details.
:license: MIT, see LICENSE for more details.
"""
class State(object):
"""
State in lifecycle of components or the entire microservice
"""
Undefined = -1
"""
Undefined state
"""
Initial = 0
"""
Initial state right after creation
"""
Configured = 1
"""
Configuration was successfully completed
"""
Linked = 2
"""
Links between components were successfully set
"""
Opened = 3
"""
Ready to perform operations
"""
Ready = 3
"""
Ready to perform operations.
This is a duplicate for Opened.
"""
Closed = 4
"""
Closed but can be reopened
"""
|
"""
pip_services_runtime.State
~~~~~~~~~~~~~~~~~~~~~~~~~~
Component state enumeration
:copyright: Digital Living Software Corp. 2015-2016, see AUTHORS for more details.
:license: MIT, see LICENSE for more details.
"""
class State(object):
"""
State in lifecycle of components or the entire microservice
"""
undefined = -1
'\n Undefined state\n '
initial = 0
'\n Initial state right after creation\n '
configured = 1
'\n Configuration was successfully completed\n '
linked = 2
'\n Links between components were successfully set\n '
opened = 3
'\n Ready to perform operations\n '
ready = 3
'\n Ready to perform operations.\n This is a duplicate for Opened. \n '
closed = 4
'\n Closed but can be reopened\n '
|
class AutoTrackConfig:
hog_cell_size=4
hog_n_dim=31
gray_cell_size=4
cn_use_for_gray=False
cn_cell_size=4
cn_n_dim=10
search_area_shape = 'square' # the shape of the samples
search_area_scale = 5.0 # the scaling of the target size to get the search area
min_image_sample_size = 150 ** 2 # minimum area of image samples
max_image_sample_size = 200 ** 2 # maximum area of image samples
feature_downsample_ratio=4
reg_window_max=1e5
reg_window_min=1e-3
# detection parameters
refinement_iterations = 1 # number of iterations used to refine the resulting position in a frame
newton_iterations = 5 # the number of Netwon iterations used for optimizing the detection score
clamp_position = False # clamp the target position to be inside the image
# learning parameters
output_sigma_factor = 0.06 # label function sigma
# ADMM params
max_iterations=3
init_penalty_factor=1
max_penalty_factor=10000
penalty_scale_step=10
admm_lambda=1
epsilon=1
zeta=13
delta=0.2
nu=0.2
# scale parameters
number_of_scales = 33 # number of scales to run the detector
scale_step = 1.03 # the scale factor
use_scale_filter = True # use the fDSST scale filter or not
# scale_type='LP'
# class ScaleConfig:
# learning_rate_scale = 0.015
# scale_sz_window = (64, 64)
#
# scale_config=ScaleConfig()
scale_type = 'normal'
class ScaleConfig:
scale_sigma_factor = 0.5 # scale label function sigma
scale_lambda=0.0001
scale_learning_rate = 0.025 # scale filter learning rate
number_of_scales_filter = 33 # number of scales
number_of_interp_scales = 33 # number of interpolated scales
scale_model_factor = 1.0 # scaling of the scale model
scale_step_filter = 1.03 # the scale factor of the scale sample patch
scale_model_max_area = 32 * 16 # maximume area for the scale sample patch
scale_feature = 'HOG4' # features for the scale filter (only HOG4 supported)
s_num_compressed_dim = 'MAX' # number of compressed feature dimensions in the scale filter
lamBda = 1e-4 # scale filter regularization
do_poly_interp = False
scale_config = ScaleConfig()
#
normalize_power = 2 # Lp normalization with this p
normalize_size = True # also normalize with respect to the spatial size of the feature
normalize_dim = True # also normalize with respect to the dimensionality of the feature
square_root_normalization = False
|
class Autotrackconfig:
hog_cell_size = 4
hog_n_dim = 31
gray_cell_size = 4
cn_use_for_gray = False
cn_cell_size = 4
cn_n_dim = 10
search_area_shape = 'square'
search_area_scale = 5.0
min_image_sample_size = 150 ** 2
max_image_sample_size = 200 ** 2
feature_downsample_ratio = 4
reg_window_max = 100000.0
reg_window_min = 0.001
refinement_iterations = 1
newton_iterations = 5
clamp_position = False
output_sigma_factor = 0.06
max_iterations = 3
init_penalty_factor = 1
max_penalty_factor = 10000
penalty_scale_step = 10
admm_lambda = 1
epsilon = 1
zeta = 13
delta = 0.2
nu = 0.2
number_of_scales = 33
scale_step = 1.03
use_scale_filter = True
scale_type = 'normal'
class Scaleconfig:
scale_sigma_factor = 0.5
scale_lambda = 0.0001
scale_learning_rate = 0.025
number_of_scales_filter = 33
number_of_interp_scales = 33
scale_model_factor = 1.0
scale_step_filter = 1.03
scale_model_max_area = 32 * 16
scale_feature = 'HOG4'
s_num_compressed_dim = 'MAX'
lam_bda = 0.0001
do_poly_interp = False
scale_config = scale_config()
normalize_power = 2
normalize_size = True
normalize_dim = True
square_root_normalization = False
|
#
# PySNMP MIB module TPLINK-DHCPSERVER-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TPLINK-DHCPSERVER-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 21:17:01 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
iso, ModuleIdentity, IpAddress, TimeTicks, Counter32, Gauge32, ObjectIdentity, Bits, Counter64, Integer32, NotificationType, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "ModuleIdentity", "IpAddress", "TimeTicks", "Counter32", "Gauge32", "ObjectIdentity", "Bits", "Counter64", "Integer32", "NotificationType", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
tplinkMgmt, = mibBuilder.importSymbols("TPLINK-MIB", "tplinkMgmt")
TPRowStatus, = mibBuilder.importSymbols("TPLINK-TC-MIB", "TPRowStatus")
tplinkDhcpServerMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 11863, 6, 38))
tplinkDhcpServerMIB.setRevisions(('2012-11-29 00:00',))
if mibBuilder.loadTexts: tplinkDhcpServerMIB.setLastUpdated('201211290000Z')
if mibBuilder.loadTexts: tplinkDhcpServerMIB.setOrganization('TP-LINK')
tplinkDhcpServerMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1))
tplinkDhcpServerNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 38, 2))
tpDhcpServerEnable = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tpDhcpServerEnable.setStatus('current')
tpDhcpServerVendorClassId = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tpDhcpServerVendorClassId.setStatus('current')
tpDhcpServerCapwapAcIp = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 3), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tpDhcpServerCapwapAcIp.setStatus('current')
tpDhcpServerUnusedIpTable = MibTable((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4), )
if mibBuilder.loadTexts: tpDhcpServerUnusedIpTable.setStatus('current')
tpDhcpServerUnusedIpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4, 1), ).setIndexNames((0, "TPLINK-DHCPSERVER-MIB", "tpDhcpServerUnusedStartIp"))
if mibBuilder.loadTexts: tpDhcpServerUnusedIpEntry.setStatus('current')
tpDhcpServerUnusedStartIp = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerUnusedStartIp.setStatus('current')
tpDhcpServerUnusedEndIp = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4, 1, 2), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerUnusedEndIp.setStatus('current')
tpDhcpServerUnusedIpStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4, 1, 3), TPRowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerUnusedIpStatus.setStatus('current')
tpDhcpServerAddrPoolTable = MibTable((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5), )
if mibBuilder.loadTexts: tpDhcpServerAddrPoolTable.setStatus('current')
tpDhcpServerAddrPoolEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1), ).setIndexNames((0, "TPLINK-DHCPSERVER-MIB", "tpDhcpServerAddrPoolNetwork"))
if mibBuilder.loadTexts: tpDhcpServerAddrPoolEntry.setStatus('current')
tpDhcpServerAddrPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 8))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolName.setStatus('current')
tpDhcpServerAddrPoolNetwork = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 2), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolNetwork.setStatus('current')
tpDhcpServerAddrPoolSubnetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 3), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolSubnetMask.setStatus('current')
tpDhcpServerAddrPoolRentTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 4), Integer32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolRentTime.setStatus('current')
tpDhcpServerAddrPoolGateWayA = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 5), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayA.setStatus('current')
tpDhcpServerAddrPoolGateWayB = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 6), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayB.setStatus('current')
tpDhcpServerAddrPoolGateWayC = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 7), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayC.setStatus('current')
tpDhcpServerAddrPoolGateWayD = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 8), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayD.setStatus('current')
tpDhcpServerAddrPoolGateWayE = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 9), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayE.setStatus('current')
tpDhcpServerAddrPoolGateWayF = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 10), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayF.setStatus('current')
tpDhcpServerAddrPoolGateWayG = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 11), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayG.setStatus('current')
tpDhcpServerAddrPoolGateWayH = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 12), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayH.setStatus('current')
tpDhcpServerAddrPoolDnsA = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 13), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsA.setStatus('current')
tpDhcpServerAddrPoolDnsB = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 14), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsB.setStatus('current')
tpDhcpServerAddrPoolDnsC = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 15), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsC.setStatus('current')
tpDhcpServerAddrPoolDnsD = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 16), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsD.setStatus('current')
tpDhcpServerAddrPoolDnsE = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 17), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsE.setStatus('current')
tpDhcpServerAddrPoolDnsF = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 18), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsF.setStatus('current')
tpDhcpServerAddrPoolDnsG = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 19), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsG.setStatus('current')
tpDhcpServerAddrPoolDnsH = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 20), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsH.setStatus('current')
tpDhcpServerAddrPoolNBNServerA = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 21), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerA.setStatus('current')
tpDhcpServerAddrPoolNBNServerB = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 22), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerB.setStatus('current')
tpDhcpServerAddrPoolNBNServerC = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 23), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerC.setStatus('current')
tpDhcpServerAddrPoolNBNServerD = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 24), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerD.setStatus('current')
tpDhcpServerAddrPoolNBNServerE = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 25), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerE.setStatus('current')
tpDhcpServerAddrPoolNBNServerF = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 26), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerF.setStatus('current')
tpDhcpServerAddrPoolNBNServerG = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 27), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerG.setStatus('current')
tpDhcpServerAddrPoolNBNServerH = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 28), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerH.setStatus('current')
tpDhcpServerAddrPoolNetbiosNodeType = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 29), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 4, 8))).clone(namedValues=NamedValues(("none", 0), ("broadcast", 1), ("peer-to-peer", 2), ("mixed", 4), ("hybrid", 8)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolNetbiosNodeType.setStatus('current')
tpDhcpServerAddrPoolNextServer = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 30), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolNextServer.setStatus('current')
tpDhcpServerAddrPoolDomainName = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 31), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 200))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolDomainName.setStatus('current')
tpDhcpServerAddrPoolBootfile = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 32), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolBootfile.setStatus('current')
tpDhcpServerAddrPoolStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 33), TPRowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerAddrPoolStatus.setStatus('current')
tpDhcpServerStaticBindTable = MibTable((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6), )
if mibBuilder.loadTexts: tpDhcpServerStaticBindTable.setStatus('current')
tpDhcpServerStaticBindEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1), ).setIndexNames((0, "TPLINK-DHCPSERVER-MIB", "tpDhcpServerBindIpAddr"))
if mibBuilder.loadTexts: tpDhcpServerStaticBindEntry.setStatus('current')
tpDhcpServerStaticAddrPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 8))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerStaticAddrPoolName.setStatus('current')
tpDhcpServerBindIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 2), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerBindIpAddr.setStatus('current')
tpDhcpServerStaticClientId = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerStaticClientId.setStatus('current')
tpDhcpServerMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerMacAddr.setStatus('current')
tpDhcpServerHardwareType = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(-2, -1, 1, 6))).clone(namedValues=NamedValues(("ascii", -2), ("hex", -1), ("ethernet", 1), ("ieee802", 6)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerHardwareType.setStatus('current')
tpDhcpServerStaticBindStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 6), TPRowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerStaticBindStatus.setStatus('current')
tpDhcpServerBindingTable = MibTable((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7), )
if mibBuilder.loadTexts: tpDhcpServerBindingTable.setStatus('current')
tpDhcpServerBindingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1), ).setIndexNames((0, "TPLINK-DHCPSERVER-MIB", "tpDhcpServerBindingIp"))
if mibBuilder.loadTexts: tpDhcpServerBindingEntry.setStatus('current')
tpDhcpServerBindingIp = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerBindingIp.setStatus('current')
tpDhcpServerBindingClientId = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 200))).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerBindingClientId.setStatus('current')
tpDhcpServerBindingMac = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerBindingMac.setStatus('current')
tpDhcpServerBindingType = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("automatic", 0), ("manual", 1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerBindingType.setStatus('current')
tpDhcpServerBindingRemainTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerBindingRemainTime.setStatus('current')
tpDhcpServerBindingStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 6), TPRowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tpDhcpServerBindingStatus.setStatus('current')
tpDhcpServerBindingClear = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("remain", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tpDhcpServerBindingClear.setStatus('current')
tpDhcpServerStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9))
tpDhcpServerStatisticsBootRequest = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 1), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerStatisticsBootRequest.setStatus('current')
tpDhcpServerStatisticsDiscover = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerStatisticsDiscover.setStatus('current')
tpDhcpServerStatisticsRequest = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerStatisticsRequest.setStatus('current')
tpDhcpServerStatisticsDecline = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerStatisticsDecline.setStatus('current')
tpDhcpServerStatisticsRelease = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerStatisticsRelease.setStatus('current')
tpDhcpServerStatisticsInform = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerStatisticsInform.setStatus('current')
tpDhcpServerStatisticsBootReply = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerStatisticsBootReply.setStatus('current')
tpDhcpServerStatisticsOffer = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 8), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerStatisticsOffer.setStatus('current')
tpDhcpServerStatisticsAck = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 9), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerStatisticsAck.setStatus('current')
tpDhcpServerStatisticsNak = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 10), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tpDhcpServerStatisticsNak.setStatus('current')
tpDhcpServerStatisticsClear = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("remain", 0), ("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tpDhcpServerStatisticsClear.setStatus('current')
tpDhcpServerPingPackets = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tpDhcpServerPingPackets.setStatus('current')
tpDhcpServerPingTimeout = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(100, 10000))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tpDhcpServerPingTimeout.setStatus('current')
mibBuilder.exportSymbols("TPLINK-DHCPSERVER-MIB", tplinkDhcpServerMIB=tplinkDhcpServerMIB, tpDhcpServerMacAddr=tpDhcpServerMacAddr, tpDhcpServerAddrPoolNetbiosNodeType=tpDhcpServerAddrPoolNetbiosNodeType, tpDhcpServerAddrPoolBootfile=tpDhcpServerAddrPoolBootfile, tpDhcpServerBindingEntry=tpDhcpServerBindingEntry, tpDhcpServerUnusedIpEntry=tpDhcpServerUnusedIpEntry, tpDhcpServerAddrPoolNetwork=tpDhcpServerAddrPoolNetwork, tpDhcpServerStatisticsDecline=tpDhcpServerStatisticsDecline, tpDhcpServerAddrPoolGateWayF=tpDhcpServerAddrPoolGateWayF, tpDhcpServerAddrPoolNBNServerG=tpDhcpServerAddrPoolNBNServerG, tpDhcpServerAddrPoolDomainName=tpDhcpServerAddrPoolDomainName, tpDhcpServerStaticBindTable=tpDhcpServerStaticBindTable, tpDhcpServerAddrPoolGateWayA=tpDhcpServerAddrPoolGateWayA, tpDhcpServerAddrPoolGateWayB=tpDhcpServerAddrPoolGateWayB, tpDhcpServerAddrPoolStatus=tpDhcpServerAddrPoolStatus, tpDhcpServerAddrPoolEntry=tpDhcpServerAddrPoolEntry, tpDhcpServerUnusedStartIp=tpDhcpServerUnusedStartIp, tpDhcpServerAddrPoolDnsH=tpDhcpServerAddrPoolDnsH, tpDhcpServerAddrPoolSubnetMask=tpDhcpServerAddrPoolSubnetMask, tpDhcpServerAddrPoolNBNServerB=tpDhcpServerAddrPoolNBNServerB, tpDhcpServerAddrPoolGateWayD=tpDhcpServerAddrPoolGateWayD, tpDhcpServerUnusedIpStatus=tpDhcpServerUnusedIpStatus, tpDhcpServerStatisticsOffer=tpDhcpServerStatisticsOffer, tpDhcpServerStaticClientId=tpDhcpServerStaticClientId, tpDhcpServerAddrPoolNextServer=tpDhcpServerAddrPoolNextServer, tpDhcpServerStatisticsBootReply=tpDhcpServerStatisticsBootReply, tpDhcpServerStatisticsDiscover=tpDhcpServerStatisticsDiscover, tpDhcpServerUnusedEndIp=tpDhcpServerUnusedEndIp, tpDhcpServerStaticBindStatus=tpDhcpServerStaticBindStatus, tpDhcpServerAddrPoolDnsD=tpDhcpServerAddrPoolDnsD, tpDhcpServerStatisticsAck=tpDhcpServerStatisticsAck, tpDhcpServerStatisticsBootRequest=tpDhcpServerStatisticsBootRequest, tpDhcpServerBindingIp=tpDhcpServerBindingIp, tplinkDhcpServerMIBObjects=tplinkDhcpServerMIBObjects, tpDhcpServerAddrPoolGateWayH=tpDhcpServerAddrPoolGateWayH, PYSNMP_MODULE_ID=tplinkDhcpServerMIB, tpDhcpServerAddrPoolDnsC=tpDhcpServerAddrPoolDnsC, tpDhcpServerStatistics=tpDhcpServerStatistics, tpDhcpServerBindingMac=tpDhcpServerBindingMac, tplinkDhcpServerNotifications=tplinkDhcpServerNotifications, tpDhcpServerBindingStatus=tpDhcpServerBindingStatus, tpDhcpServerStatisticsNak=tpDhcpServerStatisticsNak, tpDhcpServerAddrPoolNBNServerE=tpDhcpServerAddrPoolNBNServerE, tpDhcpServerBindingType=tpDhcpServerBindingType, tpDhcpServerBindingTable=tpDhcpServerBindingTable, tpDhcpServerAddrPoolDnsA=tpDhcpServerAddrPoolDnsA, tpDhcpServerAddrPoolDnsB=tpDhcpServerAddrPoolDnsB, tpDhcpServerAddrPoolNBNServerC=tpDhcpServerAddrPoolNBNServerC, tpDhcpServerStaticAddrPoolName=tpDhcpServerStaticAddrPoolName, tpDhcpServerBindingClear=tpDhcpServerBindingClear, tpDhcpServerAddrPoolGateWayE=tpDhcpServerAddrPoolGateWayE, tpDhcpServerEnable=tpDhcpServerEnable, tpDhcpServerAddrPoolDnsE=tpDhcpServerAddrPoolDnsE, tpDhcpServerStatisticsInform=tpDhcpServerStatisticsInform, tpDhcpServerPingTimeout=tpDhcpServerPingTimeout, tpDhcpServerAddrPoolGateWayC=tpDhcpServerAddrPoolGateWayC, tpDhcpServerStaticBindEntry=tpDhcpServerStaticBindEntry, tpDhcpServerAddrPoolTable=tpDhcpServerAddrPoolTable, tpDhcpServerAddrPoolNBNServerA=tpDhcpServerAddrPoolNBNServerA, tpDhcpServerAddrPoolName=tpDhcpServerAddrPoolName, tpDhcpServerStatisticsClear=tpDhcpServerStatisticsClear, tpDhcpServerAddrPoolDnsG=tpDhcpServerAddrPoolDnsG, tpDhcpServerBindingClientId=tpDhcpServerBindingClientId, tpDhcpServerBindIpAddr=tpDhcpServerBindIpAddr, tpDhcpServerCapwapAcIp=tpDhcpServerCapwapAcIp, tpDhcpServerUnusedIpTable=tpDhcpServerUnusedIpTable, tpDhcpServerStatisticsRelease=tpDhcpServerStatisticsRelease, tpDhcpServerAddrPoolNBNServerH=tpDhcpServerAddrPoolNBNServerH, tpDhcpServerStatisticsRequest=tpDhcpServerStatisticsRequest, tpDhcpServerAddrPoolDnsF=tpDhcpServerAddrPoolDnsF, tpDhcpServerVendorClassId=tpDhcpServerVendorClassId, tpDhcpServerHardwareType=tpDhcpServerHardwareType, tpDhcpServerAddrPoolNBNServerF=tpDhcpServerAddrPoolNBNServerF, tpDhcpServerAddrPoolRentTime=tpDhcpServerAddrPoolRentTime, tpDhcpServerBindingRemainTime=tpDhcpServerBindingRemainTime, tpDhcpServerPingPackets=tpDhcpServerPingPackets, tpDhcpServerAddrPoolGateWayG=tpDhcpServerAddrPoolGateWayG, tpDhcpServerAddrPoolNBNServerD=tpDhcpServerAddrPoolNBNServerD)
|
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_range_constraint, constraints_intersection, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(iso, module_identity, ip_address, time_ticks, counter32, gauge32, object_identity, bits, counter64, integer32, notification_type, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'ModuleIdentity', 'IpAddress', 'TimeTicks', 'Counter32', 'Gauge32', 'ObjectIdentity', 'Bits', 'Counter64', 'Integer32', 'NotificationType', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Unsigned32')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
(tplink_mgmt,) = mibBuilder.importSymbols('TPLINK-MIB', 'tplinkMgmt')
(tp_row_status,) = mibBuilder.importSymbols('TPLINK-TC-MIB', 'TPRowStatus')
tplink_dhcp_server_mib = module_identity((1, 3, 6, 1, 4, 1, 11863, 6, 38))
tplinkDhcpServerMIB.setRevisions(('2012-11-29 00:00',))
if mibBuilder.loadTexts:
tplinkDhcpServerMIB.setLastUpdated('201211290000Z')
if mibBuilder.loadTexts:
tplinkDhcpServerMIB.setOrganization('TP-LINK')
tplink_dhcp_server_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1))
tplink_dhcp_server_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 11863, 6, 38, 2))
tp_dhcp_server_enable = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disable', 0), ('enable', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tpDhcpServerEnable.setStatus('current')
tp_dhcp_server_vendor_class_id = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tpDhcpServerVendorClassId.setStatus('current')
tp_dhcp_server_capwap_ac_ip = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 3), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tpDhcpServerCapwapAcIp.setStatus('current')
tp_dhcp_server_unused_ip_table = mib_table((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4))
if mibBuilder.loadTexts:
tpDhcpServerUnusedIpTable.setStatus('current')
tp_dhcp_server_unused_ip_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4, 1)).setIndexNames((0, 'TPLINK-DHCPSERVER-MIB', 'tpDhcpServerUnusedStartIp'))
if mibBuilder.loadTexts:
tpDhcpServerUnusedIpEntry.setStatus('current')
tp_dhcp_server_unused_start_ip = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4, 1, 1), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerUnusedStartIp.setStatus('current')
tp_dhcp_server_unused_end_ip = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4, 1, 2), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerUnusedEndIp.setStatus('current')
tp_dhcp_server_unused_ip_status = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4, 1, 3), tp_row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerUnusedIpStatus.setStatus('current')
tp_dhcp_server_addr_pool_table = mib_table((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5))
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolTable.setStatus('current')
tp_dhcp_server_addr_pool_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1)).setIndexNames((0, 'TPLINK-DHCPSERVER-MIB', 'tpDhcpServerAddrPoolNetwork'))
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolEntry.setStatus('current')
tp_dhcp_server_addr_pool_name = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 8))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolName.setStatus('current')
tp_dhcp_server_addr_pool_network = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 2), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolNetwork.setStatus('current')
tp_dhcp_server_addr_pool_subnet_mask = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 3), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolSubnetMask.setStatus('current')
tp_dhcp_server_addr_pool_rent_time = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 4), integer32()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolRentTime.setStatus('current')
tp_dhcp_server_addr_pool_gate_way_a = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 5), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolGateWayA.setStatus('current')
tp_dhcp_server_addr_pool_gate_way_b = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 6), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolGateWayB.setStatus('current')
tp_dhcp_server_addr_pool_gate_way_c = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 7), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolGateWayC.setStatus('current')
tp_dhcp_server_addr_pool_gate_way_d = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 8), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolGateWayD.setStatus('current')
tp_dhcp_server_addr_pool_gate_way_e = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 9), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolGateWayE.setStatus('current')
tp_dhcp_server_addr_pool_gate_way_f = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 10), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolGateWayF.setStatus('current')
tp_dhcp_server_addr_pool_gate_way_g = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 11), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolGateWayG.setStatus('current')
tp_dhcp_server_addr_pool_gate_way_h = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 12), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolGateWayH.setStatus('current')
tp_dhcp_server_addr_pool_dns_a = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 13), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolDnsA.setStatus('current')
tp_dhcp_server_addr_pool_dns_b = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 14), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolDnsB.setStatus('current')
tp_dhcp_server_addr_pool_dns_c = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 15), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolDnsC.setStatus('current')
tp_dhcp_server_addr_pool_dns_d = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 16), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolDnsD.setStatus('current')
tp_dhcp_server_addr_pool_dns_e = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 17), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolDnsE.setStatus('current')
tp_dhcp_server_addr_pool_dns_f = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 18), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolDnsF.setStatus('current')
tp_dhcp_server_addr_pool_dns_g = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 19), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolDnsG.setStatus('current')
tp_dhcp_server_addr_pool_dns_h = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 20), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolDnsH.setStatus('current')
tp_dhcp_server_addr_pool_nbn_server_a = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 21), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolNBNServerA.setStatus('current')
tp_dhcp_server_addr_pool_nbn_server_b = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 22), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolNBNServerB.setStatus('current')
tp_dhcp_server_addr_pool_nbn_server_c = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 23), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolNBNServerC.setStatus('current')
tp_dhcp_server_addr_pool_nbn_server_d = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 24), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolNBNServerD.setStatus('current')
tp_dhcp_server_addr_pool_nbn_server_e = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 25), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolNBNServerE.setStatus('current')
tp_dhcp_server_addr_pool_nbn_server_f = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 26), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolNBNServerF.setStatus('current')
tp_dhcp_server_addr_pool_nbn_server_g = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 27), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolNBNServerG.setStatus('current')
tp_dhcp_server_addr_pool_nbn_server_h = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 28), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolNBNServerH.setStatus('current')
tp_dhcp_server_addr_pool_netbios_node_type = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 29), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 4, 8))).clone(namedValues=named_values(('none', 0), ('broadcast', 1), ('peer-to-peer', 2), ('mixed', 4), ('hybrid', 8)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolNetbiosNodeType.setStatus('current')
tp_dhcp_server_addr_pool_next_server = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 30), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolNextServer.setStatus('current')
tp_dhcp_server_addr_pool_domain_name = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 31), octet_string().subtype(subtypeSpec=value_size_constraint(0, 200))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolDomainName.setStatus('current')
tp_dhcp_server_addr_pool_bootfile = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 32), octet_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolBootfile.setStatus('current')
tp_dhcp_server_addr_pool_status = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 33), tp_row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerAddrPoolStatus.setStatus('current')
tp_dhcp_server_static_bind_table = mib_table((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6))
if mibBuilder.loadTexts:
tpDhcpServerStaticBindTable.setStatus('current')
tp_dhcp_server_static_bind_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1)).setIndexNames((0, 'TPLINK-DHCPSERVER-MIB', 'tpDhcpServerBindIpAddr'))
if mibBuilder.loadTexts:
tpDhcpServerStaticBindEntry.setStatus('current')
tp_dhcp_server_static_addr_pool_name = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 8))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerStaticAddrPoolName.setStatus('current')
tp_dhcp_server_bind_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 2), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerBindIpAddr.setStatus('current')
tp_dhcp_server_static_client_id = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerStaticClientId.setStatus('current')
tp_dhcp_server_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerMacAddr.setStatus('current')
tp_dhcp_server_hardware_type = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(-2, -1, 1, 6))).clone(namedValues=named_values(('ascii', -2), ('hex', -1), ('ethernet', 1), ('ieee802', 6)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerHardwareType.setStatus('current')
tp_dhcp_server_static_bind_status = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 6), tp_row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerStaticBindStatus.setStatus('current')
tp_dhcp_server_binding_table = mib_table((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7))
if mibBuilder.loadTexts:
tpDhcpServerBindingTable.setStatus('current')
tp_dhcp_server_binding_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1)).setIndexNames((0, 'TPLINK-DHCPSERVER-MIB', 'tpDhcpServerBindingIp'))
if mibBuilder.loadTexts:
tpDhcpServerBindingEntry.setStatus('current')
tp_dhcp_server_binding_ip = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 1), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerBindingIp.setStatus('current')
tp_dhcp_server_binding_client_id = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(0, 200))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerBindingClientId.setStatus('current')
tp_dhcp_server_binding_mac = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerBindingMac.setStatus('current')
tp_dhcp_server_binding_type = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('automatic', 0), ('manual', 1)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerBindingType.setStatus('current')
tp_dhcp_server_binding_remain_time = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerBindingRemainTime.setStatus('current')
tp_dhcp_server_binding_status = mib_table_column((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 6), tp_row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
tpDhcpServerBindingStatus.setStatus('current')
tp_dhcp_server_binding_clear = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('remain', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tpDhcpServerBindingClear.setStatus('current')
tp_dhcp_server_statistics = mib_identifier((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9))
tp_dhcp_server_statistics_boot_request = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 1), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerStatisticsBootRequest.setStatus('current')
tp_dhcp_server_statistics_discover = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 2), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerStatisticsDiscover.setStatus('current')
tp_dhcp_server_statistics_request = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerStatisticsRequest.setStatus('current')
tp_dhcp_server_statistics_decline = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerStatisticsDecline.setStatus('current')
tp_dhcp_server_statistics_release = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerStatisticsRelease.setStatus('current')
tp_dhcp_server_statistics_inform = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 6), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerStatisticsInform.setStatus('current')
tp_dhcp_server_statistics_boot_reply = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 7), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerStatisticsBootReply.setStatus('current')
tp_dhcp_server_statistics_offer = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 8), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerStatisticsOffer.setStatus('current')
tp_dhcp_server_statistics_ack = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 9), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerStatisticsAck.setStatus('current')
tp_dhcp_server_statistics_nak = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 10), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tpDhcpServerStatisticsNak.setStatus('current')
tp_dhcp_server_statistics_clear = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('remain', 0), ('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tpDhcpServerStatisticsClear.setStatus('current')
tp_dhcp_server_ping_packets = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 10))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tpDhcpServerPingPackets.setStatus('current')
tp_dhcp_server_ping_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(100, 10000))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tpDhcpServerPingTimeout.setStatus('current')
mibBuilder.exportSymbols('TPLINK-DHCPSERVER-MIB', tplinkDhcpServerMIB=tplinkDhcpServerMIB, tpDhcpServerMacAddr=tpDhcpServerMacAddr, tpDhcpServerAddrPoolNetbiosNodeType=tpDhcpServerAddrPoolNetbiosNodeType, tpDhcpServerAddrPoolBootfile=tpDhcpServerAddrPoolBootfile, tpDhcpServerBindingEntry=tpDhcpServerBindingEntry, tpDhcpServerUnusedIpEntry=tpDhcpServerUnusedIpEntry, tpDhcpServerAddrPoolNetwork=tpDhcpServerAddrPoolNetwork, tpDhcpServerStatisticsDecline=tpDhcpServerStatisticsDecline, tpDhcpServerAddrPoolGateWayF=tpDhcpServerAddrPoolGateWayF, tpDhcpServerAddrPoolNBNServerG=tpDhcpServerAddrPoolNBNServerG, tpDhcpServerAddrPoolDomainName=tpDhcpServerAddrPoolDomainName, tpDhcpServerStaticBindTable=tpDhcpServerStaticBindTable, tpDhcpServerAddrPoolGateWayA=tpDhcpServerAddrPoolGateWayA, tpDhcpServerAddrPoolGateWayB=tpDhcpServerAddrPoolGateWayB, tpDhcpServerAddrPoolStatus=tpDhcpServerAddrPoolStatus, tpDhcpServerAddrPoolEntry=tpDhcpServerAddrPoolEntry, tpDhcpServerUnusedStartIp=tpDhcpServerUnusedStartIp, tpDhcpServerAddrPoolDnsH=tpDhcpServerAddrPoolDnsH, tpDhcpServerAddrPoolSubnetMask=tpDhcpServerAddrPoolSubnetMask, tpDhcpServerAddrPoolNBNServerB=tpDhcpServerAddrPoolNBNServerB, tpDhcpServerAddrPoolGateWayD=tpDhcpServerAddrPoolGateWayD, tpDhcpServerUnusedIpStatus=tpDhcpServerUnusedIpStatus, tpDhcpServerStatisticsOffer=tpDhcpServerStatisticsOffer, tpDhcpServerStaticClientId=tpDhcpServerStaticClientId, tpDhcpServerAddrPoolNextServer=tpDhcpServerAddrPoolNextServer, tpDhcpServerStatisticsBootReply=tpDhcpServerStatisticsBootReply, tpDhcpServerStatisticsDiscover=tpDhcpServerStatisticsDiscover, tpDhcpServerUnusedEndIp=tpDhcpServerUnusedEndIp, tpDhcpServerStaticBindStatus=tpDhcpServerStaticBindStatus, tpDhcpServerAddrPoolDnsD=tpDhcpServerAddrPoolDnsD, tpDhcpServerStatisticsAck=tpDhcpServerStatisticsAck, tpDhcpServerStatisticsBootRequest=tpDhcpServerStatisticsBootRequest, tpDhcpServerBindingIp=tpDhcpServerBindingIp, tplinkDhcpServerMIBObjects=tplinkDhcpServerMIBObjects, tpDhcpServerAddrPoolGateWayH=tpDhcpServerAddrPoolGateWayH, PYSNMP_MODULE_ID=tplinkDhcpServerMIB, tpDhcpServerAddrPoolDnsC=tpDhcpServerAddrPoolDnsC, tpDhcpServerStatistics=tpDhcpServerStatistics, tpDhcpServerBindingMac=tpDhcpServerBindingMac, tplinkDhcpServerNotifications=tplinkDhcpServerNotifications, tpDhcpServerBindingStatus=tpDhcpServerBindingStatus, tpDhcpServerStatisticsNak=tpDhcpServerStatisticsNak, tpDhcpServerAddrPoolNBNServerE=tpDhcpServerAddrPoolNBNServerE, tpDhcpServerBindingType=tpDhcpServerBindingType, tpDhcpServerBindingTable=tpDhcpServerBindingTable, tpDhcpServerAddrPoolDnsA=tpDhcpServerAddrPoolDnsA, tpDhcpServerAddrPoolDnsB=tpDhcpServerAddrPoolDnsB, tpDhcpServerAddrPoolNBNServerC=tpDhcpServerAddrPoolNBNServerC, tpDhcpServerStaticAddrPoolName=tpDhcpServerStaticAddrPoolName, tpDhcpServerBindingClear=tpDhcpServerBindingClear, tpDhcpServerAddrPoolGateWayE=tpDhcpServerAddrPoolGateWayE, tpDhcpServerEnable=tpDhcpServerEnable, tpDhcpServerAddrPoolDnsE=tpDhcpServerAddrPoolDnsE, tpDhcpServerStatisticsInform=tpDhcpServerStatisticsInform, tpDhcpServerPingTimeout=tpDhcpServerPingTimeout, tpDhcpServerAddrPoolGateWayC=tpDhcpServerAddrPoolGateWayC, tpDhcpServerStaticBindEntry=tpDhcpServerStaticBindEntry, tpDhcpServerAddrPoolTable=tpDhcpServerAddrPoolTable, tpDhcpServerAddrPoolNBNServerA=tpDhcpServerAddrPoolNBNServerA, tpDhcpServerAddrPoolName=tpDhcpServerAddrPoolName, tpDhcpServerStatisticsClear=tpDhcpServerStatisticsClear, tpDhcpServerAddrPoolDnsG=tpDhcpServerAddrPoolDnsG, tpDhcpServerBindingClientId=tpDhcpServerBindingClientId, tpDhcpServerBindIpAddr=tpDhcpServerBindIpAddr, tpDhcpServerCapwapAcIp=tpDhcpServerCapwapAcIp, tpDhcpServerUnusedIpTable=tpDhcpServerUnusedIpTable, tpDhcpServerStatisticsRelease=tpDhcpServerStatisticsRelease, tpDhcpServerAddrPoolNBNServerH=tpDhcpServerAddrPoolNBNServerH, tpDhcpServerStatisticsRequest=tpDhcpServerStatisticsRequest, tpDhcpServerAddrPoolDnsF=tpDhcpServerAddrPoolDnsF, tpDhcpServerVendorClassId=tpDhcpServerVendorClassId, tpDhcpServerHardwareType=tpDhcpServerHardwareType, tpDhcpServerAddrPoolNBNServerF=tpDhcpServerAddrPoolNBNServerF, tpDhcpServerAddrPoolRentTime=tpDhcpServerAddrPoolRentTime, tpDhcpServerBindingRemainTime=tpDhcpServerBindingRemainTime, tpDhcpServerPingPackets=tpDhcpServerPingPackets, tpDhcpServerAddrPoolGateWayG=tpDhcpServerAddrPoolGateWayG, tpDhcpServerAddrPoolNBNServerD=tpDhcpServerAddrPoolNBNServerD)
|
print('first')
print('second')
if True:
x = 1
y = 2
print('hi')
|
print('first')
print('second')
if True:
x = 1
y = 2
print('hi')
|
'''
sekarang kita menghitung bunganya! ooh ya,
apakah anda tahu bahwa kita bisa merantai perhitungan
seperti ini
jawaban = 2000 * /100
kita buat hal serupa di sini
'''
'''
ciptakan variabel suku_bunga dan berikan nilai
antara 5 hingga 30
-ciptakan juga varibel jumlah_bunga yang merupakan
hasil perkalian sisa_cicilan dan suku_bunga
dan di bagi 100
kenapa dibagi 100?
>>>karena suku bunga satuannya adalah persen
'''
harga_laptop = 5000000
uang_muka = 1000000
sisa_cicilan = harga_laptop - uang_muka
suku_bunga = 20
jumlah_bunga = sisa_cicilan * suku_bunga /100
print(jumlah_bunga)
|
"""
sekarang kita menghitung bunganya! ooh ya,
apakah anda tahu bahwa kita bisa merantai perhitungan
seperti ini
jawaban = 2000 * /100
kita buat hal serupa di sini
"""
'\nciptakan variabel suku_bunga dan berikan nilai\nantara 5 hingga 30\n-ciptakan juga varibel jumlah_bunga yang merupakan\nhasil perkalian sisa_cicilan dan suku_bunga \ndan di bagi 100\nkenapa dibagi 100?\n>>>karena suku bunga satuannya adalah persen\n'
harga_laptop = 5000000
uang_muka = 1000000
sisa_cicilan = harga_laptop - uang_muka
suku_bunga = 20
jumlah_bunga = sisa_cicilan * suku_bunga / 100
print(jumlah_bunga)
|
# Title : Insert new element before each element
# Author : Kiran raj R.
# Date : 23:10:2020
def insert_b4(list_in, str_elem):
out = [elem for list_elem in list_in for elem in (str_elem, list_elem)]
print(f"After inserting element: {out}")
def insert_after(list_in, str_elem):
out = [elem for list_elem in list_in for elem in (list_elem, str_elem)]
print(f"After inserting element: {out}")
insert_b4([1, 2, 3, 4, 5], "$")
insert_after([1, 2, 3, 4, 5], "#")
|
def insert_b4(list_in, str_elem):
out = [elem for list_elem in list_in for elem in (str_elem, list_elem)]
print(f'After inserting element: {out}')
def insert_after(list_in, str_elem):
out = [elem for list_elem in list_in for elem in (list_elem, str_elem)]
print(f'After inserting element: {out}')
insert_b4([1, 2, 3, 4, 5], '$')
insert_after([1, 2, 3, 4, 5], '#')
|
NOP = 0
RD = 1
WR = 2
class mmiodev(object):
def __init__(self):
self.regmap = {}
self.regidx = {}
def addReg(self, name, addr, length, readonly=0, default=0):
# make sure it doesn't overlap with anything.
for (a0,a1) in self.regmap:
assert addr < a0 or addr >= a1
assert name not in self.regidx
self.regmap[(addr, addr+length)] = (name, length, readonly, [default]*length)
self.regidx[name] = (addr, addr+length)
def read(self, addr):
assert addr >= 0 and addr <= 65536
for (a0, a1) in self.regmap:
if addr >= a0 and addr < a1:
(name, length, readonly, data) = self.regmap[(a0, a1)]
offset = addr-a0
return True, data[offset]
return False, 0
def write(self, addr, byte):
assert addr >= 0 and addr <= 65536
for (a0, a1) in self.regmap:
if addr >= a0 and addr < a1:
(name, length, readonly, data) = self.regmap[(a0, a1)]
if not readonly:
offset = addr-a0
data[offset] = byte
def getRegB(self, name):
(a0, a1) = self.regidx[name]
(name, length, readonly, data) = self.regmap[(a0, a1)]
return data
def getRegI(self, name):
(a0, a1) = self.regidx[name]
(name, length, readonly, data) = self.regmap[(a0, a1)]
m, v = 1, 0
for i in xrange(length):
v = v + m * data[i]
m = m * 0x100
return v
def setRegI(self, name, datain):
(a0, a1) = self.regidx[name]
(name, length, readonly, data) = self.regmap[(a0, a1)]
data = []
for i in xrange(length):
data.append(datain & 0xFF)
datain = datain >> 8
self.regmap[(a0, a1)] = (name, length, readonly, data)
def setRegB(self, name, datain):
(a0, a1) = self.regidx[name]
(name, length, readonly, data) = self.regmap[(a0, a1)]
assert len(datain) == length
self.regmap[(a0, a1)] = (name, length, readonly, datain)
|
nop = 0
rd = 1
wr = 2
class Mmiodev(object):
def __init__(self):
self.regmap = {}
self.regidx = {}
def add_reg(self, name, addr, length, readonly=0, default=0):
for (a0, a1) in self.regmap:
assert addr < a0 or addr >= a1
assert name not in self.regidx
self.regmap[addr, addr + length] = (name, length, readonly, [default] * length)
self.regidx[name] = (addr, addr + length)
def read(self, addr):
assert addr >= 0 and addr <= 65536
for (a0, a1) in self.regmap:
if addr >= a0 and addr < a1:
(name, length, readonly, data) = self.regmap[a0, a1]
offset = addr - a0
return (True, data[offset])
return (False, 0)
def write(self, addr, byte):
assert addr >= 0 and addr <= 65536
for (a0, a1) in self.regmap:
if addr >= a0 and addr < a1:
(name, length, readonly, data) = self.regmap[a0, a1]
if not readonly:
offset = addr - a0
data[offset] = byte
def get_reg_b(self, name):
(a0, a1) = self.regidx[name]
(name, length, readonly, data) = self.regmap[a0, a1]
return data
def get_reg_i(self, name):
(a0, a1) = self.regidx[name]
(name, length, readonly, data) = self.regmap[a0, a1]
(m, v) = (1, 0)
for i in xrange(length):
v = v + m * data[i]
m = m * 256
return v
def set_reg_i(self, name, datain):
(a0, a1) = self.regidx[name]
(name, length, readonly, data) = self.regmap[a0, a1]
data = []
for i in xrange(length):
data.append(datain & 255)
datain = datain >> 8
self.regmap[a0, a1] = (name, length, readonly, data)
def set_reg_b(self, name, datain):
(a0, a1) = self.regidx[name]
(name, length, readonly, data) = self.regmap[a0, a1]
assert len(datain) == length
self.regmap[a0, a1] = (name, length, readonly, datain)
|
def of(n, acc1=0, acc2=1):
if n < 0:
raise ValueError
if n == 0:
return 0
elif n <= 1:
return acc2
else:
return of(n - 1, acc2, acc1 + acc2)
|
def of(n, acc1=0, acc2=1):
if n < 0:
raise ValueError
if n == 0:
return 0
elif n <= 1:
return acc2
else:
return of(n - 1, acc2, acc1 + acc2)
|
#!/usr/bin/python3
# Create a file and call it lyrics.txt (it does not need to have any content)
# Create a new file and call it songs.docx and in this file write 3 lines
# of text to it.
# Open and read the content and write it to your terminal
# window. * you should use the read(), readline(), and readlines()
# methods for this. (so 3 times the same output).
# from typing import TextIO
songs_dox = "../files/songs.docx"
def separator(text):
print(f"\n#----- Reading from songs.docx with {text} -----#\n")
lyricsFile = open("../files/lyrics.txt", "w+")
print("lyrics.txt has been created in folder files,",
"any previous data has been deleted")
lyricsFile.close()
songsFile = open(songs_dox, "w+")
songsFile.write("This is the first line of the file.\n")
songsFile.write("And this is the second line of the file.\n")
songsFile.write("Ths is the third and final line of the file,",
"I hope you enjoyed your stay.\n")
print("songs.docx has been created and overwritten")
songsFile.close()
# read()
separator("read()")
songsFile = open(songs_dox, "r")
if songsFile.mode == "r":
text = songsFile.read()
print(text)
songsFile.close()
# readline()
separator("readline()")
songsFile = open(songs_dox, "r")
if songsFile.mode == "r":
text = songsFile.readline()
while text:
# printline adds a \n char so i want to remove my old one
print(text.replace("\n", ""))
text = songsFile.readline()
songsFile.close()
# readlines()
separator("readlines()")
songsFile = open(songs_dox, "r")
if songsFile.mode == "r":
text = songsFile.readlines()
for x in text:
x = x.replace("\n", "")
print(x)
songsFile.close()
|
songs_dox = '../files/songs.docx'
def separator(text):
print(f'\n#----- Reading from songs.docx with {text} -----#\n')
lyrics_file = open('../files/lyrics.txt', 'w+')
print('lyrics.txt has been created in folder files,', 'any previous data has been deleted')
lyricsFile.close()
songs_file = open(songs_dox, 'w+')
songsFile.write('This is the first line of the file.\n')
songsFile.write('And this is the second line of the file.\n')
songsFile.write('Ths is the third and final line of the file,', 'I hope you enjoyed your stay.\n')
print('songs.docx has been created and overwritten')
songsFile.close()
separator('read()')
songs_file = open(songs_dox, 'r')
if songsFile.mode == 'r':
text = songsFile.read()
print(text)
songsFile.close()
separator('readline()')
songs_file = open(songs_dox, 'r')
if songsFile.mode == 'r':
text = songsFile.readline()
while text:
print(text.replace('\n', ''))
text = songsFile.readline()
songsFile.close()
separator('readlines()')
songs_file = open(songs_dox, 'r')
if songsFile.mode == 'r':
text = songsFile.readlines()
for x in text:
x = x.replace('\n', '')
print(x)
songsFile.close()
|
class Star:
def __init__(self):
self.x = random(-width/2, width/2)
self.y = random(-height/2, height/2)
self.z = random(width/2)
self.pz = self.z
def update(self, speed):
self.z = self.z - speed
if self.z < 1:
self.z = width/2
self.x = random(-width/2, width/2)
self.y = random(-height/2, height/2)
self.pz = self.z
def show(self):
fill(255)
noStroke()
sx = map(self.x / self.z, 0, 1, 0, width/2)
sy = map(self.y / self.z, 0, 1, 0, height/2)
r = map(self.z, 0, width/2, 16, 0)
ellipse(sx, sy, r, r)
px = map(self.x / self.pz, 0, 1, 0, width/2)
py = map(self.y / self.pz, 0, 1, 0, height/2)
self.pz = self.z
stroke(255)
line(px, py, sx, sy)
|
class Star:
def __init__(self):
self.x = random(-width / 2, width / 2)
self.y = random(-height / 2, height / 2)
self.z = random(width / 2)
self.pz = self.z
def update(self, speed):
self.z = self.z - speed
if self.z < 1:
self.z = width / 2
self.x = random(-width / 2, width / 2)
self.y = random(-height / 2, height / 2)
self.pz = self.z
def show(self):
fill(255)
no_stroke()
sx = map(self.x / self.z, 0, 1, 0, width / 2)
sy = map(self.y / self.z, 0, 1, 0, height / 2)
r = map(self.z, 0, width / 2, 16, 0)
ellipse(sx, sy, r, r)
px = map(self.x / self.pz, 0, 1, 0, width / 2)
py = map(self.y / self.pz, 0, 1, 0, height / 2)
self.pz = self.z
stroke(255)
line(px, py, sx, sy)
|
# -*- coding: utf-8 -*-
# Copyright 2021 Cohesity Inc.
class ValueTypeEnum(object):
"""Implementation of the 'ValueType' enum.
Specifies the type of the value contained here. All values are returned
as
pointers to strings, but they can be casted to the type indicated here.
'kInt64' indicates that the value stored in the Task Attribute is
a 64-bit integer.
'kDouble' indicates that the value stored in the Task Attribute is
a 64 bit floating point number.
'kString' indicates that the value stored in the Task Attribute is
a string.
'kBytes' indicates that the value stored in the Task Attribute is
an array of bytes.
Attributes:
KINT64: TODO: type description here.
KDOUBLE: TODO: type description here.
KSTRING: TODO: type description here.
KBYTES: TODO: type description here.
"""
KINT64 = 'kInt64'
KDOUBLE = 'kDouble'
KSTRING = 'kString'
KBYTES = 'kBytes'
|
class Valuetypeenum(object):
"""Implementation of the 'ValueType' enum.
Specifies the type of the value contained here. All values are returned
as
pointers to strings, but they can be casted to the type indicated here.
'kInt64' indicates that the value stored in the Task Attribute is
a 64-bit integer.
'kDouble' indicates that the value stored in the Task Attribute is
a 64 bit floating point number.
'kString' indicates that the value stored in the Task Attribute is
a string.
'kBytes' indicates that the value stored in the Task Attribute is
an array of bytes.
Attributes:
KINT64: TODO: type description here.
KDOUBLE: TODO: type description here.
KSTRING: TODO: type description here.
KBYTES: TODO: type description here.
"""
kint64 = 'kInt64'
kdouble = 'kDouble'
kstring = 'kString'
kbytes = 'kBytes'
|
#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@file : hooks.py
@Time : 2021/3/31 15:32
@Author: Tao.Xu
@Email : [email protected]
"""
def pytest_smtp_report_title(report):
""" Called before adding the title to the report """
def pytest_smtp_results_summary(prefix, summary, postfix):
""" Called before adding the summary section to the report """
def pytest_smtp_results_table_header(cells):
""" Called after building results table header. """
def pytest_smtp_results_table_row(report, cells):
""" Called after building results table row. """
def pytest_smtp_results_table_html(report, data):
""" Called after building results table additional HTML. """
|
"""
@file : hooks.py
@Time : 2021/3/31 15:32
@Author: Tao.Xu
@Email : [email protected]
"""
def pytest_smtp_report_title(report):
""" Called before adding the title to the report """
def pytest_smtp_results_summary(prefix, summary, postfix):
""" Called before adding the summary section to the report """
def pytest_smtp_results_table_header(cells):
""" Called after building results table header. """
def pytest_smtp_results_table_row(report, cells):
""" Called after building results table row. """
def pytest_smtp_results_table_html(report, data):
""" Called after building results table additional HTML. """
|
DATABASE_AUTO_CREATE_INDEX = True
DATABASES = {
'default': {
'db': 'billing',
'host': 'localhost',
'port': 27017,
'username': '',
'password': ''
}
}
CACHES = {
'default': {},
'local': {
'backend': 'spaceone.core.cache.local_cache.LocalCache',
'max_size': 128,
'ttl': 300
}
}
HANDLERS = {
}
CONNECTORS = {
'BillingPluginConnector': {
},
'SpaceConnector': {
'backend': 'spaceone.core.connector.space_connector.SpaceConnector',
'endpoints': {
'identity': 'grpc://identity:50051',
'plugin': 'grpc://plugin:50051',
'repository': 'grpc://repository:50051',
'secret': 'grpc://secret:50051',
'config': 'grpc://config:50051',
}
},
}
INSTALLED_DATA_SOURCE_PLUGINS = [
# {
# 'name': '',
# 'plugin_info': {
# 'plugin_id': '',
# 'version': '',
# 'options': {},
# 'secret_data': {},
# 'schema': '',
# 'upgrade_mode': ''
# },
# 'tags':{
# 'description': ''
# }
# }
]
|
database_auto_create_index = True
databases = {'default': {'db': 'billing', 'host': 'localhost', 'port': 27017, 'username': '', 'password': ''}}
caches = {'default': {}, 'local': {'backend': 'spaceone.core.cache.local_cache.LocalCache', 'max_size': 128, 'ttl': 300}}
handlers = {}
connectors = {'BillingPluginConnector': {}, 'SpaceConnector': {'backend': 'spaceone.core.connector.space_connector.SpaceConnector', 'endpoints': {'identity': 'grpc://identity:50051', 'plugin': 'grpc://plugin:50051', 'repository': 'grpc://repository:50051', 'secret': 'grpc://secret:50051', 'config': 'grpc://config:50051'}}}
installed_data_source_plugins = []
|
# We're trying to find the sum of the even fibonacci numbers
# from 1 to `max_num`
class Solution:
# We're going to do fibonacci iteratively
def solution(self, max_num: int) -> int:
# `minus1` and `minus2` keep track of the last two values
# starting with 0 and 1, `num` keeps track of the current
# value, and `sum` is a running sum of `num`'s even values.
#
minus1, minus2 = 1, 0
num = 0
sum = 0
while num < max_num:
num = minus1 + minus2
minus2 = minus1
minus1 = num
# We only care to sum even values of `num`
if num % 2 == 0:
sum += num
return sum
|
class Solution:
def solution(self, max_num: int) -> int:
(minus1, minus2) = (1, 0)
num = 0
sum = 0
while num < max_num:
num = minus1 + minus2
minus2 = minus1
minus1 = num
if num % 2 == 0:
sum += num
return sum
|
class Solution:
def maxDistance(self, position: List[int], m: int) -> int:
position=sorted(position)
dis=position[-1]-position[0]
if m==2:
return position[-1]-position[0]
low=1
high=dis
def validInterval(interval):
n=m-1
i=0
while n>0:
j=i
while j<len(position)-1 and position[j]-position[i]<interval:
j+=1
if position[j]-position[i]<interval:
return False
i=j
n-=1
return True
while low!=high:
mid=(high+low)//2
if mid==low:
mid+=1
if validInterval(mid):
low=mid
else:
high=mid-1
return high
|
class Solution:
def max_distance(self, position: List[int], m: int) -> int:
position = sorted(position)
dis = position[-1] - position[0]
if m == 2:
return position[-1] - position[0]
low = 1
high = dis
def valid_interval(interval):
n = m - 1
i = 0
while n > 0:
j = i
while j < len(position) - 1 and position[j] - position[i] < interval:
j += 1
if position[j] - position[i] < interval:
return False
i = j
n -= 1
return True
while low != high:
mid = (high + low) // 2
if mid == low:
mid += 1
if valid_interval(mid):
low = mid
else:
high = mid - 1
return high
|
project = 'django-sms'
copyright = '2021, Roald Nefs'
author = 'Roald Nefs'
release = '0.4.0'
extensions = ['m2r2']
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
source_suffix = ['.rst', '.md']
html_theme = 'alabaster'
html_theme_options = {
"description": "A Django app for sending SMS with interchangeable backends.",
"show_powered_by": False,
"github_user": "roaldnefs",
"github_repo": "django-sms",
"github_button": True,
"github_banner": True,
"show_related": False,
}
html_static_path = ['_static']
|
project = 'django-sms'
copyright = '2021, Roald Nefs'
author = 'Roald Nefs'
release = '0.4.0'
extensions = ['m2r2']
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
source_suffix = ['.rst', '.md']
html_theme = 'alabaster'
html_theme_options = {'description': 'A Django app for sending SMS with interchangeable backends.', 'show_powered_by': False, 'github_user': 'roaldnefs', 'github_repo': 'django-sms', 'github_button': True, 'github_banner': True, 'show_related': False}
html_static_path = ['_static']
|
def main():
f = [int(i) for i in [line.rstrip("\n") for line in open("Data.txt")][0].split(",")]
f[1] = 12
f[2] = 2
i = 0
while True:
if f[i] == 99:
break
elif f[i] == 1:
f[f[i + 3]] = f[f[i + 1]] + f[f[i + 2]]
elif f[i] == 2:
f[f[i + 3]] = f[f[i + 1]]*f[f[i + 2]]
else:
print("Something went wrong")
i += 4
print(f[0])
if __name__ == "__main__":
main()
|
def main():
f = [int(i) for i in [line.rstrip('\n') for line in open('Data.txt')][0].split(',')]
f[1] = 12
f[2] = 2
i = 0
while True:
if f[i] == 99:
break
elif f[i] == 1:
f[f[i + 3]] = f[f[i + 1]] + f[f[i + 2]]
elif f[i] == 2:
f[f[i + 3]] = f[f[i + 1]] * f[f[i + 2]]
else:
print('Something went wrong')
i += 4
print(f[0])
if __name__ == '__main__':
main()
|
def register(mf):
mf.register_event("main", lambda: print("tests"), unique=False)
register_parents = False
|
def register(mf):
mf.register_event('main', lambda : print('tests'), unique=False)
register_parents = False
|
# https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def buildTree(self, inorder: List[int], postorder: List[int]) -> TreeNode:
map_inorder = {}
for i, val in enumerate(inorder):
map_inorder[val] = i
def recur(low, high):
if low > high:
return None
x = TreeNode(postorder.pop())
mid = map_inorder[x.val]
x.right = recur(mid+1, high)
x.left = recur(low, mid-1)
return x
return recur(0, len(inorder)-1)
|
class Solution:
def build_tree(self, inorder: List[int], postorder: List[int]) -> TreeNode:
map_inorder = {}
for (i, val) in enumerate(inorder):
map_inorder[val] = i
def recur(low, high):
if low > high:
return None
x = tree_node(postorder.pop())
mid = map_inorder[x.val]
x.right = recur(mid + 1, high)
x.left = recur(low, mid - 1)
return x
return recur(0, len(inorder) - 1)
|
DATABASE = {
'host': None,
'port': None,
'username': None, # 'data'
'password': None, # 'cafl-2021'
'db': None,
'uri': None,
}
BROWSER = {
# broswer settings
'options': [
"--no-sandbox",
"--dns-prefetch-disable",
"--disable-browser-side-navigation",
"--disable-dev-shm-usage",
"--disable-infobars",
"enable-automation"
],
# delay,
'delay': 0,
# waiting time to restart chrome after blocked by Amazon
'waitInterval': 10,
# wait for web element
'elementTimeout': 0.5,
# browser loading timeout
'browserTimeout': 180,
}
LOGGER = "error"
VERBOSEDIGIT = 2
PROGRESSLEN = 25
SKIPERROR = True
PRIVATE_PROXY = {
# -------------- private proxy with authentication configuration ------------- #
# 'username': '12345678',
# 'password': '12345678',
"manifest_json": """
{
"version": "1.0.0",
"manifest_version": 2,
"name": "Chrome Proxy",
"permissions": [
"proxy",
"tabs",
"unlimitedStorage",
"storage",
"<all_urls>",
"webRequest",
"webRequestBlocking"
],
"background": {
"scripts": ["background.js"]
},
"minimum_chrome_version":"22.0.0"
}
""",
"background_js": """
var config = {
mode: "fixed_servers",
rules: {
singleProxy: {
scheme: "http",
host: "%s",
port: parseInt(%s)
},
bypassList: ["localhost"]
}
};
chrome.proxy.settings.set({value: config, scope: "regular"}, function() {});
function callbackFn(details) {
return {
authCredentials: {
username: "%s",
password: "%s"
}
};
}
chrome.webRequest.onAuthRequired.addListener(
callbackFn,
{urls: ["<all_urls>"]},
['blocking']
);
"""
}
|
database = {'host': None, 'port': None, 'username': None, 'password': None, 'db': None, 'uri': None}
browser = {'options': ['--no-sandbox', '--dns-prefetch-disable', '--disable-browser-side-navigation', '--disable-dev-shm-usage', '--disable-infobars', 'enable-automation'], 'delay': 0, 'waitInterval': 10, 'elementTimeout': 0.5, 'browserTimeout': 180}
logger = 'error'
verbosedigit = 2
progresslen = 25
skiperror = True
private_proxy = {'manifest_json': '\n {\n "version": "1.0.0",\n "manifest_version": 2,\n "name": "Chrome Proxy",\n "permissions": [\n "proxy",\n "tabs",\n "unlimitedStorage",\n "storage",\n "<all_urls>",\n "webRequest",\n "webRequestBlocking"\n ],\n "background": {\n "scripts": ["background.js"]\n },\n "minimum_chrome_version":"22.0.0"\n }\n ', 'background_js': '\n var config = {\n mode: "fixed_servers",\n rules: {\n singleProxy: {\n scheme: "http",\n host: "%s",\n port: parseInt(%s)\n },\n bypassList: ["localhost"]\n }\n };\n\n chrome.proxy.settings.set({value: config, scope: "regular"}, function() {});\n\n function callbackFn(details) {\n return {\n authCredentials: {\n username: "%s",\n password: "%s"\n }\n };\n }\n\n chrome.webRequest.onAuthRequired.addListener(\n callbackFn,\n {urls: ["<all_urls>"]},\n [\'blocking\']\n );\n '}
|
# Copyright 2021 The Bazel Authors. All rights reserved.
#
# 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.
"""Implementation for macOS universal binary rule."""
load(":apple_support.bzl", "apple_support")
load(":lipo.bzl", "lipo")
load(":transitions.bzl", "macos_universal_transition")
load("@bazel_skylib//lib:dicts.bzl", "dicts")
def _universal_binary_impl(ctx):
inputs = [
binary.files.to_list()[0]
for binary in ctx.split_attr.binary.values()
]
if not inputs:
fail("Target (%s) `binary` label ('%s') does not provide any " +
"file for universal binary" % (ctx.attr.name, ctx.attr.binary))
output = ctx.actions.declare_file(ctx.label.name)
if len(inputs) > 1:
lipo.create(
actions = ctx.actions,
apple_fragment = ctx.fragments.apple,
inputs = inputs,
output = output,
xcode_config = ctx.attr._xcode_config[apple_common.XcodeVersionConfig],
)
else:
# If the transition doesn't split, this is building for a non-macOS
# target, so just create a symbolic link of the input binary.
ctx.actions.symlink(target_file = inputs[0], output = output)
return [
DefaultInfo(
executable = output,
files = depset([output]),
),
]
universal_binary = rule(
attrs = dicts.add(
apple_support.action_required_attrs(),
{
"binary": attr.label(
cfg = macos_universal_transition,
doc = "Target to generate a 'fat' binary from.",
mandatory = True,
),
"_allowlist_function_transition": attr.label(
default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
),
},
),
doc = """
This rule produces a multi-architecture ("fat") binary targeting Apple macOS
platforms *regardless* of the architecture of the macOS host platform. The
`lipo` tool is used to combine built binaries of multiple architectures. For
non-macOS platforms, this simply just creates a symbolic link of the input
binary.
""",
fragments = ["apple"],
implementation = _universal_binary_impl,
)
|
"""Implementation for macOS universal binary rule."""
load(':apple_support.bzl', 'apple_support')
load(':lipo.bzl', 'lipo')
load(':transitions.bzl', 'macos_universal_transition')
load('@bazel_skylib//lib:dicts.bzl', 'dicts')
def _universal_binary_impl(ctx):
inputs = [binary.files.to_list()[0] for binary in ctx.split_attr.binary.values()]
if not inputs:
fail("Target (%s) `binary` label ('%s') does not provide any " + 'file for universal binary' % (ctx.attr.name, ctx.attr.binary))
output = ctx.actions.declare_file(ctx.label.name)
if len(inputs) > 1:
lipo.create(actions=ctx.actions, apple_fragment=ctx.fragments.apple, inputs=inputs, output=output, xcode_config=ctx.attr._xcode_config[apple_common.XcodeVersionConfig])
else:
ctx.actions.symlink(target_file=inputs[0], output=output)
return [default_info(executable=output, files=depset([output]))]
universal_binary = rule(attrs=dicts.add(apple_support.action_required_attrs(), {'binary': attr.label(cfg=macos_universal_transition, doc="Target to generate a 'fat' binary from.", mandatory=True), '_allowlist_function_transition': attr.label(default='@bazel_tools//tools/allowlists/function_transition_allowlist')}), doc='\nThis rule produces a multi-architecture ("fat") binary targeting Apple macOS\nplatforms *regardless* of the architecture of the macOS host platform. The\n`lipo` tool is used to combine built binaries of multiple architectures. For\nnon-macOS platforms, this simply just creates a symbolic link of the input\nbinary.\n', fragments=['apple'], implementation=_universal_binary_impl)
|
# compose tree to describe object dictionary
# assume all instrument readings are four-byte floats
theTree = {
0x1000: {
0x00: {0x40: 0, 'size': 4}
},
0x6001: {
0x00: {0x40: 5},
0x01: {0x40: 'INST:SEL CH1;:SOUR:VOLT?', 0x23: 'INST:SEL CH1;:SOUR:VOLT'},
0x02: {0x40: 'INST:SEL CH1;:SOUR:CURR?', 0x23: 'INST:SEL CH1;:SOUR:CURR'},
0x03: {0x40: 'FETCH:VOLT? CH1'},
0x04: {0x40: 'FETCH:CURR? CH1'},
0x05: {0x40: 'FETCH:POW? CH1'}
},
0x6002: {
0x00: {0x40: 5},
0x01: {0x40: 'INST:SEL CH2;:SOUR:VOLT?', 0x23: 'INST:SEL CH2;:SOUR:VOLT'},
0x02: {0x40: 'INST:SEL CH2;:SOUR:CURR?', 0x23: 'INST:SEL CH2;:SOUR:CURR'},
0x03: {0x40: 'FETCH:VOLT? CH2'},
0x04: {0x40: 'FETCH:CURR? CH2'},
0x05: {0x40: 'FETCH:POW? CH2'}
},
0x6003: {
0x00: {0x40: 5},
0x01: {0x40: 'INST:SEL CH3;:SOUR:VOLT?', 0x23: 'INST:SEL CH3;:SOUR:VOLT'},
0x02: {0x40: 'INST:SEL CH3;:SOUR:CURR?', 0x23: 'INST:SEL CH3;:SOUR:CURR'},
0x03: {0x40: 'FETCH:VOLT? CH3'},
0x04: {0x40: 'FETCH:CURR? CH3'},
0x05: {0x40: 'FETCH:POW? CH3'}
}
}
|
the_tree = {4096: {0: {64: 0, 'size': 4}}, 24577: {0: {64: 5}, 1: {64: 'INST:SEL CH1;:SOUR:VOLT?', 35: 'INST:SEL CH1;:SOUR:VOLT'}, 2: {64: 'INST:SEL CH1;:SOUR:CURR?', 35: 'INST:SEL CH1;:SOUR:CURR'}, 3: {64: 'FETCH:VOLT? CH1'}, 4: {64: 'FETCH:CURR? CH1'}, 5: {64: 'FETCH:POW? CH1'}}, 24578: {0: {64: 5}, 1: {64: 'INST:SEL CH2;:SOUR:VOLT?', 35: 'INST:SEL CH2;:SOUR:VOLT'}, 2: {64: 'INST:SEL CH2;:SOUR:CURR?', 35: 'INST:SEL CH2;:SOUR:CURR'}, 3: {64: 'FETCH:VOLT? CH2'}, 4: {64: 'FETCH:CURR? CH2'}, 5: {64: 'FETCH:POW? CH2'}}, 24579: {0: {64: 5}, 1: {64: 'INST:SEL CH3;:SOUR:VOLT?', 35: 'INST:SEL CH3;:SOUR:VOLT'}, 2: {64: 'INST:SEL CH3;:SOUR:CURR?', 35: 'INST:SEL CH3;:SOUR:CURR'}, 3: {64: 'FETCH:VOLT? CH3'}, 4: {64: 'FETCH:CURR? CH3'}, 5: {64: 'FETCH:POW? CH3'}}}
|
api_key = ""
api_secret = ""
access_token_key = ""
access_token_secret = ""
|
api_key = ''
api_secret = ''
access_token_key = ''
access_token_secret = ''
|
USERS = {}
def update_user(user):
if user not in USERS:
USERS[user] = 0
USERS[user] += 1
return {'name': user, 'access': USERS[user]}
|
users = {}
def update_user(user):
if user not in USERS:
USERS[user] = 0
USERS[user] += 1
return {'name': user, 'access': USERS[user]}
|
N, A, B = map(int, input().split())
if B >= A*N:
print(A*N)
else:
print(B)
|
(n, a, b) = map(int, input().split())
if B >= A * N:
print(A * N)
else:
print(B)
|
class Network:
def __init__(self):
self.layer_list = []
self.num_layer = 0
def add(self, layer):
self.num_layer = self.num_layer + 1
self.layer_list.append(layer)
def forward(self, x):
for i in range(self.num_layer):
x = self.layer_list[i].forward(x)
return x
def backward(self, delta):
for i in reversed(range(self.num_layer)):
delta = self.layer_list[i].backward(delta)
|
class Network:
def __init__(self):
self.layer_list = []
self.num_layer = 0
def add(self, layer):
self.num_layer = self.num_layer + 1
self.layer_list.append(layer)
def forward(self, x):
for i in range(self.num_layer):
x = self.layer_list[i].forward(x)
return x
def backward(self, delta):
for i in reversed(range(self.num_layer)):
delta = self.layer_list[i].backward(delta)
|
"""
define in here e.g. the number of class, box scale, ...
meaning constants class
date: 9/30
author: arabian9ts
"""
# the number of classified class
classes = 21
# the number of boxes per feature map
boxes = [4, 6, 6, 6, 6, 6,]
# default box ratios
# each length should be matches boxes[index]
box_ratios = [
[1.0, 1.0, 2.0, 1.0/2.0],
[1.0, 1.0, 2.0, 1.0/2.0, 3.0, 1.0/3.0],
[1.0, 1.0, 2.0, 1.0/2.0, 3.0, 1.0/3.0],
[1.0, 1.0, 2.0, 1.0/2.0, 3.0, 1.0/3.0],
[1.0, 1.0, 2.0, 1.0/2.0, 3.0, 1.0/3.0],
[1.0, 1.0, 2.0, 1.0/2.0, 3.0, 1.0/3.0],
]
|
"""
define in here e.g. the number of class, box scale, ...
meaning constants class
date: 9/30
author: arabian9ts
"""
classes = 21
boxes = [4, 6, 6, 6, 6, 6]
box_ratios = [[1.0, 1.0, 2.0, 1.0 / 2.0], [1.0, 1.0, 2.0, 1.0 / 2.0, 3.0, 1.0 / 3.0], [1.0, 1.0, 2.0, 1.0 / 2.0, 3.0, 1.0 / 3.0], [1.0, 1.0, 2.0, 1.0 / 2.0, 3.0, 1.0 / 3.0], [1.0, 1.0, 2.0, 1.0 / 2.0, 3.0, 1.0 / 3.0], [1.0, 1.0, 2.0, 1.0 / 2.0, 3.0, 1.0 / 3.0]]
|
_base_ = [
'../../_base_/models/detr.py',
'../../_base_/datasets/mot15.py',
'../../_base_/default_runtime.py'
#'../../_base_/datasets/mot_challenge.py',
]
custom_imports = dict(imports=['mmtrack.models.mot.kf'], allow_failed_imports=False)
link = 'https://download.openmmlab.com/mmdetection/v2.0/detr/detr_r50_8x2_150e_coco/detr_r50_8x2_150e_coco_20201130_194835-2c4b8974.pth'
model = dict(type='KFSORT',
detector=dict(
init_cfg=dict(type='Pretrained',checkpoint=link),
),
score_thres=0.9,
iou_thres=0.3,
)
dataset_type = 'MOTChallengeDataset'
data_root = 'data/MOT15/'
# data = dict(
# samples_per_gpu=2,
# workers_per_gpu=2,
# train=dict(
# type=dataset_type,
# visibility_thr=-1,
# ann_file=data_root + 'annotations/half-train_cocoformat.json',
# img_prefix=data_root + 'train',
# ref_img_sampler=dict(
# num_ref_imgs=1,
# frame_range=10,
# filter_key_img=True,
# method='uniform'),
# pipeline=train_pipeline),
# val=dict(
# type=dataset_type,
# ann_file=data_root + 'annotations/half-val_cocoformat.json',
# img_prefix=data_root + 'train',
# ref_img_sampler=None,
# pipeline=test_pipeline),
# test=dict(
# type=dataset_type,
# ann_file=data_root + 'annotations/half-val_cocoformat.json',
# img_prefix=data_root + 'train',
# ref_img_sampler=None,
# pipeline=test_pipeline))
# learning policy
lr_config = dict(
policy='step',
warmup='linear',
warmup_iters=100,
warmup_ratio=1.0 / 100,
step=[3])
# runtime settings
total_epochs = 4
evaluation = dict(metric=['bbox', 'track'], interval=1)
search_metrics = ['MOTA', 'IDF1', 'FN', 'FP', 'IDs', 'MT', 'ML']
|
_base_ = ['../../_base_/models/detr.py', '../../_base_/datasets/mot15.py', '../../_base_/default_runtime.py']
custom_imports = dict(imports=['mmtrack.models.mot.kf'], allow_failed_imports=False)
link = 'https://download.openmmlab.com/mmdetection/v2.0/detr/detr_r50_8x2_150e_coco/detr_r50_8x2_150e_coco_20201130_194835-2c4b8974.pth'
model = dict(type='KFSORT', detector=dict(init_cfg=dict(type='Pretrained', checkpoint=link)), score_thres=0.9, iou_thres=0.3)
dataset_type = 'MOTChallengeDataset'
data_root = 'data/MOT15/'
lr_config = dict(policy='step', warmup='linear', warmup_iters=100, warmup_ratio=1.0 / 100, step=[3])
total_epochs = 4
evaluation = dict(metric=['bbox', 'track'], interval=1)
search_metrics = ['MOTA', 'IDF1', 'FN', 'FP', 'IDs', 'MT', 'ML']
|
_base_ = [
'../_base_/default_runtime.py'
]
model = dict(
type='opera.InsPose',
backbone=dict(
type='mmdet.ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_eval=False,
style='pytorch',
init_cfg=dict(type='Pretrained',
checkpoint='torchvision://resnet50')),
neck=dict(
type='mmdet.FPN',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
start_level=1,
add_extra_convs='on_output',
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='opera.InsPoseHead',
num_classes=1, # (only person)
in_channels=256,
stacked_convs=4,
feat_channels=256,
stacked_convs_kpt=4,
feat_channels_kpt=512,
stacked_convs_hm=3,
feat_channels_hm=512,
strides=[8, 16, 32, 64, 128],
center_sampling=True,
center_sample_radius=1.5,
centerness_on_reg=True,
regression_normalize=True,
with_hm_loss=True,
min_overlap_hm=0.9,
min_hm_radius=0,
max_hm_radius=3,
min_overlap_kp=0.9,
min_offset_radius=0,
max_offset_radius=3,
loss_cls=dict(
type='mmdet.VarifocalLoss',
use_sigmoid=True,
gamma=2.0,
alpha=0.75,
iou_weighted=True,
loss_weight=1.0),
loss_bbox=dict(type='mmdet.GIoULoss', loss_weight=1.0),
loss_centerness=dict(
type='mmdet.CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_hm=dict(
type='mmdet.FocalLoss',
use_sigmoid=True,
gamma=2.0,
alpha=0.25,
loss_weight=1.0),
loss_weight_offset=1.0,
unvisible_weight=0.1),
test_cfg = dict(
nms_pre=1000,
score_thr=0.05,
nms=dict(type='soft_nms', iou_threshold=0.3),
mask_thresh=0.5,
max_per_img=100))
# dataset settings
dataset_type = 'opera.CocoPoseDataset'
data_root = '/dataset/public/coco/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='mmdet.LoadImageFromFile', to_float32=True),
dict(type='opera.LoadAnnotations',
with_bbox=True,
with_mask=True,
with_keypoint=True),
dict(type='opera.Resize',
img_scale=[(1333, 800), (1333, 768), (1333, 736),
(1333, 704), (1333, 672), (1333, 640)],
multiscale_mode='value',
keep_ratio=True),
dict(type='opera.RandomFlip', flip_ratio=0.5),
dict(type='mmdet.Normalize', **img_norm_cfg),
dict(type='mmdet.Pad', size_divisor=32),
dict(type='opera.DefaultFormatBundle'),
dict(type='mmdet.Collect',
keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks', 'gt_keypoints']),
]
test_pipeline = [
dict(type='mmdet.LoadImageFromFile'),
dict(
type='mmdet.MultiScaleFlipAug',
img_scale=(1333, 800),
flip=False,
transforms=[
dict(type='mmdet.Resize', keep_ratio=True),
dict(type='mmdet.RandomFlip'),
dict(type='mmdet.Normalize', **img_norm_cfg),
dict(type='mmdet.Pad', size_divisor=32),
dict(type='mmdet.ImageToTensor', keys=['img']),
dict(type='mmdet.Collect', keys=['img']),
])
]
data = dict(
samples_per_gpu=4,
workers_per_gpu=2,
train=dict(
type=dataset_type,
ann_file='/data/configs/inspose/person_keypoints_train2017_pesudobox.json',
img_prefix=data_root + 'images/train2017/',
pipeline=train_pipeline,
skip_invaild_pose=False),
val=dict(
type=dataset_type,
ann_file=data_root + 'annotations/person_keypoints_val2017.json',
img_prefix=data_root + 'images/val2017/',
pipeline=test_pipeline),
test=dict(
type=dataset_type,
ann_file=data_root + 'annotations/person_keypoints_val2017.json',
img_prefix=data_root + 'images/val2017/',
pipeline=test_pipeline))
evaluation = dict(interval=1, metric='keypoints')
# optimizer
optimizer = dict(type='SGD', lr=0.02, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
# learning policy
lr_config = dict(
policy='step',
warmup='linear',
warmup_iters=2000,
warmup_ratio=0.001,
step=[27, 33])
runner = dict(type='EpochBasedRunner', max_epochs=36)
checkpoint_config = dict(interval=1, max_keep_ckpts=3)
|
_base_ = ['../_base_/default_runtime.py']
model = dict(type='opera.InsPose', backbone=dict(type='mmdet.ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_eval=False, style='pytorch', init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')), neck=dict(type='mmdet.FPN', in_channels=[256, 512, 1024, 2048], out_channels=256, start_level=1, add_extra_convs='on_output', num_outs=5, relu_before_extra_convs=True), bbox_head=dict(type='opera.InsPoseHead', num_classes=1, in_channels=256, stacked_convs=4, feat_channels=256, stacked_convs_kpt=4, feat_channels_kpt=512, stacked_convs_hm=3, feat_channels_hm=512, strides=[8, 16, 32, 64, 128], center_sampling=True, center_sample_radius=1.5, centerness_on_reg=True, regression_normalize=True, with_hm_loss=True, min_overlap_hm=0.9, min_hm_radius=0, max_hm_radius=3, min_overlap_kp=0.9, min_offset_radius=0, max_offset_radius=3, loss_cls=dict(type='mmdet.VarifocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.75, iou_weighted=True, loss_weight=1.0), loss_bbox=dict(type='mmdet.GIoULoss', loss_weight=1.0), loss_centerness=dict(type='mmdet.CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0), loss_hm=dict(type='mmdet.FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=1.0), loss_weight_offset=1.0, unvisible_weight=0.1), test_cfg=dict(nms_pre=1000, score_thr=0.05, nms=dict(type='soft_nms', iou_threshold=0.3), mask_thresh=0.5, max_per_img=100))
dataset_type = 'opera.CocoPoseDataset'
data_root = '/dataset/public/coco/'
img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [dict(type='mmdet.LoadImageFromFile', to_float32=True), dict(type='opera.LoadAnnotations', with_bbox=True, with_mask=True, with_keypoint=True), dict(type='opera.Resize', img_scale=[(1333, 800), (1333, 768), (1333, 736), (1333, 704), (1333, 672), (1333, 640)], multiscale_mode='value', keep_ratio=True), dict(type='opera.RandomFlip', flip_ratio=0.5), dict(type='mmdet.Normalize', **img_norm_cfg), dict(type='mmdet.Pad', size_divisor=32), dict(type='opera.DefaultFormatBundle'), dict(type='mmdet.Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks', 'gt_keypoints'])]
test_pipeline = [dict(type='mmdet.LoadImageFromFile'), dict(type='mmdet.MultiScaleFlipAug', img_scale=(1333, 800), flip=False, transforms=[dict(type='mmdet.Resize', keep_ratio=True), dict(type='mmdet.RandomFlip'), dict(type='mmdet.Normalize', **img_norm_cfg), dict(type='mmdet.Pad', size_divisor=32), dict(type='mmdet.ImageToTensor', keys=['img']), dict(type='mmdet.Collect', keys=['img'])])]
data = dict(samples_per_gpu=4, workers_per_gpu=2, train=dict(type=dataset_type, ann_file='/data/configs/inspose/person_keypoints_train2017_pesudobox.json', img_prefix=data_root + 'images/train2017/', pipeline=train_pipeline, skip_invaild_pose=False), val=dict(type=dataset_type, ann_file=data_root + 'annotations/person_keypoints_val2017.json', img_prefix=data_root + 'images/val2017/', pipeline=test_pipeline), test=dict(type=dataset_type, ann_file=data_root + 'annotations/person_keypoints_val2017.json', img_prefix=data_root + 'images/val2017/', pipeline=test_pipeline))
evaluation = dict(interval=1, metric='keypoints')
optimizer = dict(type='SGD', lr=0.02, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
lr_config = dict(policy='step', warmup='linear', warmup_iters=2000, warmup_ratio=0.001, step=[27, 33])
runner = dict(type='EpochBasedRunner', max_epochs=36)
checkpoint_config = dict(interval=1, max_keep_ckpts=3)
|
# -*- coding: utf-8 -*-
"""
meraki
This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ).
"""
class ObjectTypeEnum(object):
"""Implementation of the 'objectType' enum.
TODO: type enum description here.
Attributes:
PERSON: TODO: type description here.
VEHICLE: TODO: type description here.
"""
PERSON = 'person'
VEHICLE = 'vehicle'
|
"""
meraki
This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ).
"""
class Objecttypeenum(object):
"""Implementation of the 'objectType' enum.
TODO: type enum description here.
Attributes:
PERSON: TODO: type description here.
VEHICLE: TODO: type description here.
"""
person = 'person'
vehicle = 'vehicle'
|
""" Define multi-algoritmic simulation errors.
:Author: Arthur Goldberg <[email protected]>
:Date: 2016-12-12
:Copyright: 2016-2018, Karr Lab
:License: MIT
"""
class Error(Exception):
""" Base class for exceptions involving multi-algoritmic simulation
Attributes:
message (:obj:`str`): the exception's message
"""
def __init__(self, message=None):
super().__init__(message)
class MultialgorithmError(Error):
""" Exception raised for errors in package `wc_sim`
Attributes:
message (:obj:`str`): the exception's message
"""
def __init__(self, message=None):
super().__init__(message)
class DynamicMultialgorithmError(Error):
""" Exception raised for errors in package `wc_sim` that occur during a simulation
Attributes:
time (:obj:`float`): the simulation time at which the error occurs
message (:obj:`str`): the exception's message
"""
TIME_PRECISION = 5
def __init__(self, time, message=None):
self.time = time
super().__init__(f"{time:.{self.TIME_PRECISION}E}: {message}")
class SpeciesPopulationError(Error):
""" Exception raised when species population management encounters a problem
Attributes:
message (:obj:`str`): the exception's message
"""
def __init__(self, message=None):
super().__init__(message)
class DynamicSpeciesPopulationError(DynamicMultialgorithmError):
""" Exception raised when species population management encounters a problem during a simulation
Attributes:
time (:obj:`float`): the simulation time at which the error occurs
message (:obj:`str`): the exception's message
"""
def __init__(self, time, message=None):
super().__init__(time, message)
class DynamicFrozenSimulationError(DynamicMultialgorithmError):
""" Exception raised by an SSA submodel when it is the only submodel and total propensities == 0
A simulation in this state cannot progress.
Attributes:
time (:obj:`float`): the simulation time at which the error occurs
message (:obj:`str`): the exception's message
"""
def __init__(self, time, message=None):
super().__init__(time, message)
class DynamicNegativePopulationError(DynamicMultialgorithmError):
""" Exception raised when a negative species population is predicted
The sum of `last_population` and `population_decrease` equals the predicted negative population.
Attributes:
time (:obj:`float`): the simulation time at which the error occurs
method (:obj:`str`): name of the method in which the exception occured
species (:obj:`str`): name of the species whose population is predicted to be negative
last_population (:obj:`float`): previous recorded population for the species
population_decrease (:obj:`float`): change to the population which would make it negative
delta_time (:obj:`float`, optional): if the species has been updated by a continuous submodel,
time since the last continuous update
"""
def __init__(self, time, method, species, last_population, population_decrease, delta_time=None):
self.method = method
self.species = species
self.last_population = last_population
self.population_decrease = population_decrease
self.delta_time = delta_time
super().__init__(time, 'negative population predicted')
def __eq__(self, other):
""" Determine whether two instances have the same content """
if isinstance(other, self.__class__):
return self.__dict__ == other.__dict__
return False
def __ne__(self, other):
return not self.__eq__(other)
def __hash__(self):
return hash((self.method, self.species, self.last_population, self.population_decrease,
self.delta_time))
def __str__(self):
""" Provide a readable `DynamicNegativePopulationError` which contains all its attributes
Returns:
:obj:`str`: a readable representation of this `DynamicNegativePopulationError`
"""
rv = "at {:g}: {}(): negative population predicted for '{}', with decline from {:g} to {:g}".format(
self.time, self.method, self.species, self.last_population,
self.last_population + self.population_decrease)
if self.delta_time is None:
return rv
else:
if self.delta_time == 1:
return rv + " over 1 time unit"
else:
return rv + " over {:g} time units".format(self.delta_time)
class MultialgorithmWarning(UserWarning):
""" `wc_sim` multialgorithm warning """
pass
|
""" Define multi-algoritmic simulation errors.
:Author: Arthur Goldberg <[email protected]>
:Date: 2016-12-12
:Copyright: 2016-2018, Karr Lab
:License: MIT
"""
class Error(Exception):
""" Base class for exceptions involving multi-algoritmic simulation
Attributes:
message (:obj:`str`): the exception's message
"""
def __init__(self, message=None):
super().__init__(message)
class Multialgorithmerror(Error):
""" Exception raised for errors in package `wc_sim`
Attributes:
message (:obj:`str`): the exception's message
"""
def __init__(self, message=None):
super().__init__(message)
class Dynamicmultialgorithmerror(Error):
""" Exception raised for errors in package `wc_sim` that occur during a simulation
Attributes:
time (:obj:`float`): the simulation time at which the error occurs
message (:obj:`str`): the exception's message
"""
time_precision = 5
def __init__(self, time, message=None):
self.time = time
super().__init__(f'{time:.{self.TIME_PRECISION}E}: {message}')
class Speciespopulationerror(Error):
""" Exception raised when species population management encounters a problem
Attributes:
message (:obj:`str`): the exception's message
"""
def __init__(self, message=None):
super().__init__(message)
class Dynamicspeciespopulationerror(DynamicMultialgorithmError):
""" Exception raised when species population management encounters a problem during a simulation
Attributes:
time (:obj:`float`): the simulation time at which the error occurs
message (:obj:`str`): the exception's message
"""
def __init__(self, time, message=None):
super().__init__(time, message)
class Dynamicfrozensimulationerror(DynamicMultialgorithmError):
""" Exception raised by an SSA submodel when it is the only submodel and total propensities == 0
A simulation in this state cannot progress.
Attributes:
time (:obj:`float`): the simulation time at which the error occurs
message (:obj:`str`): the exception's message
"""
def __init__(self, time, message=None):
super().__init__(time, message)
class Dynamicnegativepopulationerror(DynamicMultialgorithmError):
""" Exception raised when a negative species population is predicted
The sum of `last_population` and `population_decrease` equals the predicted negative population.
Attributes:
time (:obj:`float`): the simulation time at which the error occurs
method (:obj:`str`): name of the method in which the exception occured
species (:obj:`str`): name of the species whose population is predicted to be negative
last_population (:obj:`float`): previous recorded population for the species
population_decrease (:obj:`float`): change to the population which would make it negative
delta_time (:obj:`float`, optional): if the species has been updated by a continuous submodel,
time since the last continuous update
"""
def __init__(self, time, method, species, last_population, population_decrease, delta_time=None):
self.method = method
self.species = species
self.last_population = last_population
self.population_decrease = population_decrease
self.delta_time = delta_time
super().__init__(time, 'negative population predicted')
def __eq__(self, other):
""" Determine whether two instances have the same content """
if isinstance(other, self.__class__):
return self.__dict__ == other.__dict__
return False
def __ne__(self, other):
return not self.__eq__(other)
def __hash__(self):
return hash((self.method, self.species, self.last_population, self.population_decrease, self.delta_time))
def __str__(self):
""" Provide a readable `DynamicNegativePopulationError` which contains all its attributes
Returns:
:obj:`str`: a readable representation of this `DynamicNegativePopulationError`
"""
rv = "at {:g}: {}(): negative population predicted for '{}', with decline from {:g} to {:g}".format(self.time, self.method, self.species, self.last_population, self.last_population + self.population_decrease)
if self.delta_time is None:
return rv
elif self.delta_time == 1:
return rv + ' over 1 time unit'
else:
return rv + ' over {:g} time units'.format(self.delta_time)
class Multialgorithmwarning(UserWarning):
""" `wc_sim` multialgorithm warning """
pass
|
class Employee():
def __init__(self, first_name, last_name, money):
self.first_name = first_name
self.last_name = last_name
self.money = money
def give_raise(self, add_money=5000):
self.money += add_money
return self.money
|
class Employee:
def __init__(self, first_name, last_name, money):
self.first_name = first_name
self.last_name = last_name
self.money = money
def give_raise(self, add_money=5000):
self.money += add_money
return self.money
|
#Shape of capital B:
def for_B():
"""printing capital 'B' using for loop"""
for row in range(7):
for col in range(5):
if col==0 or row==0 and col!=4 or row==3 and col!=4 or row==6 and col!=4 or col==4 and row%3!=0:
print("*",end=" ")
else:
print(" ",end=" ")
print()
for_B()
def while_B():
"""printing capital 'B' using while loop"""
i=0
while i<7:
j=0
while j<5:
if j==0 or i==0 and j!=4 or i==3 and j!=4 or i==6 and j!=4 or j==4 and i%3!=0:
print("*",end=" ")
else:
print(" ",end=" ")
j+=1
print()
i+=1
while_B()
|
def for_b():
"""printing capital 'B' using for loop"""
for row in range(7):
for col in range(5):
if col == 0 or (row == 0 and col != 4) or (row == 3 and col != 4) or (row == 6 and col != 4) or (col == 4 and row % 3 != 0):
print('*', end=' ')
else:
print(' ', end=' ')
print()
for_b()
def while_b():
"""printing capital 'B' using while loop"""
i = 0
while i < 7:
j = 0
while j < 5:
if j == 0 or (i == 0 and j != 4) or (i == 3 and j != 4) or (i == 6 and j != 4) or (j == 4 and i % 3 != 0):
print('*', end=' ')
else:
print(' ', end=' ')
j += 1
print()
i += 1
while_b()
|
def add(x,y):
return x + y
def multiply(x,y):
return x * y
def subtract(x,y):
return x - y
def divide(x,y):
return y/x
def power(x,y):
return x**y
|
def add(x, y):
return x + y
def multiply(x, y):
return x * y
def subtract(x, y):
return x - y
def divide(x, y):
return y / x
def power(x, y):
return x ** y
|
"""
https://leetcode.com/problems/longest-increasing-subsequence/
Given an unsorted array of integers, find the length of longest increasing subsequence.
Example:
Input: [10,9,2,5,3,7,101,18]
Output: 4
Explanation: The longest increasing subsequence is [2,3,7,101], therefore the length is 4.
Note:
There may be more than one LIS combination, it is only necessary for you to return the length.
Your algorithm should run in O(n2) complexity.
Follow up: Could you improve it to O(n log n) time complexity?
"""
class Solution(object):
def lengthOfLISDP(self, nums):
"""
This O(n^2) approach uses DP.
Each index contains the longest increasing subsequence at that index.
When evaluating each index, iterate through previous values.
If a previous number is less than current number, increment the LIS value at the current index, if LIS value
is greater than existing LIS value.
At the end of iterating through each current index value, if the LIS value at the current index is greater than
the max LIS, use it.
:type nums: List[int]
:rtype: int
"""
if len(nums) <= 1:
return len(nums)
values = [1] * len(nums)
max_value = 1
for i in range(0, len(nums)):
for j in range(0, i):
if nums[j] < nums[i]:
values[i] = max(values[i], values[j] + 1)
max_value = max(max_value, values[i])
return max_value
def lengthOfLIS(self, nums):
"""
Keep track of the smallest value in an array, where the index of the array corresponds to the size of the
subsequence.
So index 0 of the array represents the smallest value of all subsequences with a size of 1.
Index 1 of the array would correspond to the smallest value of all subsequences with a size of 2.
As one iterates over the numbers in the inputted array, if the number is greater than any of the smallest
values in any of the subsequences, then add it to the array for the next greatest subsequence size.
This basically means that an increasing subsequence exists with the updated size since a smaller increasing
subsequence existed with a lesser value, and we're iterating through the numbers.
To find if any of the smallest subsequence values match, binary search through smallest values in subsequences
array.
Since smallest sequences value array could be N long in worst case, and since need to search over the array N
times, the total runtime is O(N * log N).
:type nums: List[int]
:rtype: int
"""
length_tail_min_values = [0] * len(nums)
size = 0
for num in nums:
start = 0
end = size
while start != end:
middle = int((start + end) / 2)
if length_tail_min_values[middle] < num:
start = middle + 1
else:
end = middle
length_tail_min_values[start] = num
size = max(start + 1, size)
return size
|
"""
https://leetcode.com/problems/longest-increasing-subsequence/
Given an unsorted array of integers, find the length of longest increasing subsequence.
Example:
Input: [10,9,2,5,3,7,101,18]
Output: 4
Explanation: The longest increasing subsequence is [2,3,7,101], therefore the length is 4.
Note:
There may be more than one LIS combination, it is only necessary for you to return the length.
Your algorithm should run in O(n2) complexity.
Follow up: Could you improve it to O(n log n) time complexity?
"""
class Solution(object):
def length_of_lisdp(self, nums):
"""
This O(n^2) approach uses DP.
Each index contains the longest increasing subsequence at that index.
When evaluating each index, iterate through previous values.
If a previous number is less than current number, increment the LIS value at the current index, if LIS value
is greater than existing LIS value.
At the end of iterating through each current index value, if the LIS value at the current index is greater than
the max LIS, use it.
:type nums: List[int]
:rtype: int
"""
if len(nums) <= 1:
return len(nums)
values = [1] * len(nums)
max_value = 1
for i in range(0, len(nums)):
for j in range(0, i):
if nums[j] < nums[i]:
values[i] = max(values[i], values[j] + 1)
max_value = max(max_value, values[i])
return max_value
def length_of_lis(self, nums):
"""
Keep track of the smallest value in an array, where the index of the array corresponds to the size of the
subsequence.
So index 0 of the array represents the smallest value of all subsequences with a size of 1.
Index 1 of the array would correspond to the smallest value of all subsequences with a size of 2.
As one iterates over the numbers in the inputted array, if the number is greater than any of the smallest
values in any of the subsequences, then add it to the array for the next greatest subsequence size.
This basically means that an increasing subsequence exists with the updated size since a smaller increasing
subsequence existed with a lesser value, and we're iterating through the numbers.
To find if any of the smallest subsequence values match, binary search through smallest values in subsequences
array.
Since smallest sequences value array could be N long in worst case, and since need to search over the array N
times, the total runtime is O(N * log N).
:type nums: List[int]
:rtype: int
"""
length_tail_min_values = [0] * len(nums)
size = 0
for num in nums:
start = 0
end = size
while start != end:
middle = int((start + end) / 2)
if length_tail_min_values[middle] < num:
start = middle + 1
else:
end = middle
length_tail_min_values[start] = num
size = max(start + 1, size)
return size
|
'''
Created on 1.12.2016
@author: Darren
''''''
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
For example,
Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6.
The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped. Thanks Marcos for contributing this image!"
'''
class Solution(object):
def trap(self, height):
"""
:type height: List[int]
:rtype: int
"""
l,r=0,len(height)-1
res=0
while l<r:
min_height=min(height[l],height[r])
if min_height==height[l]:
l+=1
while l<r and height[l]<min_height:
res+=min_height-height[l]
l+=1
else:
r-=1
while l<r and height[r]<min_height:
res+=min_height-height[r]
r-=1
return res
|
"""
Created on 1.12.2016
@author: Darren
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
For example,
Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6.
The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped. Thanks Marcos for contributing this image!"
"""
class Solution(object):
def trap(self, height):
"""
:type height: List[int]
:rtype: int
"""
(l, r) = (0, len(height) - 1)
res = 0
while l < r:
min_height = min(height[l], height[r])
if min_height == height[l]:
l += 1
while l < r and height[l] < min_height:
res += min_height - height[l]
l += 1
else:
r -= 1
while l < r and height[r] < min_height:
res += min_height - height[r]
r -= 1
return res
|
## -*- coding: utf-8 -*- ##
## Sage Doctest File ##
#**************************************#
#* Generated from PreTeXt source *#
#* on 2017-08-24T11:43:34-07:00 *#
#* *#
#* http://mathbook.pugetsound.edu *#
#* *#
#**************************************#
##
"""
Please contact Rob Beezer ([email protected]) with
any test failures here that need to be changed
as a result of changes accepted into Sage. You
may edit/change this file in any sensible way, so
that development work may procede. Your changes
may later be replaced by the authors of "Abstract
Algebra: Theory and Applications" when the text is
updated, and a replacement of this file is proposed
for review.
"""
##
## To execute doctests in these files, run
## $ $SAGE_ROOT/sage -t <directory-of-these-files>
## or
## $ $SAGE_ROOT/sage -t <a-single-file>
##
## Replace -t by "-tp n" for parallel testing,
## "-tp 0" will use a sensible number of threads
##
## See: http://www.sagemath.org/doc/developer/doctesting.html
## or run $ $SAGE_ROOT/sage --advanced for brief help
##
## Generated at 2017-08-24T11:43:34-07:00
## From "Abstract Algebra"
## At commit 26d3cac0b4047f4b8d6f737542be455606e2c4b4
##
## Section 18.5 Sage
##
r"""
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: Q = ZZ.fraction_field(); Q
Rational Field
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: Q == QQ
True
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: R.<x> = ZZ[]
sage: P = R.fraction_field();P
Fraction Field of Univariate Polynomial Ring in x over Integer Ring
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: f = P((x^2+3)/(7*x+4))
sage: g = P((4*x^2)/(3*x^2-5*x+4))
sage: h = P((-2*x^3+4*x^2+3)/(x^2+1))
sage: ((f+g)/h).numerator()
3*x^6 + 23*x^5 + 32*x^4 + 8*x^3 + 41*x^2 - 15*x + 12
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: ((f+g)/h).denominator()
-42*x^6 + 130*x^5 - 108*x^4 + 63*x^3 - 5*x^2 + 24*x + 48
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: F.<c> = FiniteField(3^5)
sage: F.characteristic()
3
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: G = F.prime_subfield(); G
Finite Field of size 3
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: G.list()
[0, 1, 2]
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: K.<y>=QuadraticField(-7); K
Number Field in y with defining polynomial x^2 + 7
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: K.prime_subfield()
Rational Field
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: K.<x> = ZZ[sqrt(-3)]; K
Order in Number Field in a with defining polynomial x^2 + 3
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: K.is_integral_domain()
True
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: K.basis()
[1, a]
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: x
a
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: (1+x)*(1-x) == 2*2
True
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: four = K(4)
sage: four.is_unit()
False
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: four^-1
1/4
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: T.<x>=ZZ[]
sage: T.is_integral_domain()
True
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: J = T.ideal(5, x); J
Ideal (5, x) of Univariate Polynomial Ring in x over Integer Ring
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: Q = T.quotient(J); Q
Quotient of Univariate Polynomial Ring in x over
Integer Ring by the ideal (5, x)
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: J.is_principal()
Traceback (most recent call last):
...
NotImplementedError
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: Q.is_field()
Traceback (most recent call last):
...
NotImplementedError
"""
|
"""
Please contact Rob Beezer ([email protected]) with
any test failures here that need to be changed
as a result of changes accepted into Sage. You
may edit/change this file in any sensible way, so
that development work may procede. Your changes
may later be replaced by the authors of "Abstract
Algebra: Theory and Applications" when the text is
updated, and a replacement of this file is proposed
for review.
"""
'\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: Q = ZZ.fraction_field(); Q\n Rational Field\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: Q == QQ\n True\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: R.<x> = ZZ[]\n sage: P = R.fraction_field();P\n Fraction Field of Univariate Polynomial Ring in x over Integer Ring\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: f = P((x^2+3)/(7*x+4))\n sage: g = P((4*x^2)/(3*x^2-5*x+4))\n sage: h = P((-2*x^3+4*x^2+3)/(x^2+1))\n sage: ((f+g)/h).numerator()\n 3*x^6 + 23*x^5 + 32*x^4 + 8*x^3 + 41*x^2 - 15*x + 12\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: ((f+g)/h).denominator()\n -42*x^6 + 130*x^5 - 108*x^4 + 63*x^3 - 5*x^2 + 24*x + 48\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: F.<c> = FiniteField(3^5)\n sage: F.characteristic()\n 3\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: G = F.prime_subfield(); G\n Finite Field of size 3\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: G.list()\n [0, 1, 2]\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: K.<y>=QuadraticField(-7); K\n Number Field in y with defining polynomial x^2 + 7\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: K.prime_subfield()\n Rational Field\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: K.<x> = ZZ[sqrt(-3)]; K\n Order in Number Field in a with defining polynomial x^2 + 3\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: K.is_integral_domain()\n True\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: K.basis()\n [1, a]\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: x\n a\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: (1+x)*(1-x) == 2*2\n True\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: four = K(4)\n sage: four.is_unit()\n False\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: four^-1\n 1/4\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: T.<x>=ZZ[]\n sage: T.is_integral_domain()\n True\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: J = T.ideal(5, x); J\n Ideal (5, x) of Univariate Polynomial Ring in x over Integer Ring\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: Q = T.quotient(J); Q\n Quotient of Univariate Polynomial Ring in x over\n Integer Ring by the ideal (5, x)\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: J.is_principal()\n Traceback (most recent call last):\n ...\n NotImplementedError\n\n~~~~~~~~~~~~~~~~~~~~~~ ::\n\n sage: Q.is_field()\n Traceback (most recent call last):\n ...\n NotImplementedError\n\n'
|
# EclipseCon Europe Che Challenge
#
# This program prints the numbers from 1 to 100, with every multiple of 3
# replaced by "Fizz", and every multiple of 5 replaced by "Buzz". Numbers
# divisible by both are replaced by "FizzBuzz". Otherwise, the program
# prints the number.
#
# Your mission, if you choose to accept it, is to change this program so that,
# in addition to the above, it prints "Fizz" for any number which includes a 3,
# and prints "Buzz" for any number including a 5. After modification, for
# example, the number 53 should be replaced by "FizzBuzz".
#
# Once you have completed the challenge, you will be entered into a draw for
# one of the ChromeBooks at the Eclipse Che booth.
for i in range(1, 101):
num = "%s" % i;
if (i % 3 == 0):
num = "Fizz"
if (i % 5 == 0):
num = "Buzz"
print (f"{num}");
|
for i in range(1, 101):
num = '%s' % i
if i % 3 == 0:
num = 'Fizz'
if i % 5 == 0:
num = 'Buzz'
print(f'{num}')
|
class DataPacker:
#list data type will only write out the values without the key
@staticmethod
def dataTypeList():
return "list"
@staticmethod
def dataTypeObject():
return "object"
def __init__(self, type):
self.type = type
self.data = []
def add_pair(self, key, value):
self.data.append([key, value])
def add_value(self, key, value):
self.data.append(key, value)
def to_string(self, coding):
if self.type == self.dataTypeObject():
if coding == 'json':
s = "{"
for item in self.data:
s += ' "' + item[0] + '": '
s += '"' + item[1] + '"\n'
s += "}"
else:
for item in self.data:
s += item[0].replace('=', '\\=') + '='
s += item[1] + '\n'
if self.type == self.dataTypeList():
if coding == 'json':
s = "["
for item in self.data:
s += '"' + item[1] + '"\n'
s += "]"
else:
for item in self.data:
s += item[1] + '\n'
return s
|
class Datapacker:
@staticmethod
def data_type_list():
return 'list'
@staticmethod
def data_type_object():
return 'object'
def __init__(self, type):
self.type = type
self.data = []
def add_pair(self, key, value):
self.data.append([key, value])
def add_value(self, key, value):
self.data.append(key, value)
def to_string(self, coding):
if self.type == self.dataTypeObject():
if coding == 'json':
s = '{'
for item in self.data:
s += ' "' + item[0] + '": '
s += '"' + item[1] + '"\n'
s += '}'
else:
for item in self.data:
s += item[0].replace('=', '\\=') + '='
s += item[1] + '\n'
if self.type == self.dataTypeList():
if coding == 'json':
s = '['
for item in self.data:
s += '"' + item[1] + '"\n'
s += ']'
else:
for item in self.data:
s += item[1] + '\n'
return s
|
#! /usr/bin/python
# Filename: object_init
# Description: the constructor in python
class Persion:
def __init__(self, name):
self.name = name
def sayHi(self):
print(self.name)
test = Persion("Hello,world")
test.sayHi()
|
class Persion:
def __init__(self, name):
self.name = name
def say_hi(self):
print(self.name)
test = persion('Hello,world')
test.sayHi()
|
arr = [-3, 4, 8, -2, -1, 5, 4, 8]
for i in range(0, len(arr)-1):
if(arr[i] > 0):
#num is positive
temp = arr[i]
arr[i] = arr[i+1]
arr[i+1] = temp
print(arr)
|
arr = [-3, 4, 8, -2, -1, 5, 4, 8]
for i in range(0, len(arr) - 1):
if arr[i] > 0:
temp = arr[i]
arr[i] = arr[i + 1]
arr[i + 1] = temp
print(arr)
|
class Rememberer:
def __init__(self):
self.funcs = []
def register(self, fn):
self.funcs.append(fn)
fn.__conform__ = lambda new: self.recode(fn, new)
return self
def recode(self, fn, new):
if new is None:
self.funcs.remove(fn)
else:
fn.__code__ = new.__code__
def __call__(self, *args):
return [fn(*args) for fn in self.funcs]
activities = Rememberer()
@activities.register
def do(x):
return f"Paint {x} canvasses"
@activities.register
def do(x):
return f"Sing {x} songs"
@activities.register
def do(x):
return f"Worship the {x} suns"
@activities.register
def do(x):
return f"Dance for {x} hours"
@activities.register
def do(x):
return f"Do {x} push-ups"
|
class Rememberer:
def __init__(self):
self.funcs = []
def register(self, fn):
self.funcs.append(fn)
fn.__conform__ = lambda new: self.recode(fn, new)
return self
def recode(self, fn, new):
if new is None:
self.funcs.remove(fn)
else:
fn.__code__ = new.__code__
def __call__(self, *args):
return [fn(*args) for fn in self.funcs]
activities = rememberer()
@activities.register
def do(x):
return f'Paint {x} canvasses'
@activities.register
def do(x):
return f'Sing {x} songs'
@activities.register
def do(x):
return f'Worship the {x} suns'
@activities.register
def do(x):
return f'Dance for {x} hours'
@activities.register
def do(x):
return f'Do {x} push-ups'
|
"""
categories: Core,Functions
description: Assign instance variable to function
cause: Unknown
workaround: Unknown
"""
def f():
pass
f.x = 0
print(f.x)
|
"""
categories: Core,Functions
description: Assign instance variable to function
cause: Unknown
workaround: Unknown
"""
def f():
pass
f.x = 0
print(f.x)
|
# Create a program that reads an integer and shows on the screen whether it is even or odd
n = int(input('Type a integer: '))
if n % 2 == 0:
print('The number {} is {} EVEN {}'.format(n, '\033[1;31;40m', '\033[m'))
else:
print('The number {} is {} ODD {}'.format(n, '\033[7;30m', '\033[m'))
|
n = int(input('Type a integer: '))
if n % 2 == 0:
print('The number {} is {} EVEN {}'.format(n, '\x1b[1;31;40m', '\x1b[m'))
else:
print('The number {} is {} ODD {}'.format(n, '\x1b[7;30m', '\x1b[m'))
|
# @Time : 2019/4/24 23:22
# @Author : shakespere
# @FileName: 3Sum.py
'''
15. 3Sum
Medium
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note:
The solution set must not contain duplicate triplets.
Example:
Given array nums = [-1, 0, 1, 2, -1, -4],
A solution set is:
[
[-1, 0, 1],
[-1, -1, 2]
]
'''
class Solution(object):
def threeSum(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
nums.sort()
res = []
for i in range(len(nums) - 2):
if i == 0 or nums[i] > nums[i - 1]:
left = i + 1
right = len(nums) - 1
while left < right:
if nums[left] + nums[right] == -nums[i]:
res.append([nums[i], nums[left], nums[right]])
left += 1
right -= 1
while left < right and nums[left] == nums[left - 1]: left += 1
while left < right and nums[right] == nums[right + 1]: right -= 1
elif nums[left] + nums[right] < -nums[i]:
while left < right:
left += 1
if nums[left] > nums[left - 1]:
break
else:
while left < right:
right -= 1
if nums[right] < nums[right + 1]:
break
return res
|
"""
15. 3Sum
Medium
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note:
The solution set must not contain duplicate triplets.
Example:
Given array nums = [-1, 0, 1, 2, -1, -4],
A solution set is:
[
[-1, 0, 1],
[-1, -1, 2]
]
"""
class Solution(object):
def three_sum(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
nums.sort()
res = []
for i in range(len(nums) - 2):
if i == 0 or nums[i] > nums[i - 1]:
left = i + 1
right = len(nums) - 1
while left < right:
if nums[left] + nums[right] == -nums[i]:
res.append([nums[i], nums[left], nums[right]])
left += 1
right -= 1
while left < right and nums[left] == nums[left - 1]:
left += 1
while left < right and nums[right] == nums[right + 1]:
right -= 1
elif nums[left] + nums[right] < -nums[i]:
while left < right:
left += 1
if nums[left] > nums[left - 1]:
break
else:
while left < right:
right -= 1
if nums[right] < nums[right + 1]:
break
return res
|
# Handshake
# Count the number of Handshakes in a board meeting.
#
# https://www.hackerrank.com/challenges/handshake/problem
#
T = int(input())
for a0 in range(T):
N = int(input())
print(N * (N - 1) // 2)
|
t = int(input())
for a0 in range(T):
n = int(input())
print(N * (N - 1) // 2)
|
inicial = int(input('Qual o numero inicial?'))
final = int(input('Qual o numero final?'))
x = inicial
while( x <= final):
if(x % 2 == 0):
print(x)
x = x + 1
|
inicial = int(input('Qual o numero inicial?'))
final = int(input('Qual o numero final?'))
x = inicial
while x <= final:
if x % 2 == 0:
print(x)
x = x + 1
|
#!/usr/bin/env python3
# Everything in Python are objects.
# This means that everything that's created is an
# instance on a pre-defined class, or a self-defined class.
# These instances are in memory (hence named objects), and
# has access to the functions defined in the original classes
# and is called methods.
# 1. Creating a name in the namespace
# This example shows creating a variable.
# Know that this variable `name` is created as an instance
# of the str() class.
name = "Rob"
print(type(name))
print(dir(name))
# 2. Creating a custom class
class Animal:
"""Animal Class"""
def __init__(self):
"""Constructor for Animal Class"""
pass
def print_name(self, name):
print("{} is an Animal".format(name))
# Creating an instance out of Animal class
my_animal = Animal()
my_animal.print_name("Deer")
# 3. self
# `self` is a contruct which refers to the instance
# of the class itself.
class Vehicle:
"""Vehicle class"""
def __init__(self, color, doors, tires, vtype):
self.color = color
self.doors = doors
self.tires = tires
self.vtype = vtype
def brake(self):
return "{} braking".format(self.vtype)
def drive(self):
return "I am driving a {0} {1}".format(self.color, self.vtype)
if __name__ == "__main__":
car = Vehicle("Blue", 5, 4, "car")
print(car.brake())
print(car.drive())
truck = Vehicle("Red", 3, 6, "truck")
print(truck.drive())
print(truck.brake())
|
name = 'Rob'
print(type(name))
print(dir(name))
class Animal:
"""Animal Class"""
def __init__(self):
"""Constructor for Animal Class"""
pass
def print_name(self, name):
print('{} is an Animal'.format(name))
my_animal = animal()
my_animal.print_name('Deer')
class Vehicle:
"""Vehicle class"""
def __init__(self, color, doors, tires, vtype):
self.color = color
self.doors = doors
self.tires = tires
self.vtype = vtype
def brake(self):
return '{} braking'.format(self.vtype)
def drive(self):
return 'I am driving a {0} {1}'.format(self.color, self.vtype)
if __name__ == '__main__':
car = vehicle('Blue', 5, 4, 'car')
print(car.brake())
print(car.drive())
truck = vehicle('Red', 3, 6, 'truck')
print(truck.drive())
print(truck.brake())
|
def main_screen(calendar):
while True:
print("What would you like to do? ")
print("\ta) Add event")
print("\tb) Delete event")
print("\tc) Print events")
print("\td) Exit")
answer = input(" $ ")
if "a" in answer:
add_event(calendar)
elif "b" in answer:
delete_event(calendar)
elif "c" in answer:
print_events(calendar)
elif "d" in answer:
break
else:
pass
def add_event(calendar):
print("What is the name of the event that you would like to add?")
name = input(" $ ")
print("When does your event start? FORMAT: dd/mm/yyyy hh:mm:ss")
start_time = input(" $ ")
print("When does your event end? FORMAT: dd/mm/yyyy hh:mm:ss")
end_time = input(" $ ")
try:
calendar.add_event(name, start_time, end_time)
except ValueError:
print("Check your inputs, they don't seem to be in the right format.")
def delete_event(calendar):
calendar.print_events()
print("What is the ID of the event(s) you would like to delete? Separate ids with ,.")
event_ids = input(" $ ")
event_ids = event_ids.split(",")
calendar.delete_event(event_ids)
def print_events(calendar):
calendar.print_events()
|
def main_screen(calendar):
while True:
print('What would you like to do? ')
print('\ta) Add event')
print('\tb) Delete event')
print('\tc) Print events')
print('\td) Exit')
answer = input(' $ ')
if 'a' in answer:
add_event(calendar)
elif 'b' in answer:
delete_event(calendar)
elif 'c' in answer:
print_events(calendar)
elif 'd' in answer:
break
else:
pass
def add_event(calendar):
print('What is the name of the event that you would like to add?')
name = input(' $ ')
print('When does your event start? FORMAT: dd/mm/yyyy hh:mm:ss')
start_time = input(' $ ')
print('When does your event end? FORMAT: dd/mm/yyyy hh:mm:ss')
end_time = input(' $ ')
try:
calendar.add_event(name, start_time, end_time)
except ValueError:
print("Check your inputs, they don't seem to be in the right format.")
def delete_event(calendar):
calendar.print_events()
print('What is the ID of the event(s) you would like to delete? Separate ids with ,.')
event_ids = input(' $ ')
event_ids = event_ids.split(',')
calendar.delete_event(event_ids)
def print_events(calendar):
calendar.print_events()
|
def levenshtein_Distance(word1,word2):
word1="#"+word1
wordTmp="#"+word2
letters1 = list(word1)
letters2 = list(wordTmp)
# Initializing table
table = [ [0 for i in range(len(word1))] for j in range(len(wordTmp))]
for i in range (len(word1)):
table[0][i] = i
for j in range (len(wordTmp)):
table[j][0] = j
for i in range (1,len(word1)):
for j in range (1,len(wordTmp)):
tmpList=[]
x = table[j][i-1]+1
tmpList.append(x)
y = table[j-1][i]+1
tmpList.append(y)
if letters1[i] == letters2[j]:
z = table[j-1][i-1]
else:
z = table[j-1][i-1]+2
tmpList.append(z)
table[j][i] =min(tmpList)
return table[-1][-1],word2
|
def levenshtein__distance(word1, word2):
word1 = '#' + word1
word_tmp = '#' + word2
letters1 = list(word1)
letters2 = list(wordTmp)
table = [[0 for i in range(len(word1))] for j in range(len(wordTmp))]
for i in range(len(word1)):
table[0][i] = i
for j in range(len(wordTmp)):
table[j][0] = j
for i in range(1, len(word1)):
for j in range(1, len(wordTmp)):
tmp_list = []
x = table[j][i - 1] + 1
tmpList.append(x)
y = table[j - 1][i] + 1
tmpList.append(y)
if letters1[i] == letters2[j]:
z = table[j - 1][i - 1]
else:
z = table[j - 1][i - 1] + 2
tmpList.append(z)
table[j][i] = min(tmpList)
return (table[-1][-1], word2)
|
#
# PySNMP MIB module ACMEPACKET-PRODUCTS (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ACMEPACKET-PRODUCTS
# Produced by pysmi-0.3.4 at Mon Apr 29 16:57:56 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)
#
acmepacket, = mibBuilder.importSymbols("ACMEPACKET-SMI", "acmepacket")
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Counter32, Gauge32, iso, Integer32, Counter64, Unsigned32, ObjectIdentity, IpAddress, TimeTicks, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, ModuleIdentity, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "Gauge32", "iso", "Integer32", "Counter64", "Unsigned32", "ObjectIdentity", "IpAddress", "TimeTicks", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "ModuleIdentity", "Bits")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
acmepacketProducts = ModuleIdentity((1, 3, 6, 1, 4, 1, 9148, 1))
acmepacketProducts.setRevisions(('2012-07-16 00:00', '2007-04-03 15:00',))
if mibBuilder.loadTexts: acmepacketProducts.setLastUpdated('201207160000Z')
if mibBuilder.loadTexts: acmepacketProducts.setOrganization('Acme Packet, Inc.')
apNetNet4000Series = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 1))
if mibBuilder.loadTexts: apNetNet4000Series.setStatus('current')
apNetNet4250 = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 1, 1))
if mibBuilder.loadTexts: apNetNet4250.setStatus('current')
apNetNet4500 = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 1, 2))
if mibBuilder.loadTexts: apNetNet4500.setStatus('current')
apNetNet9000Series = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 2))
if mibBuilder.loadTexts: apNetNet9000Series.setStatus('current')
apNetNet9200 = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 2, 1))
if mibBuilder.loadTexts: apNetNet9200.setStatus('current')
apNetNet3000Series = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 3))
if mibBuilder.loadTexts: apNetNet3000Series.setStatus('current')
apNetNet3800 = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 3, 1))
if mibBuilder.loadTexts: apNetNet3800.setStatus('current')
apNetNet3820 = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 3, 2))
if mibBuilder.loadTexts: apNetNet3820.setStatus('current')
apNetNetOSSeries = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 4))
if mibBuilder.loadTexts: apNetNetOSSeries.setStatus('current')
apNetNetOS = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 4, 1))
if mibBuilder.loadTexts: apNetNetOS.setStatus('current')
apNetNetOSVM = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 4, 2))
if mibBuilder.loadTexts: apNetNetOSVM.setStatus('current')
apNetNet6000Series = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 5))
if mibBuilder.loadTexts: apNetNet6000Series.setStatus('current')
apNetNet6300 = ObjectIdentity((1, 3, 6, 1, 4, 1, 9148, 1, 5, 1))
if mibBuilder.loadTexts: apNetNet6300.setStatus('current')
mibBuilder.exportSymbols("ACMEPACKET-PRODUCTS", apNetNet9000Series=apNetNet9000Series, apNetNet3820=apNetNet3820, apNetNet4500=apNetNet4500, apNetNet3000Series=apNetNet3000Series, apNetNet4250=apNetNet4250, apNetNetOSVM=apNetNetOSVM, PYSNMP_MODULE_ID=acmepacketProducts, apNetNet4000Series=apNetNet4000Series, apNetNet6000Series=apNetNet6000Series, apNetNet9200=apNetNet9200, acmepacketProducts=acmepacketProducts, apNetNetOS=apNetNetOS, apNetNet6300=apNetNet6300, apNetNet3800=apNetNet3800, apNetNetOSSeries=apNetNetOSSeries)
|
(acmepacket,) = mibBuilder.importSymbols('ACMEPACKET-SMI', 'acmepacket')
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_union, single_value_constraint, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(counter32, gauge32, iso, integer32, counter64, unsigned32, object_identity, ip_address, time_ticks, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type, module_identity, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'Gauge32', 'iso', 'Integer32', 'Counter64', 'Unsigned32', 'ObjectIdentity', 'IpAddress', 'TimeTicks', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType', 'ModuleIdentity', 'Bits')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
acmepacket_products = module_identity((1, 3, 6, 1, 4, 1, 9148, 1))
acmepacketProducts.setRevisions(('2012-07-16 00:00', '2007-04-03 15:00'))
if mibBuilder.loadTexts:
acmepacketProducts.setLastUpdated('201207160000Z')
if mibBuilder.loadTexts:
acmepacketProducts.setOrganization('Acme Packet, Inc.')
ap_net_net4000_series = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 1))
if mibBuilder.loadTexts:
apNetNet4000Series.setStatus('current')
ap_net_net4250 = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 1, 1))
if mibBuilder.loadTexts:
apNetNet4250.setStatus('current')
ap_net_net4500 = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 1, 2))
if mibBuilder.loadTexts:
apNetNet4500.setStatus('current')
ap_net_net9000_series = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 2))
if mibBuilder.loadTexts:
apNetNet9000Series.setStatus('current')
ap_net_net9200 = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 2, 1))
if mibBuilder.loadTexts:
apNetNet9200.setStatus('current')
ap_net_net3000_series = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 3))
if mibBuilder.loadTexts:
apNetNet3000Series.setStatus('current')
ap_net_net3800 = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 3, 1))
if mibBuilder.loadTexts:
apNetNet3800.setStatus('current')
ap_net_net3820 = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 3, 2))
if mibBuilder.loadTexts:
apNetNet3820.setStatus('current')
ap_net_net_os_series = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 4))
if mibBuilder.loadTexts:
apNetNetOSSeries.setStatus('current')
ap_net_net_os = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 4, 1))
if mibBuilder.loadTexts:
apNetNetOS.setStatus('current')
ap_net_net_osvm = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 4, 2))
if mibBuilder.loadTexts:
apNetNetOSVM.setStatus('current')
ap_net_net6000_series = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 5))
if mibBuilder.loadTexts:
apNetNet6000Series.setStatus('current')
ap_net_net6300 = object_identity((1, 3, 6, 1, 4, 1, 9148, 1, 5, 1))
if mibBuilder.loadTexts:
apNetNet6300.setStatus('current')
mibBuilder.exportSymbols('ACMEPACKET-PRODUCTS', apNetNet9000Series=apNetNet9000Series, apNetNet3820=apNetNet3820, apNetNet4500=apNetNet4500, apNetNet3000Series=apNetNet3000Series, apNetNet4250=apNetNet4250, apNetNetOSVM=apNetNetOSVM, PYSNMP_MODULE_ID=acmepacketProducts, apNetNet4000Series=apNetNet4000Series, apNetNet6000Series=apNetNet6000Series, apNetNet9200=apNetNet9200, acmepacketProducts=acmepacketProducts, apNetNetOS=apNetNetOS, apNetNet6300=apNetNet6300, apNetNet3800=apNetNet3800, apNetNetOSSeries=apNetNetOSSeries)
|
# Feature flag to raise an exception in case of a non existing device feature.
# The flag should be fully removed in a later release.
# It allows dependend libraries to gracefully migrate to the new behaviour
raise_exception_on_not_supported_device_feature = True
# Feature flag to raise exception if rate limit of the API is hit
raise_exception_on_rate_limit = True
# Feature flag to raise exception on command calls if the API does not return (2xx or 3xx) responses.
raise_exception_on_command_failure = True
|
raise_exception_on_not_supported_device_feature = True
raise_exception_on_rate_limit = True
raise_exception_on_command_failure = True
|
class Solution:
def countOdds(self, low: int, high: int) -> int:
c = high - low + 1
if c % 2 == 1 and low % 2 == 1:
r = 1
else:
r = 0
return r + c // 2
|
class Solution:
def count_odds(self, low: int, high: int) -> int:
c = high - low + 1
if c % 2 == 1 and low % 2 == 1:
r = 1
else:
r = 0
return r + c // 2
|
class Solution:
def reverseWords(self, s: str) -> str:
res, blank = '', False
for _ in s[::-1]:
res += _
return ' '.join(res.split()[::-1])
|
class Solution:
def reverse_words(self, s: str) -> str:
(res, blank) = ('', False)
for _ in s[::-1]:
res += _
return ' '.join(res.split()[::-1])
|
# -----------------------------------------------------------------------------
# Copyright * 2014, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration. All
# rights reserved.
#
# The Crisis Mapping Toolkit (CMT) v1 platform is 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.
# -----------------------------------------------------------------------------
# this file stores variously previously learned Adaboost classifiers
modis_classifiers = dict()
radar_classifiers = dict()
# default classifier, learned from ['unflooded_mississippi_2010.xml', 'unflooded_new_orleans_2004.xml', 'sf_bay_area_2011_4.xml', 'unflooded_bosnia_2013.xml']
modis_classifiers['default'] = [(u'dartmouth', 0.30887438055782945, 1.4558371112080295), (u'b2', 2020.1975382568198, 0.9880130793929531), (u'MNDWI', 0.3677501330908955, 0.5140443440746121), (u'b2', 1430.1463073852296, 0.15367606716883875), (u'b1', 1108.5241042345276, 0.13193086117959033), (u'dartmouth', 0.7819758531686796, -0.13210548296374583), (u'dartmouth', 0.604427824270283, 0.12627962195951867), (u'b2', 1725.1719228210247, -0.07293616881105353), (u'b2', 1872.6847305389224, -0.09329031467870501), (u'b2', 1577.659115103127, 0.1182474134065663), (u'b2', 1946.441134397871, -0.13595282841411163), (u'b2', 2610.24876912841, 0.10010381165310277), (u'b2', 1983.3193363273454, -0.0934455057392682), (u'b2', 1503.9027112441784, 0.13483194249576771), (u'b2', 2001.7584372920826, -0.10099203054937314), (u'b2', 2905.2743845642053, 0.1135686859467779), (u'dartmouth', 0.5156538098210846, 0.07527677772747364), (u'b2', 2010.9779877744513, -0.09535260187161688), (u'b2', 1798.9283266799735, 0.07889358547222977), (u'dartmouth', 0.36787708796485785, -0.07370319016383906), (u'MNDWI', -0.6422574132273133, 0.06922934793487515), (u'dartmouth', 0.33837573426134365, -0.10266747186797487), (u'dartmouth', 0.4712668025964854, 0.09612545197834421), (u'dartmouth', 0.3236250574095866, -0.10754218805531587), (u'MNDWI', -0.48248013602276113, 0.111365639029263), (u'dartmouth', 0.316249718983708, -0.10620217821842894), (u'dartmouth', 0.4490732989841858, 0.09743861137429623), (u'dartmouth', 0.31256204977076874, -0.08121162639185005), (u'MNDWI', -0.5623687746250372, 0.10344420165347998), (u'dartmouth', 0.3107182151642991, -0.08899821447581886), (u'LSWI', -0.29661326544921773, 0.08652882218688322), (u'dartmouth', 0.3097962978610643, -0.07503568257204306), (u'MNDWI', 0.022523637136343283, 0.08765150582301148), (u'b2', 2015.5877630156356, -0.06978548014829108), (u'b2', 3052.7871922821028, 0.08567389991115743), (u'LSWI', -0.19275063787434812, 0.08357667312445341), (u'dartmouth', 0.3093353392094469, -0.08053950648462435), (u'LSWI', -0.14081932408691333, 0.07186342090261867), (u'dartmouth', 0.30910485988363817, -0.05720223719278896), (u'MNDWI', 0.19513688511361937, 0.07282637257701345), (u'NDWI', -0.361068160450533, 0.06565995208358431), (u'NDWI', -0.2074005503754442, -0.0522715989389411), (u'b1', 775.4361563517915, 0.05066415016422507), (u'b2', 2017.8926506362277, -0.0596357907686033), (u'b2', 1762.050124750499, 0.06600172638129476), (u'b2', 2019.0450944465238, -0.05498763067596745), (u'b1', 941.9801302931596, 0.06500771792028737), (u'dartmouth', 0.24987167315080105, 0.06409775979747406), (u'b2', 2979.0307884231543, 0.06178896578945445), (u'dartmouth', 0.22037031944728686, 0.04708770942378687), (u'dartmouth', 0.30898962022073384, -0.06357932266591948), (u'EVI', -0.13991172174597732, 0.061167901067941045), (u'dartmouth', 0.30893200038928165, -0.047538992866687814), (u'dartmouth', 0.23512099629904396, 0.055800430467148325), (u'dartmouth', 0.3089031904735555, -0.04993911823852714), (u'dartmouth', 0.22774565787316542, 0.045917043382747345), (u'b1', 232.32231270358304, -0.04624672841408699), (u'LSWIminusEVI', -1.3902019910129537, 0.044122210356250594), (u'fai', 914.8719936250361, 0.04696283008449494), (u'b2', 2019.6213163516718, -0.051114386132496435), (u'b2', 2315.2231536926147, 0.048898662215419296), (u'fai', 1434.706585047812, -0.05352547959475242), (u'diff', -544.4250000000001, -0.04459039609050114), (u'dartmouth', 0.39737844166837205, 0.045452678171318414), (u'dartmouth', 0.3088887855156925, -0.03891014191130265), (u'dartmouth', 0.22405798866022614, 0.042128457713671935), (u'diff', -777.2958333333333, -0.03902784979889064), (u'dartmouth', 0.2222141540537565, 0.03788131334473313), (u'dartmouth', 0.30888158303676094, -0.037208213701295255), (u'dartmouth', 0.3531264111131007, 0.0375648736301961), (u'dartmouth', 0.3088779817972952, -0.03427856593613819), (u'LSWI', -0.16678498098063071, 0.03430983541990538), (u'fai', -425.5957838307736, -0.03348006551810443), (u'NDWI', -0.13056674533789978, -0.03552899660957818), (u'b2', 2019.3332053990978, -0.0344936369203531), (u'b2', 1835.806528609448, 0.03856210900250611), (u'b2', 1467.0245093147041, -0.0345449746977328), (u'fai', 395.0374022022602, 0.031130251540884356), (u'fai', 654.9546979136481, 0.04214466417320743), (u'b2', 1448.5854083499669, -0.05667775728680656), (u'fai', 135.12010649087222, 0.03948338203848539), (u'dartmouth', 0.493460306208785, -0.045802615250103394), (u'fai', 784.9133457693422, 0.03128133499873274), (u'fai', 1174.7892893364242, -0.04413487095880613), (u'b2', 3015.9089903526283, 0.04133685218791008), (u'fai', 1304.7479371921181, -0.04107557606064173), (u'b2', 2462.7359614105126, 0.03777625735990945), (u'fai', 1369.727261119965, -0.03524600268462714), (u'b2', 2997.4698893878913, 0.03864830537283341), (u'dartmouth', 0.22313607135699132, 0.0348041704038284), (u'fai', -575.9950811359025, -0.036345846940478974), (u'fai', 1402.2169230838886, -0.03481517966048645), (u'fai', 719.9340218414952, 0.032833655233338276), (u'b2', 2019.1891499228109, -0.03272953788499046), (u'b2', 2388.9795575515636, 0.03713369823962704), (u'b2', 2019.1171221846673, -0.027949075715791222), (u'b2', 1743.611023785762, 0.03310357200312585), (u'LSWIminusNDVI', -0.3990346417915731, 0.029045726328998267), (u'NDWI', -0.16898364785667197, -0.025735337614573982), (u'dartmouth', 0.3088761811775623, -0.02973898070330325)]
## Trained only on Mississippi MODIS x 30
#classifier = [(u'dartmouth', 0.4601187028446295, 1.3933244326017509), (u'b2', 2354.099683544304, 0.8009263433881945), (u'LSWIminusNDVI', -0.37403464179157314, -0.19660698864485893), (u'b2', 997.0490506329114, -0.22609471240379023), (u'LSWI', 0.7307270024497643, -0.19371590131103372), (u'b2', 2862.799841772152, 0.1958087739665682), (u'LSWI', 0.6519079187081369, -0.10411467161095657), (u'b2', 827.2238924050632, -0.1627002183497957), (u'LSWI', 0.6124983768373232, -0.1164763151056205), (u'b2', 3117.149920886076, 0.14045495336435712), (u'dartmouth', 0.8979830751809463, -0.12738474810727388), (u'b2', 1845.3995253164558, 0.09053474497663075), (u'LSWIminusNDVI', -0.4337695820901687, 0.0857764518831651), (u'dartmouth', 1.4135180226982098, 0.07075600803587892), (u'LSWIminusNDVI', 0.7774358230593219, -0.11418946709797562), (u'dartmouth', 1.3146504355818416, 0.10739211371940653), (u'dartmouth', 1.0568829618232098, -0.11015352163127118), (u'b2', 2989.974881329114, 0.08685181198332771), (u'LSWI', 0.8095460861913917, -0.08786494584616246), (u'b2', 912.1364715189873, -0.10303455995441295), (u'MNDWI', -0.29396969047077653, 0.07596098140939918), (u'dartmouth', 1.3640842291400257, 0.09266573131480345), (u'LSWI', 0.8489556280622054, -0.0783584759736119), (u'NDVI', 0.7748969641121193, 0.07406876644625034), (u'dartmouth', 0.9774330185020781, -0.08325113592851094), (u'dartmouth', 0.739083188538683, 0.07799308375292567), (u'dartmouth', 0.9377080468415122, -0.07468962616015257), (u'b2', 3053.562401107595, 0.08334191996627335), (u'LSWI', 0.8686603989976123, -0.05795058684040472), (u'b2', 954.5927610759493, -0.0764128019856413)]
# Trained only on Bosnia data set
# 30
#classifier = [(u'fai', -105.57184246833049, 2.011175093865707), (u'diff', 1251.7560240963855, 0.8824534628772853), (u'LSWI', -0.1950396228838406, -0.34104836216017687), (u'MNDWI', 0.3156758628856189, 0.3971974262249763), (u'diff', 1652.1280120481929, 0.2301851751240506), (u'fai', 21.356797943057927, -0.25320140980424466), (u'ratio', 8.124320652173912, -0.27487135740578195), (u'MNDWI', 0.4338371139090058, 0.23183008491145138), (u'fai', -42.10752226263628, -0.2838952387654039), (u'ratio', 9.051290760869565, -0.18060837756218376), (u'MNDWI', 0.4929177394206993, 0.26151319350647706), (u'dartmouth', 0.7715202347815262, -0.19603377110432904), (u'MNDWI', 0.46337742666485254, 0.16945766306122212), (u'ratio', 9.51477581521739, -0.19326781484568353), (u'fai', -73.83968236548338, -0.1914520350524376), (u'dartmouth', 0.8985318397001062, 0.1320588534810869), (u'ratio', 9.746518342391305, -0.19297983361086213), (u'dartmouth', 0.9620376421593961, 0.138279854734148), (u'dartmouth', 0.8350260372408163, -0.11171574068467803), (u'fai', 84.82111814875213, 0.10168445603729025), (u'fai', -89.70576241690694, -0.14899335489218352), (u'NDVI', 0.7246944616336632, -0.12905505976725612), (u'MNDWI', 0.5224580521765461, 0.13393714338762214), (u'MNDWI', -0.09581370874173237, 0.0971904083985509), (u'fai', -97.63880244261871, -0.12420188150947246), (u'fai', 116.55327825159924, 0.1379596068377162), (u'fai', -101.6053224554746, -0.13973920004492527), (u'ratio', 9.862389605978262, -0.13788473854143857), (u'dartmouth', 0.9302847409297512, 0.12752031805931177), (u'dartmouth', 0.8032731360111712, -0.12615703892605462)]
# 100
#classifier = [(u'fai', -105.57184246833049, 2.011175093865707), (u'diff', 1251.7560240963855, 0.8824534628772853), (u'LSWI', -0.1950396228838406, -0.34104836216017687), (u'MNDWI', 0.3156758628856189, 0.3971974262249763), (u'diff', 1652.1280120481929, 0.2301851751240506), (u'fai', 21.356797943057927, -0.25320140980424466), (u'ratio', 8.124320652173912, -0.27487135740578195), (u'MNDWI', 0.4338371139090058, 0.23183008491145138), (u'fai', -42.10752226263628, -0.2838952387654039), (u'ratio', 9.051290760869565, -0.18060837756218376), (u'MNDWI', 0.4929177394206993, 0.26151319350647706), (u'dartmouth', 0.7715202347815262, -0.19603377110432904), (u'MNDWI', 0.46337742666485254, 0.16945766306122212), (u'ratio', 9.51477581521739, -0.19326781484568353), (u'fai', -73.83968236548338, -0.1914520350524376), (u'dartmouth', 0.8985318397001062, 0.1320588534810869), (u'ratio', 9.746518342391305, -0.19297983361086213), (u'dartmouth', 0.9620376421593961, 0.138279854734148), (u'dartmouth', 0.8350260372408163, -0.11171574068467803), (u'fai', 84.82111814875213, 0.10168445603729025), (u'fai', -89.70576241690694, -0.14899335489218352), (u'NDVI', 0.7246944616336632, -0.12905505976725612), (u'MNDWI', 0.5224580521765461, 0.13393714338762214), (u'MNDWI', -0.09581370874173237, 0.0971904083985509), (u'fai', -97.63880244261871, -0.12420188150947246), (u'fai', 116.55327825159924, 0.1379596068377162), (u'fai', -101.6053224554746, -0.13973920004492527), (u'ratio', 9.862389605978262, -0.13788473854143857), (u'dartmouth', 0.9302847409297512, 0.12752031805931177), (u'dartmouth', 0.8032731360111712, -0.12615703892605462), (u'fai', 53.08895804590503, 0.11280108368230035), (u'fai', -103.58858246190255, -0.1323621639708806), (u'fai', 68.95503809732858, 0.11111732544776452), (u'fai', -104.58021246511652, -0.09561460982792948), (u'ratio', 9.920325237771738, -0.11350588718525503), (u'MNDWI', 0.5372282085544694, 0.12457806680434337), (u'ratio', 9.949293053668477, -0.10142947278348549), (u'b1', 1024.4102564102564, 0.12769119462941034), (u'LSWIminusEVI', 1.2275397718573775, -0.10736324339508174), (u'b2', 3027.5, 0.11335627686056896), (u'LSWIminusEVI', 0.9969081432144813, -0.09855102339735189), (u'b2', 2856.25, 0.12341099685812779), (u'LSWIminusEVI', 1.1122239575359294, -0.09888830150850089), (u'fai', -105.0760274667235, -0.10867185036244718), (u'LSWI', -0.22884831003114736, 0.09390617010433257), (u'b1', 855.3653846153845, 0.09224267581066231), (u'dartmouth', 0.7873966853963488, -0.08654968485638263), (u'MNDWI', 0.5076878957986226, 0.08281065550953068), (u'LSWIminusEVI', 1.0545660503752052, -0.10070544168373859), (u'b1', 939.8878205128204, 0.09546509230524551), (u'LSWIminusEVI', 1.0257370967948432, -0.07512157753132792), (u'dartmouth', 0.9144082903149287, 0.08334614008782373), (u'MNDWI', 0.37475648839731235, -0.09347621062767539), (u'EVI', -0.5354007283235324, 0.07174011237019035), (u'MNDWI', 0.5298431303655078, 0.09325407788460913), (u'LSWIminusEVI', 1.011322620004662, -0.07094468512780058), (u'fai', -105.323934967527, -0.08699012823035202), (u'fai', 37.22287799448148, 0.0825373235212839), (u'dartmouth', 0.7794584600889375, -0.07138166975482693), (u'dartmouth', 0.8667789384704612, 0.07712045798967725), (u'dartmouth', 0.7754893474352318, -0.06762386155357324), (u'dartmouth', 0.6445086298629463, 0.07866161620559303), (u'fai', -105.44788871792875, -0.06872185637143167), (u'LSWI', -0.21194396645749397, 0.07899481836422567), (u'b1', 982.1490384615383, 0.067325499150263), (u'dartmouth', 0.773504791108379, -0.06463211254050916), (u'dartmouth', 0.5810028274036563, 0.07334871420010625), (u'b1', 770.8429487179487, -0.059061001597415036), (u'fai', -105.50986559312962, -0.0589202777929247), (u'EVI', -0.7131758497107877, 0.07543805485058235), (u'b2', 2941.875, 0.0769994468975548), (u'ratio', 9.934809145720108, -0.06559718164524614), (u'MNDWI', 0.5150729739875843, 0.0716339467915095), (u'dartmouth', 0.7725125129449526, -0.051293672818369905), (u'LSWI', -0.2034917946706673, 0.05938789552971963), (u'b1', 961.0184294871794, 0.07318340098162476), (u'b1', 813.1041666666666, -0.06572293073399683), (u'fai', 735.022130941929, 0.060554277275912824), (u'fai', 1028.3904772356705, -0.05029509963366562), (u'dartmouth', 0.9223465156223399, 0.0603999613021688), (u'ratio', 9.927567191745922, -0.059891901340974205), (u'fai', -105.54085403073006, -0.07731554985749788), (u'EVI', -0.62428828901716, 0.06719923296302845), (u'b1', 950.453125, 0.07579445528659902), (u'LSWIminusEVI', 1.0041153816095716, -0.056489892194208524), (u'MNDWI', 0.5113804348931035, 0.05913619958443161), (u'MNDWI', 0.4042968011531591, -0.05075066212771365), (u'diff', 44.518072289156635, 0.04720084087401721), (u'fai', -105.55634824953027, -0.05663241244401389), (u'diff', 247.76506024096386, 0.0590397873216613), (u'b2', 2899.0625, 0.05140907548559329), (u'NDVI', 0.678130801361386, -0.05420275867925114), (u'fai', -105.56409535893039, -0.0578072448545363), (u'NDVI', 0.6548489712252474, -0.07016682881460558), (u'dartmouth', 0.9183774029686342, 0.07612486244144435), (u'NDVI', 0.6664898862933167, -0.06024946186606819), (u'MNDWI', 0.544613286743431, 0.07203803995934993), (u'NDVI', 0.660669428759282, -0.055733385225458454), (u'b2', 2877.65625, 0.05993217671898275), (u'b1', 834.2347756410256, -0.05155918752640494)]
# New Orleans 30
#classifier = [(u'b2', 396.6109850939728, 1.4807909625958868), (u'b2', 1768.9536616979908, 0.8924003455619385), (u'b1', 854.8195364238411, 0.40691523803721014), (u'MNDWI', 0.3892345080908955, 0.36259940088550857), (u'dartmouth', 0.30135484930782946, -0.14337027100064728), (u'NDWI', -0.08016322692474476, -0.15831813233382272), (u'b2', 2281.2268308489956, 0.1353187435748396), (u'dartmouth', 0.7479193288987777, -0.16003727715630708), (u'b2', 2537.363415424498, 0.14061137727842032), (u'ratio', 6.880495612552257, -0.1166499595177218), (u'dartmouth', 0.3565977910898579, -0.11078288758401122), (u'NDWI', -0.2159195980788689, -0.10724023529180131), (u'dartmouth', 0.3289763201988437, -0.10755196279513543), (u'LSWI', -0.0569956547430914, 0.13659163207872768), (u'ratio', 3.9894934188283853, -0.10611849585590673), (u'b2', 2665.4317077122487, 0.14308264148123284), (u'ratio', 5.434994515690321, -0.0863607116606289), (u'b2', 2729.4658538561243, 0.08311291715506125), (u'fai', 902.9220972795897, -0.09359740396097607), (u'NDWI', -0.14804141250180683, -0.0705379771355723), (u'dartmouth', 0.31516558475333656, -0.08259143592340348), (u'LSWI', -0.14982826386693998, 0.08733446419322317), (u'ratio', 9.771497806276129, 0.08172740412577022), (u'MNDWI', -0.6315152257273133, 0.09657359625983933), (u'ratio', 11.216998903138064, 0.08246857226665376), (u'MNDWI', -0.7966635966818656, 0.07605162061421399), (u'dartmouth', 0.32207095247609013, -0.08295128868296117), (u'MNDWI', -0.7140894112045895, 0.0793663117501679), (u'ratio', 10.494248354707096, 0.08231229722793916), (u'LSWIminusEVI', -0.08557300521224676, -0.07043790156684442)]
# 87 on a full set including a dozen lakes
modis_classifiers['lakes'] = [(u'dartmouth', 0.3191065854189406, 1.557305460141852), (u'MNDWI', 0.36596171757859164, 0.6348226054395288), (u'fai', 1076.7198220279101, 0.30760696551024047), (u'b1', 2490.1666666666665, 0.15428815637057783), (u'b1', 1382.4166666666665, 0.23468676605683622), (u'MNDWI', 0.016043270812331922, 0.2328762729873063), (u'diff', 1348.2627965043696, 0.0893530403812219), (u'EVI', -0.936229495395644, -0.0634313110230615), (u'EVI', 0.15713514272585227, -0.1369834357186273), (u'MNDWI', 0.19100249419546178, 0.1396065269707512), (u'EVI', -0.3895471763348959, -0.0699137042914175), (u'fai', -167.53021645595163, 0.09996436618217863), (u'diff', 3321.3055555555557, 0.09048885842380311), (u'fai', -39.46036556514488, 0.10447135022949844), (u'LSWIminusEVI', -1.8703796507388168, -0.08555612086933119), (u'fai', 24.57455988025849, 0.06788717248868892), (u'EVI', -0.1162060168045218, -0.07076437875624517), (u'EVI', 0.020464562960665234, -0.06640347420417587), (u'MNDWI', 0.2784821058870267, 0.0724098935614613), (u'LSWIminusEVI', -1.4401890608008658, -0.07070792766742959), (u'fai', -7.442902842443196, 0.07045138322018761), (u'EVI', -0.047870726921928286, -0.07285420746159146), (u'LSWIminusEVI', -1.2250937658318906, -0.055977386707896926), (u'b2', 3161.583333333333, -0.06589191057236488), (u'b2', 4305.708333333333, 0.04837026087353021), (u'dartmouth', 0.38322539525652455, 0.06306567258296356), (u'b2', 3733.645833333333, 0.054927931406532564), (u'dartmouth', 0.41528480017531655, 0.06032232647772757), (u'b2', 4019.677083333333, 0.0519316593408497), (u'dartmouth', 0.43131450263471255, 0.04868064475460096), (u'EVI', -0.013703081980631526, -0.052847995106752886), (u'b1', 828.5416666666666, -0.045046979840081554), (u'dartmouth', 0.4393293538644105, 0.03393621379393856), (u'b2', 436.6666666666667, -0.058719990230070525), (u'dartmouth', 0.44333677947925954, 0.055475163457599744), (u'dartmouth', 0.35116599033773255, -0.04464212550237975), (u'diff', 1956.9369538077403, -0.044786403818468996), (u'fai', 582.664653676786, 0.034362389553391215), (u'dartmouth', 0.3351362878783366, -0.03792028656513705), (u'dartmouth', 0.44534049228668404, 0.05187952065328861), (u'dartmouth', 0.3271214366486386, -0.05470657728868695), (u'MNDWI', -0.6666113750420029, 0.05405507219193603), (u'dartmouth', 0.32311401103378956, -0.05376528359478583), (u'dartmouth', 0.4463423486903963, 0.05449932480484019), (u'dartmouth', 0.32111029822636505, -0.0508089033370553), (u'MNDWI', -0.5002432754979653, 0.05120260867296932), (u'dartmouth', 0.32010844182265286, -0.0486732927468307), (u'dartmouth', 0.44684327689225245, 0.04692181887347917), (u'dartmouth', 0.31960751362079676, -0.04268244773234967), (u'MNDWI', -0.5834273252699841, 0.04712231236239887), (u'dartmouth', 0.31935704951986865, -0.04401637387406991), (u'MNDWI', -0.6250193501559935, 0.040914589219895145), (u'dartmouth', 0.31923181746940466, -0.038101469357921955), (u'dartmouth', 0.4470937409931805, 0.03911555294126862), (u'fai', 335.6370695012239, -0.0367701043425464), (u'fai', 212.12327741344288, -0.029512647597407196), (u'diff', 739.5886392009988, 0.04428176152799306), (u'diff', 1043.925717852684, 0.03722820575844798), (u'fai', 273.8801734573334, -0.04948130454705945), (u'dartmouth', 0.2549877755813566, 0.03377180068269043), (u'MNDWI', 0.3222219117328092, -0.04255121251198512), (u'diff', 1196.0942571785267, 0.045470427081376316), (u'MNDWI', 0.3440918146557004, -0.047085347000781985), (u'MNDWI', 0.23474230004124425, 0.04054075125347783), (u'MNDWI', 0.355026766117146, -0.046736584848805475), (u'MNDWI', 0.30035200880991797, 0.04078965556380944), (u'MNDWI', 0.3604942418478688, -0.04776704868198665), (u'LSWIminusNDVI', -0.5568084053554159, -0.04437083563150389), (u'MNDWI', 0.3112869602713636, 0.036248827530157374), (u'MNDWI', 0.36322797971323023, -0.04875479813967596), (u'MNDWI', 0.3167544360020864, 0.04123070622165848), (u'MNDWI', 0.36459484864591096, -0.03810930893128258), (u'diff', 1120.0099875156054, 0.035777913949894054), (u'fai', 829.6922378523481, -0.047446531409649384), (u'diff', 1081.9678526841449, 0.03507927976215228), (u'fai', 953.2060299401292, -0.04108410252021359), (u'b2', 4162.692708333333, 0.04836338373525389), (u'dartmouth', 0.44721897304364455, 0.03740129289331726), (u'dartmouth', 0.3191692014441726, -0.03601093736536919), (u'fai', 1014.9629259840196, -0.03601118264855319), (u'diff', 1158.052122347066, 0.04506611179539899), (u'fai', 1045.841374005965, -0.03593891978458228), (u'diff', 1652.599875156055, 0.03514766129091426), (u'fai', 1061.2805980169376, -0.034972506816040166), (u'fai', 1570.7749903790343, 0.03247104395760117), (u'MNDWI', -0.6042233377129889, 0.03328561186493601), (u'b2', 4091.184895833333, 0.03369074877033)]
# Gloucester
#classifier = [(u'Red', 106.25, 2.6908694873435546), (u'EVI', 1.8180788840643158, -1.6880493518661959), (u'MNDWI', 0.46606862179569125, 0.6759920285041151), (u'b1', 304.25, 0.6781297845583472), (u'Red', 145.5, -0.9332055109286996)]
# New Bedford
# Sumatra
# BAD!!!
#classifier = [(u'MNDWI', 0.4333154844558887, 1.493003861830998), (u'LSWI', 0.37775474450370045, -1.8148849780535137), (u'MNDWI', 0.44980066412990727, -0.7511626994787829), (u'NDWI', -0.6339380319013941, -0.8071101617753624), (u'LSWI', 0.39116467763045004, -0.6801609455151723), (u'Red_idm', 0.13091442790613322, -0.5990066511447246), (u'MNDWI', 0.5321794476425439, 1.0282918260098124), (u'b1', 534.25, 0.8524646445337082), (u'b2', 3215.75, 1.039598641718185), (u'LSWIminusEVI', -1.34846955925935, 0.5222328913364728), (u'MNDWI', 0.4168303047818701, 0.7765206583109537), (u'b1', 523.375, 0.8634569486904281), (u'NDVI', 0.7289698882981454, 1.2326959603643795), (u'b1', 366.25, 0.8382830454882036), (u'EVI', 1.422945109473755, 1.1928188689191888), (u'b1', 349.125, 0.7785531677333495), (u'LSWIminusEVI', -1.3167488924224617, 1.0260639426964406), (u'MNDWI', 0.40858771494486085, 1.4027451684417347), (u'LSWIminusEVI', -1.332609225840906, 1.9664195043168113), (u'MNDWI', 0.40446642002635624, 2.492961637332882), (u'EVI', 1.50922532584799, 3.6046473932813488), (u'LSWIminusEVI', -1.4332960268996904, 1.6903927811081079), (u'b1', 340.5625, 2.3605074347987642), (u'NDVI', 0.7122812759311696, 3.37782938914105), (u'b1', 517.9375, 1.6428199426052579), (u'MNDWI', 0.5321873001187866, 2.1599753462719047), (u'LSWIminusEVI', -1.340539392550128, 1.4453448840683698), (u'b1', 336.28125, 2.3208302513464885), (u'NDVI', 0.7039369697476817, 3.2525521714322845), (u'b1', 515.21875, 1.314512950758647), (u'MNDWI', 0.532191226356908, 1.617127359609984), (u'b2', 3156.375, 1.8784471643971616), (u'b1', 334.140625, 1.0400732285323449), (u'NDVI', 0.7959284553377698, 1.193027997994037), (u'b1', 333.0703125, 1.0099517832242602), (u'MNDWI', 0.5321931894759686, 1.0361885558471728), (u'EVI', 1.3797149514279692, 1.2523657802915276), (u'LSWIminusEVI', -1.344504475904739, 0.8719989740804845), (u'b1', 332.53515625, 1.0839084753587287), (u'NDVI', 0.6997648166559378, 1.7315726665929243), (u'b1', 332.267578125, 0.996052880739089), (u'NDVI', 0.7791377841849334, 1.0759593744171274), (u'b1', 332.1337890625, 0.9513482878953953), (u'MNDWI', 0.4024057725671039, 0.9086363886393817), (u'LSWIminusEVI', -1.3464870175820445, 1.8026760313828059), (u'Red', 86.875, 2.427801754929139), (u'b1', 513.859375, 1.058023863094511), (u'NDVI', 0.7875331197613515, 1.483041632820267), (u'b1', 332.06689453125, 1.052590647877841), (u'diff', 2716.75, 1.0137422040649617)]
# Malawi
#classifier = [(u'Red', 211.375, -1.4978661367770034), (u'NIR', 171.875, 1.5677471079645802), (u'Red', 208.6875, -0.7549541585435253), (u'b1', 1460.25, 0.6831800731095334), (u'EVI', 0.29952058003806714, 0.5210102026304385)]
# trained on Landsat and MODIS
# trained on Landsat multiple floods and MODIS (doesn't work well)
#classifier = [(u'dartmouth', 0.31990953680782946, 1.3532525832292066), (u'LSWIminusNDVI', -0.41260886054157314, -2.2975599250672945), (u'LSWIminusNDVI', -0.3721610296179776, 0.8951755042386669), (u'LSWIminusNDVI', -0.4530566914651687, 0.6168756052926035), (u'b2', 2031.3975382568196, 0.4928850390139595), (u'B5', 59.35646171559858, 0.396967826941809), (u'B3', 115.2403564453125, -0.5827723329456356), (u'NDVI', -0.499185231572826, -0.8206139450883484), (u'NDVI', 15.27728981864239, -0.9612414977608352), (u'b1', 164.72231270358304, -1.1021978514482116), (u'ratio', 20.830495612552255, -0.8400239901683402), (u'B1', 14.01019038342401, -1.179673542586125), (u'B5', 7.458179092108224, 0.6191675239346668), (u'B5', 37.11245136246036, 0.45205356755293613), (u'LSWIminusNDVI', -0.4328327760033709, 0.2929427581041321), (u'LSWIminusNDVI', -0.35193711415617984, -0.3282316089074475), (u'MNDWI', -0.6320035069773133, -0.5077801803359128), (u'NDVI', 7.549723790463586, -0.7433972707850641), (u'MNDWI', -0.7969077373068656, -0.9734434265642887), (u'NDVI', 3.6859407763741845, -1.1185334743968922), (u'MNDWI', -0.8793598524716417, -1.2191574474417988), (u'dartmouth', 0.25538925127580103, 0.68557400171212), (u'b1', 93.5093648208469, -0.3183118201605347), (u'NDVI', 1.7540492693294836, -0.47533945354750357), (u'b1', 57.902890879478825, -0.5350006454963759), (u'NDVI', 0.7881035158071331, -0.488488980846825), (u'B1', 7.068814236390512, -0.43090497876107114), (u'B5', 11.163310050715186, 0.49166007962734726), (u'LSWIminusNDVI', -0.422720818272472, 0.24376142023795544), (u'LSWIminusEVI', -1.467155116012954, -0.2949111121125788), (u'NDVI', 1.2710763925683084, -0.3532787638045371), (u'b1', 40.099653908794785, -0.35440607970179305), (u'NDVI', 1.0295899541877207, -0.31164486232315497), (u'B1', 3.5981261628737626, -0.3626550539485778), (u'B5', 13.015875530018668, 0.21001981049372742), (u'LSWIminusNDVI', -0.4176648394070226, 0.22155949367640532), (u'LSWIminusNDVI', -0.47328060692696644, -0.25778054247623255), (u'LSWIminusNDVI', -0.4151368499742979, 0.22653206426504116), (u'LSWIminusNDVI', -0.3620490718870787, -0.22717813859342045), (u'LSWIminusNDVI', -0.4138728552579355, 0.22124896614628006), (u'LSWIminusNDVI', -0.4631686491960676, -0.22046149882433666), (u'LSWIminusNDVI', -0.4132408578997543, 0.20278657322608665), (u'B1', 74.36108315515176, -0.19698717197097967), (u'LSWIminusNDVI', -0.36710505075252814, -0.16603353237141502), (u'diff', -3.4819277108433653, -0.2138109964074318), (u'NDVI', 1.1503331733780144, -0.20132627230609748), (u'diff', -182.7289156626506, -0.29647898630599173), (u'LSWI', 22.59461849485026, -0.27478785278729473), (u'b1', 31.198035423452765, -0.3858949394312004), (u'LSWI', 11.28157617977539, -0.35278992723251107)]
# trained on default, plus training data
#classifier = [(u'diff', 7.851405622489949, 1.1499210570729492), (u'dartmouth', 0.8282223665130863, 0.8336847949898812), (u'LSWIminusNDVI', -0.4029517424860176, -0.4969022650114408), (u'B5', 67.74833454545968, 0.3966703235020681), (u'NDVI', 15.214214631938633, -0.34964556047496637), (u'B6', 83.3055415045817, -0.48622666016349725), (u'B5', 42.37932419232148, 0.3589512700830869), (u'diff', 1463.1726907630523, -0.33190674445403395), (u'dartmouth', 0.6501106091055225, 0.2663771427981788), (u'B1', 13.950356873100874, -0.21287499601676665), (u'NDVI', 7.477843215269061, -0.1659665288248955), (u'diff', -177.06224899598394, -0.23543668173775398), (u'NDVI', 3.6096575069342753, -0.23525924970683706), (u'diff', -84.605421686747, -0.23398869224812702), (u'NDVI', 1.6755646527668824, -0.21432187901910843), (u'MNDWI', -0.6460009028106466, -0.21133622170592178), (u'NDVI', 2.642611079850579, -0.19832033019573156), (u'MNDWI', -0.8039064352235321, -0.21902250388685324), (u'NDVI', 2.159087866308731, -0.21759471721995757), (u'MNDWI', -0.882859201429975, -0.22462325352727264), (u'NDVI', 1.9173262595378067, -0.22133287794719197), (u'MNDWI', -0.9223355845331964, -0.21912707745520124), (u'NDVI', 1.7964454561523446, -0.212352900657123)]
# trained on unflooded_mississippi with landsat
modis_classifiers['mississippi_5'] = [(u'B5', 22.5, 1.424016860332339)]#, (u'NDWI', -0.3488199979104613, -1.1643319348488192)]#, (u'MNDWI', 0.2060761675061745, -0.8190562053615513), (u'NDWI', 0.12342893439063468, -0.5539167295936754), (u'B6', 128.5625, -0.676969969487169)]#, (u'NDWI', -0.050652615441503096, -0.6038609463852692), (u'MNDWI', 0.0688502702628284, -0.5667166676298596), (u'NDWI', 0.6956693010823654, -0.5326141290666078), (u'MNDWI', -0.29396969047077653, -0.4977145365280558), (u'NDWI', -0.137693390357572, -0.5296068483657974), (u'MNDWI', 0.00023732164115535664, -0.40996366647279703), (u'NDWI', 0.2975104842227725, -0.45039955994958353)]
modis_classifiers['mississippi'] = [(u'B5', 20.25, 1.4064982148857947), (u'NDWI', -0.3488199979104613, -1.1281588137098968), (u'MNDWI', 0.2060761675061745, -0.6204705541547991), (u'NDWI', 0.12342893439063468, -0.43739127359050894), (u'B6', 130.03125, -0.7385587172087229), (u'NDWI', -0.050652615441503096, -0.6351588979749766), (u'MNDWI', 0.0688502702628284, -0.7096006602751659), (u'NDWI', -0.137693390357572, -0.6767143211075154), (u'MNDWI', 0.00023732164115535664, -0.4784325526693348), (u'NDWI', 0.6956693010823654, -0.5175430073894397), (u'B6', 129.515625, -0.7658727652948186), (u'NDWI', 0.5836306675686378, -0.8230539867550758)]#, (u'MNDWI', -0.29396969047077653, -1.010378000263949), (u'NDWI', 0.2975104842227725, -1.3470307294716275), (u'MNDWI', -0.40676672221590593, -2.2975599250672945), (u'LSWIminusNDVI', 0.7774358230593219, -2.2975599250672945), (u'b1', 462.17105263157896, -2.2975599250672945), (u'ratio', 1.4121003963517729, -2.2975599250672945), (u'b2', 997.0490506329114, 1.708867948280161), (u'NDWI', -0.41086291422887156, -1.42020845722415), (u'b1', 519.8092105263158, 1.5190611577702313), (u'NDWI', -0.37984145606966646, 0.6952464401700104), (u'NDWI', 0.03638815947456579, -0.7169989507219887), (u'b2', 2354.099683544304, 0.3890029333764627), (u'MNDWI', 0.3433020647495206, -0.41277191754557085), (u'B5', 72.5, 0.3363970042121114), (u'NDWI', 0.38455125913884136, -0.3114385403162398), (u'B5', 15.125, -0.42367907943593436), (u'ratio', 1.7288336636264774, 0.29873586627097254), (u'b2', 827.2238924050632, -0.3807266400174877), (u'b1', 490.9901315789474, 0.35653058641342855), (u'ratio', 1.5704670299891252, 0.4029986460707291), (u'b2', 912.1364715189873, -0.2884661529282731), (u'NDWI', -0.395352185149269, 0.28270986674046317), (u'B1', 79.0625, -0.33478669976778425), (u'NDWI', 0.4280716465968758, -0.27808569593125426), (u'MNDWI', -0.1811726587256471, -0.4277643212788643), (u'NDWI', 0.21046970930670358, -0.47535345223600173), (u'MNDWI', -0.1247741428530824, -0.4532532405442839), (u'NDWI', 0.25399009676473805, -0.3579646150883709), (u'B6', 136.8125, 0.433260616467046), (u'b1', 476.5805921052632, 0.3387323994289085), (u'B3', 29.625, -0.2228446437747992), (u'b1', 469.37582236842104, 0.17408297061563255), (u'ratio', 1.491283713170449, 0.1900202691541482), (u'b2', 954.5927610759493, -0.28090682024123353), (u'ratio', 1.451692054761111, 0.2696401463438538), (u'NDVI', 0.4442480887479201, -0.26025283609038974), (u'LSWIminusEVI', -1.269889491012954, -0.2179140715466851), (u'b1', 465.7734375, 0.2120846094538366)]
# trained on unflooded_new_orleans with landsat
modis_classifiers['new_orleans'] = [(u'B4', 13.375, 1.4669571862477135), (u'b2', 1768.9536616979908, 0.7191964118271637), (u'B3', 18.3125, -0.4070155359645522), (u'LSWIminusEVI', -0.08557300521224676, -0.5810809746072104), (u'B4', 10.6875, -0.5291029708890636), (u'NDWI', 0.6135381706131, -0.42333042815387417), (u'MNDWI', -0.6315152257273133, -0.4508129543642559), (u'NDWI', 0.40244384299830177, -0.4529011567813934), (u'MNDWI', -0.7966635966818656, -0.4229803773880765), (u'NDWI', 0.8246324982278983, -0.4069177636794863), (u'MNDWI', -0.8792377821591417, -0.4443473879013045), (u'NDWI', 0.7190853344204992, -0.4883209250265058), (u'MNDWI', -0.9205248748977797, -0.49636567364951045), (u'NDWI', 0.7718589163241987, -0.47532398301078105), (u'MNDWI', -0.9411684212670988, -0.46105794712582865), (u'NDWI', 0.9301796620352974, -0.44708336474163696), (u'MNDWI', -0.9514901944517582, -0.4449868419505934), (u'NDWI', 0.8774060801315979, -0.4471999560229246), (u'MNDWI', -0.956651081044088, -0.44724569495404887), (u'NDWI', 0.8510192891797481, -0.4452132576283198), (u'MNDWI', -0.9592315243402529, -0.4429423461902555), (u'NDWI', 0.8378258937038232, -0.4412914152487152), (u'MNDWI', -0.46636685477276113, -0.44065814160370703), (u'NDWI', 0.7454721253723489, -0.42970202497381904), (u'MNDWI', -0.9605217459883353, -0.48957048644758405), (u'NDWI', 0.8312291959658608, -0.5099369404270232), (u'MNDWI', -0.9611668568123766, -0.5177206937846746), (u'NDWI', 0.8279308470968796, -0.5208055090499037), (u'MNDWI', -0.9614894122243971, -0.5218294172269368), (u'NDWI', 0.8262816726623889, -0.5221839375535151), (u'MNDWI', -0.9616506899304074, -0.5222930845903063), (u'NDWI', 0.8254570854451436, -0.5222798634644608), (u'MNDWI', -0.9617313287834126, -0.5221948879561688), (u'NDWI', 0.8250447918365209, -0.5221108271103068), (u'MNDWI', -0.9617716482099152, -0.5220471206666469), (u'NDWI', 0.8248386450322096, -0.5220049728945718), (u'MNDWI', -0.9617918079231664, -0.5219766049261293), (u'NDWI', 0.824735571630054, -0.5219580845269158), (u'MNDWI', -0.961801887779792, -0.5219465310519422), (u'NDWI', 0.8246840349289761, -0.5219393305356076), (u'MNDWI', -0.9618069277081049, -0.5219349735701074), (u'NDWI', 0.8246582665784372, -0.521932312793635), (u'MNDWI', -0.9618094476722614, -0.5219307253356017)]
# radar classifiers
# Rome TODO
radar_classifiers['rome'] = [(u'diff', 178.90461847389557, 2.46177797269142), (u'dartmouth', 0.695180948525906, 0.5636808582048225), (u'b2', 3259.75, 0.40623813335255893), (u'vh', 60.0, 0.512954469752306), (u'b1', 600.7550251256282, 0.2801037593761655), (u'diff', 2154.25, 0.22719741605005747), (u'vh', 48.375, 0.1929392221948245), (u'EVI', -0.39797892895956055, -0.26067596700783746), (u'vh', 42.5625, 0.20882052714352622), (u'diff', 263.7538487282463, -0.211052953848031), (u'LSWI', 0.5436867478118161, -0.16553174402115256), (u'diff', 221.32923360107094, -0.15858370383683376), (u'LSWI', 0.45046812317651347, -0.19487772605927273), (u'EVI', -0.40180875045282066, -0.18574586377612953), (u'LSWI', 0.4038588108588621, -0.1607083937449329), (u'dartmouth', 1.0862723406778199, 0.14520750017543604), (u'b1', 365.38253768844226, 0.13710337373549727), (u'diff', 200.11692603748327, -0.12794110582183135), (u'LSWI', 0.38055415470003645, -0.14473310752902216), (u'b1', 1459.25, 0.13486298225301327), (u'MNDWI', 0.45613992940110276, 0.13252409515935595), (u'b1', 483.0687814070352, 0.1234375368417903), (u'vh', 39.65625, 0.10828147089675809), (u'b1', 1653.125, 0.14309662904293483), (u'vh', 30.875, 0.12050226416705825), (u'diff', 189.5107722556894, -0.13029115438110866), (u'dartmouth', 0.567399392562919, 0.12046203774769106), (u'diff', 184.20769536479247, -0.11034439591730216), (u'vh', 33.8125, 0.12078156192671918), (u'EVI', -0.4037236611994507, -0.11025517176478977), (u'LSWIminusEVI', -1.0112946701259427, -0.11523798706849528), (u'diff', 1909.875, -0.10464945907884636), (u'diff', 2032.0625, 0.07976450393456289), (u'dartmouth', 1.15403648079079, -0.1117066685929633), (u'diff', 2093.15625, 0.0968477259918149), (u'b1', 541.9119032663317, 0.07969028249670798), (u'b1', 836.1275125628141, -0.08405908949318663), (u'diff', 181.556156919344, -0.09346085859259494), (u'LSWI', 0.49707743549416483, -0.1085325347020279), (u'EVI', -0.40468111657276573, -0.09747783097236294), (u'vh', 32.34375, 0.09782288286234157), (u'b1', 1750.0625, 0.10205751464991006), (u'b1', 718.4412688442212, -0.09593339090882935), (u'b1', 424.2256595477387, 0.10473543924639585), (u'MNDWI', 0.5560647563672181, 0.06538569127220625), (u'MNDWI', 0.5061023428841604, 0.12118441764008514), (u'vh', 31.609375, 0.1342091965527664), (u'diff', 1787.6875, -0.10241482447678286), (u'MNDWI', 0.5310835496256893, 0.09017490496680071), (u'dartmouth', 1.187918550847275, -0.07281106494462425)]
# Malawi
radar_classifiers['malawi'] = [(u'b1', 1206.75, -1.4978661367770034), (u'vv', 92.25, 1.7076910083270624), (u'vv', 155.625, 0.7927423357058031), (u'LSWI', 0.17814903701073945, -0.5656867478534681), (u'b2', 2386.5, 0.39133434117158), (u'vv', 101.625, 0.494237798312077), (u'EVI', 0.29952058003806714, 0.4815500071179563), (u'vv', 106.3125, 0.3791369535317837), (u'LSWIminusNDVI', -0.16354986340261995, -0.3392309042314572), (u'vv', 108.65625, 0.2514716832021546), (u'b2', 2386.75, 0.3450772215737547), (u'vv', 107.484375, 0.2546137126854733), (u'LSWIminusNDVI', -0.16492926771972327, -0.2120703141095119), (u'vv', 106.8984375, 0.1745865336139307), (u'b2', 2386.875, 0.20753425729944486), (u'vv', 106.60546875, 0.17151475757505275), (u'LSWIminusNDVI', -0.16561896987827493, -0.15231935160185775), (u'vv', 106.458984375, 0.13206764439243204), (u'b2', 2386.9375, 0.14843573703920598), (u'vv', 106.3857421875, 0.1291434356120595), (u'LSWIminusNDVI', -0.16596382095755075, -0.11830301992251846), (u'b2', 2242.25, -0.11673694258002199), (u'vv', 154.4375, 0.14908876959293232), (u'LSWI', 0.1611832167953936, -0.13132406390088658), (u'vv', 153.84375, 0.11576377977859459), (u'vv', 106.34912109375, 0.10789584424489668), (u'b2', 2386.96875, 0.09128013378839395), (u'LSWI', 0.1527003066877207, -0.10621539361861156), (u'vv', 153.546875, 0.09035974506503541), (u'LSWI', 0.14845885163388423, -0.08265186904318825), (u'vv', 153.3984375, 0.07612663467721505), (u'vv', 106.330810546875, 0.08087104691133243), (u'EVI', 0.29940517086505597, 0.08383365337627942), (u'vv', 106.3216552734375, 0.0773362495526882), (u'LSWIminusNDVI', -0.16613624649718867, -0.07278061333579333), (u'vv', 106.31707763671875, 0.06783538228239976), (u'b2', 2386.984375, 0.07162768046483561), (u'LSWI', 0.146338124106966, -0.06916246665080311), (u'vv', 153.32421875, 0.06162461812861291), (u'vv', 106.31478881835938, 0.06613725906318095), (u'EVI', 0.29934746627855036, 0.06260671123906972), (u'vv', 106.31364440917969, 0.05891377646208847), (u'b2', 2386.9921875, 0.06026476394466554), (u'LSWI', 0.1452777603435069, -0.05929864988094706), (u'vv', 153.287109375, 0.053562732376205416), (u'vv', 106.31307220458984, 0.05635435997933675), (u'LSWIminusNDVI', -0.16622245926700763, -0.05460616467334437), (u'vv', 106.31278610229492, 0.051776199455337915), (u'b2', 2386.99609375, 0.053322901499510564), (u'LSWI', 0.14580794222523646, -0.05070452620576959)]
# Mississippi
radar_classifiers['mississippi'] = [(u'NDWI', -0.11622393735660222, -0.8115012757343506), (u'b2', 2985.5263157894738, 0.702679351118156), (u'vv', 5217.619047619048, 0.32062701131953586), (u'MNDWI', 0.26416074525030153, 0.3471969659874681), (u'b1', 1168.775, 0.23958804098018174), (u'b2', 3260.7631578947367, 0.1757460665061179), (u'MNDWI', 0.23640999604191795, 0.16849237965344419), (u'MNDWI', -0.051449424342105275, 0.21073597217765677), (u'LSWIminusNDVI', -0.15381863239050603, 0.261929215268214), (u'MNDWI', 0.10345585696939877, 0.17522339053409086), (u'NDVI', 0.37550520655709846, -0.11678248102474162), (u'ratio', 1.5808138542284427, 0.1307997498783867), (u'MNDWI', 0.22253462143772618, 0.15496439880003274), (u'vv', 23686.289682539682, 0.12065151422211098), (u'LSWIminusNDVI', -0.16578319612225706, 0.10079262433049868), (u'NDWI', 0.01798571473181413, -0.11427381786395764), (u'MNDWI', 0.15605755190146658, 0.12846750517442398), (u'LSWIminusNDVI', -0.15980091425638154, 0.12183307890098613), (u'b2', 3398.3815789473683, 0.0966718411565018), (u'NDWI', -0.035607830086293674, -0.1132584559163686), (u'hv', 4575.416666666667, -0.10741868882123311), (u'NDWI', 0.07157925954992193, -0.10737359754159287), (u'b2', 3467.190789473684, 0.13415083578467207), (u'b1', 1191.3125, -0.11146696782543182), (u'LSWIminusEVI', -2.5247238686545077, 0.11340603990862676), (u'vv', 31272.89484126984, 0.08425074607028928), (u'NDWI', 0.044782487140868035, -0.08653314042576717), (u'b2', 3792.0, 0.1044832325795063), (u'NDVI', 0.43088596754931874, -0.08847969070316128), (u'MNDWI', 0.18235839936750048, 0.07058671161786771), (u'NDWI', 0.058180873345394984, -0.08947323800356782), (u'b2', 3664.0, 0.08796628891143386), (u'NDWI', 0.06488006644765845, -0.07018091636763152), (u'b1', 1180.04375, -0.08727299235554262), (u'LSWIminusNDVI', -0.15680977332344379, 0.08425838412482411), (u'MNDWI', 0.19550882310051743, 0.0619919718523082), (u'NDWI', 0.09837603195897585, -0.08165793068280822), (u'b2', 3600.0, 0.08026689946353305), (u'NDWI', -0.008811057677239772, -0.059679375901025386), (u'hv', 5903.513888888889, -0.06982902975780846), (u'vv', 27479.592261904763, 0.06622628594867959), (u'hv', 51808.0, -0.06271609598725954), (u'vv', 16099.684523809523, -0.06691035524355445), (u'vv', 29376.2435515873, 0.06455229511493261), (u'vv', 19892.9871031746, -0.05233305018274409), (u'b2', 2710.289473684211, 0.05121585389944283), (u'b2', 2847.9078947368425, -0.06272919860762075), (u'b2', 2572.671052631579, 0.083277023990062), (u'b2', 2916.7171052631584, -0.11017977593192452), (u'b2', 2503.8618421052633, 0.08271694814319466)]
|
modis_classifiers = dict()
radar_classifiers = dict()
modis_classifiers['default'] = [(u'dartmouth', 0.30887438055782945, 1.4558371112080295), (u'b2', 2020.1975382568198, 0.9880130793929531), (u'MNDWI', 0.3677501330908955, 0.5140443440746121), (u'b2', 1430.1463073852296, 0.15367606716883875), (u'b1', 1108.5241042345276, 0.13193086117959033), (u'dartmouth', 0.7819758531686796, -0.13210548296374583), (u'dartmouth', 0.604427824270283, 0.12627962195951867), (u'b2', 1725.1719228210247, -0.07293616881105353), (u'b2', 1872.6847305389224, -0.09329031467870501), (u'b2', 1577.659115103127, 0.1182474134065663), (u'b2', 1946.441134397871, -0.13595282841411163), (u'b2', 2610.24876912841, 0.10010381165310277), (u'b2', 1983.3193363273454, -0.0934455057392682), (u'b2', 1503.9027112441784, 0.13483194249576771), (u'b2', 2001.7584372920826, -0.10099203054937314), (u'b2', 2905.2743845642053, 0.1135686859467779), (u'dartmouth', 0.5156538098210846, 0.07527677772747364), (u'b2', 2010.9779877744513, -0.09535260187161688), (u'b2', 1798.9283266799735, 0.07889358547222977), (u'dartmouth', 0.36787708796485785, -0.07370319016383906), (u'MNDWI', -0.6422574132273133, 0.06922934793487515), (u'dartmouth', 0.33837573426134365, -0.10266747186797487), (u'dartmouth', 0.4712668025964854, 0.09612545197834421), (u'dartmouth', 0.3236250574095866, -0.10754218805531587), (u'MNDWI', -0.48248013602276113, 0.111365639029263), (u'dartmouth', 0.316249718983708, -0.10620217821842894), (u'dartmouth', 0.4490732989841858, 0.09743861137429623), (u'dartmouth', 0.31256204977076874, -0.08121162639185005), (u'MNDWI', -0.5623687746250372, 0.10344420165347998), (u'dartmouth', 0.3107182151642991, -0.08899821447581886), (u'LSWI', -0.29661326544921773, 0.08652882218688322), (u'dartmouth', 0.3097962978610643, -0.07503568257204306), (u'MNDWI', 0.022523637136343283, 0.08765150582301148), (u'b2', 2015.5877630156356, -0.06978548014829108), (u'b2', 3052.7871922821028, 0.08567389991115743), (u'LSWI', -0.19275063787434812, 0.08357667312445341), (u'dartmouth', 0.3093353392094469, -0.08053950648462435), (u'LSWI', -0.14081932408691333, 0.07186342090261867), (u'dartmouth', 0.30910485988363817, -0.05720223719278896), (u'MNDWI', 0.19513688511361937, 0.07282637257701345), (u'NDWI', -0.361068160450533, 0.06565995208358431), (u'NDWI', -0.2074005503754442, -0.0522715989389411), (u'b1', 775.4361563517915, 0.05066415016422507), (u'b2', 2017.8926506362277, -0.0596357907686033), (u'b2', 1762.050124750499, 0.06600172638129476), (u'b2', 2019.0450944465238, -0.05498763067596745), (u'b1', 941.9801302931596, 0.06500771792028737), (u'dartmouth', 0.24987167315080105, 0.06409775979747406), (u'b2', 2979.0307884231543, 0.06178896578945445), (u'dartmouth', 0.22037031944728686, 0.04708770942378687), (u'dartmouth', 0.30898962022073384, -0.06357932266591948), (u'EVI', -0.13991172174597732, 0.061167901067941045), (u'dartmouth', 0.30893200038928165, -0.047538992866687814), (u'dartmouth', 0.23512099629904396, 0.055800430467148325), (u'dartmouth', 0.3089031904735555, -0.04993911823852714), (u'dartmouth', 0.22774565787316542, 0.045917043382747345), (u'b1', 232.32231270358304, -0.04624672841408699), (u'LSWIminusEVI', -1.3902019910129537, 0.044122210356250594), (u'fai', 914.8719936250361, 0.04696283008449494), (u'b2', 2019.6213163516718, -0.051114386132496435), (u'b2', 2315.2231536926147, 0.048898662215419296), (u'fai', 1434.706585047812, -0.05352547959475242), (u'diff', -544.4250000000001, -0.04459039609050114), (u'dartmouth', 0.39737844166837205, 0.045452678171318414), (u'dartmouth', 0.3088887855156925, -0.03891014191130265), (u'dartmouth', 0.22405798866022614, 0.042128457713671935), (u'diff', -777.2958333333333, -0.03902784979889064), (u'dartmouth', 0.2222141540537565, 0.03788131334473313), (u'dartmouth', 0.30888158303676094, -0.037208213701295255), (u'dartmouth', 0.3531264111131007, 0.0375648736301961), (u'dartmouth', 0.3088779817972952, -0.03427856593613819), (u'LSWI', -0.16678498098063071, 0.03430983541990538), (u'fai', -425.5957838307736, -0.03348006551810443), (u'NDWI', -0.13056674533789978, -0.03552899660957818), (u'b2', 2019.3332053990978, -0.0344936369203531), (u'b2', 1835.806528609448, 0.03856210900250611), (u'b2', 1467.0245093147041, -0.0345449746977328), (u'fai', 395.0374022022602, 0.031130251540884356), (u'fai', 654.9546979136481, 0.04214466417320743), (u'b2', 1448.5854083499669, -0.05667775728680656), (u'fai', 135.12010649087222, 0.03948338203848539), (u'dartmouth', 0.493460306208785, -0.045802615250103394), (u'fai', 784.9133457693422, 0.03128133499873274), (u'fai', 1174.7892893364242, -0.04413487095880613), (u'b2', 3015.9089903526283, 0.04133685218791008), (u'fai', 1304.7479371921181, -0.04107557606064173), (u'b2', 2462.7359614105126, 0.03777625735990945), (u'fai', 1369.727261119965, -0.03524600268462714), (u'b2', 2997.4698893878913, 0.03864830537283341), (u'dartmouth', 0.22313607135699132, 0.0348041704038284), (u'fai', -575.9950811359025, -0.036345846940478974), (u'fai', 1402.2169230838886, -0.03481517966048645), (u'fai', 719.9340218414952, 0.032833655233338276), (u'b2', 2019.1891499228109, -0.03272953788499046), (u'b2', 2388.9795575515636, 0.03713369823962704), (u'b2', 2019.1171221846673, -0.027949075715791222), (u'b2', 1743.611023785762, 0.03310357200312585), (u'LSWIminusNDVI', -0.3990346417915731, 0.029045726328998267), (u'NDWI', -0.16898364785667197, -0.025735337614573982), (u'dartmouth', 0.3088761811775623, -0.02973898070330325)]
modis_classifiers['lakes'] = [(u'dartmouth', 0.3191065854189406, 1.557305460141852), (u'MNDWI', 0.36596171757859164, 0.6348226054395288), (u'fai', 1076.7198220279101, 0.30760696551024047), (u'b1', 2490.1666666666665, 0.15428815637057783), (u'b1', 1382.4166666666665, 0.23468676605683622), (u'MNDWI', 0.016043270812331922, 0.2328762729873063), (u'diff', 1348.2627965043696, 0.0893530403812219), (u'EVI', -0.936229495395644, -0.0634313110230615), (u'EVI', 0.15713514272585227, -0.1369834357186273), (u'MNDWI', 0.19100249419546178, 0.1396065269707512), (u'EVI', -0.3895471763348959, -0.0699137042914175), (u'fai', -167.53021645595163, 0.09996436618217863), (u'diff', 3321.3055555555557, 0.09048885842380311), (u'fai', -39.46036556514488, 0.10447135022949844), (u'LSWIminusEVI', -1.8703796507388168, -0.08555612086933119), (u'fai', 24.57455988025849, 0.06788717248868892), (u'EVI', -0.1162060168045218, -0.07076437875624517), (u'EVI', 0.020464562960665234, -0.06640347420417587), (u'MNDWI', 0.2784821058870267, 0.0724098935614613), (u'LSWIminusEVI', -1.4401890608008658, -0.07070792766742959), (u'fai', -7.442902842443196, 0.07045138322018761), (u'EVI', -0.047870726921928286, -0.07285420746159146), (u'LSWIminusEVI', -1.2250937658318906, -0.055977386707896926), (u'b2', 3161.583333333333, -0.06589191057236488), (u'b2', 4305.708333333333, 0.04837026087353021), (u'dartmouth', 0.38322539525652455, 0.06306567258296356), (u'b2', 3733.645833333333, 0.054927931406532564), (u'dartmouth', 0.41528480017531655, 0.06032232647772757), (u'b2', 4019.677083333333, 0.0519316593408497), (u'dartmouth', 0.43131450263471255, 0.04868064475460096), (u'EVI', -0.013703081980631526, -0.052847995106752886), (u'b1', 828.5416666666666, -0.045046979840081554), (u'dartmouth', 0.4393293538644105, 0.03393621379393856), (u'b2', 436.6666666666667, -0.058719990230070525), (u'dartmouth', 0.44333677947925954, 0.055475163457599744), (u'dartmouth', 0.35116599033773255, -0.04464212550237975), (u'diff', 1956.9369538077403, -0.044786403818468996), (u'fai', 582.664653676786, 0.034362389553391215), (u'dartmouth', 0.3351362878783366, -0.03792028656513705), (u'dartmouth', 0.44534049228668404, 0.05187952065328861), (u'dartmouth', 0.3271214366486386, -0.05470657728868695), (u'MNDWI', -0.6666113750420029, 0.05405507219193603), (u'dartmouth', 0.32311401103378956, -0.05376528359478583), (u'dartmouth', 0.4463423486903963, 0.05449932480484019), (u'dartmouth', 0.32111029822636505, -0.0508089033370553), (u'MNDWI', -0.5002432754979653, 0.05120260867296932), (u'dartmouth', 0.32010844182265286, -0.0486732927468307), (u'dartmouth', 0.44684327689225245, 0.04692181887347917), (u'dartmouth', 0.31960751362079676, -0.04268244773234967), (u'MNDWI', -0.5834273252699841, 0.04712231236239887), (u'dartmouth', 0.31935704951986865, -0.04401637387406991), (u'MNDWI', -0.6250193501559935, 0.040914589219895145), (u'dartmouth', 0.31923181746940466, -0.038101469357921955), (u'dartmouth', 0.4470937409931805, 0.03911555294126862), (u'fai', 335.6370695012239, -0.0367701043425464), (u'fai', 212.12327741344288, -0.029512647597407196), (u'diff', 739.5886392009988, 0.04428176152799306), (u'diff', 1043.925717852684, 0.03722820575844798), (u'fai', 273.8801734573334, -0.04948130454705945), (u'dartmouth', 0.2549877755813566, 0.03377180068269043), (u'MNDWI', 0.3222219117328092, -0.04255121251198512), (u'diff', 1196.0942571785267, 0.045470427081376316), (u'MNDWI', 0.3440918146557004, -0.047085347000781985), (u'MNDWI', 0.23474230004124425, 0.04054075125347783), (u'MNDWI', 0.355026766117146, -0.046736584848805475), (u'MNDWI', 0.30035200880991797, 0.04078965556380944), (u'MNDWI', 0.3604942418478688, -0.04776704868198665), (u'LSWIminusNDVI', -0.5568084053554159, -0.04437083563150389), (u'MNDWI', 0.3112869602713636, 0.036248827530157374), (u'MNDWI', 0.36322797971323023, -0.04875479813967596), (u'MNDWI', 0.3167544360020864, 0.04123070622165848), (u'MNDWI', 0.36459484864591096, -0.03810930893128258), (u'diff', 1120.0099875156054, 0.035777913949894054), (u'fai', 829.6922378523481, -0.047446531409649384), (u'diff', 1081.9678526841449, 0.03507927976215228), (u'fai', 953.2060299401292, -0.04108410252021359), (u'b2', 4162.692708333333, 0.04836338373525389), (u'dartmouth', 0.44721897304364455, 0.03740129289331726), (u'dartmouth', 0.3191692014441726, -0.03601093736536919), (u'fai', 1014.9629259840196, -0.03601118264855319), (u'diff', 1158.052122347066, 0.04506611179539899), (u'fai', 1045.841374005965, -0.03593891978458228), (u'diff', 1652.599875156055, 0.03514766129091426), (u'fai', 1061.2805980169376, -0.034972506816040166), (u'fai', 1570.7749903790343, 0.03247104395760117), (u'MNDWI', -0.6042233377129889, 0.03328561186493601), (u'b2', 4091.184895833333, 0.03369074877033)]
modis_classifiers['mississippi_5'] = [(u'B5', 22.5, 1.424016860332339)]
modis_classifiers['mississippi'] = [(u'B5', 20.25, 1.4064982148857947), (u'NDWI', -0.3488199979104613, -1.1281588137098968), (u'MNDWI', 0.2060761675061745, -0.6204705541547991), (u'NDWI', 0.12342893439063468, -0.43739127359050894), (u'B6', 130.03125, -0.7385587172087229), (u'NDWI', -0.050652615441503096, -0.6351588979749766), (u'MNDWI', 0.0688502702628284, -0.7096006602751659), (u'NDWI', -0.137693390357572, -0.6767143211075154), (u'MNDWI', 0.00023732164115535664, -0.4784325526693348), (u'NDWI', 0.6956693010823654, -0.5175430073894397), (u'B6', 129.515625, -0.7658727652948186), (u'NDWI', 0.5836306675686378, -0.8230539867550758)]
modis_classifiers['new_orleans'] = [(u'B4', 13.375, 1.4669571862477135), (u'b2', 1768.9536616979908, 0.7191964118271637), (u'B3', 18.3125, -0.4070155359645522), (u'LSWIminusEVI', -0.08557300521224676, -0.5810809746072104), (u'B4', 10.6875, -0.5291029708890636), (u'NDWI', 0.6135381706131, -0.42333042815387417), (u'MNDWI', -0.6315152257273133, -0.4508129543642559), (u'NDWI', 0.40244384299830177, -0.4529011567813934), (u'MNDWI', -0.7966635966818656, -0.4229803773880765), (u'NDWI', 0.8246324982278983, -0.4069177636794863), (u'MNDWI', -0.8792377821591417, -0.4443473879013045), (u'NDWI', 0.7190853344204992, -0.4883209250265058), (u'MNDWI', -0.9205248748977797, -0.49636567364951045), (u'NDWI', 0.7718589163241987, -0.47532398301078105), (u'MNDWI', -0.9411684212670988, -0.46105794712582865), (u'NDWI', 0.9301796620352974, -0.44708336474163696), (u'MNDWI', -0.9514901944517582, -0.4449868419505934), (u'NDWI', 0.8774060801315979, -0.4471999560229246), (u'MNDWI', -0.956651081044088, -0.44724569495404887), (u'NDWI', 0.8510192891797481, -0.4452132576283198), (u'MNDWI', -0.9592315243402529, -0.4429423461902555), (u'NDWI', 0.8378258937038232, -0.4412914152487152), (u'MNDWI', -0.46636685477276113, -0.44065814160370703), (u'NDWI', 0.7454721253723489, -0.42970202497381904), (u'MNDWI', -0.9605217459883353, -0.48957048644758405), (u'NDWI', 0.8312291959658608, -0.5099369404270232), (u'MNDWI', -0.9611668568123766, -0.5177206937846746), (u'NDWI', 0.8279308470968796, -0.5208055090499037), (u'MNDWI', -0.9614894122243971, -0.5218294172269368), (u'NDWI', 0.8262816726623889, -0.5221839375535151), (u'MNDWI', -0.9616506899304074, -0.5222930845903063), (u'NDWI', 0.8254570854451436, -0.5222798634644608), (u'MNDWI', -0.9617313287834126, -0.5221948879561688), (u'NDWI', 0.8250447918365209, -0.5221108271103068), (u'MNDWI', -0.9617716482099152, -0.5220471206666469), (u'NDWI', 0.8248386450322096, -0.5220049728945718), (u'MNDWI', -0.9617918079231664, -0.5219766049261293), (u'NDWI', 0.824735571630054, -0.5219580845269158), (u'MNDWI', -0.961801887779792, -0.5219465310519422), (u'NDWI', 0.8246840349289761, -0.5219393305356076), (u'MNDWI', -0.9618069277081049, -0.5219349735701074), (u'NDWI', 0.8246582665784372, -0.521932312793635), (u'MNDWI', -0.9618094476722614, -0.5219307253356017)]
radar_classifiers['rome'] = [(u'diff', 178.90461847389557, 2.46177797269142), (u'dartmouth', 0.695180948525906, 0.5636808582048225), (u'b2', 3259.75, 0.40623813335255893), (u'vh', 60.0, 0.512954469752306), (u'b1', 600.7550251256282, 0.2801037593761655), (u'diff', 2154.25, 0.22719741605005747), (u'vh', 48.375, 0.1929392221948245), (u'EVI', -0.39797892895956055, -0.26067596700783746), (u'vh', 42.5625, 0.20882052714352622), (u'diff', 263.7538487282463, -0.211052953848031), (u'LSWI', 0.5436867478118161, -0.16553174402115256), (u'diff', 221.32923360107094, -0.15858370383683376), (u'LSWI', 0.45046812317651347, -0.19487772605927273), (u'EVI', -0.40180875045282066, -0.18574586377612953), (u'LSWI', 0.4038588108588621, -0.1607083937449329), (u'dartmouth', 1.0862723406778199, 0.14520750017543604), (u'b1', 365.38253768844226, 0.13710337373549727), (u'diff', 200.11692603748327, -0.12794110582183135), (u'LSWI', 0.38055415470003645, -0.14473310752902216), (u'b1', 1459.25, 0.13486298225301327), (u'MNDWI', 0.45613992940110276, 0.13252409515935595), (u'b1', 483.0687814070352, 0.1234375368417903), (u'vh', 39.65625, 0.10828147089675809), (u'b1', 1653.125, 0.14309662904293483), (u'vh', 30.875, 0.12050226416705825), (u'diff', 189.5107722556894, -0.13029115438110866), (u'dartmouth', 0.567399392562919, 0.12046203774769106), (u'diff', 184.20769536479247, -0.11034439591730216), (u'vh', 33.8125, 0.12078156192671918), (u'EVI', -0.4037236611994507, -0.11025517176478977), (u'LSWIminusEVI', -1.0112946701259427, -0.11523798706849528), (u'diff', 1909.875, -0.10464945907884636), (u'diff', 2032.0625, 0.07976450393456289), (u'dartmouth', 1.15403648079079, -0.1117066685929633), (u'diff', 2093.15625, 0.0968477259918149), (u'b1', 541.9119032663317, 0.07969028249670798), (u'b1', 836.1275125628141, -0.08405908949318663), (u'diff', 181.556156919344, -0.09346085859259494), (u'LSWI', 0.49707743549416483, -0.1085325347020279), (u'EVI', -0.40468111657276573, -0.09747783097236294), (u'vh', 32.34375, 0.09782288286234157), (u'b1', 1750.0625, 0.10205751464991006), (u'b1', 718.4412688442212, -0.09593339090882935), (u'b1', 424.2256595477387, 0.10473543924639585), (u'MNDWI', 0.5560647563672181, 0.06538569127220625), (u'MNDWI', 0.5061023428841604, 0.12118441764008514), (u'vh', 31.609375, 0.1342091965527664), (u'diff', 1787.6875, -0.10241482447678286), (u'MNDWI', 0.5310835496256893, 0.09017490496680071), (u'dartmouth', 1.187918550847275, -0.07281106494462425)]
radar_classifiers['malawi'] = [(u'b1', 1206.75, -1.4978661367770034), (u'vv', 92.25, 1.7076910083270624), (u'vv', 155.625, 0.7927423357058031), (u'LSWI', 0.17814903701073945, -0.5656867478534681), (u'b2', 2386.5, 0.39133434117158), (u'vv', 101.625, 0.494237798312077), (u'EVI', 0.29952058003806714, 0.4815500071179563), (u'vv', 106.3125, 0.3791369535317837), (u'LSWIminusNDVI', -0.16354986340261995, -0.3392309042314572), (u'vv', 108.65625, 0.2514716832021546), (u'b2', 2386.75, 0.3450772215737547), (u'vv', 107.484375, 0.2546137126854733), (u'LSWIminusNDVI', -0.16492926771972327, -0.2120703141095119), (u'vv', 106.8984375, 0.1745865336139307), (u'b2', 2386.875, 0.20753425729944486), (u'vv', 106.60546875, 0.17151475757505275), (u'LSWIminusNDVI', -0.16561896987827493, -0.15231935160185775), (u'vv', 106.458984375, 0.13206764439243204), (u'b2', 2386.9375, 0.14843573703920598), (u'vv', 106.3857421875, 0.1291434356120595), (u'LSWIminusNDVI', -0.16596382095755075, -0.11830301992251846), (u'b2', 2242.25, -0.11673694258002199), (u'vv', 154.4375, 0.14908876959293232), (u'LSWI', 0.1611832167953936, -0.13132406390088658), (u'vv', 153.84375, 0.11576377977859459), (u'vv', 106.34912109375, 0.10789584424489668), (u'b2', 2386.96875, 0.09128013378839395), (u'LSWI', 0.1527003066877207, -0.10621539361861156), (u'vv', 153.546875, 0.09035974506503541), (u'LSWI', 0.14845885163388423, -0.08265186904318825), (u'vv', 153.3984375, 0.07612663467721505), (u'vv', 106.330810546875, 0.08087104691133243), (u'EVI', 0.29940517086505597, 0.08383365337627942), (u'vv', 106.3216552734375, 0.0773362495526882), (u'LSWIminusNDVI', -0.16613624649718867, -0.07278061333579333), (u'vv', 106.31707763671875, 0.06783538228239976), (u'b2', 2386.984375, 0.07162768046483561), (u'LSWI', 0.146338124106966, -0.06916246665080311), (u'vv', 153.32421875, 0.06162461812861291), (u'vv', 106.31478881835938, 0.06613725906318095), (u'EVI', 0.29934746627855036, 0.06260671123906972), (u'vv', 106.31364440917969, 0.05891377646208847), (u'b2', 2386.9921875, 0.06026476394466554), (u'LSWI', 0.1452777603435069, -0.05929864988094706), (u'vv', 153.287109375, 0.053562732376205416), (u'vv', 106.31307220458984, 0.05635435997933675), (u'LSWIminusNDVI', -0.16622245926700763, -0.05460616467334437), (u'vv', 106.31278610229492, 0.051776199455337915), (u'b2', 2386.99609375, 0.053322901499510564), (u'LSWI', 0.14580794222523646, -0.05070452620576959)]
radar_classifiers['mississippi'] = [(u'NDWI', -0.11622393735660222, -0.8115012757343506), (u'b2', 2985.5263157894738, 0.702679351118156), (u'vv', 5217.619047619048, 0.32062701131953586), (u'MNDWI', 0.26416074525030153, 0.3471969659874681), (u'b1', 1168.775, 0.23958804098018174), (u'b2', 3260.7631578947367, 0.1757460665061179), (u'MNDWI', 0.23640999604191795, 0.16849237965344419), (u'MNDWI', -0.051449424342105275, 0.21073597217765677), (u'LSWIminusNDVI', -0.15381863239050603, 0.261929215268214), (u'MNDWI', 0.10345585696939877, 0.17522339053409086), (u'NDVI', 0.37550520655709846, -0.11678248102474162), (u'ratio', 1.5808138542284427, 0.1307997498783867), (u'MNDWI', 0.22253462143772618, 0.15496439880003274), (u'vv', 23686.289682539682, 0.12065151422211098), (u'LSWIminusNDVI', -0.16578319612225706, 0.10079262433049868), (u'NDWI', 0.01798571473181413, -0.11427381786395764), (u'MNDWI', 0.15605755190146658, 0.12846750517442398), (u'LSWIminusNDVI', -0.15980091425638154, 0.12183307890098613), (u'b2', 3398.3815789473683, 0.0966718411565018), (u'NDWI', -0.035607830086293674, -0.1132584559163686), (u'hv', 4575.416666666667, -0.10741868882123311), (u'NDWI', 0.07157925954992193, -0.10737359754159287), (u'b2', 3467.190789473684, 0.13415083578467207), (u'b1', 1191.3125, -0.11146696782543182), (u'LSWIminusEVI', -2.5247238686545077, 0.11340603990862676), (u'vv', 31272.89484126984, 0.08425074607028928), (u'NDWI', 0.044782487140868035, -0.08653314042576717), (u'b2', 3792.0, 0.1044832325795063), (u'NDVI', 0.43088596754931874, -0.08847969070316128), (u'MNDWI', 0.18235839936750048, 0.07058671161786771), (u'NDWI', 0.058180873345394984, -0.08947323800356782), (u'b2', 3664.0, 0.08796628891143386), (u'NDWI', 0.06488006644765845, -0.07018091636763152), (u'b1', 1180.04375, -0.08727299235554262), (u'LSWIminusNDVI', -0.15680977332344379, 0.08425838412482411), (u'MNDWI', 0.19550882310051743, 0.0619919718523082), (u'NDWI', 0.09837603195897585, -0.08165793068280822), (u'b2', 3600.0, 0.08026689946353305), (u'NDWI', -0.008811057677239772, -0.059679375901025386), (u'hv', 5903.513888888889, -0.06982902975780846), (u'vv', 27479.592261904763, 0.06622628594867959), (u'hv', 51808.0, -0.06271609598725954), (u'vv', 16099.684523809523, -0.06691035524355445), (u'vv', 29376.2435515873, 0.06455229511493261), (u'vv', 19892.9871031746, -0.05233305018274409), (u'b2', 2710.289473684211, 0.05121585389944283), (u'b2', 2847.9078947368425, -0.06272919860762075), (u'b2', 2572.671052631579, 0.083277023990062), (u'b2', 2916.7171052631584, -0.11017977593192452), (u'b2', 2503.8618421052633, 0.08271694814319466)]
|
def N():
for row in range(7):
for col in range(7):
if (col==0 or col==6) or row-col==0:
print("*",end=" ")
else:
print(end=" ")
print()
|
def n():
for row in range(7):
for col in range(7):
if (col == 0 or col == 6) or row - col == 0:
print('*', end=' ')
else:
print(end=' ')
print()
|
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def addOneRow(self, root, v, d):
"""
:type root: TreeNode
:type v: int
:type d: int
:rtype: TreeNode
"""
# BFS is even better because it terminates much earlier
dummy = TreeNode(-1)
dummy.left = root
stack = [(1, dummy, 0)]
while stack:
p, node, h = stack.pop()
if not node:
continue
if p == 1:
stack.extend([(1, node.right, h + 1), (1, node.left, h + 1), (0, node, h + 1)])
elif h == d:
left = node.left
right = node.right
node.left, node.right = map(TreeNode, (v,v))
node.left.left = left
node.right.right = right
return dummy.left
|
class Solution(object):
def add_one_row(self, root, v, d):
"""
:type root: TreeNode
:type v: int
:type d: int
:rtype: TreeNode
"""
dummy = tree_node(-1)
dummy.left = root
stack = [(1, dummy, 0)]
while stack:
(p, node, h) = stack.pop()
if not node:
continue
if p == 1:
stack.extend([(1, node.right, h + 1), (1, node.left, h + 1), (0, node, h + 1)])
elif h == d:
left = node.left
right = node.right
(node.left, node.right) = map(TreeNode, (v, v))
node.left.left = left
node.right.right = right
return dummy.left
|
a=list(map(int,input().split(',')))[:4]
x,y,p,q=a[0],a[1],a[2],a[3]
b1,b2,b3=1,1,1
print(b1,'C',x,b2,'H',y,',',b3,',C',p,'H',q)
print((b1*x+b2*y),(b3*(p*q)))
while (b1*x+b2*y)!=(b3*(p*q)):
while b1*x!=b3*p:
print('l1')
if b1*x!=p:
b1+=1
elif x!=b3*p:
b3+=1
else:
b1+=1
b3+=1
while b2*y!=b3*q:
print('l2')
if b2*y!=q:
b2+=1
elif y!=b3*q:
b3+=1
else:
b2+=1
b3+=1
print(b1,'C',x,b2,'H',y,',',b3,',C',p,'H',q)
|
a = list(map(int, input().split(',')))[:4]
(x, y, p, q) = (a[0], a[1], a[2], a[3])
(b1, b2, b3) = (1, 1, 1)
print(b1, 'C', x, b2, 'H', y, ',', b3, ',C', p, 'H', q)
print(b1 * x + b2 * y, b3 * (p * q))
while b1 * x + b2 * y != b3 * (p * q):
while b1 * x != b3 * p:
print('l1')
if b1 * x != p:
b1 += 1
elif x != b3 * p:
b3 += 1
else:
b1 += 1
b3 += 1
while b2 * y != b3 * q:
print('l2')
if b2 * y != q:
b2 += 1
elif y != b3 * q:
b3 += 1
else:
b2 += 1
b3 += 1
print(b1, 'C', x, b2, 'H', y, ',', b3, ',C', p, 'H', q)
|
league_schema_name = None
def tn(tablename: str) -> str:
if league_schema_name is not None:
return '`{0}`.`{1}`'.format(league_schema_name, tablename)
else:
return '`{0}`'.format(tablename)
|
league_schema_name = None
def tn(tablename: str) -> str:
if league_schema_name is not None:
return '`{0}`.`{1}`'.format(league_schema_name, tablename)
else:
return '`{0}`'.format(tablename)
|
A = [1, 2, 3]
for i, x in enumerate(A):
A[i] += x
B = A[0]
C = A[0]
D: int = 3
while C < A[2]:
C += 1
if C == A[2]:
print('True')
def main():
print("Main started")
print(A)
print(B)
print(C)
print(D)
if __name__ == '__main__':
main()
|
a = [1, 2, 3]
for (i, x) in enumerate(A):
A[i] += x
b = A[0]
c = A[0]
d: int = 3
while C < A[2]:
c += 1
if C == A[2]:
print('True')
def main():
print('Main started')
print(A)
print(B)
print(C)
print(D)
if __name__ == '__main__':
main()
|
# Folders
FOLDER_SCHEMA = "graphql"
# Packages
PACKAGE_RESOLVERS = "resolvers"
# Modules
MODULE_MODELS = "models"
MODULE_DIRECTIVES = "directives"
MODULE_SETTINGS = "settings"
MODULE_PYDANTIC = "pyd_models"
|
folder_schema = 'graphql'
package_resolvers = 'resolvers'
module_models = 'models'
module_directives = 'directives'
module_settings = 'settings'
module_pydantic = 'pyd_models'
|
"""
The ``covertutils`` module provides ready plug-n-play tools for `Remote Code Execution Agent` programming.
Features like `chunking`, `encryption`, `data identification` are all handled transparently by its classes.
The :class:`SimpleOrchestrator` handles all data manipulation, and the :class:`Handlers.BaseHandler` derivative classes handle the agent's and handler's actions and responses.
The module does not provide networking functionalities. All networking has to be wrapped by two functions (a sender and a receiver functions) and Handlers will use those for raw_data.
"""
__version__ = '0.3.4'
__name__ = 'covertutils'
__author__ = 'John Torakis - operatorequals'
__email__ = '[email protected]'
__github__ = 'https://github.com/operatorequals/covertutils'
__readthedocs__ = 'https://covertutils.readthedocs.io'
|
"""
The ``covertutils`` module provides ready plug-n-play tools for `Remote Code Execution Agent` programming.
Features like `chunking`, `encryption`, `data identification` are all handled transparently by its classes.
The :class:`SimpleOrchestrator` handles all data manipulation, and the :class:`Handlers.BaseHandler` derivative classes handle the agent's and handler's actions and responses.
The module does not provide networking functionalities. All networking has to be wrapped by two functions (a sender and a receiver functions) and Handlers will use those for raw_data.
"""
__version__ = '0.3.4'
__name__ = 'covertutils'
__author__ = 'John Torakis - operatorequals'
__email__ = '[email protected]'
__github__ = 'https://github.com/operatorequals/covertutils'
__readthedocs__ = 'https://covertutils.readthedocs.io'
|
# 2. Matching Parentheses
# You are given an algebraic expression with parentheses. Scan through the string and extract each set of parentheses.
# Print the result back on the console.
string = list(input())
stack_index = []
for index in range(len(string)):
if string[index] == "(":
stack_index.append(index)
elif string[index] == ")":
start_index = stack_index.pop()
end_index = index
parentheses_set = string[start_index:end_index+1]
print(''.join(parentheses_set))
|
string = list(input())
stack_index = []
for index in range(len(string)):
if string[index] == '(':
stack_index.append(index)
elif string[index] == ')':
start_index = stack_index.pop()
end_index = index
parentheses_set = string[start_index:end_index + 1]
print(''.join(parentheses_set))
|
#
# PySNMP MIB module JUNIPER-FABRIC-CHASSIS (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/JUNIPER-FABRIC-CHASSIS
# Produced by pysmi-0.3.4 at Wed May 1 13:59:10 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint")
JnxChassisId, = mibBuilder.importSymbols("JUNIPER-MIB", "JnxChassisId")
jnxDcfMibRoot, jnxFabricChassisTraps, jnxFabricChassisOKTraps = mibBuilder.importSymbols("JUNIPER-SMI", "jnxDcfMibRoot", "jnxFabricChassisTraps", "jnxFabricChassisOKTraps")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
MibIdentifier, ObjectIdentity, ModuleIdentity, Counter32, Integer32, IpAddress, Bits, iso, Counter64, TimeTicks, Gauge32, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "ObjectIdentity", "ModuleIdentity", "Counter32", "Integer32", "IpAddress", "Bits", "iso", "Counter64", "TimeTicks", "Gauge32", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32")
DisplayString, TextualConvention, DateAndTime = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "DateAndTime")
jnxFabricAnatomy = ModuleIdentity((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2))
jnxFabricAnatomy.setRevisions(('2012-09-13 00:00', '2012-07-26 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: jnxFabricAnatomy.setRevisionsDescriptions(('Added director group device (DG) enum to JnxFabricContainersFamily.', 'Modified the description for JnxFabricDeviceId. Added ufabric as part of JnxFabricContainersFamily.',))
if mibBuilder.loadTexts: jnxFabricAnatomy.setLastUpdated('201209130000Z')
if mibBuilder.loadTexts: jnxFabricAnatomy.setOrganization('Juniper Networks, Inc.')
if mibBuilder.loadTexts: jnxFabricAnatomy.setContactInfo(' Juniper Technical Assistance Center Juniper Networks, Inc. 1194 N. Mathilda Avenue Sunnyvale, CA 94089 E-mail: [email protected]')
if mibBuilder.loadTexts: jnxFabricAnatomy.setDescription("The MIB modules representing Juniper Networks' Quantum Fabric hardware components.")
jnxFabricAnatomyScalars = MibIdentifier((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1))
jnxFabricAnatomyTables = MibIdentifier((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2))
class JnxFabricDeviceId(TextualConvention, Integer32):
description = 'The device identifier assigned to the individual devices across the fabric by SFC. This shall be a unique index for each of the devices constituting the fabric.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 2147483647)
class JnxFabricContainersFamily(TextualConvention, Integer32):
description = 'The family of container that defines the device.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("fabricChassis", 1), ("fabricNode", 2), ("ufabric", 3), ("directorGroupDevice", 4))
jnxFabricClass = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 1), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricClass.setStatus('current')
if mibBuilder.loadTexts: jnxFabricClass.setDescription('The product line of the fabric switch.')
jnxFabricDescr = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDescr.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDescr.setDescription('The name, model, or detailed description of the fabric, indicating which product the fabric is about.')
jnxFabricSerialNo = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricSerialNo.setStatus('current')
if mibBuilder.loadTexts: jnxFabricSerialNo.setDescription('The serial number of this subject, blank if unknown or unavailable.')
jnxFabricRevision = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRevision.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRevision.setDescription('The revision of this subject, blank if unknown or unavailable.')
jnxFabricFirmwareRevision = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFirmwareRevision.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFirmwareRevision.setDescription('The firmware (u-boot) revision of this subject, blank if unknown or unavailable.')
jnxFabricLastInstalled = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 6), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricLastInstalled.setStatus('current')
if mibBuilder.loadTexts: jnxFabricLastInstalled.setDescription('The value of sysUpTime when the subject was last installed, up-and-running. Zero if unknown or already up-and-running when the agent was up.')
jnxFabricContentsLastChange = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 7), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsLastChange.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsLastChange.setDescription('The value of sysUpTime when the fabric contents table last changed. Zero if unknown or already existing when the agent was up.')
jnxFabricFilledLastChange = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 8), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFilledLastChange.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFilledLastChange.setDescription('The value of sysUpTime when the fabric filled status table last changed. Zero if unknown or already at that state when the agent was up.')
jnxFabricDeviceTable = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1), )
if mibBuilder.loadTexts: jnxFabricDeviceTable.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceTable.setDescription('A list of fabric device entries.')
jnxFabricDeviceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1), ).setIndexNames((0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"))
if mibBuilder.loadTexts: jnxFabricDeviceEntry.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntry.setDescription('An entry of fabric device table.')
jnxFabricDeviceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 1), JnxFabricDeviceId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceIndex.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceIndex.setDescription('Identifies the device on which the contents of this row exists.')
jnxFabricDeviceEntryContainersFamily = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 2), JnxFabricContainersFamily()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceEntryContainersFamily.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntryContainersFamily.setDescription('The family of container that defines this device.')
jnxFabricDeviceEntryClass = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 3), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceEntryClass.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntryClass.setDescription('The productline of the device entry.')
jnxFabricDeviceEntryModel = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 4), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceEntryModel.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntryModel.setDescription('The model object identifier of the device entry.')
jnxFabricDeviceEntryDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceEntryDescr.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntryDescr.setDescription('The name or detailed description of the device entry.')
jnxFabricDeviceEntrySerialNo = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceEntrySerialNo.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntrySerialNo.setDescription('The serial number of this subject, blank if unknown or unavailable.')
jnxFabricDeviceEntryName = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceEntryName.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntryName.setDescription('The name of this subject which is same as the serial number unless a device alias has been configured.')
jnxFabricDeviceEntryRevision = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceEntryRevision.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntryRevision.setDescription('The revision of this subject, blank if unknown or unavailable.')
jnxFabricDeviceEntryFirmwareRevision = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceEntryFirmwareRevision.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntryFirmwareRevision.setDescription('The firmware (u-boot) revision of this subject, blank if unknown or unavailable.')
jnxFabricDeviceEntryInstalled = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 10), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceEntryInstalled.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntryInstalled.setDescription('The value of sysUpTime when the subject was last installed, up-and-running. Zero if unknown or already up-and-running when the agent was up.')
jnxFabricDeviceEntryContentsLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 11), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceEntryContentsLastChange.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntryContentsLastChange.setDescription('The value of sysUpTime when the contents table last changed. Zero if unknown or already existing when the agent was up.')
jnxFabricDeviceEntryFilledLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 12), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceEntryFilledLastChange.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntryFilledLastChange.setDescription('The value of sysUpTime when the filled status table last changed. Zero if unknown or already at that state when the agent was up.')
jnxFabricDeviceEntryKernelMemoryUsedPercent = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricDeviceEntryKernelMemoryUsedPercent.setStatus('current')
if mibBuilder.loadTexts: jnxFabricDeviceEntryKernelMemoryUsedPercent.setDescription('The percentage of kernel memory used of this subject. 0 if unavailable or inapplicable.')
jnxFabricContainersTable = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2), )
if mibBuilder.loadTexts: jnxFabricContainersTable.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContainersTable.setDescription('A list of containers entries.')
jnxFabricContainersEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1), ).setIndexNames((0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricContainersFamily"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricContainersIndex"))
if mibBuilder.loadTexts: jnxFabricContainersEntry.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContainersEntry.setDescription('An entry of containers table. Each entry is indexed by the container table type and the container index.')
jnxFabricContainersFamily = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 1), JnxFabricContainersFamily()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContainersFamily.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContainersFamily.setDescription('The family of container.')
jnxFabricContainersIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContainersIndex.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContainersIndex.setDescription('The index for this entry.')
jnxFabricContainersView = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 3), Bits().clone(namedValues=NamedValues(("viewFront", 0), ("viewRear", 1), ("viewTop", 2), ("viewBottom", 3), ("viewLeftHandSide", 4), ("viewRightHandSide", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContainersView.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContainersView.setDescription('The view(s) from which the specific container appears. This variable indicates that the specific container is embedded and accessible from the corresponding view(s). The value is a bit map represented as a sum. If multiple bits are set, the specified container(s) are located and accessible from that set of views. The various values representing the bit positions and its corresponding views are: 1 front 2 rear 4 top 8 bottom 16 leftHandSide 32 rightHandSide Note 1: LefHandSide and rightHandSide are referred to based on the view from the front. Note 2: If the specified containers are scattered around various views, the numbering is according to the following sequence: front -> rear -> top -> bottom -> leftHandSide -> rightHandSide For each view plane, the numbering sequence is first from left to right, and then from up to down. Note 3: Even though the value in chassis hardware (e.g. slot number) may be labelled from 0, 1, 2, and up, all the indices in MIB start with 1 (not 0) according to network management convention.')
jnxFabricContainersLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("level0", 0), ("level1", 1), ("level2", 2), ("level3", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContainersLevel.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContainersLevel.setDescription('The abstraction level of the chassis or device. It is enumerated from the outside to the inside, from the outer layer to the inner layer. For example, top level (i.e. level 0) refers to chassis frame, level 1 FPC slot within chassis frame, level 2 PIC space within FPC slot.')
jnxFabricContainersWithin = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContainersWithin.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContainersWithin.setDescription('The index of its next higher level container housing this entry. The associated jnxFabricContainersIndex in the jnxFabricContainersTable represents its next higher level container.')
jnxFabricContainersType = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 6), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContainersType.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContainersType.setDescription('The type of this container.')
jnxFabricContainersDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContainersDescr.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContainersDescr.setDescription('The name or detailed description of this subject.')
jnxFabricContainersCount = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContainersCount.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContainersCount.setDescription('The maximum number of containers of this level per container of the next higher level. e.g. if there are six level 2 containers in level 1 container, then jnxFabricContainersCount for level 2 is six.')
jnxFabricContentsTable = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3), )
if mibBuilder.loadTexts: jnxFabricContentsTable.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsTable.setDescription('A list of contents entries.')
jnxFabricContentsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1), ).setIndexNames((0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsContainerIndex"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL1Index"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL2Index"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL3Index"))
if mibBuilder.loadTexts: jnxFabricContentsEntry.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsEntry.setDescription('An entry of contents table.')
jnxFabricContentsContainerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsContainerIndex.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsContainerIndex.setDescription('The associated jnxFabricContainersIndex in the jnxFabricContainersTable.')
jnxFabricContentsL1Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsL1Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsL1Index.setDescription('The level one index of the container housing this subject. Zero if unavailable or inapplicable.')
jnxFabricContentsL2Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsL2Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsL2Index.setDescription('The level two index of the container housing this subject. Zero if unavailable or inapplicable.')
jnxFabricContentsL3Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsL3Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsL3Index.setDescription('The level three index of the container housing this subject. Zero if unavailable or inapplicable.')
jnxFabricContentsType = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 5), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsType.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsType.setDescription('The type of this subject. zeroDotZero if unknown.')
jnxFabricContentsDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsDescr.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsDescr.setDescription('The name or detailed description of this subject.')
jnxFabricContentsSerialNo = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsSerialNo.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsSerialNo.setDescription('The serial number of this subject, blank if unknown or unavailable.')
jnxFabricContentsRevision = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsRevision.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsRevision.setDescription('The revision of this subject, blank if unknown or unavailable.')
jnxFabricContentsInstalled = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 9), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsInstalled.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsInstalled.setDescription('The value of sysUpTime when the subject was last installed, up-and-running. Zero if unknown or already up-and-running when the agent was up.')
jnxFabricContentsPartNo = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsPartNo.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsPartNo.setDescription('The part number of this subject, blank if unknown or unavailable.')
jnxFabricContentsChassisId = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 11), JnxChassisId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsChassisId.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsChassisId.setDescription('Identifies the chassis on which the contents of this row exists.')
jnxFabricContentsChassisDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 12), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsChassisDescr.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsChassisDescr.setDescription('A textual description of the chassis on which the contents of this row exists.')
jnxFabricContentsChassisCleiCode = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricContentsChassisCleiCode.setStatus('current')
if mibBuilder.loadTexts: jnxFabricContentsChassisCleiCode.setDescription('The clei code of this subject, blank if unknown or unavailable. A CLEI code is an intelligent code that consists of 10 alphanumeric characters with 4 data elements. The first data element is considered the basic code with the first 2 characters indicating the technology or equipment type, and the third and fourth characters denoting the functional sub-category. The second data element represents the features, and its three characters denote functional capabilities or changes. The third data element has one character and denotes a reference to a manufacturer, system ID, specification, or drawing. The fourth data element consists of two characters and contains complementary data. These two characters provide a means of differentiating or providing uniqueness between the eight character CLEI codes by identifying the manufacturing vintage of the product. Names are assigned via procedures defined in [GR485]. The assigned maintenance agent for the CLEI code, Telcordia Technologies, is responsible for assigning certain equipment and other identifiers (e.g., location, manufacturer/supplier) for the telecommunications industry.')
jnxFabricFilledTable = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4), )
if mibBuilder.loadTexts: jnxFabricFilledTable.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFilledTable.setDescription('A list of filled status entries.')
jnxFabricFilledEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1), ).setIndexNames((0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricFilledContainerIndex"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricFilledL1Index"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricFilledL2Index"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricFilledL3Index"))
if mibBuilder.loadTexts: jnxFabricFilledEntry.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFilledEntry.setDescription('An entry of filled status table.')
jnxFabricFilledContainerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFilledContainerIndex.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFilledContainerIndex.setDescription('The associated jnxFabricContainersIndex in the jnxFabricContainersTable.')
jnxFabricFilledL1Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFilledL1Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFilledL1Index.setDescription('The level one index of the container housing this subject. Zero if unavailable or inapplicable.')
jnxFabricFilledL2Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFilledL2Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFilledL2Index.setDescription('The level two index of the container housing this subject. Zero if unavailable or inapplicable.')
jnxFabricFilledL3Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFilledL3Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFilledL3Index.setDescription('The level three index of the container housing this subject. Zero if unavailable or inapplicable.')
jnxFabricFilledDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFilledDescr.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFilledDescr.setDescription('The name or detailed description of this subject.')
jnxFabricFilledState = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("empty", 2), ("filled", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFilledState.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFilledState.setDescription('The filled state of this subject.')
jnxFabricFilledChassisId = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 7), JnxChassisId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFilledChassisId.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFilledChassisId.setDescription('Identifies the chassis on which the contents of this row exists.')
jnxFabricFilledChassisDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFilledChassisDescr.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFilledChassisDescr.setDescription('A textual description of the chassis on which the contents of this row exists.')
jnxFabricOperatingTable = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5), )
if mibBuilder.loadTexts: jnxFabricOperatingTable.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingTable.setDescription('A list of operating status entries.')
jnxFabricOperatingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1), ).setIndexNames((0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricOperatingContentsIndex"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricOperatingL1Index"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricOperatingL2Index"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricOperatingL3Index"))
if mibBuilder.loadTexts: jnxFabricOperatingEntry.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingEntry.setDescription('An entry of operating status table.')
jnxFabricOperatingContentsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingContentsIndex.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingContentsIndex.setDescription('The associated jnxFabricContentsContainerIndex in the jnxFabricContentsTable.')
jnxFabricOperatingL1Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingL1Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingL1Index.setDescription('The level one index associated with this subject. Zero if unavailable or inapplicable.')
jnxFabricOperatingL2Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingL2Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingL2Index.setDescription('The level two index associated with this subject. Zero if unavailable or inapplicable.')
jnxFabricOperatingL3Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingL3Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingL3Index.setDescription('The level three index associated with this subject. Zero if unavailable or inapplicable.')
jnxFabricOperatingDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingDescr.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingDescr.setDescription('The name or detailed description of this subject.')
jnxFabricOperatingState = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("unknown", 1), ("running", 2), ("ready", 3), ("reset", 4), ("runningAtFullSpeed", 5), ("down", 6), ("standby", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingState.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingState.setDescription('The operating state of this subject.')
jnxFabricOperatingTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 7), Integer32()).setUnits('Celsius (degrees C)').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingTemp.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingTemp.setDescription('The temperature in Celsius (degrees C) of this subject. Zero if unavailable or inapplicable.')
jnxFabricOperatingCPU = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingCPU.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingCPU.setDescription('The CPU utilization in percentage of this subject. Zero if unavailable or inapplicable.')
jnxFabricOperatingISR = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingISR.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingISR.setDescription('The CPU utilization in percentage of this subject spending in interrupt service routine (ISR). Zero if unavailable or inapplicable.')
jnxFabricOperatingDRAMSize = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingDRAMSize.setStatus('deprecated')
if mibBuilder.loadTexts: jnxFabricOperatingDRAMSize.setDescription('The DRAM size in bytes of this subject. Zero if unavailable or inapplicable.')
jnxFabricOperatingBuffer = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingBuffer.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingBuffer.setDescription('The buffer pool utilization in percentage of this subject. Zero if unavailable or inapplicable.')
jnxFabricOperatingHeap = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingHeap.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingHeap.setDescription('The heap utilization in percentage of this subject. Zero if unavailable or inapplicable.')
jnxFabricOperatingUpTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 13), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingUpTime.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingUpTime.setDescription('The time interval in 10-millisecond period that this subject has been up and running. Zero if unavailable or inapplicable.')
jnxFabricOperatingLastRestart = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 14), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingLastRestart.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingLastRestart.setDescription('The value of sysUpTime when this subject last restarted. Zero if unavailable or inapplicable.')
jnxFabricOperatingMemory = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 15), Integer32()).setUnits('Megabytes').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingMemory.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingMemory.setDescription('The installed memory size in Megabytes of this subject. Zero if unavailable or inapplicable.')
jnxFabricOperatingStateOrdered = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("running", 1), ("standby", 2), ("ready", 3), ("runningAtFullSpeed", 4), ("reset", 5), ("down", 6), ("unknown", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingStateOrdered.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingStateOrdered.setDescription("The operating state of this subject. Identical to jnxFabricOperatingState, but with enums ordered from 'most operational' to 'least operational' states.")
jnxFabricOperatingChassisId = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 17), JnxChassisId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingChassisId.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingChassisId.setDescription('Identifies the chassis on which the contents of this row exists.')
jnxFabricOperatingChassisDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 18), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingChassisDescr.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingChassisDescr.setDescription('A textual description of the chassis on which the contents of this row exists.')
jnxFabricOperatingRestartTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 19), DateAndTime()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperatingRestartTime.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperatingRestartTime.setDescription('The time at which this entity last restarted.')
jnxFabricOperating1MinLoadAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 20), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperating1MinLoadAvg.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperating1MinLoadAvg.setDescription('The CPU Load Average over the last 1 minutes Here it will be shown as percentage value Zero if unavailable or inapplicable.')
jnxFabricOperating5MinLoadAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 21), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperating5MinLoadAvg.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperating5MinLoadAvg.setDescription('The CPU Load Average over the last 5 minutes Here it will be shown as percentage value Zero if unavailable or inapplicable.')
jnxFabricOperating15MinLoadAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 22), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricOperating15MinLoadAvg.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOperating15MinLoadAvg.setDescription('The CPU Load Average over the last 15 minutes Here it will be shown as percentage value Zero if unavailable or inapplicable.')
jnxFabricRedundancyTable = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6), )
if mibBuilder.loadTexts: jnxFabricRedundancyTable.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyTable.setDescription('A list of redundancy information entries.')
jnxFabricRedundancyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1), ).setIndexNames((0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancyContentsIndex"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancyL1Index"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancyL2Index"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancyL3Index"))
if mibBuilder.loadTexts: jnxFabricRedundancyEntry.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyEntry.setDescription('An entry in the redundancy information table.')
jnxFabricRedundancyContentsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyContentsIndex.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyContentsIndex.setDescription('The associated jnxFabricContentsContainerIndex in the jnxFabricContentsTable.')
jnxFabricRedundancyL1Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyL1Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyL1Index.setDescription('The level one index associated with this subject. Zero if unavailable or inapplicable.')
jnxFabricRedundancyL2Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyL2Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyL2Index.setDescription('The level two index associated with this subject. Zero if unavailable or inapplicable.')
jnxFabricRedundancyL3Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyL3Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyL3Index.setDescription('The level three index associated with this subject. Zero if unavailable or inapplicable.')
jnxFabricRedundancyDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyDescr.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyDescr.setDescription('The name or detailed description of this subject.')
jnxFabricRedundancyConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("master", 2), ("backup", 3), ("disabled", 4), ("notApplicable", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyConfig.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyConfig.setDescription("The election priority of redundancy configuration for this subject. The value 'notApplicable' means no specific instance is configured to be master or backup; whichever component boots up first becomes a master.")
jnxFabricRedundancyState = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("unknown", 1), ("master", 2), ("backup", 3), ("disabled", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyState.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyState.setDescription('The current running state for this subject.')
jnxFabricRedundancySwitchoverCount = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancySwitchoverCount.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancySwitchoverCount.setDescription('The total number of switchover as perceived by this subject since routing engine is up and running. The switchover is defined as a change in state of jnxFabricRedundancyState from master to backup or vice versa. Its value is reset when the routing engine is reset or rebooted.')
jnxFabricRedundancySwitchoverTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 9), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancySwitchoverTime.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancySwitchoverTime.setDescription('The value of sysUpTime when the jnxFabricRedundancyState of this subject was last switched over from master to backup or vice versa. Zero if unknown or never switched over since the routing engine is up and running.')
jnxFabricRedundancySwitchoverReason = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("neverSwitched", 2), ("userSwitched", 3), ("autoSwitched", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancySwitchoverReason.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancySwitchoverReason.setDescription('The reason of the last switchover for this subject.')
jnxFabricRedundancyKeepaliveHeartbeat = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyKeepaliveHeartbeat.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyKeepaliveHeartbeat.setDescription('The period of sending keepalive messages between the master and backup subsystems. It is a system-wide preset value in seconds used by internal mastership resolution. Zero if unavailable or inapplicable.')
jnxFabricRedundancyKeepaliveTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyKeepaliveTimeout.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyKeepaliveTimeout.setDescription('The timeout period in seconds, by the keepalive watchdog timer, before initiating a switch over to the backup subsystem. Zero if unavailable or inapplicable.')
jnxFabricRedundancyKeepaliveElapsed = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyKeepaliveElapsed.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyKeepaliveElapsed.setDescription('The elapsed time in seconds by this subject since receiving the last keepalive message from the other subsystems. Zero if unavailable or inapplicable.')
jnxFabricRedundancyKeepaliveLoss = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyKeepaliveLoss.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyKeepaliveLoss.setDescription('The total number of losses on keepalive messages between the master and backup subsystems as perceived by this subject since the system is up and running. Zero if unavailable or inapplicable.')
jnxFabricRedundancyChassisId = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 15), JnxChassisId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyChassisId.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyChassisId.setDescription('Identifies the chassis on which the contents of this row exists.')
jnxFabricRedundancyChassisDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 16), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricRedundancyChassisDescr.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancyChassisDescr.setDescription('A textual description of the chassis on which the contents of this row exists.')
jnxFabricFruTable = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7), )
if mibBuilder.loadTexts: jnxFabricFruTable.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruTable.setDescription('A list of FRU status entries.')
jnxFabricFruEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1), ).setIndexNames((0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), (0, "JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"))
if mibBuilder.loadTexts: jnxFabricFruEntry.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruEntry.setDescription('An entry in the FRU status table.')
jnxFabricFruContentsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruContentsIndex.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruContentsIndex.setDescription('The associated jnxFabricContentsContainerIndex in the jnxFabricContentsTable.')
jnxFabricFruL1Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruL1Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruL1Index.setDescription('The level one index associated with this subject. Zero if unavailable or inapplicable.')
jnxFabricFruL2Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruL2Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruL2Index.setDescription('The level two index associated with this subject. Zero if unavailable or inapplicable.')
jnxFabricFruL3Index = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruL3Index.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruL3Index.setDescription('The level three index associated with this subject. Zero if unavailable or inapplicable.')
jnxFabricFruName = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruName.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruName.setDescription('The name or detailed description of this subject.')
jnxFabricFruType = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))).clone(namedValues=NamedValues(("other", 1), ("clockGenerator", 2), ("flexiblePicConcentrator", 3), ("switchingAndForwardingModule", 4), ("controlBoard", 5), ("routingEngine", 6), ("powerEntryModule", 7), ("frontPanelModule", 8), ("switchInterfaceBoard", 9), ("processorMezzanineBoardForSIB", 10), ("portInterfaceCard", 11), ("craftInterfacePanel", 12), ("fan", 13), ("lineCardChassis", 14), ("forwardingEngineBoard", 15), ("protectedSystemDomain", 16)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruType.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruType.setDescription('The FRU type for this subject.')
jnxFabricFruSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruSlot.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruSlot.setDescription('The slot number of this subject. This is equivalent to jnxFabricFruL1Index in meaning. Zero if unavailable or inapplicable.')
jnxFabricFruState = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("unknown", 1), ("empty", 2), ("present", 3), ("ready", 4), ("announceOnline", 5), ("online", 6), ("anounceOffline", 7), ("offline", 8), ("diagnostic", 9), ("standby", 10)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruState.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruState.setDescription('The current state for this subject.')
jnxFabricFruTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 9), Integer32()).setUnits('Celsius (degrees C)').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruTemp.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruTemp.setDescription('The temperature in Celsius (degrees C) of this subject. Zero if unavailable or inapplicable.')
jnxFabricFruOfflineReason = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75))).clone(namedValues=NamedValues(("unknown", 1), ("none", 2), ("error", 3), ("noPower", 4), ("configPowerOff", 5), ("configHoldInReset", 6), ("cliCommand", 7), ("buttonPress", 8), ("cliRestart", 9), ("overtempShutdown", 10), ("masterClockDown", 11), ("singleSfmModeChange", 12), ("packetSchedulingModeChange", 13), ("physicalRemoval", 14), ("unresponsiveRestart", 15), ("sonetClockAbsent", 16), ("rddPowerOff", 17), ("majorErrors", 18), ("minorErrors", 19), ("lccHardRestart", 20), ("lccVersionMismatch", 21), ("powerCycle", 22), ("reconnect", 23), ("overvoltage", 24), ("pfeVersionMismatch", 25), ("febRddCfgChange", 26), ("fpcMisconfig", 27), ("fruReconnectFail", 28), ("fruFwddReset", 29), ("fruFebSwitch", 30), ("fruFebOffline", 31), ("fruInServSoftUpgradeError", 32), ("fruChasdPowerRatingExceed", 33), ("fruConfigOffline", 34), ("fruServiceRestartRequest", 35), ("spuResetRequest", 36), ("spuFlowdDown", 37), ("spuSpi4Down", 38), ("spuWatchdogTimeout", 39), ("spuCoreDump", 40), ("fpgaSpi4LinkDown", 41), ("i3Spi4LinkDown", 42), ("cppDisconnect", 43), ("cpuNotBoot", 44), ("spuCoreDumpComplete", 45), ("rstOnSpcSpuFailure", 46), ("softRstOnSpcSpuFailure", 47), ("hwAuthenticationFailure", 48), ("reconnectFpcFail", 49), ("fpcAppFailed", 50), ("fpcKernelCrash", 51), ("spuFlowdDownNoCore", 52), ("spuFlowdCoreDumpIncomplete", 53), ("spuFlowdCoreDumpComplete", 54), ("spuIdpdDownNoCore", 55), ("spuIdpdCoreDumpIncomplete", 56), ("spuIdpdCoreDumpComplete", 57), ("spuCoreDumpIncomplete", 58), ("spuIdpdDown", 59), ("fruPfeReset", 60), ("fruReconnectNotReady", 61), ("fruSfLinkDown", 62), ("fruFabricDown", 63), ("fruAntiCounterfeitRetry", 64), ("fruFPCChassisClusterDisable", 65), ("spuFipsError", 66), ("fruFPCFabricDownOffline", 67), ("febCfgChange", 68), ("routeLocalizationRoleChange", 69), ("fruFpcUnsupported", 70), ("psdVersionMismatch", 71), ("fruResetThresholdExceeded", 72), ("picBounce", 73), ("badVoltage", 74), ("fruFPCReducedFabricBW", 75)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruOfflineReason.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruOfflineReason.setDescription('The offline reason of this subject.')
jnxFabricFruLastPowerOff = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 11), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruLastPowerOff.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruLastPowerOff.setDescription('The value of sysUpTime when this subject was last powered off. Zero if unavailable or inapplicable.')
jnxFabricFruLastPowerOn = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 12), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruLastPowerOn.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruLastPowerOn.setDescription('The value of sysUpTime when this subject was last powered on. Zero if unavailable or inapplicable.')
jnxFabricFruPowerUpTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 13), TimeTicks()).setUnits('centi-seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruPowerUpTime.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruPowerUpTime.setDescription('The time interval in 10-millisecond period that this subject has been up and running since the last power on time. Zero if unavailable or inapplicable.')
jnxFabricFruChassisId = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 14), JnxChassisId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruChassisId.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruChassisId.setDescription('Identifies the chassis on which the contents of this row exists.')
jnxFabricFruChassisDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 15), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruChassisDescr.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruChassisDescr.setDescription('A textual description of the chassis on which the contents of this row exists.')
jnxFabricFruPsdAssignment = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxFabricFruPsdAssignment.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruPsdAssignment.setDescription('The PSD assignment of this subject. Zero if unavailable or not applicable.')
jnxFabricPowerSupplyFailure = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 1)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsContainerIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsDescr"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricOperatingState"))
if mibBuilder.loadTexts: jnxFabricPowerSupplyFailure.setStatus('current')
if mibBuilder.loadTexts: jnxFabricPowerSupplyFailure.setDescription('A jnxFabricPowerSupplyFailure trap signifies that the SNMP entity, acting in an agent role, has detected that the specified power supply in the chassis has been in the failure (bad DC output) condition.')
jnxFabricFanFailure = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 2)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsContainerIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsDescr"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricOperatingState"))
if mibBuilder.loadTexts: jnxFabricFanFailure.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFanFailure.setDescription('A jnxFabricFanFailure trap signifies that the SNMP entity, acting in an agent role, has detected that the specified cooling fan or impeller in the chassis has been in the failure (not spinning) condition.')
jnxFabricOverTemperature = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 3)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsContainerIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsDescr"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricOperatingTemp"))
if mibBuilder.loadTexts: jnxFabricOverTemperature.setStatus('current')
if mibBuilder.loadTexts: jnxFabricOverTemperature.setDescription('A jnxFabricOverTemperature trap signifies that the SNMP entity, acting in an agent role, has detected that the specified hardware component in the chassis has experienced over temperature condition.')
jnxFabricRedundancySwitchover = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 4)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancyContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancyL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancyL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancyL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancyDescr"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancyConfig"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancyState"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancySwitchoverCount"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancySwitchoverTime"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricRedundancySwitchoverReason"))
if mibBuilder.loadTexts: jnxFabricRedundancySwitchover.setStatus('current')
if mibBuilder.loadTexts: jnxFabricRedundancySwitchover.setDescription('A jnxFabricRedundancySwitchover trap signifies that the SNMP entity, acting in an agent role, has detected that the specified hardware component in the chassis has experienced a redundancy switchover event defined as a change in state of jnxFabricRedundancyState from master to backup or vice versa.')
jnxFabricFruRemoval = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 5)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"))
if mibBuilder.loadTexts: jnxFabricFruRemoval.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruRemoval.setDescription('A jnxFabricFruRemoval trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has been removed from the chassis.')
jnxFabricFruInsertion = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 6)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"))
if mibBuilder.loadTexts: jnxFabricFruInsertion.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruInsertion.setDescription('A jnxFabricFruInsertion trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has been inserted into the chassis.')
jnxFabricFruPowerOff = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 7)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruOfflineReason"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruLastPowerOff"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruLastPowerOn"))
if mibBuilder.loadTexts: jnxFabricFruPowerOff.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruPowerOff.setDescription('A jnxFabricFruPowerOff trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has been powered off in the chassis.')
jnxFabricFruPowerOn = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 8)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruOfflineReason"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruLastPowerOff"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruLastPowerOn"))
if mibBuilder.loadTexts: jnxFabricFruPowerOn.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruPowerOn.setDescription('A jnxFabricFruPowerOn trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has been powered on in the chassis.')
jnxFabricFruFailed = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 9)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"))
if mibBuilder.loadTexts: jnxFabricFruFailed.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruFailed.setDescription('This indicates the specified FRU (Field Replaceable Unit) has failed in the chassis. Most probably this is due toi some hard error such as fru is not powering up or not able to load ukernel. In these cases, fru is replaced.')
jnxFabricFruOffline = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 10)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruOfflineReason"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruLastPowerOff"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruLastPowerOn"))
if mibBuilder.loadTexts: jnxFabricFruOffline.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruOffline.setDescription('A jnxFabricFruOffline trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has gone offline in the chassis.')
jnxFabricFruOnline = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 11)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"))
if mibBuilder.loadTexts: jnxFabricFruOnline.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruOnline.setDescription('A jnxFabricFruOnline trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has gone online in the chassis.')
jnxFabricFruCheck = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 12)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"))
if mibBuilder.loadTexts: jnxFabricFruCheck.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruCheck.setDescription('A jnxFabricFruCheck trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has encountered some operational errors and gone into check state in the chassis.')
jnxFabricFEBSwitchover = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 13)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"))
if mibBuilder.loadTexts: jnxFabricFEBSwitchover.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFEBSwitchover.setDescription('A jnxFabricFEBSwitchover trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FEB (Forwarding Engine Board) has switched over.')
jnxFabricHardDiskFailed = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 14)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"))
if mibBuilder.loadTexts: jnxFabricHardDiskFailed.setStatus('current')
if mibBuilder.loadTexts: jnxFabricHardDiskFailed.setDescription('A jnxHardDiskFailed trap signifies that the SNMP entity, acting in an agent role, has detected that the Disk in the specified Routing Engine has encountered some operational errors and gone into failed state in the chassis.')
jnxFabricHardDiskMissing = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 15)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"))
if mibBuilder.loadTexts: jnxFabricHardDiskMissing.setStatus('current')
if mibBuilder.loadTexts: jnxFabricHardDiskMissing.setDescription('A DiskMissing trap signifies that the SNMP entity, acting in an agent role, has detected that hard disk in the specified outing Engine is missing from boot device list.')
jnxFabricBootFromBackup = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 19, 16)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"))
if mibBuilder.loadTexts: jnxFabricBootFromBackup.setStatus('current')
if mibBuilder.loadTexts: jnxFabricBootFromBackup.setDescription('A jnxBootFromBackup trap signifies that the SNMP entity, acting in an agent role, has detected that the specified routing-engine/member has booted from the back up root partition')
jnxFabricPowerSupplyOK = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 20, 1)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsContainerIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsDescr"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricOperatingState"))
if mibBuilder.loadTexts: jnxFabricPowerSupplyOK.setStatus('current')
if mibBuilder.loadTexts: jnxFabricPowerSupplyOK.setDescription('A jnxFabricPowerSupplyOK trap signifies that the SNMP entity, acting in an agent role, has detected that the specified power supply in the chassis has recovered from the failure (bad DC output) condition.')
jnxFabricFanOK = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 20, 2)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsContainerIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsDescr"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricOperatingState"))
if mibBuilder.loadTexts: jnxFabricFanOK.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFanOK.setDescription('A jnxFabricFanOK trap signifies that the SNMP entity, acting in an agent role, has detected that the specified cooling fan or impeller in the chassis has recovered from the failure (not spinning) condition.')
jnxFabricTemperatureOK = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 20, 3)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsContainerIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricContentsDescr"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricOperatingTemp"))
if mibBuilder.loadTexts: jnxFabricTemperatureOK.setStatus('current')
if mibBuilder.loadTexts: jnxFabricTemperatureOK.setDescription('A jnxFabricTemperatureOK trap signifies that the SNMP entity, acting in an agent role, has detected that the specified hardware component in the chassis has recovered from over temperature condition.')
jnxFabricFruOK = NotificationType((1, 3, 6, 1, 4, 1, 2636, 4, 20, 4)).setObjects(("JUNIPER-FABRIC-CHASSIS", "jnxFabricDeviceIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruContentsIndex"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL1Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL2Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruL3Index"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruName"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruType"), ("JUNIPER-FABRIC-CHASSIS", "jnxFabricFruSlot"))
if mibBuilder.loadTexts: jnxFabricFruOK.setStatus('current')
if mibBuilder.loadTexts: jnxFabricFruOK.setDescription('A jnxFabricFabricFruOK trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has recovered from previous operational errors and it is in ok state in the chassis.')
mibBuilder.exportSymbols("JUNIPER-FABRIC-CHASSIS", jnxFabricFruL3Index=jnxFabricFruL3Index, jnxFabricDeviceEntryDescr=jnxFabricDeviceEntryDescr, jnxFabricOverTemperature=jnxFabricOverTemperature, jnxFabricDeviceEntrySerialNo=jnxFabricDeviceEntrySerialNo, jnxFabricRedundancyChassisId=jnxFabricRedundancyChassisId, jnxFabricContentsRevision=jnxFabricContentsRevision, jnxFabricOperatingDRAMSize=jnxFabricOperatingDRAMSize, jnxFabricContentsContainerIndex=jnxFabricContentsContainerIndex, jnxFabricOperatingDescr=jnxFabricOperatingDescr, jnxFabricRedundancyKeepaliveElapsed=jnxFabricRedundancyKeepaliveElapsed, jnxFabricFruL1Index=jnxFabricFruL1Index, jnxFabricFruPowerOff=jnxFabricFruPowerOff, jnxFabricRevision=jnxFabricRevision, jnxFabricFilledL1Index=jnxFabricFilledL1Index, jnxFabricRedundancySwitchoverTime=jnxFabricRedundancySwitchoverTime, jnxFabricContainersLevel=jnxFabricContainersLevel, jnxFabricFruCheck=jnxFabricFruCheck, jnxFabricContainersTable=jnxFabricContainersTable, jnxFabricFilledDescr=jnxFabricFilledDescr, jnxFabricContainersFamily=jnxFabricContainersFamily, jnxFabricFilledContainerIndex=jnxFabricFilledContainerIndex, jnxFabricOperating1MinLoadAvg=jnxFabricOperating1MinLoadAvg, jnxFabricContentsL1Index=jnxFabricContentsL1Index, jnxFabricDeviceTable=jnxFabricDeviceTable, jnxFabricDeviceEntryClass=jnxFabricDeviceEntryClass, jnxFabricContainersWithin=jnxFabricContainersWithin, jnxFabricFilledChassisId=jnxFabricFilledChassisId, jnxFabricRedundancyTable=jnxFabricRedundancyTable, jnxFabricOperatingCPU=jnxFabricOperatingCPU, jnxFabricOperatingTable=jnxFabricOperatingTable, jnxFabricRedundancyL3Index=jnxFabricRedundancyL3Index, jnxFabricFanFailure=jnxFabricFanFailure, jnxFabricRedundancyEntry=jnxFabricRedundancyEntry, jnxFabricClass=jnxFabricClass, jnxFabricContentsL3Index=jnxFabricContentsL3Index, jnxFabricDeviceEntryRevision=jnxFabricDeviceEntryRevision, jnxFabricContentsChassisId=jnxFabricContentsChassisId, jnxFabricFruType=jnxFabricFruType, jnxFabricContentsLastChange=jnxFabricContentsLastChange, jnxFabricContentsChassisDescr=jnxFabricContentsChassisDescr, jnxFabricFruRemoval=jnxFabricFruRemoval, jnxFabricDeviceEntryFirmwareRevision=jnxFabricDeviceEntryFirmwareRevision, jnxFabricRedundancyKeepaliveLoss=jnxFabricRedundancyKeepaliveLoss, jnxFabricFruTemp=jnxFabricFruTemp, jnxFabricDescr=jnxFabricDescr, jnxFabricFanOK=jnxFabricFanOK, PYSNMP_MODULE_ID=jnxFabricAnatomy, jnxFabricFruOfflineReason=jnxFabricFruOfflineReason, jnxFabricContainersEntry=jnxFabricContainersEntry, jnxFabricRedundancyState=jnxFabricRedundancyState, jnxFabricOperatingLastRestart=jnxFabricOperatingLastRestart, jnxFabricContentsDescr=jnxFabricContentsDescr, jnxFabricFirmwareRevision=jnxFabricFirmwareRevision, jnxFabricContentsEntry=jnxFabricContentsEntry, jnxFabricRedundancyDescr=jnxFabricRedundancyDescr, jnxFabricDeviceEntryName=jnxFabricDeviceEntryName, jnxFabricOperating15MinLoadAvg=jnxFabricOperating15MinLoadAvg, jnxFabricFilledTable=jnxFabricFilledTable, jnxFabricRedundancySwitchover=jnxFabricRedundancySwitchover, jnxFabricTemperatureOK=jnxFabricTemperatureOK, jnxFabricBootFromBackup=jnxFabricBootFromBackup, jnxFabricAnatomyScalars=jnxFabricAnatomyScalars, jnxFabricDeviceIndex=jnxFabricDeviceIndex, jnxFabricContainersIndex=jnxFabricContainersIndex, jnxFabricFruPsdAssignment=jnxFabricFruPsdAssignment, jnxFabricDeviceEntryKernelMemoryUsedPercent=jnxFabricDeviceEntryKernelMemoryUsedPercent, jnxFabricOperatingChassisDescr=jnxFabricOperatingChassisDescr, jnxFabricFruLastPowerOn=jnxFabricFruLastPowerOn, jnxFabricDeviceEntryModel=jnxFabricDeviceEntryModel, jnxFabricFruSlot=jnxFabricFruSlot, jnxFabricOperatingHeap=jnxFabricOperatingHeap, jnxFabricOperatingL2Index=jnxFabricOperatingL2Index, jnxFabricFilledChassisDescr=jnxFabricFilledChassisDescr, jnxFabricOperatingRestartTime=jnxFabricOperatingRestartTime, jnxFabricFruContentsIndex=jnxFabricFruContentsIndex, jnxFabricOperatingStateOrdered=jnxFabricOperatingStateOrdered, jnxFabricContentsChassisCleiCode=jnxFabricContentsChassisCleiCode, jnxFabricFruInsertion=jnxFabricFruInsertion, jnxFabricRedundancyContentsIndex=jnxFabricRedundancyContentsIndex, jnxFabricFEBSwitchover=jnxFabricFEBSwitchover, jnxFabricFruPowerOn=jnxFabricFruPowerOn, jnxFabricFilledLastChange=jnxFabricFilledLastChange, jnxFabricContainersDescr=jnxFabricContainersDescr, jnxFabricFilledState=jnxFabricFilledState, jnxFabricFruEntry=jnxFabricFruEntry, jnxFabricOperatingState=jnxFabricOperatingState, jnxFabricHardDiskFailed=jnxFabricHardDiskFailed, jnxFabricDeviceEntry=jnxFabricDeviceEntry, jnxFabricFruPowerUpTime=jnxFabricFruPowerUpTime, jnxFabricContentsType=jnxFabricContentsType, jnxFabricContainersCount=jnxFabricContainersCount, jnxFabricOperatingL3Index=jnxFabricOperatingL3Index, jnxFabricRedundancyKeepaliveTimeout=jnxFabricRedundancyKeepaliveTimeout, jnxFabricOperatingUpTime=jnxFabricOperatingUpTime, jnxFabricOperatingISR=jnxFabricOperatingISR, jnxFabricOperatingTemp=jnxFabricOperatingTemp, jnxFabricFruOffline=jnxFabricFruOffline, jnxFabricLastInstalled=jnxFabricLastInstalled, jnxFabricAnatomyTables=jnxFabricAnatomyTables, jnxFabricContentsPartNo=jnxFabricContentsPartNo, jnxFabricRedundancySwitchoverReason=jnxFabricRedundancySwitchoverReason, jnxFabricAnatomy=jnxFabricAnatomy, jnxFabricContentsSerialNo=jnxFabricContentsSerialNo, jnxFabricContentsInstalled=jnxFabricContentsInstalled, jnxFabricFruChassisId=jnxFabricFruChassisId, jnxFabricFruState=jnxFabricFruState, jnxFabricOperatingL1Index=jnxFabricOperatingL1Index, jnxFabricRedundancySwitchoverCount=jnxFabricRedundancySwitchoverCount, jnxFabricFilledEntry=jnxFabricFilledEntry, jnxFabricOperatingEntry=jnxFabricOperatingEntry, jnxFabricRedundancyKeepaliveHeartbeat=jnxFabricRedundancyKeepaliveHeartbeat, jnxFabricFruOnline=jnxFabricFruOnline, jnxFabricDeviceEntryFilledLastChange=jnxFabricDeviceEntryFilledLastChange, jnxFabricDeviceEntryContentsLastChange=jnxFabricDeviceEntryContentsLastChange, jnxFabricOperatingContentsIndex=jnxFabricOperatingContentsIndex, jnxFabricHardDiskMissing=jnxFabricHardDiskMissing, jnxFabricFruL2Index=jnxFabricFruL2Index, jnxFabricContainersView=jnxFabricContainersView, jnxFabricOperatingChassisId=jnxFabricOperatingChassisId, jnxFabricRedundancyChassisDescr=jnxFabricRedundancyChassisDescr, jnxFabricFruFailed=jnxFabricFruFailed, jnxFabricRedundancyConfig=jnxFabricRedundancyConfig, jnxFabricPowerSupplyOK=jnxFabricPowerSupplyOK, jnxFabricOperatingBuffer=jnxFabricOperatingBuffer, jnxFabricSerialNo=jnxFabricSerialNo, jnxFabricDeviceEntryContainersFamily=jnxFabricDeviceEntryContainersFamily, JnxFabricContainersFamily=JnxFabricContainersFamily, jnxFabricOperatingMemory=jnxFabricOperatingMemory, jnxFabricFruChassisDescr=jnxFabricFruChassisDescr, jnxFabricContentsL2Index=jnxFabricContentsL2Index, jnxFabricOperating5MinLoadAvg=jnxFabricOperating5MinLoadAvg, jnxFabricContainersType=jnxFabricContainersType, jnxFabricRedundancyL2Index=jnxFabricRedundancyL2Index, jnxFabricFruLastPowerOff=jnxFabricFruLastPowerOff, jnxFabricDeviceEntryInstalled=jnxFabricDeviceEntryInstalled, jnxFabricFilledL2Index=jnxFabricFilledL2Index, jnxFabricFruTable=jnxFabricFruTable, jnxFabricPowerSupplyFailure=jnxFabricPowerSupplyFailure, JnxFabricDeviceId=JnxFabricDeviceId, jnxFabricRedundancyL1Index=jnxFabricRedundancyL1Index, jnxFabricContentsTable=jnxFabricContentsTable, jnxFabricFruName=jnxFabricFruName, jnxFabricFruOK=jnxFabricFruOK, jnxFabricFilledL3Index=jnxFabricFilledL3Index)
|
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_size_constraint, constraints_union, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint')
(jnx_chassis_id,) = mibBuilder.importSymbols('JUNIPER-MIB', 'JnxChassisId')
(jnx_dcf_mib_root, jnx_fabric_chassis_traps, jnx_fabric_chassis_ok_traps) = mibBuilder.importSymbols('JUNIPER-SMI', 'jnxDcfMibRoot', 'jnxFabricChassisTraps', 'jnxFabricChassisOKTraps')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(mib_identifier, object_identity, module_identity, counter32, integer32, ip_address, bits, iso, counter64, time_ticks, gauge32, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'ObjectIdentity', 'ModuleIdentity', 'Counter32', 'Integer32', 'IpAddress', 'Bits', 'iso', 'Counter64', 'TimeTicks', 'Gauge32', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Unsigned32')
(display_string, textual_convention, date_and_time) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'DateAndTime')
jnx_fabric_anatomy = module_identity((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2))
jnxFabricAnatomy.setRevisions(('2012-09-13 00:00', '2012-07-26 00:00'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
jnxFabricAnatomy.setRevisionsDescriptions(('Added director group device (DG) enum to JnxFabricContainersFamily.', 'Modified the description for JnxFabricDeviceId. Added ufabric as part of JnxFabricContainersFamily.'))
if mibBuilder.loadTexts:
jnxFabricAnatomy.setLastUpdated('201209130000Z')
if mibBuilder.loadTexts:
jnxFabricAnatomy.setOrganization('Juniper Networks, Inc.')
if mibBuilder.loadTexts:
jnxFabricAnatomy.setContactInfo(' Juniper Technical Assistance Center Juniper Networks, Inc. 1194 N. Mathilda Avenue Sunnyvale, CA 94089 E-mail: [email protected]')
if mibBuilder.loadTexts:
jnxFabricAnatomy.setDescription("The MIB modules representing Juniper Networks' Quantum Fabric hardware components.")
jnx_fabric_anatomy_scalars = mib_identifier((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1))
jnx_fabric_anatomy_tables = mib_identifier((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2))
class Jnxfabricdeviceid(TextualConvention, Integer32):
description = 'The device identifier assigned to the individual devices across the fabric by SFC. This shall be a unique index for each of the devices constituting the fabric.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 2147483647)
class Jnxfabriccontainersfamily(TextualConvention, Integer32):
description = 'The family of container that defines the device.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4))
named_values = named_values(('fabricChassis', 1), ('fabricNode', 2), ('ufabric', 3), ('directorGroupDevice', 4))
jnx_fabric_class = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 1), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricClass.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricClass.setDescription('The product line of the fabric switch.')
jnx_fabric_descr = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDescr.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDescr.setDescription('The name, model, or detailed description of the fabric, indicating which product the fabric is about.')
jnx_fabric_serial_no = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricSerialNo.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricSerialNo.setDescription('The serial number of this subject, blank if unknown or unavailable.')
jnx_fabric_revision = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRevision.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRevision.setDescription('The revision of this subject, blank if unknown or unavailable.')
jnx_fabric_firmware_revision = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFirmwareRevision.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFirmwareRevision.setDescription('The firmware (u-boot) revision of this subject, blank if unknown or unavailable.')
jnx_fabric_last_installed = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 6), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricLastInstalled.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricLastInstalled.setDescription('The value of sysUpTime when the subject was last installed, up-and-running. Zero if unknown or already up-and-running when the agent was up.')
jnx_fabric_contents_last_change = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 7), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsLastChange.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsLastChange.setDescription('The value of sysUpTime when the fabric contents table last changed. Zero if unknown or already existing when the agent was up.')
jnx_fabric_filled_last_change = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 1, 8), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFilledLastChange.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFilledLastChange.setDescription('The value of sysUpTime when the fabric filled status table last changed. Zero if unknown or already at that state when the agent was up.')
jnx_fabric_device_table = mib_table((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1))
if mibBuilder.loadTexts:
jnxFabricDeviceTable.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceTable.setDescription('A list of fabric device entries.')
jnx_fabric_device_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1)).setIndexNames((0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'))
if mibBuilder.loadTexts:
jnxFabricDeviceEntry.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntry.setDescription('An entry of fabric device table.')
jnx_fabric_device_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 1), jnx_fabric_device_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceIndex.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceIndex.setDescription('Identifies the device on which the contents of this row exists.')
jnx_fabric_device_entry_containers_family = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 2), jnx_fabric_containers_family()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryContainersFamily.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryContainersFamily.setDescription('The family of container that defines this device.')
jnx_fabric_device_entry_class = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 3), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryClass.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryClass.setDescription('The productline of the device entry.')
jnx_fabric_device_entry_model = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 4), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryModel.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryModel.setDescription('The model object identifier of the device entry.')
jnx_fabric_device_entry_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryDescr.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryDescr.setDescription('The name or detailed description of the device entry.')
jnx_fabric_device_entry_serial_no = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceEntrySerialNo.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntrySerialNo.setDescription('The serial number of this subject, blank if unknown or unavailable.')
jnx_fabric_device_entry_name = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryName.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryName.setDescription('The name of this subject which is same as the serial number unless a device alias has been configured.')
jnx_fabric_device_entry_revision = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryRevision.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryRevision.setDescription('The revision of this subject, blank if unknown or unavailable.')
jnx_fabric_device_entry_firmware_revision = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryFirmwareRevision.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryFirmwareRevision.setDescription('The firmware (u-boot) revision of this subject, blank if unknown or unavailable.')
jnx_fabric_device_entry_installed = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 10), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryInstalled.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryInstalled.setDescription('The value of sysUpTime when the subject was last installed, up-and-running. Zero if unknown or already up-and-running when the agent was up.')
jnx_fabric_device_entry_contents_last_change = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 11), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryContentsLastChange.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryContentsLastChange.setDescription('The value of sysUpTime when the contents table last changed. Zero if unknown or already existing when the agent was up.')
jnx_fabric_device_entry_filled_last_change = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 12), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryFilledLastChange.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryFilledLastChange.setDescription('The value of sysUpTime when the filled status table last changed. Zero if unknown or already at that state when the agent was up.')
jnx_fabric_device_entry_kernel_memory_used_percent = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 1, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryKernelMemoryUsedPercent.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricDeviceEntryKernelMemoryUsedPercent.setDescription('The percentage of kernel memory used of this subject. 0 if unavailable or inapplicable.')
jnx_fabric_containers_table = mib_table((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2))
if mibBuilder.loadTexts:
jnxFabricContainersTable.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContainersTable.setDescription('A list of containers entries.')
jnx_fabric_containers_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1)).setIndexNames((0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricContainersFamily'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricContainersIndex'))
if mibBuilder.loadTexts:
jnxFabricContainersEntry.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContainersEntry.setDescription('An entry of containers table. Each entry is indexed by the container table type and the container index.')
jnx_fabric_containers_family = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 1), jnx_fabric_containers_family()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContainersFamily.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContainersFamily.setDescription('The family of container.')
jnx_fabric_containers_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContainersIndex.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContainersIndex.setDescription('The index for this entry.')
jnx_fabric_containers_view = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 3), bits().clone(namedValues=named_values(('viewFront', 0), ('viewRear', 1), ('viewTop', 2), ('viewBottom', 3), ('viewLeftHandSide', 4), ('viewRightHandSide', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContainersView.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContainersView.setDescription('The view(s) from which the specific container appears. This variable indicates that the specific container is embedded and accessible from the corresponding view(s). The value is a bit map represented as a sum. If multiple bits are set, the specified container(s) are located and accessible from that set of views. The various values representing the bit positions and its corresponding views are: 1 front 2 rear 4 top 8 bottom 16 leftHandSide 32 rightHandSide Note 1: LefHandSide and rightHandSide are referred to based on the view from the front. Note 2: If the specified containers are scattered around various views, the numbering is according to the following sequence: front -> rear -> top -> bottom -> leftHandSide -> rightHandSide For each view plane, the numbering sequence is first from left to right, and then from up to down. Note 3: Even though the value in chassis hardware (e.g. slot number) may be labelled from 0, 1, 2, and up, all the indices in MIB start with 1 (not 0) according to network management convention.')
jnx_fabric_containers_level = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('level0', 0), ('level1', 1), ('level2', 2), ('level3', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContainersLevel.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContainersLevel.setDescription('The abstraction level of the chassis or device. It is enumerated from the outside to the inside, from the outer layer to the inner layer. For example, top level (i.e. level 0) refers to chassis frame, level 1 FPC slot within chassis frame, level 2 PIC space within FPC slot.')
jnx_fabric_containers_within = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContainersWithin.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContainersWithin.setDescription('The index of its next higher level container housing this entry. The associated jnxFabricContainersIndex in the jnxFabricContainersTable represents its next higher level container.')
jnx_fabric_containers_type = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 6), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContainersType.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContainersType.setDescription('The type of this container.')
jnx_fabric_containers_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContainersDescr.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContainersDescr.setDescription('The name or detailed description of this subject.')
jnx_fabric_containers_count = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 2, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContainersCount.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContainersCount.setDescription('The maximum number of containers of this level per container of the next higher level. e.g. if there are six level 2 containers in level 1 container, then jnxFabricContainersCount for level 2 is six.')
jnx_fabric_contents_table = mib_table((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3))
if mibBuilder.loadTexts:
jnxFabricContentsTable.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsTable.setDescription('A list of contents entries.')
jnx_fabric_contents_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1)).setIndexNames((0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsContainerIndex'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL1Index'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL2Index'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL3Index'))
if mibBuilder.loadTexts:
jnxFabricContentsEntry.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsEntry.setDescription('An entry of contents table.')
jnx_fabric_contents_container_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsContainerIndex.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsContainerIndex.setDescription('The associated jnxFabricContainersIndex in the jnxFabricContainersTable.')
jnx_fabric_contents_l1_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsL1Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsL1Index.setDescription('The level one index of the container housing this subject. Zero if unavailable or inapplicable.')
jnx_fabric_contents_l2_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsL2Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsL2Index.setDescription('The level two index of the container housing this subject. Zero if unavailable or inapplicable.')
jnx_fabric_contents_l3_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsL3Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsL3Index.setDescription('The level three index of the container housing this subject. Zero if unavailable or inapplicable.')
jnx_fabric_contents_type = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 5), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsType.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsType.setDescription('The type of this subject. zeroDotZero if unknown.')
jnx_fabric_contents_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsDescr.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsDescr.setDescription('The name or detailed description of this subject.')
jnx_fabric_contents_serial_no = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsSerialNo.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsSerialNo.setDescription('The serial number of this subject, blank if unknown or unavailable.')
jnx_fabric_contents_revision = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsRevision.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsRevision.setDescription('The revision of this subject, blank if unknown or unavailable.')
jnx_fabric_contents_installed = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 9), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsInstalled.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsInstalled.setDescription('The value of sysUpTime when the subject was last installed, up-and-running. Zero if unknown or already up-and-running when the agent was up.')
jnx_fabric_contents_part_no = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 10), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsPartNo.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsPartNo.setDescription('The part number of this subject, blank if unknown or unavailable.')
jnx_fabric_contents_chassis_id = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 11), jnx_chassis_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsChassisId.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsChassisId.setDescription('Identifies the chassis on which the contents of this row exists.')
jnx_fabric_contents_chassis_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 12), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsChassisDescr.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsChassisDescr.setDescription('A textual description of the chassis on which the contents of this row exists.')
jnx_fabric_contents_chassis_clei_code = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 3, 1, 13), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricContentsChassisCleiCode.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricContentsChassisCleiCode.setDescription('The clei code of this subject, blank if unknown or unavailable. A CLEI code is an intelligent code that consists of 10 alphanumeric characters with 4 data elements. The first data element is considered the basic code with the first 2 characters indicating the technology or equipment type, and the third and fourth characters denoting the functional sub-category. The second data element represents the features, and its three characters denote functional capabilities or changes. The third data element has one character and denotes a reference to a manufacturer, system ID, specification, or drawing. The fourth data element consists of two characters and contains complementary data. These two characters provide a means of differentiating or providing uniqueness between the eight character CLEI codes by identifying the manufacturing vintage of the product. Names are assigned via procedures defined in [GR485]. The assigned maintenance agent for the CLEI code, Telcordia Technologies, is responsible for assigning certain equipment and other identifiers (e.g., location, manufacturer/supplier) for the telecommunications industry.')
jnx_fabric_filled_table = mib_table((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4))
if mibBuilder.loadTexts:
jnxFabricFilledTable.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFilledTable.setDescription('A list of filled status entries.')
jnx_fabric_filled_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1)).setIndexNames((0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricFilledContainerIndex'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricFilledL1Index'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricFilledL2Index'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricFilledL3Index'))
if mibBuilder.loadTexts:
jnxFabricFilledEntry.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFilledEntry.setDescription('An entry of filled status table.')
jnx_fabric_filled_container_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFilledContainerIndex.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFilledContainerIndex.setDescription('The associated jnxFabricContainersIndex in the jnxFabricContainersTable.')
jnx_fabric_filled_l1_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFilledL1Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFilledL1Index.setDescription('The level one index of the container housing this subject. Zero if unavailable or inapplicable.')
jnx_fabric_filled_l2_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFilledL2Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFilledL2Index.setDescription('The level two index of the container housing this subject. Zero if unavailable or inapplicable.')
jnx_fabric_filled_l3_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFilledL3Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFilledL3Index.setDescription('The level three index of the container housing this subject. Zero if unavailable or inapplicable.')
jnx_fabric_filled_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFilledDescr.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFilledDescr.setDescription('The name or detailed description of this subject.')
jnx_fabric_filled_state = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unknown', 1), ('empty', 2), ('filled', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFilledState.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFilledState.setDescription('The filled state of this subject.')
jnx_fabric_filled_chassis_id = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 7), jnx_chassis_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFilledChassisId.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFilledChassisId.setDescription('Identifies the chassis on which the contents of this row exists.')
jnx_fabric_filled_chassis_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 4, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFilledChassisDescr.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFilledChassisDescr.setDescription('A textual description of the chassis on which the contents of this row exists.')
jnx_fabric_operating_table = mib_table((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5))
if mibBuilder.loadTexts:
jnxFabricOperatingTable.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingTable.setDescription('A list of operating status entries.')
jnx_fabric_operating_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1)).setIndexNames((0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricOperatingContentsIndex'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricOperatingL1Index'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricOperatingL2Index'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricOperatingL3Index'))
if mibBuilder.loadTexts:
jnxFabricOperatingEntry.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingEntry.setDescription('An entry of operating status table.')
jnx_fabric_operating_contents_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingContentsIndex.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingContentsIndex.setDescription('The associated jnxFabricContentsContainerIndex in the jnxFabricContentsTable.')
jnx_fabric_operating_l1_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingL1Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingL1Index.setDescription('The level one index associated with this subject. Zero if unavailable or inapplicable.')
jnx_fabric_operating_l2_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingL2Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingL2Index.setDescription('The level two index associated with this subject. Zero if unavailable or inapplicable.')
jnx_fabric_operating_l3_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingL3Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingL3Index.setDescription('The level three index associated with this subject. Zero if unavailable or inapplicable.')
jnx_fabric_operating_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingDescr.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingDescr.setDescription('The name or detailed description of this subject.')
jnx_fabric_operating_state = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('unknown', 1), ('running', 2), ('ready', 3), ('reset', 4), ('runningAtFullSpeed', 5), ('down', 6), ('standby', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingState.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingState.setDescription('The operating state of this subject.')
jnx_fabric_operating_temp = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 7), integer32()).setUnits('Celsius (degrees C)').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingTemp.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingTemp.setDescription('The temperature in Celsius (degrees C) of this subject. Zero if unavailable or inapplicable.')
jnx_fabric_operating_cpu = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingCPU.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingCPU.setDescription('The CPU utilization in percentage of this subject. Zero if unavailable or inapplicable.')
jnx_fabric_operating_isr = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingISR.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingISR.setDescription('The CPU utilization in percentage of this subject spending in interrupt service routine (ISR). Zero if unavailable or inapplicable.')
jnx_fabric_operating_dram_size = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingDRAMSize.setStatus('deprecated')
if mibBuilder.loadTexts:
jnxFabricOperatingDRAMSize.setDescription('The DRAM size in bytes of this subject. Zero if unavailable or inapplicable.')
jnx_fabric_operating_buffer = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 11), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingBuffer.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingBuffer.setDescription('The buffer pool utilization in percentage of this subject. Zero if unavailable or inapplicable.')
jnx_fabric_operating_heap = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingHeap.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingHeap.setDescription('The heap utilization in percentage of this subject. Zero if unavailable or inapplicable.')
jnx_fabric_operating_up_time = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 13), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingUpTime.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingUpTime.setDescription('The time interval in 10-millisecond period that this subject has been up and running. Zero if unavailable or inapplicable.')
jnx_fabric_operating_last_restart = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 14), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingLastRestart.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingLastRestart.setDescription('The value of sysUpTime when this subject last restarted. Zero if unavailable or inapplicable.')
jnx_fabric_operating_memory = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 15), integer32()).setUnits('Megabytes').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingMemory.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingMemory.setDescription('The installed memory size in Megabytes of this subject. Zero if unavailable or inapplicable.')
jnx_fabric_operating_state_ordered = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('running', 1), ('standby', 2), ('ready', 3), ('runningAtFullSpeed', 4), ('reset', 5), ('down', 6), ('unknown', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingStateOrdered.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingStateOrdered.setDescription("The operating state of this subject. Identical to jnxFabricOperatingState, but with enums ordered from 'most operational' to 'least operational' states.")
jnx_fabric_operating_chassis_id = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 17), jnx_chassis_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingChassisId.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingChassisId.setDescription('Identifies the chassis on which the contents of this row exists.')
jnx_fabric_operating_chassis_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 18), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingChassisDescr.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingChassisDescr.setDescription('A textual description of the chassis on which the contents of this row exists.')
jnx_fabric_operating_restart_time = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 19), date_and_time()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperatingRestartTime.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperatingRestartTime.setDescription('The time at which this entity last restarted.')
jnx_fabric_operating1_min_load_avg = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 20), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperating1MinLoadAvg.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperating1MinLoadAvg.setDescription('The CPU Load Average over the last 1 minutes Here it will be shown as percentage value Zero if unavailable or inapplicable.')
jnx_fabric_operating5_min_load_avg = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 21), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperating5MinLoadAvg.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperating5MinLoadAvg.setDescription('The CPU Load Average over the last 5 minutes Here it will be shown as percentage value Zero if unavailable or inapplicable.')
jnx_fabric_operating15_min_load_avg = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 5, 1, 22), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricOperating15MinLoadAvg.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOperating15MinLoadAvg.setDescription('The CPU Load Average over the last 15 minutes Here it will be shown as percentage value Zero if unavailable or inapplicable.')
jnx_fabric_redundancy_table = mib_table((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6))
if mibBuilder.loadTexts:
jnxFabricRedundancyTable.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyTable.setDescription('A list of redundancy information entries.')
jnx_fabric_redundancy_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1)).setIndexNames((0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancyContentsIndex'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancyL1Index'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancyL2Index'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancyL3Index'))
if mibBuilder.loadTexts:
jnxFabricRedundancyEntry.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyEntry.setDescription('An entry in the redundancy information table.')
jnx_fabric_redundancy_contents_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyContentsIndex.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyContentsIndex.setDescription('The associated jnxFabricContentsContainerIndex in the jnxFabricContentsTable.')
jnx_fabric_redundancy_l1_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyL1Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyL1Index.setDescription('The level one index associated with this subject. Zero if unavailable or inapplicable.')
jnx_fabric_redundancy_l2_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyL2Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyL2Index.setDescription('The level two index associated with this subject. Zero if unavailable or inapplicable.')
jnx_fabric_redundancy_l3_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyL3Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyL3Index.setDescription('The level three index associated with this subject. Zero if unavailable or inapplicable.')
jnx_fabric_redundancy_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyDescr.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyDescr.setDescription('The name or detailed description of this subject.')
jnx_fabric_redundancy_config = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('master', 2), ('backup', 3), ('disabled', 4), ('notApplicable', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyConfig.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyConfig.setDescription("The election priority of redundancy configuration for this subject. The value 'notApplicable' means no specific instance is configured to be master or backup; whichever component boots up first becomes a master.")
jnx_fabric_redundancy_state = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('unknown', 1), ('master', 2), ('backup', 3), ('disabled', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyState.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyState.setDescription('The current running state for this subject.')
jnx_fabric_redundancy_switchover_count = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancySwitchoverCount.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancySwitchoverCount.setDescription('The total number of switchover as perceived by this subject since routing engine is up and running. The switchover is defined as a change in state of jnxFabricRedundancyState from master to backup or vice versa. Its value is reset when the routing engine is reset or rebooted.')
jnx_fabric_redundancy_switchover_time = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 9), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancySwitchoverTime.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancySwitchoverTime.setDescription('The value of sysUpTime when the jnxFabricRedundancyState of this subject was last switched over from master to backup or vice versa. Zero if unknown or never switched over since the routing engine is up and running.')
jnx_fabric_redundancy_switchover_reason = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('neverSwitched', 2), ('userSwitched', 3), ('autoSwitched', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancySwitchoverReason.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancySwitchoverReason.setDescription('The reason of the last switchover for this subject.')
jnx_fabric_redundancy_keepalive_heartbeat = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 11), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyKeepaliveHeartbeat.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyKeepaliveHeartbeat.setDescription('The period of sending keepalive messages between the master and backup subsystems. It is a system-wide preset value in seconds used by internal mastership resolution. Zero if unavailable or inapplicable.')
jnx_fabric_redundancy_keepalive_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyKeepaliveTimeout.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyKeepaliveTimeout.setDescription('The timeout period in seconds, by the keepalive watchdog timer, before initiating a switch over to the backup subsystem. Zero if unavailable or inapplicable.')
jnx_fabric_redundancy_keepalive_elapsed = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyKeepaliveElapsed.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyKeepaliveElapsed.setDescription('The elapsed time in seconds by this subject since receiving the last keepalive message from the other subsystems. Zero if unavailable or inapplicable.')
jnx_fabric_redundancy_keepalive_loss = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyKeepaliveLoss.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyKeepaliveLoss.setDescription('The total number of losses on keepalive messages between the master and backup subsystems as perceived by this subject since the system is up and running. Zero if unavailable or inapplicable.')
jnx_fabric_redundancy_chassis_id = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 15), jnx_chassis_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyChassisId.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyChassisId.setDescription('Identifies the chassis on which the contents of this row exists.')
jnx_fabric_redundancy_chassis_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 6, 1, 16), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricRedundancyChassisDescr.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancyChassisDescr.setDescription('A textual description of the chassis on which the contents of this row exists.')
jnx_fabric_fru_table = mib_table((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7))
if mibBuilder.loadTexts:
jnxFabricFruTable.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruTable.setDescription('A list of FRU status entries.')
jnx_fabric_fru_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1)).setIndexNames((0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), (0, 'JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'))
if mibBuilder.loadTexts:
jnxFabricFruEntry.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruEntry.setDescription('An entry in the FRU status table.')
jnx_fabric_fru_contents_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruContentsIndex.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruContentsIndex.setDescription('The associated jnxFabricContentsContainerIndex in the jnxFabricContentsTable.')
jnx_fabric_fru_l1_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruL1Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruL1Index.setDescription('The level one index associated with this subject. Zero if unavailable or inapplicable.')
jnx_fabric_fru_l2_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruL2Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruL2Index.setDescription('The level two index associated with this subject. Zero if unavailable or inapplicable.')
jnx_fabric_fru_l3_index = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruL3Index.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruL3Index.setDescription('The level three index associated with this subject. Zero if unavailable or inapplicable.')
jnx_fabric_fru_name = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruName.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruName.setDescription('The name or detailed description of this subject.')
jnx_fabric_fru_type = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))).clone(namedValues=named_values(('other', 1), ('clockGenerator', 2), ('flexiblePicConcentrator', 3), ('switchingAndForwardingModule', 4), ('controlBoard', 5), ('routingEngine', 6), ('powerEntryModule', 7), ('frontPanelModule', 8), ('switchInterfaceBoard', 9), ('processorMezzanineBoardForSIB', 10), ('portInterfaceCard', 11), ('craftInterfacePanel', 12), ('fan', 13), ('lineCardChassis', 14), ('forwardingEngineBoard', 15), ('protectedSystemDomain', 16)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruType.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruType.setDescription('The FRU type for this subject.')
jnx_fabric_fru_slot = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruSlot.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruSlot.setDescription('The slot number of this subject. This is equivalent to jnxFabricFruL1Index in meaning. Zero if unavailable or inapplicable.')
jnx_fabric_fru_state = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=named_values(('unknown', 1), ('empty', 2), ('present', 3), ('ready', 4), ('announceOnline', 5), ('online', 6), ('anounceOffline', 7), ('offline', 8), ('diagnostic', 9), ('standby', 10)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruState.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruState.setDescription('The current state for this subject.')
jnx_fabric_fru_temp = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 9), integer32()).setUnits('Celsius (degrees C)').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruTemp.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruTemp.setDescription('The temperature in Celsius (degrees C) of this subject. Zero if unavailable or inapplicable.')
jnx_fabric_fru_offline_reason = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75))).clone(namedValues=named_values(('unknown', 1), ('none', 2), ('error', 3), ('noPower', 4), ('configPowerOff', 5), ('configHoldInReset', 6), ('cliCommand', 7), ('buttonPress', 8), ('cliRestart', 9), ('overtempShutdown', 10), ('masterClockDown', 11), ('singleSfmModeChange', 12), ('packetSchedulingModeChange', 13), ('physicalRemoval', 14), ('unresponsiveRestart', 15), ('sonetClockAbsent', 16), ('rddPowerOff', 17), ('majorErrors', 18), ('minorErrors', 19), ('lccHardRestart', 20), ('lccVersionMismatch', 21), ('powerCycle', 22), ('reconnect', 23), ('overvoltage', 24), ('pfeVersionMismatch', 25), ('febRddCfgChange', 26), ('fpcMisconfig', 27), ('fruReconnectFail', 28), ('fruFwddReset', 29), ('fruFebSwitch', 30), ('fruFebOffline', 31), ('fruInServSoftUpgradeError', 32), ('fruChasdPowerRatingExceed', 33), ('fruConfigOffline', 34), ('fruServiceRestartRequest', 35), ('spuResetRequest', 36), ('spuFlowdDown', 37), ('spuSpi4Down', 38), ('spuWatchdogTimeout', 39), ('spuCoreDump', 40), ('fpgaSpi4LinkDown', 41), ('i3Spi4LinkDown', 42), ('cppDisconnect', 43), ('cpuNotBoot', 44), ('spuCoreDumpComplete', 45), ('rstOnSpcSpuFailure', 46), ('softRstOnSpcSpuFailure', 47), ('hwAuthenticationFailure', 48), ('reconnectFpcFail', 49), ('fpcAppFailed', 50), ('fpcKernelCrash', 51), ('spuFlowdDownNoCore', 52), ('spuFlowdCoreDumpIncomplete', 53), ('spuFlowdCoreDumpComplete', 54), ('spuIdpdDownNoCore', 55), ('spuIdpdCoreDumpIncomplete', 56), ('spuIdpdCoreDumpComplete', 57), ('spuCoreDumpIncomplete', 58), ('spuIdpdDown', 59), ('fruPfeReset', 60), ('fruReconnectNotReady', 61), ('fruSfLinkDown', 62), ('fruFabricDown', 63), ('fruAntiCounterfeitRetry', 64), ('fruFPCChassisClusterDisable', 65), ('spuFipsError', 66), ('fruFPCFabricDownOffline', 67), ('febCfgChange', 68), ('routeLocalizationRoleChange', 69), ('fruFpcUnsupported', 70), ('psdVersionMismatch', 71), ('fruResetThresholdExceeded', 72), ('picBounce', 73), ('badVoltage', 74), ('fruFPCReducedFabricBW', 75)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruOfflineReason.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruOfflineReason.setDescription('The offline reason of this subject.')
jnx_fabric_fru_last_power_off = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 11), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruLastPowerOff.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruLastPowerOff.setDescription('The value of sysUpTime when this subject was last powered off. Zero if unavailable or inapplicable.')
jnx_fabric_fru_last_power_on = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 12), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruLastPowerOn.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruLastPowerOn.setDescription('The value of sysUpTime when this subject was last powered on. Zero if unavailable or inapplicable.')
jnx_fabric_fru_power_up_time = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 13), time_ticks()).setUnits('centi-seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruPowerUpTime.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruPowerUpTime.setDescription('The time interval in 10-millisecond period that this subject has been up and running since the last power on time. Zero if unavailable or inapplicable.')
jnx_fabric_fru_chassis_id = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 14), jnx_chassis_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruChassisId.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruChassisId.setDescription('Identifies the chassis on which the contents of this row exists.')
jnx_fabric_fru_chassis_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 15), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruChassisDescr.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruChassisDescr.setDescription('A textual description of the chassis on which the contents of this row exists.')
jnx_fabric_fru_psd_assignment = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 42, 2, 2, 7, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 31))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
jnxFabricFruPsdAssignment.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruPsdAssignment.setDescription('The PSD assignment of this subject. Zero if unavailable or not applicable.')
jnx_fabric_power_supply_failure = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 1)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsContainerIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsDescr'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricOperatingState'))
if mibBuilder.loadTexts:
jnxFabricPowerSupplyFailure.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricPowerSupplyFailure.setDescription('A jnxFabricPowerSupplyFailure trap signifies that the SNMP entity, acting in an agent role, has detected that the specified power supply in the chassis has been in the failure (bad DC output) condition.')
jnx_fabric_fan_failure = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 2)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsContainerIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsDescr'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricOperatingState'))
if mibBuilder.loadTexts:
jnxFabricFanFailure.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFanFailure.setDescription('A jnxFabricFanFailure trap signifies that the SNMP entity, acting in an agent role, has detected that the specified cooling fan or impeller in the chassis has been in the failure (not spinning) condition.')
jnx_fabric_over_temperature = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 3)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsContainerIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsDescr'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricOperatingTemp'))
if mibBuilder.loadTexts:
jnxFabricOverTemperature.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricOverTemperature.setDescription('A jnxFabricOverTemperature trap signifies that the SNMP entity, acting in an agent role, has detected that the specified hardware component in the chassis has experienced over temperature condition.')
jnx_fabric_redundancy_switchover = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 4)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancyContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancyL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancyL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancyL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancyDescr'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancyConfig'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancyState'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancySwitchoverCount'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancySwitchoverTime'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricRedundancySwitchoverReason'))
if mibBuilder.loadTexts:
jnxFabricRedundancySwitchover.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricRedundancySwitchover.setDescription('A jnxFabricRedundancySwitchover trap signifies that the SNMP entity, acting in an agent role, has detected that the specified hardware component in the chassis has experienced a redundancy switchover event defined as a change in state of jnxFabricRedundancyState from master to backup or vice versa.')
jnx_fabric_fru_removal = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 5)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'))
if mibBuilder.loadTexts:
jnxFabricFruRemoval.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruRemoval.setDescription('A jnxFabricFruRemoval trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has been removed from the chassis.')
jnx_fabric_fru_insertion = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 6)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'))
if mibBuilder.loadTexts:
jnxFabricFruInsertion.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruInsertion.setDescription('A jnxFabricFruInsertion trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has been inserted into the chassis.')
jnx_fabric_fru_power_off = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 7)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruOfflineReason'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruLastPowerOff'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruLastPowerOn'))
if mibBuilder.loadTexts:
jnxFabricFruPowerOff.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruPowerOff.setDescription('A jnxFabricFruPowerOff trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has been powered off in the chassis.')
jnx_fabric_fru_power_on = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 8)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruOfflineReason'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruLastPowerOff'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruLastPowerOn'))
if mibBuilder.loadTexts:
jnxFabricFruPowerOn.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruPowerOn.setDescription('A jnxFabricFruPowerOn trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has been powered on in the chassis.')
jnx_fabric_fru_failed = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 9)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'))
if mibBuilder.loadTexts:
jnxFabricFruFailed.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruFailed.setDescription('This indicates the specified FRU (Field Replaceable Unit) has failed in the chassis. Most probably this is due toi some hard error such as fru is not powering up or not able to load ukernel. In these cases, fru is replaced.')
jnx_fabric_fru_offline = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 10)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruOfflineReason'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruLastPowerOff'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruLastPowerOn'))
if mibBuilder.loadTexts:
jnxFabricFruOffline.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruOffline.setDescription('A jnxFabricFruOffline trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has gone offline in the chassis.')
jnx_fabric_fru_online = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 11)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'))
if mibBuilder.loadTexts:
jnxFabricFruOnline.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruOnline.setDescription('A jnxFabricFruOnline trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has gone online in the chassis.')
jnx_fabric_fru_check = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 12)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'))
if mibBuilder.loadTexts:
jnxFabricFruCheck.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruCheck.setDescription('A jnxFabricFruCheck trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has encountered some operational errors and gone into check state in the chassis.')
jnx_fabric_feb_switchover = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 13)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'))
if mibBuilder.loadTexts:
jnxFabricFEBSwitchover.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFEBSwitchover.setDescription('A jnxFabricFEBSwitchover trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FEB (Forwarding Engine Board) has switched over.')
jnx_fabric_hard_disk_failed = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 14)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'))
if mibBuilder.loadTexts:
jnxFabricHardDiskFailed.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricHardDiskFailed.setDescription('A jnxHardDiskFailed trap signifies that the SNMP entity, acting in an agent role, has detected that the Disk in the specified Routing Engine has encountered some operational errors and gone into failed state in the chassis.')
jnx_fabric_hard_disk_missing = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 15)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'))
if mibBuilder.loadTexts:
jnxFabricHardDiskMissing.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricHardDiskMissing.setDescription('A DiskMissing trap signifies that the SNMP entity, acting in an agent role, has detected that hard disk in the specified outing Engine is missing from boot device list.')
jnx_fabric_boot_from_backup = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 19, 16)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'))
if mibBuilder.loadTexts:
jnxFabricBootFromBackup.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricBootFromBackup.setDescription('A jnxBootFromBackup trap signifies that the SNMP entity, acting in an agent role, has detected that the specified routing-engine/member has booted from the back up root partition')
jnx_fabric_power_supply_ok = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 20, 1)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsContainerIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsDescr'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricOperatingState'))
if mibBuilder.loadTexts:
jnxFabricPowerSupplyOK.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricPowerSupplyOK.setDescription('A jnxFabricPowerSupplyOK trap signifies that the SNMP entity, acting in an agent role, has detected that the specified power supply in the chassis has recovered from the failure (bad DC output) condition.')
jnx_fabric_fan_ok = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 20, 2)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsContainerIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsDescr'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricOperatingState'))
if mibBuilder.loadTexts:
jnxFabricFanOK.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFanOK.setDescription('A jnxFabricFanOK trap signifies that the SNMP entity, acting in an agent role, has detected that the specified cooling fan or impeller in the chassis has recovered from the failure (not spinning) condition.')
jnx_fabric_temperature_ok = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 20, 3)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsContainerIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricContentsDescr'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricOperatingTemp'))
if mibBuilder.loadTexts:
jnxFabricTemperatureOK.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricTemperatureOK.setDescription('A jnxFabricTemperatureOK trap signifies that the SNMP entity, acting in an agent role, has detected that the specified hardware component in the chassis has recovered from over temperature condition.')
jnx_fabric_fru_ok = notification_type((1, 3, 6, 1, 4, 1, 2636, 4, 20, 4)).setObjects(('JUNIPER-FABRIC-CHASSIS', 'jnxFabricDeviceIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruContentsIndex'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL1Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL2Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruL3Index'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruName'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruType'), ('JUNIPER-FABRIC-CHASSIS', 'jnxFabricFruSlot'))
if mibBuilder.loadTexts:
jnxFabricFruOK.setStatus('current')
if mibBuilder.loadTexts:
jnxFabricFruOK.setDescription('A jnxFabricFabricFruOK trap signifies that the SNMP entity, acting in an agent role, has detected that the specified FRU (Field Replaceable Unit) has recovered from previous operational errors and it is in ok state in the chassis.')
mibBuilder.exportSymbols('JUNIPER-FABRIC-CHASSIS', jnxFabricFruL3Index=jnxFabricFruL3Index, jnxFabricDeviceEntryDescr=jnxFabricDeviceEntryDescr, jnxFabricOverTemperature=jnxFabricOverTemperature, jnxFabricDeviceEntrySerialNo=jnxFabricDeviceEntrySerialNo, jnxFabricRedundancyChassisId=jnxFabricRedundancyChassisId, jnxFabricContentsRevision=jnxFabricContentsRevision, jnxFabricOperatingDRAMSize=jnxFabricOperatingDRAMSize, jnxFabricContentsContainerIndex=jnxFabricContentsContainerIndex, jnxFabricOperatingDescr=jnxFabricOperatingDescr, jnxFabricRedundancyKeepaliveElapsed=jnxFabricRedundancyKeepaliveElapsed, jnxFabricFruL1Index=jnxFabricFruL1Index, jnxFabricFruPowerOff=jnxFabricFruPowerOff, jnxFabricRevision=jnxFabricRevision, jnxFabricFilledL1Index=jnxFabricFilledL1Index, jnxFabricRedundancySwitchoverTime=jnxFabricRedundancySwitchoverTime, jnxFabricContainersLevel=jnxFabricContainersLevel, jnxFabricFruCheck=jnxFabricFruCheck, jnxFabricContainersTable=jnxFabricContainersTable, jnxFabricFilledDescr=jnxFabricFilledDescr, jnxFabricContainersFamily=jnxFabricContainersFamily, jnxFabricFilledContainerIndex=jnxFabricFilledContainerIndex, jnxFabricOperating1MinLoadAvg=jnxFabricOperating1MinLoadAvg, jnxFabricContentsL1Index=jnxFabricContentsL1Index, jnxFabricDeviceTable=jnxFabricDeviceTable, jnxFabricDeviceEntryClass=jnxFabricDeviceEntryClass, jnxFabricContainersWithin=jnxFabricContainersWithin, jnxFabricFilledChassisId=jnxFabricFilledChassisId, jnxFabricRedundancyTable=jnxFabricRedundancyTable, jnxFabricOperatingCPU=jnxFabricOperatingCPU, jnxFabricOperatingTable=jnxFabricOperatingTable, jnxFabricRedundancyL3Index=jnxFabricRedundancyL3Index, jnxFabricFanFailure=jnxFabricFanFailure, jnxFabricRedundancyEntry=jnxFabricRedundancyEntry, jnxFabricClass=jnxFabricClass, jnxFabricContentsL3Index=jnxFabricContentsL3Index, jnxFabricDeviceEntryRevision=jnxFabricDeviceEntryRevision, jnxFabricContentsChassisId=jnxFabricContentsChassisId, jnxFabricFruType=jnxFabricFruType, jnxFabricContentsLastChange=jnxFabricContentsLastChange, jnxFabricContentsChassisDescr=jnxFabricContentsChassisDescr, jnxFabricFruRemoval=jnxFabricFruRemoval, jnxFabricDeviceEntryFirmwareRevision=jnxFabricDeviceEntryFirmwareRevision, jnxFabricRedundancyKeepaliveLoss=jnxFabricRedundancyKeepaliveLoss, jnxFabricFruTemp=jnxFabricFruTemp, jnxFabricDescr=jnxFabricDescr, jnxFabricFanOK=jnxFabricFanOK, PYSNMP_MODULE_ID=jnxFabricAnatomy, jnxFabricFruOfflineReason=jnxFabricFruOfflineReason, jnxFabricContainersEntry=jnxFabricContainersEntry, jnxFabricRedundancyState=jnxFabricRedundancyState, jnxFabricOperatingLastRestart=jnxFabricOperatingLastRestart, jnxFabricContentsDescr=jnxFabricContentsDescr, jnxFabricFirmwareRevision=jnxFabricFirmwareRevision, jnxFabricContentsEntry=jnxFabricContentsEntry, jnxFabricRedundancyDescr=jnxFabricRedundancyDescr, jnxFabricDeviceEntryName=jnxFabricDeviceEntryName, jnxFabricOperating15MinLoadAvg=jnxFabricOperating15MinLoadAvg, jnxFabricFilledTable=jnxFabricFilledTable, jnxFabricRedundancySwitchover=jnxFabricRedundancySwitchover, jnxFabricTemperatureOK=jnxFabricTemperatureOK, jnxFabricBootFromBackup=jnxFabricBootFromBackup, jnxFabricAnatomyScalars=jnxFabricAnatomyScalars, jnxFabricDeviceIndex=jnxFabricDeviceIndex, jnxFabricContainersIndex=jnxFabricContainersIndex, jnxFabricFruPsdAssignment=jnxFabricFruPsdAssignment, jnxFabricDeviceEntryKernelMemoryUsedPercent=jnxFabricDeviceEntryKernelMemoryUsedPercent, jnxFabricOperatingChassisDescr=jnxFabricOperatingChassisDescr, jnxFabricFruLastPowerOn=jnxFabricFruLastPowerOn, jnxFabricDeviceEntryModel=jnxFabricDeviceEntryModel, jnxFabricFruSlot=jnxFabricFruSlot, jnxFabricOperatingHeap=jnxFabricOperatingHeap, jnxFabricOperatingL2Index=jnxFabricOperatingL2Index, jnxFabricFilledChassisDescr=jnxFabricFilledChassisDescr, jnxFabricOperatingRestartTime=jnxFabricOperatingRestartTime, jnxFabricFruContentsIndex=jnxFabricFruContentsIndex, jnxFabricOperatingStateOrdered=jnxFabricOperatingStateOrdered, jnxFabricContentsChassisCleiCode=jnxFabricContentsChassisCleiCode, jnxFabricFruInsertion=jnxFabricFruInsertion, jnxFabricRedundancyContentsIndex=jnxFabricRedundancyContentsIndex, jnxFabricFEBSwitchover=jnxFabricFEBSwitchover, jnxFabricFruPowerOn=jnxFabricFruPowerOn, jnxFabricFilledLastChange=jnxFabricFilledLastChange, jnxFabricContainersDescr=jnxFabricContainersDescr, jnxFabricFilledState=jnxFabricFilledState, jnxFabricFruEntry=jnxFabricFruEntry, jnxFabricOperatingState=jnxFabricOperatingState, jnxFabricHardDiskFailed=jnxFabricHardDiskFailed, jnxFabricDeviceEntry=jnxFabricDeviceEntry, jnxFabricFruPowerUpTime=jnxFabricFruPowerUpTime, jnxFabricContentsType=jnxFabricContentsType, jnxFabricContainersCount=jnxFabricContainersCount, jnxFabricOperatingL3Index=jnxFabricOperatingL3Index, jnxFabricRedundancyKeepaliveTimeout=jnxFabricRedundancyKeepaliveTimeout, jnxFabricOperatingUpTime=jnxFabricOperatingUpTime, jnxFabricOperatingISR=jnxFabricOperatingISR, jnxFabricOperatingTemp=jnxFabricOperatingTemp, jnxFabricFruOffline=jnxFabricFruOffline, jnxFabricLastInstalled=jnxFabricLastInstalled, jnxFabricAnatomyTables=jnxFabricAnatomyTables, jnxFabricContentsPartNo=jnxFabricContentsPartNo, jnxFabricRedundancySwitchoverReason=jnxFabricRedundancySwitchoverReason, jnxFabricAnatomy=jnxFabricAnatomy, jnxFabricContentsSerialNo=jnxFabricContentsSerialNo, jnxFabricContentsInstalled=jnxFabricContentsInstalled, jnxFabricFruChassisId=jnxFabricFruChassisId, jnxFabricFruState=jnxFabricFruState, jnxFabricOperatingL1Index=jnxFabricOperatingL1Index, jnxFabricRedundancySwitchoverCount=jnxFabricRedundancySwitchoverCount, jnxFabricFilledEntry=jnxFabricFilledEntry, jnxFabricOperatingEntry=jnxFabricOperatingEntry, jnxFabricRedundancyKeepaliveHeartbeat=jnxFabricRedundancyKeepaliveHeartbeat, jnxFabricFruOnline=jnxFabricFruOnline, jnxFabricDeviceEntryFilledLastChange=jnxFabricDeviceEntryFilledLastChange, jnxFabricDeviceEntryContentsLastChange=jnxFabricDeviceEntryContentsLastChange, jnxFabricOperatingContentsIndex=jnxFabricOperatingContentsIndex, jnxFabricHardDiskMissing=jnxFabricHardDiskMissing, jnxFabricFruL2Index=jnxFabricFruL2Index, jnxFabricContainersView=jnxFabricContainersView, jnxFabricOperatingChassisId=jnxFabricOperatingChassisId, jnxFabricRedundancyChassisDescr=jnxFabricRedundancyChassisDescr, jnxFabricFruFailed=jnxFabricFruFailed, jnxFabricRedundancyConfig=jnxFabricRedundancyConfig, jnxFabricPowerSupplyOK=jnxFabricPowerSupplyOK, jnxFabricOperatingBuffer=jnxFabricOperatingBuffer, jnxFabricSerialNo=jnxFabricSerialNo, jnxFabricDeviceEntryContainersFamily=jnxFabricDeviceEntryContainersFamily, JnxFabricContainersFamily=JnxFabricContainersFamily, jnxFabricOperatingMemory=jnxFabricOperatingMemory, jnxFabricFruChassisDescr=jnxFabricFruChassisDescr, jnxFabricContentsL2Index=jnxFabricContentsL2Index, jnxFabricOperating5MinLoadAvg=jnxFabricOperating5MinLoadAvg, jnxFabricContainersType=jnxFabricContainersType, jnxFabricRedundancyL2Index=jnxFabricRedundancyL2Index, jnxFabricFruLastPowerOff=jnxFabricFruLastPowerOff, jnxFabricDeviceEntryInstalled=jnxFabricDeviceEntryInstalled, jnxFabricFilledL2Index=jnxFabricFilledL2Index, jnxFabricFruTable=jnxFabricFruTable, jnxFabricPowerSupplyFailure=jnxFabricPowerSupplyFailure, JnxFabricDeviceId=JnxFabricDeviceId, jnxFabricRedundancyL1Index=jnxFabricRedundancyL1Index, jnxFabricContentsTable=jnxFabricContentsTable, jnxFabricFruName=jnxFabricFruName, jnxFabricFruOK=jnxFabricFruOK, jnxFabricFilledL3Index=jnxFabricFilledL3Index)
|
"""Rules for simple testing without dependencies by parsing output logs."""
def tflite_micro_cc_test(
name,
expected_in_logs = "~~~ALL TESTS PASSED~~~",
srcs = [],
includes = [],
defines = [],
copts = [],
nocopts = "",
linkopts = [],
deps = [],
tags = [],
visibility = None):
"""Tests a C/C++ binary without testing framework dependencies`.
Runs a C++ binary, and tests that the output logs contain the
expected value. This is a deliberately spartan way of testing, to match
what's available when testing microcontroller binaries.
Args:
name: a unique name for this rule.
expected_in_logs: A regular expression that is required to be
present in the binary's logs for the test to pass.
srcs: sources to compile (C, C++, ld scripts).
includes: include paths to add to this rule and its dependents.
defines: list of `VAR` or `VAR=VAL` to pass to CPP for this rule and
its dependents.
copts: gcc compilation flags for this rule only.
nocopts: list of gcc compilation flags to remove for this rule
only. No regexp like for `cc_library`.
linkopts: `gcc` flags to add to the linking phase. For "pure" ld flags,
prefix them with the `-Wl,` prefix here.
deps: dependencies. only `tflite_bare_metal_cc_library()` dependencies
allowed.
visibility: visibility.
"""
native.cc_binary(
name = name + "_binary",
srcs = srcs,
includes = includes,
defines = defines,
copts = copts,
nocopts = nocopts,
linkopts = linkopts,
deps = deps,
tags = tags,
visibility = visibility,
)
native.sh_test(
name = name,
size = "medium",
srcs = [
"//tensorflow/contrib/lite/experimental/micro/testing:test_linux_binary.sh",
],
args = [
native.package_name() + "/" + name + "_binary",
"'" + expected_in_logs + "'",
],
data = [
name + "_binary",
# Internal test dependency placeholder
],
deps = [
],
tags = tags,
)
|
"""Rules for simple testing without dependencies by parsing output logs."""
def tflite_micro_cc_test(name, expected_in_logs='~~~ALL TESTS PASSED~~~', srcs=[], includes=[], defines=[], copts=[], nocopts='', linkopts=[], deps=[], tags=[], visibility=None):
"""Tests a C/C++ binary without testing framework dependencies`.
Runs a C++ binary, and tests that the output logs contain the
expected value. This is a deliberately spartan way of testing, to match
what's available when testing microcontroller binaries.
Args:
name: a unique name for this rule.
expected_in_logs: A regular expression that is required to be
present in the binary's logs for the test to pass.
srcs: sources to compile (C, C++, ld scripts).
includes: include paths to add to this rule and its dependents.
defines: list of `VAR` or `VAR=VAL` to pass to CPP for this rule and
its dependents.
copts: gcc compilation flags for this rule only.
nocopts: list of gcc compilation flags to remove for this rule
only. No regexp like for `cc_library`.
linkopts: `gcc` flags to add to the linking phase. For "pure" ld flags,
prefix them with the `-Wl,` prefix here.
deps: dependencies. only `tflite_bare_metal_cc_library()` dependencies
allowed.
visibility: visibility.
"""
native.cc_binary(name=name + '_binary', srcs=srcs, includes=includes, defines=defines, copts=copts, nocopts=nocopts, linkopts=linkopts, deps=deps, tags=tags, visibility=visibility)
native.sh_test(name=name, size='medium', srcs=['//tensorflow/contrib/lite/experimental/micro/testing:test_linux_binary.sh'], args=[native.package_name() + '/' + name + '_binary', "'" + expected_in_logs + "'"], data=[name + '_binary'], deps=[], tags=tags)
|
class Solution:
def minPathSum(self, grid: List[List[int]]) -> int:
rows=len(grid)
columns=len(grid[0])
for i in range(1,columns):
grid[0][i]+=grid[0][i-1]
for j in range(1,rows):
grid[j][0]+=grid[j-1][0]
for k in range(1,rows):
for l in range(1,columns):
grid[k][l]+=min(grid[k][l-1],grid[k-1][l])
return grid[-1][-1]
|
class Solution:
def min_path_sum(self, grid: List[List[int]]) -> int:
rows = len(grid)
columns = len(grid[0])
for i in range(1, columns):
grid[0][i] += grid[0][i - 1]
for j in range(1, rows):
grid[j][0] += grid[j - 1][0]
for k in range(1, rows):
for l in range(1, columns):
grid[k][l] += min(grid[k][l - 1], grid[k - 1][l])
return grid[-1][-1]
|
'''
Take two sorted linked lists L, R and return the merge of L and R
Notes:
* when declaring a python class, inherit from object if not otherwise specified
* in the python class __init__ function, self is a required first argument
* next is a reserved name (iterator method) in python. use the variable name next_node for the pointer field instead.
* what went right
* used dummy linked list head pattern
* bugs
* forgot to advance the merged list node pointer variable
'''
class LinkedListNode(object):
def __init__(self, val, next_node=None):
self.val = val
self.next_node = next_node
def print_nodes(self):
print(self.val)
if self.next_node is not None:
self.next_node.print_nodes()
def merge_lists(l, r):
dummy_head = LinkedListNode(0)
node = dummy_head
while True:
if l is None:
node.next_node = r
break
if r is None:
node.next_node = l
break
if l.val < r.val:
node.next_node = l
l = l.next_node
else:
node.next_node = r
r = r.next_node
node = node.next_node
return dummy_head.next_node
def create_list_from_arr(arr):
dummy_head = LinkedListNode(0)
node = dummy_head
for el in arr:
next_node = LinkedListNode(el)
node.next_node = next_node
node = next_node
return dummy_head.next_node
if __name__ == '__main__':
test_cases = [
([1,4,6,10], [2,3,5]),
([1,4,6,10], []),
([], [2,3,5]),
([1,2,3], [4,5,6]),
]
for t in test_cases:
l = create_list_from_arr(t[0])
r = create_list_from_arr(t[1])
print(t)
merge_lists(l,r).print_nodes()
|
"""
Take two sorted linked lists L, R and return the merge of L and R
Notes:
* when declaring a python class, inherit from object if not otherwise specified
* in the python class __init__ function, self is a required first argument
* next is a reserved name (iterator method) in python. use the variable name next_node for the pointer field instead.
* what went right
* used dummy linked list head pattern
* bugs
* forgot to advance the merged list node pointer variable
"""
class Linkedlistnode(object):
def __init__(self, val, next_node=None):
self.val = val
self.next_node = next_node
def print_nodes(self):
print(self.val)
if self.next_node is not None:
self.next_node.print_nodes()
def merge_lists(l, r):
dummy_head = linked_list_node(0)
node = dummy_head
while True:
if l is None:
node.next_node = r
break
if r is None:
node.next_node = l
break
if l.val < r.val:
node.next_node = l
l = l.next_node
else:
node.next_node = r
r = r.next_node
node = node.next_node
return dummy_head.next_node
def create_list_from_arr(arr):
dummy_head = linked_list_node(0)
node = dummy_head
for el in arr:
next_node = linked_list_node(el)
node.next_node = next_node
node = next_node
return dummy_head.next_node
if __name__ == '__main__':
test_cases = [([1, 4, 6, 10], [2, 3, 5]), ([1, 4, 6, 10], []), ([], [2, 3, 5]), ([1, 2, 3], [4, 5, 6])]
for t in test_cases:
l = create_list_from_arr(t[0])
r = create_list_from_arr(t[1])
print(t)
merge_lists(l, r).print_nodes()
|
# -*- coding: utf-8 -*-
"""Top-level package for mvstats."""
__author__ = """Hrishikesh A. Chandanpurkar"""
__email__ = '[email protected]'
__version__ = '0.1.0'
|
"""Top-level package for mvstats."""
__author__ = 'Hrishikesh A. Chandanpurkar'
__email__ = '[email protected]'
__version__ = '0.1.0'
|
global_transform = 0
# TODO: add types / proper data structures to variables
def find_attitude_data(timestamp):
"""
Find corresponding attitude data by time stamp.
:param timestamp: The timestamp.
:return: ?
"""
pass
def find_displacement_data(timestamp):
"""
Find corresponding displacement data by time stamp.
:param timestamp: The timestamp.
:return: ?
"""
pass
def transform_cloud(a, b, c):
"""
Transform the point cloud of previous frame into its own navigation coordinate system.
:param a: Point Cloud.
:param b: Point.
:param c: Point difference.
:return: ?
"""
pass
def pair_align(a, b):
"""
Accurate Registration.
:param a: Point cloud for previous frame.
:param b: Point cloud for current frame.
:return: The matrix.
"""
x = 0
return x
def transform_point_cloud(a, b):
"""
Transform the point cloud to the global coordinate system which is the
navigation coordinate system of the first input point cloud.
:param a: Point cloud for current frame.
:param b: New transform.
:return: ?
"""
pass
def compute_transform(a, b):
"""
Calculate the transformation from C1 to C2, C1 is the point cloud obtained by transforming C
into its own navigation coordinate system, C2 is the point cloud obtained by
transforming c into the navigation coordinate system of previous frame.
:param a: Point cloud for current frame.
:param b: New transform.
:return: ?
"""
pass
def align_point_clouds(C, L, P, D):
"""
This Program does stuff.
:param C: Point cloud of current frame.
:param L: Point cloud of previous frame.
:param P: IMU data set.
:param D: Encoder data set.
:return: Point cloud of current frame that transformed to the global coordinate.
"""
global global_transform
# Initial Registration:
for p1 in P:
print(f'{p1 = }')
if L.timestamp == p1.timestamp:
find_attitude_data(p1.timestamp)
return p1
for d1 in D:
print(f'{d1 = }')
if L.timestamp == d1.timestamp:
find_displacement_data(d1.timestamp)
return d1
transform_cloud(L, p1, 0)
for p2 in P:
print(f'{p2 = }')
if C.timestamp == p2.timestamp:
find_attitude_data(p2.timestamp)
return p2
for d2 in D:
print(f'{d2 = }')
if C.timestamp == d2.timestamp:
find_displacement_data(d2.timestamp)
return d2
transform_cloud(C, p2, d2 - d1)
# Accurate Registration:
pair_transform = pair_align(L, C)
# Transform the point cloud to the global coordinate system which is the navigation
# coordinate system of the first input point cloud.
transform_point_cloud(C, global_transform * pair_transform)
_transform = compute_transform(p2, d2 - d1)
# Update global transformation.
global_transform = global_transform * pair_transform * _transform
return C
|
global_transform = 0
def find_attitude_data(timestamp):
"""
Find corresponding attitude data by time stamp.
:param timestamp: The timestamp.
:return: ?
"""
pass
def find_displacement_data(timestamp):
"""
Find corresponding displacement data by time stamp.
:param timestamp: The timestamp.
:return: ?
"""
pass
def transform_cloud(a, b, c):
"""
Transform the point cloud of previous frame into its own navigation coordinate system.
:param a: Point Cloud.
:param b: Point.
:param c: Point difference.
:return: ?
"""
pass
def pair_align(a, b):
"""
Accurate Registration.
:param a: Point cloud for previous frame.
:param b: Point cloud for current frame.
:return: The matrix.
"""
x = 0
return x
def transform_point_cloud(a, b):
"""
Transform the point cloud to the global coordinate system which is the
navigation coordinate system of the first input point cloud.
:param a: Point cloud for current frame.
:param b: New transform.
:return: ?
"""
pass
def compute_transform(a, b):
"""
Calculate the transformation from C1 to C2, C1 is the point cloud obtained by transforming C
into its own navigation coordinate system, C2 is the point cloud obtained by
transforming c into the navigation coordinate system of previous frame.
:param a: Point cloud for current frame.
:param b: New transform.
:return: ?
"""
pass
def align_point_clouds(C, L, P, D):
"""
This Program does stuff.
:param C: Point cloud of current frame.
:param L: Point cloud of previous frame.
:param P: IMU data set.
:param D: Encoder data set.
:return: Point cloud of current frame that transformed to the global coordinate.
"""
global global_transform
for p1 in P:
print(f'p1 = {p1!r}')
if L.timestamp == p1.timestamp:
find_attitude_data(p1.timestamp)
return p1
for d1 in D:
print(f'd1 = {d1!r}')
if L.timestamp == d1.timestamp:
find_displacement_data(d1.timestamp)
return d1
transform_cloud(L, p1, 0)
for p2 in P:
print(f'p2 = {p2!r}')
if C.timestamp == p2.timestamp:
find_attitude_data(p2.timestamp)
return p2
for d2 in D:
print(f'd2 = {d2!r}')
if C.timestamp == d2.timestamp:
find_displacement_data(d2.timestamp)
return d2
transform_cloud(C, p2, d2 - d1)
pair_transform = pair_align(L, C)
transform_point_cloud(C, global_transform * pair_transform)
_transform = compute_transform(p2, d2 - d1)
global_transform = global_transform * pair_transform * _transform
return C
|
PRED_TYPE = 'Basic'
TTA_PRED_TYPE = 'TTA'
ENS_TYPE = 'Ens'
MEGA_ENS_TYPE = 'MegaEns'
|
pred_type = 'Basic'
tta_pred_type = 'TTA'
ens_type = 'Ens'
mega_ens_type = 'MegaEns'
|
# Copyright (c) 2017 Dustin Doloff
# Licensed under Apache License v2.0
load(
":internal.bzl",
"assert_files_equal_rule",
"assert_label_struct_rule",
)
def assert_equal(v1, v2):
"""
Asserts that two values are equal. If not, fails the build
"""
if v1 != v2:
fail("Values were not equal (" + str(v1) + ") (" + str(v2) + ")")
def assert_str_equal(v1, v2):
"""
Asserts that the string representation of two values are equal. If not, fails the build
"""
assert_equal(str(v1), str(v2))
def assert_repr_equal(v1, v2):
"""
Asserts that the `repr` of two values are equal. If not, fails the build
"""
assert_equal(repr(v1), repr(v2))
def assert_files_equal(expected_file, actual_file):
"""
Asserts that two files are equal
Args:
expected_file: `label` - The file compared against
actual_file: `label` - The file being tested
"""
name = "assert_files_equal_{hash}".format(hash = hash(expected_file + actual_file))
assert_files_equal_rule(
name = name,
expected_file = expected_file,
actual_file = actual_file,
)
def assert_label_providers(label, expected_struct):
"""
Asserts that a label's provider struct matches the expected struct
Args:
label: `Label|str` - The label or name of a label to check
expected_struct: `struct` - The struct expected to match the provider's of `label`
"""
if type(expected_struct) != "dict":
fail("expected_struct is not a dict")
expected_struct_string = str(expected_struct)
name = "assert_label_struct_{hash}".format(hash = hash(label + expected_struct_string))
assert_label_struct_rule(
name = name,
label = label,
expected_struct_string = expected_struct_string,
)
|
load(':internal.bzl', 'assert_files_equal_rule', 'assert_label_struct_rule')
def assert_equal(v1, v2):
"""
Asserts that two values are equal. If not, fails the build
"""
if v1 != v2:
fail('Values were not equal (' + str(v1) + ') (' + str(v2) + ')')
def assert_str_equal(v1, v2):
"""
Asserts that the string representation of two values are equal. If not, fails the build
"""
assert_equal(str(v1), str(v2))
def assert_repr_equal(v1, v2):
"""
Asserts that the `repr` of two values are equal. If not, fails the build
"""
assert_equal(repr(v1), repr(v2))
def assert_files_equal(expected_file, actual_file):
"""
Asserts that two files are equal
Args:
expected_file: `label` - The file compared against
actual_file: `label` - The file being tested
"""
name = 'assert_files_equal_{hash}'.format(hash=hash(expected_file + actual_file))
assert_files_equal_rule(name=name, expected_file=expected_file, actual_file=actual_file)
def assert_label_providers(label, expected_struct):
"""
Asserts that a label's provider struct matches the expected struct
Args:
label: `Label|str` - The label or name of a label to check
expected_struct: `struct` - The struct expected to match the provider's of `label`
"""
if type(expected_struct) != 'dict':
fail('expected_struct is not a dict')
expected_struct_string = str(expected_struct)
name = 'assert_label_struct_{hash}'.format(hash=hash(label + expected_struct_string))
assert_label_struct_rule(name=name, label=label, expected_struct_string=expected_struct_string)
|
class Application:
def __init__(self, owner, raw):
self.id = raw['app_id']
self.owner_id = raw['owner_id']
self._update(owner, raw)
def _update(self, owner, raw):
self._raw = raw
self.owner = owner
self.name = raw['name']
self.type = raw['type']
self.token = raw['token']
self.description = raw.get('description')
@property
def as_json(self):
return {
'id': str(self.id),
'owner_id': str(self.owner_id),
'description': self.description,
'name': self.name,
'owner': self.owner.as_json,
'token': self.token,
}
|
class Application:
def __init__(self, owner, raw):
self.id = raw['app_id']
self.owner_id = raw['owner_id']
self._update(owner, raw)
def _update(self, owner, raw):
self._raw = raw
self.owner = owner
self.name = raw['name']
self.type = raw['type']
self.token = raw['token']
self.description = raw.get('description')
@property
def as_json(self):
return {'id': str(self.id), 'owner_id': str(self.owner_id), 'description': self.description, 'name': self.name, 'owner': self.owner.as_json, 'token': self.token}
|
'''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, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY,
WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.'''
# Bitcoin Cash (BCH) qpz32c4lg7x7lnk9jg6qg7s4uavdce89myax5v5nuk
# Ether (ETH) - 0x843d3DEC2A4705BD4f45F674F641cE2D0022c9FB
# Litecoin (LTC) - Lfk5y4F7KZa9oRxpazETwjQnHszEPvqPvu
# Bitcoin (BTC) - 34L8qWiQyKr8k4TnHDacfjbaSqQASbBtTd
# contact :- [email protected]
"""
Problem Statement:
If we list all the natural numbers below 10 that are multiples of 3 or 5,
we get 3,5,6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below N.
"""
def solution(n):
"""Returns the sum of all the multiples of 3 or 5 below n.
>>> solution(3)
0
>>> solution(4)
3
>>> solution(10)
23
>>> solution(600)
83700
"""
a = 3
result = 0
while a < n:
if a % 3 == 0 or a % 5 == 0:
result += a
elif a % 15 == 0:
result -= a
a += 1
return result
if __name__ == "__main__":
print(solution(int(input().strip())))
|
"""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, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY,
WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE."""
'\nProblem Statement:\nIf we list all the natural numbers below 10 that are multiples of 3 or 5,\nwe get 3,5,6 and 9. The sum of these multiples is 23.\nFind the sum of all the multiples of 3 or 5 below N.\n'
def solution(n):
"""Returns the sum of all the multiples of 3 or 5 below n.
>>> solution(3)
0
>>> solution(4)
3
>>> solution(10)
23
>>> solution(600)
83700
"""
a = 3
result = 0
while a < n:
if a % 3 == 0 or a % 5 == 0:
result += a
elif a % 15 == 0:
result -= a
a += 1
return result
if __name__ == '__main__':
print(solution(int(input().strip())))
|
# AUTOGENERATED! DO NOT EDIT! File to edit: 00_core.ipynb (unless otherwise specified).
__all__ = ['a']
# Cell
def a(b):
"qgerhwtejyrkafher arerhtrw"
return 10
|
__all__ = ['a']
def a(b):
"""qgerhwtejyrkafher arerhtrw"""
return 10
|
print ("Hello there welcome to Medieval Village.")
print ("You have a village that you need to take care of. Choose one of the options to keep the village in good shape 1) Plant and harvest the crops 2) Use resources from the forest near the village 3) Get your defenses up")
user_choice = input()
user_choice = int(user_choice)
if user_choice == 1:
print("You planted and harvested the crops!")
print("Now choose from: 2) Use resources from the forest near the village or 3) Get your defenses up ")
user_choice1 = input()
user_choice1 = int(user_choice1)
if user_choice1 == 2 :
print("You used the resources in the forest.")
print("Now 3) Get your defenses up")
user_choice12 = input()
user_choice12 = int(user_choice12)
if user_choice12 == 3 :
print("You got your defenses up! Your village holds strong agianst its invaders!")
print("Your village is strong! You have nothing to worry about! Game over")
elif user_choice1 == 3 :
print("You got your defenses up! Your village holds strong agianst its invaders!")
print("Now 2) Use resources from the forest near the village")
user_choice13 = input()
user_choice13 = int(user_choice13)
if user_choice13 == 2:
print("You used resources from the forest.")
print("Your village is strong! You have nothing to worry about! Game over")
elif user_choice == 2 :
print("You used the resources in the forest.")
print("Now choose from: 1) Plant and harvest the crops or 3) Get your defenses up")
user_choice2 = input()
user_choice2 = int(user_choice2)
if user_choice2 == 1:
print("You harvested the crops!")
print("Now 3) Get your defenses up")
user_choice21 = input()
user_choice21 = int(user_choice21)
if user_choice21 == 3:
print("You got your defenses up! Your village holds strong agianst its invaders!")
print("Your village is strong! You have nothing to worry about! Game over")
elif user_choice2 == 3:
print("You got your defenses up! Your village holds strong agianst its invaders!")
print("Now 1) Plant and harvest the crops")
user_choice23 = input()
user_choice23 = int(user_choice23)
if user_choice23 == 1:
print("You harvested the crops!")
print("Your village is strong! You have nothing to worry about! Game over")
elif user_choice == 3:
print("You got your defenses up! Your village holds strong agianst its invaders!")
print("Now choose from: 1) Plant and harvest the crops or 2) Use resources from the forest near the village")
user_choice3 = input()
user_choice3 = int(user_choice3)
if user_choice3 == 1:
print("You harvested the crops!")
print("Now 2) Use resources from the forest near the village")
user_choice31 = input()
user_choice31 = int(user_choice31)
if user_choice31 == 2:
print("You used resources from the forest near the village.")
print("Your village is strong! You have nothing to worry about! Game over")
elif user_choice3 == 2:
print("You used resources from the forest near the village.")
print("Now 1) Plant and harvest the crops")
user_choice32 = input()
user_choice32 = int(user_choice32)
if user_choice32 == 1:
print("You harvested the crops!")
print("Your village is strong! You have nothing to worry about! Game over")
else :
print ("Invalid entry try again!")
|
print('Hello there welcome to Medieval Village.')
print('You have a village that you need to take care of. Choose one of the options to keep the village in good shape 1) Plant and harvest the crops 2) Use resources from the forest near the village 3) Get your defenses up')
user_choice = input()
user_choice = int(user_choice)
if user_choice == 1:
print('You planted and harvested the crops!')
print('Now choose from: 2) Use resources from the forest near the village or 3) Get your defenses up ')
user_choice1 = input()
user_choice1 = int(user_choice1)
if user_choice1 == 2:
print('You used the resources in the forest.')
print('Now 3) Get your defenses up')
user_choice12 = input()
user_choice12 = int(user_choice12)
if user_choice12 == 3:
print('You got your defenses up! Your village holds strong agianst its invaders!')
print('Your village is strong! You have nothing to worry about! Game over')
elif user_choice1 == 3:
print('You got your defenses up! Your village holds strong agianst its invaders!')
print('Now 2) Use resources from the forest near the village')
user_choice13 = input()
user_choice13 = int(user_choice13)
if user_choice13 == 2:
print('You used resources from the forest.')
print('Your village is strong! You have nothing to worry about! Game over')
elif user_choice == 2:
print('You used the resources in the forest.')
print('Now choose from: 1) Plant and harvest the crops or 3) Get your defenses up')
user_choice2 = input()
user_choice2 = int(user_choice2)
if user_choice2 == 1:
print('You harvested the crops!')
print('Now 3) Get your defenses up')
user_choice21 = input()
user_choice21 = int(user_choice21)
if user_choice21 == 3:
print('You got your defenses up! Your village holds strong agianst its invaders!')
print('Your village is strong! You have nothing to worry about! Game over')
elif user_choice2 == 3:
print('You got your defenses up! Your village holds strong agianst its invaders!')
print('Now 1) Plant and harvest the crops')
user_choice23 = input()
user_choice23 = int(user_choice23)
if user_choice23 == 1:
print('You harvested the crops!')
print('Your village is strong! You have nothing to worry about! Game over')
elif user_choice == 3:
print('You got your defenses up! Your village holds strong agianst its invaders!')
print('Now choose from: 1) Plant and harvest the crops or 2) Use resources from the forest near the village')
user_choice3 = input()
user_choice3 = int(user_choice3)
if user_choice3 == 1:
print('You harvested the crops!')
print('Now 2) Use resources from the forest near the village')
user_choice31 = input()
user_choice31 = int(user_choice31)
if user_choice31 == 2:
print('You used resources from the forest near the village.')
print('Your village is strong! You have nothing to worry about! Game over')
elif user_choice3 == 2:
print('You used resources from the forest near the village.')
print('Now 1) Plant and harvest the crops')
user_choice32 = input()
user_choice32 = int(user_choice32)
if user_choice32 == 1:
print('You harvested the crops!')
print('Your village is strong! You have nothing to worry about! Game over')
else:
print('Invalid entry try again!')
|
def solution(board, moves):
# At first, make stack of each columns
boardStack = [[] for _ in range(len(board[0]))]
for row in board[::-1]:
# Watch out, column index is subtracted by -1
for column, element in enumerate(row):
if element != 0:
boardStack[column].append(element)
bucketStack = [];
exploded = 0;
for move in moves:
if boardStack[(move - 1)]:
pick = boardStack[(move - 1)].pop()
if bucketStack:
if bucketStack[-1] == pick:
bucketStack.pop()
exploded += 2
else:
bucketStack.append(pick)
else:
bucketStack.append(pick)
return exploded
|
def solution(board, moves):
board_stack = [[] for _ in range(len(board[0]))]
for row in board[::-1]:
for (column, element) in enumerate(row):
if element != 0:
boardStack[column].append(element)
bucket_stack = []
exploded = 0
for move in moves:
if boardStack[move - 1]:
pick = boardStack[move - 1].pop()
if bucketStack:
if bucketStack[-1] == pick:
bucketStack.pop()
exploded += 2
else:
bucketStack.append(pick)
else:
bucketStack.append(pick)
return exploded
|
repeat = int(input())
for x in range(repeat):
inlist = list(map( int, input().split()))
inlen = inlist.pop(0)
avg = sum(inlist)//inlen
inlist.sort()
for i in range(inlen):
if inlist[i] > avg:
result = (inlen-i)/inlen *100
break
result = 0
print("%.3f"%result, "%",sep="")
|
repeat = int(input())
for x in range(repeat):
inlist = list(map(int, input().split()))
inlen = inlist.pop(0)
avg = sum(inlist) // inlen
inlist.sort()
for i in range(inlen):
if inlist[i] > avg:
result = (inlen - i) / inlen * 100
break
result = 0
print('%.3f' % result, '%', sep='')
|
"""
CCC Problem J2
Randy Zhu
"""
infection_limit = int(input())
patient_zeroes = int(input())
infection_rate = int(input())
infected = 0
# newly_infected = 0
# infected = 0
currently_infected = patient_zeroes
# infected = 0
days = 0
while infected < infection_limit:
infected += (currently_infected * infection_rate) * \
infection_rate + patient_zeroes
currently_infected = infected
days += 1
print(days)
|
"""
CCC Problem J2
Randy Zhu
"""
infection_limit = int(input())
patient_zeroes = int(input())
infection_rate = int(input())
infected = 0
currently_infected = patient_zeroes
days = 0
while infected < infection_limit:
infected += currently_infected * infection_rate * infection_rate + patient_zeroes
currently_infected = infected
days += 1
print(days)
|
#!/usr/bin/env python
#
# Copyright 2009-2020 NTESS. Under the terms
# of Contract DE-NA0003525 with NTESS, the U.S.
# Government retains certain rights in this software.
#
# Copyright (c) 2009-2020, NTESS
# All rights reserved.
#
# Portions are copyright of other developers:
# See the file CONTRIBUTORS.TXT in the top level directory
# the distribution for more information.
#
# This file is part of the SST software package. For license
# information, see the LICENSE file in the top level directory of the
# distribution.
clock = "100MHz"
memory_clock = "100MHz"
coherence_protocol = "MSI"
memory_backend = "timing"
memory_controllers_per_group = 1
groups = 8
memory_capacity = 16384 * 4 # Size of memory in MBs
cpu_params = {
"verbose" : 0,
"printStats" : 1,
}
l1cache_params = {
"clock" : clock,
"coherence_protocol": coherence_protocol,
"cache_frequency": clock,
"replacement_policy": "lru",
"cache_size": "32KB",
"maxRequestDelay" : "10000",
"associativity": 8,
"cache_line_size": 64,
"access_latency_cycles": 1,
"L1": 1,
"debug": "0"
}
bus_params = {
"bus_frequency" : memory_clock
}
l2cache_params = {
"clock" : clock,
"coherence_protocol": coherence_protocol,
"cache_frequency": clock,
"replacement_policy": "lru",
"cache_size": "32KB",
"associativity": 8,
"cache_line_size": 64,
"access_latency_cycles": 1,
"debug": "0"
}
memory_params = {
"coherence_protocol" : coherence_protocol,
"rangeStart" : 0,
"clock" : memory_clock,
"addr_range_start" : 0,
"addr_range_end" : (memory_capacity // (groups * memory_controllers_per_group) ) * 1024*1024,
}
memory_backend_params = {
"id" : 0,
"clock" : "1333MHz",
"mem_size" : str( memory_capacity // (groups * memory_controllers_per_group)) + "MiB",
"max_requests_per_cycle": "-1",
"addrMapper" : "memHierarchy.roundRobinAddrMapper",
"addrMapper.interleave_size" : "64B",
"addrMapper.row_size" : "1KiB",
"channels" : 8,
"channel.transaction_Q_size" : 32,
"channel.numRanks" : 8,
"channel.rank.numBanks" : 16,
"channel.rank.bank.CL" : 12,
"channel.rank.bank.CL_WR" : 10,
"channel.rank.bank.RCD" : 12,
"channel.rank.bank.TRP" : 12,
"channel.rank.bank.dataCycles" : 2,
"channel.rank.bank.pagePolicy" : "memHierarchy.simplePagePolicy",
"channel.rank.bank.transactionQ" : "memHierarchy.reorderTransactionQ",
"channel.rank.bank.pagePolicy.close" : 0,
"printconfig" : 1,
"channel.printconfig" : 0,
"channel.rank.printconfig" : 0,
"channel.rank.bank.printconfig" : 0,
}
params = {
"numThreads" : 1,
"cpu_params" : cpu_params,
"l1_params" : l1cache_params,
"bus_params" : bus_params,
"l2_params" : l2cache_params,
"nic_cpu_params" : cpu_params,
"nic_l1_params" : l1cache_params,
"memory_params" : memory_params,
"memory_backend": memory_backend,
"memory_backend_params" : memory_backend_params,
}
|
clock = '100MHz'
memory_clock = '100MHz'
coherence_protocol = 'MSI'
memory_backend = 'timing'
memory_controllers_per_group = 1
groups = 8
memory_capacity = 16384 * 4
cpu_params = {'verbose': 0, 'printStats': 1}
l1cache_params = {'clock': clock, 'coherence_protocol': coherence_protocol, 'cache_frequency': clock, 'replacement_policy': 'lru', 'cache_size': '32KB', 'maxRequestDelay': '10000', 'associativity': 8, 'cache_line_size': 64, 'access_latency_cycles': 1, 'L1': 1, 'debug': '0'}
bus_params = {'bus_frequency': memory_clock}
l2cache_params = {'clock': clock, 'coherence_protocol': coherence_protocol, 'cache_frequency': clock, 'replacement_policy': 'lru', 'cache_size': '32KB', 'associativity': 8, 'cache_line_size': 64, 'access_latency_cycles': 1, 'debug': '0'}
memory_params = {'coherence_protocol': coherence_protocol, 'rangeStart': 0, 'clock': memory_clock, 'addr_range_start': 0, 'addr_range_end': memory_capacity // (groups * memory_controllers_per_group) * 1024 * 1024}
memory_backend_params = {'id': 0, 'clock': '1333MHz', 'mem_size': str(memory_capacity // (groups * memory_controllers_per_group)) + 'MiB', 'max_requests_per_cycle': '-1', 'addrMapper': 'memHierarchy.roundRobinAddrMapper', 'addrMapper.interleave_size': '64B', 'addrMapper.row_size': '1KiB', 'channels': 8, 'channel.transaction_Q_size': 32, 'channel.numRanks': 8, 'channel.rank.numBanks': 16, 'channel.rank.bank.CL': 12, 'channel.rank.bank.CL_WR': 10, 'channel.rank.bank.RCD': 12, 'channel.rank.bank.TRP': 12, 'channel.rank.bank.dataCycles': 2, 'channel.rank.bank.pagePolicy': 'memHierarchy.simplePagePolicy', 'channel.rank.bank.transactionQ': 'memHierarchy.reorderTransactionQ', 'channel.rank.bank.pagePolicy.close': 0, 'printconfig': 1, 'channel.printconfig': 0, 'channel.rank.printconfig': 0, 'channel.rank.bank.printconfig': 0}
params = {'numThreads': 1, 'cpu_params': cpu_params, 'l1_params': l1cache_params, 'bus_params': bus_params, 'l2_params': l2cache_params, 'nic_cpu_params': cpu_params, 'nic_l1_params': l1cache_params, 'memory_params': memory_params, 'memory_backend': memory_backend, 'memory_backend_params': memory_backend_params}
|
"""
Given the capacity of the knapsack and items specified by weights and values,
return the maximum summarized value of the items that can be fit in the
knapsack.
Example:
capacity = 5, items(value, weight) = [(60, 5), (50, 3), (70, 4), (30, 2)]
result = 80 (items valued 50 and 30 can both be fit in the knapsack)
The time complexity is O(n * m) and the space complexity is O(m), where n is
the total number of items and m is the knapsack's capacity.
"""
class Item:
def __init__(self, value, weight):
self.value = value
self.weight = weight
def get_maximum_value(items, capacity):
dp = [0] * (capacity + 1)
for item in items:
for cur_weight in reversed(range(item.weight, capacity+1)):
dp[cur_weight] = max(dp[cur_weight], item.value + dp[cur_weight - item.weight])
return dp[capacity]
|
"""
Given the capacity of the knapsack and items specified by weights and values,
return the maximum summarized value of the items that can be fit in the
knapsack.
Example:
capacity = 5, items(value, weight) = [(60, 5), (50, 3), (70, 4), (30, 2)]
result = 80 (items valued 50 and 30 can both be fit in the knapsack)
The time complexity is O(n * m) and the space complexity is O(m), where n is
the total number of items and m is the knapsack's capacity.
"""
class Item:
def __init__(self, value, weight):
self.value = value
self.weight = weight
def get_maximum_value(items, capacity):
dp = [0] * (capacity + 1)
for item in items:
for cur_weight in reversed(range(item.weight, capacity + 1)):
dp[cur_weight] = max(dp[cur_weight], item.value + dp[cur_weight - item.weight])
return dp[capacity]
|
class TBikeTruck:
def __init__(self, id, capacity, init_location):
self.id = id
self.capacity = capacity
self.location = init_location
self.bikes_count = 0
self.distance = 0
def to_json(self):
return {
'id': self.id,
'location_id': self.location.id,
'loaded_bikes_count': self.bikes_count
}
def go_up(self):
loc = self.location.at_top()
if loc is not None:
self.location = loc
self.distance += 1
def go_down(self):
loc = self.location.at_bottom()
if loc is not None:
self.location = loc
self.distance += 1
def go_left(self):
loc = self.location.at_left()
if loc is not None:
self.location = loc
self.distance += 1
def go_right(self):
loc = self.location.at_right()
if loc is not None:
self.location = loc
self.distance += 1
def load_bike(self):
if self.location.bikes_count > 0 and self.bikes_count < self.capacity:
self.location.bikes_count -= 1
self.bikes_count += 1
def unload_bike(self):
if self.bikes_count > 0:
self.location.bikes_count += 1
self.bikes_count -= 1
|
class Tbiketruck:
def __init__(self, id, capacity, init_location):
self.id = id
self.capacity = capacity
self.location = init_location
self.bikes_count = 0
self.distance = 0
def to_json(self):
return {'id': self.id, 'location_id': self.location.id, 'loaded_bikes_count': self.bikes_count}
def go_up(self):
loc = self.location.at_top()
if loc is not None:
self.location = loc
self.distance += 1
def go_down(self):
loc = self.location.at_bottom()
if loc is not None:
self.location = loc
self.distance += 1
def go_left(self):
loc = self.location.at_left()
if loc is not None:
self.location = loc
self.distance += 1
def go_right(self):
loc = self.location.at_right()
if loc is not None:
self.location = loc
self.distance += 1
def load_bike(self):
if self.location.bikes_count > 0 and self.bikes_count < self.capacity:
self.location.bikes_count -= 1
self.bikes_count += 1
def unload_bike(self):
if self.bikes_count > 0:
self.location.bikes_count += 1
self.bikes_count -= 1
|
class Stack:
topIndex = 0
items = [None] * 64
def push(self, item):
self.topIndex += 1
self.items[self.topIndex] = item
def pop(self):
if self.topIndex == 0:
return None
else:
itemToReturn = self.items[self.topIndex]
self.topIndex -= 1
return itemToReturn
def peek(self):
if self.topIndex == 0:
return None
else:
return self.items[self.topIndex]
|
class Stack:
top_index = 0
items = [None] * 64
def push(self, item):
self.topIndex += 1
self.items[self.topIndex] = item
def pop(self):
if self.topIndex == 0:
return None
else:
item_to_return = self.items[self.topIndex]
self.topIndex -= 1
return itemToReturn
def peek(self):
if self.topIndex == 0:
return None
else:
return self.items[self.topIndex]
|
# Cheering Expression (6510)
rinz = 2012007
scissorhands = 1162003
sweetness = 5160021
sm.setSpeakerID(rinz)
sm.sendNext("Welcome! What can I do for you today? ...A gift? For me? "
"Wow, a customer's never given me a gift before!")
sm.giveItem(sweetness)
sm.completeQuest(parentID)
sm.consumeItem(scissorhands)
sm.sendNext(''.join(["WOW! #t", repr(scissorhands), "#?! "
"The material...the color...the sound of the blades snipping together... "
"It's so beautiful! Thank you so much! You're the best, #h #! \r\n\r\n"
"#fUI/UIWindow2.img/QuestIcon/4/0# \r\n"
"#i", repr(sweetness), "# #t", repr(sweetness), "# x 1"]))
sm.setPlayerAsSpeaker()
sm.sendSay("#b(You learned the Cheering Expression from Rinz the Assistant.)")
|
rinz = 2012007
scissorhands = 1162003
sweetness = 5160021
sm.setSpeakerID(rinz)
sm.sendNext("Welcome! What can I do for you today? ...A gift? For me? Wow, a customer's never given me a gift before!")
sm.giveItem(sweetness)
sm.completeQuest(parentID)
sm.consumeItem(scissorhands)
sm.sendNext(''.join(['WOW! #t', repr(scissorhands), "#?! The material...the color...the sound of the blades snipping together... It's so beautiful! Thank you so much! You're the best, #h #! \r\n\r\n#fUI/UIWindow2.img/QuestIcon/4/0# \r\n#i", repr(sweetness), '# #t', repr(sweetness), '# x 1']))
sm.setPlayerAsSpeaker()
sm.sendSay('#b(You learned the Cheering Expression from Rinz the Assistant.)')
|
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
config_type='sweetberry'
inas = [
('sweetberry', '0x40:3', 'pp1050_a', 1.05, 0.010, 'j2', True), # R462, SOC
('sweetberry', '0x40:1', 'pp1050_st', 1.05, 0.010, 'j2', True), # R665
('sweetberry', '0x40:2', 'pp1050_stg', 1.05, 0.010, 'j2', True), # R664
('sweetberry', '0x40:0', 'pp1200_dram_u', 1.20, 0.010, 'j2', True), # R463
('sweetberry', '0x41:3', 'pp1800_a', 1.80, 0.010, 'j2', True), # R556, SOC + audio
('sweetberry', '0x41:1', 'pp3300_a', 3.30, 0.010, 'j2', True), # R478
('sweetberry', '0x41:2', 'pp3300_cam_a', 3.30, 0.010, 'j2', True), # R482
('sweetberry', '0x41:0', 'pp3300_ec', 3.30, 0.500, 'j2', True), # R474, originally 0.01 Ohm
('sweetberry', '0x42:3', 'pp3300_g', 3.30, 0.010, 'j2', True), # R458
('sweetberry', '0x42:1', 'pp3300_h1_g', 3.30, 0.500, 'j2', True), # R473, originally 0.01 Ohm
('sweetberry', '0x42:2', 'pp3300_hp_vbat', 3.30, 0.500, 'j2', True), # R260, originally 0 Ohm
('sweetberry', '0x42:0', 'pp3300_panel_dx', 3.30, 0.010, 'j2', True), # R476
('sweetberry', '0x43:3', 'pp3300_rtc', 3.30, 0.010, 'j2', True), # R472
('sweetberry', '0x43:1', 'pp3300_soc_a', 3.30, 0.100, 'j2', True), # R480, originally 0.01 Ohm
('sweetberry', '0x43:2', 'pp3300_ssd_a', 3.30, 0.010, 'j2', True), # R708
('sweetberry', '0x43:0', 'pp3300_tcpc_g', 3.30, 0.100, 'j2', True), # R475, originally 0.01 Ohm
('sweetberry', '0x44:3', 'pp3300_trackpad_a', 3.30, 0.010, 'j3', True), # R483
('sweetberry', '0x44:1', 'pp3300_tsp_dig_dx', 3.30, 0.010, 'j3', True), # R670
('sweetberry', '0x44:2', 'pp3300_wlan_a', 3.30, 0.010, 'j3', True), # R479
('sweetberry', '0x44:0', 'pp5000_a', 5.00, 0.010, 'j3', True), # R459, USB
('sweetberry', '0x45:3', 'pp950_vccio', 0.95, 0.010, 'j3', True), # R461
('sweetberry', '0x45:1', 'ppvar_bat', 7.70, 0.010, 'j3', True), # R569
('sweetberry', '0x45:2', 'ppvar_elv_in', 7.70, 0.010, 'j3', True), # R717
('sweetberry', '0x45:0', 'ppvar_elvdd', 4.60, 0.010, 'j3', True), # L12, originally 0 Ohm
('sweetberry', '0x46:3', 'ppvar_gt', 1.52, 0.020, 'j3', True), # U143, originally 0 Ohm
('sweetberry', '0x46:1', 'ppvar_sa', 1.52, 0.020, 'j3', True), # U144, originally 0 Ohm
('sweetberry', '0x46:2', 'ppvar_vcc', 1.52, 0.020, 'j3', True), # U141, originally 0 Ohm
('sweetberry', '0x46:0', 'ppvar_vprim_core_a', 1.05, 0.010, 'j3', True), # R460
]
|
config_type = 'sweetberry'
inas = [('sweetberry', '0x40:3', 'pp1050_a', 1.05, 0.01, 'j2', True), ('sweetberry', '0x40:1', 'pp1050_st', 1.05, 0.01, 'j2', True), ('sweetberry', '0x40:2', 'pp1050_stg', 1.05, 0.01, 'j2', True), ('sweetberry', '0x40:0', 'pp1200_dram_u', 1.2, 0.01, 'j2', True), ('sweetberry', '0x41:3', 'pp1800_a', 1.8, 0.01, 'j2', True), ('sweetberry', '0x41:1', 'pp3300_a', 3.3, 0.01, 'j2', True), ('sweetberry', '0x41:2', 'pp3300_cam_a', 3.3, 0.01, 'j2', True), ('sweetberry', '0x41:0', 'pp3300_ec', 3.3, 0.5, 'j2', True), ('sweetberry', '0x42:3', 'pp3300_g', 3.3, 0.01, 'j2', True), ('sweetberry', '0x42:1', 'pp3300_h1_g', 3.3, 0.5, 'j2', True), ('sweetberry', '0x42:2', 'pp3300_hp_vbat', 3.3, 0.5, 'j2', True), ('sweetberry', '0x42:0', 'pp3300_panel_dx', 3.3, 0.01, 'j2', True), ('sweetberry', '0x43:3', 'pp3300_rtc', 3.3, 0.01, 'j2', True), ('sweetberry', '0x43:1', 'pp3300_soc_a', 3.3, 0.1, 'j2', True), ('sweetberry', '0x43:2', 'pp3300_ssd_a', 3.3, 0.01, 'j2', True), ('sweetberry', '0x43:0', 'pp3300_tcpc_g', 3.3, 0.1, 'j2', True), ('sweetberry', '0x44:3', 'pp3300_trackpad_a', 3.3, 0.01, 'j3', True), ('sweetberry', '0x44:1', 'pp3300_tsp_dig_dx', 3.3, 0.01, 'j3', True), ('sweetberry', '0x44:2', 'pp3300_wlan_a', 3.3, 0.01, 'j3', True), ('sweetberry', '0x44:0', 'pp5000_a', 5.0, 0.01, 'j3', True), ('sweetberry', '0x45:3', 'pp950_vccio', 0.95, 0.01, 'j3', True), ('sweetberry', '0x45:1', 'ppvar_bat', 7.7, 0.01, 'j3', True), ('sweetberry', '0x45:2', 'ppvar_elv_in', 7.7, 0.01, 'j3', True), ('sweetberry', '0x45:0', 'ppvar_elvdd', 4.6, 0.01, 'j3', True), ('sweetberry', '0x46:3', 'ppvar_gt', 1.52, 0.02, 'j3', True), ('sweetberry', '0x46:1', 'ppvar_sa', 1.52, 0.02, 'j3', True), ('sweetberry', '0x46:2', 'ppvar_vcc', 1.52, 0.02, 'j3', True), ('sweetberry', '0x46:0', 'ppvar_vprim_core_a', 1.05, 0.01, 'j3', True)]
|
def selectionSort(A):
for i in range(len(A) - 1):
index_min = i
value_min = A[i]
for j in range(i + 1, len(A)):
if A[j] < value_min:
index_min = j
value_min = A[j]
A[index_min] = A[i]
A[i] = value_min
return A
def insertionSort2(A):
min_index = 0
for i in range(len(A)):
if A[i] < A[min_index]:
min_index = i
temp = A[0]
A[0] = A[min_index]
A[min_index] = temp
for i in range(2, len(A)):
value_min = A[i]
j = i - 1
while value_min < A[j]:
A[j + 1] = A[j]
j = j - 1
A[j + 1] = value_min
return A
def insertionSort1(A):
for i in range(1, len(A)):
value_min = A[i]
j = i - 1
while (j >= 0) & (value_min < A[j]):
A[j + 1] = A[j]
j = j - 1
A[j + 1] = value_min
return A
def bubbleSort1(A):
for i in range(len(A)):
for j in range(1, len(A)):
if (A[j - 1] > A[j]):
temp = A[j - 1]
A[j - 1] = A[j]
A[j] = temp
return A
def bubbleSort2(A):
for i in range(len(A)):
for j in range(1, len(A) - i):
if (A[j - 1] > A[j]):
temp = A[j - 1]
A[j - 1] = A[j]
A[j] = temp
return A
def bubbleSort3(A):
for i in range(len(A)):
done = True
for j in range(1, len(A) - i):
if (A[j - 1] > A[j]):
done = False
temp = A[j - 1]
A[j - 1] = A[j]
A[j] = temp
if done:
return A
return A
def checkSorted(A):
for i in range(1, len(A)):
if A[i - 1] > A[i]:
return False
return True
|
def selection_sort(A):
for i in range(len(A) - 1):
index_min = i
value_min = A[i]
for j in range(i + 1, len(A)):
if A[j] < value_min:
index_min = j
value_min = A[j]
A[index_min] = A[i]
A[i] = value_min
return A
def insertion_sort2(A):
min_index = 0
for i in range(len(A)):
if A[i] < A[min_index]:
min_index = i
temp = A[0]
A[0] = A[min_index]
A[min_index] = temp
for i in range(2, len(A)):
value_min = A[i]
j = i - 1
while value_min < A[j]:
A[j + 1] = A[j]
j = j - 1
A[j + 1] = value_min
return A
def insertion_sort1(A):
for i in range(1, len(A)):
value_min = A[i]
j = i - 1
while (j >= 0) & (value_min < A[j]):
A[j + 1] = A[j]
j = j - 1
A[j + 1] = value_min
return A
def bubble_sort1(A):
for i in range(len(A)):
for j in range(1, len(A)):
if A[j - 1] > A[j]:
temp = A[j - 1]
A[j - 1] = A[j]
A[j] = temp
return A
def bubble_sort2(A):
for i in range(len(A)):
for j in range(1, len(A) - i):
if A[j - 1] > A[j]:
temp = A[j - 1]
A[j - 1] = A[j]
A[j] = temp
return A
def bubble_sort3(A):
for i in range(len(A)):
done = True
for j in range(1, len(A) - i):
if A[j - 1] > A[j]:
done = False
temp = A[j - 1]
A[j - 1] = A[j]
A[j] = temp
if done:
return A
return A
def check_sorted(A):
for i in range(1, len(A)):
if A[i - 1] > A[i]:
return False
return True
|
#
# LeetCode
#
# Problem - 386
# URL - https://leetcode.com/problems/lexicographical-numbers/
#
class Solution:
def lexicalOrder(self, n: int) -> List[int]:
ans = []
for i in range(1, n+1):
ans.insert(bisect.bisect_left(ans, str(i)), str(i))
return ans
|
class Solution:
def lexical_order(self, n: int) -> List[int]:
ans = []
for i in range(1, n + 1):
ans.insert(bisect.bisect_left(ans, str(i)), str(i))
return ans
|
def _method(f): return lambda *l, **d: f(i, *l, **d)
class o:
def __init__(i, **d): i.__dict__.update(**d)
def __repr__(i): return str(
{k: (v.__name__ + "()" if callable(v) else v)
for k, v in sorted(i.__dict__.items()) if k[0] != "_"})
def of(i, **methods):
for k, f in methods.items():
i.__dict__[k] = _method(f)
return i
def Fred(a=2):
def p(i): return i.a + i.c + 20
def lt(i, j): return i.a < j.a
return of(o(a=a, b=2, c=3), say=p, lt=lt)
f = Fred(a=-10000000000000000)
print(f.say())
print(f.lt(Fred()))
# f.say(100000000)
# g = Fred(10)
# print(g < f
|
def _method(f):
return lambda *l, **d: f(i, *l, **d)
class O:
def __init__(i, **d):
i.__dict__.update(**d)
def __repr__(i):
return str({k: v.__name__ + '()' if callable(v) else v for (k, v) in sorted(i.__dict__.items()) if k[0] != '_'})
def of(i, **methods):
for (k, f) in methods.items():
i.__dict__[k] = _method(f)
return i
def fred(a=2):
def p(i):
return i.a + i.c + 20
def lt(i, j):
return i.a < j.a
return of(o(a=a, b=2, c=3), say=p, lt=lt)
f = fred(a=-10000000000000000)
print(f.say())
print(f.lt(fred()))
|
class Solution(object):
def minCost(self, costs):
"""
:type costs: List[List[int]]
:rtype: int
"""
if not costs:
return 0
dp = [0] * (len(costs[0]))
dp[:] = costs[0]
for i in xrange(1, len(costs)):
d0 = d1 = d2 = 0
for j in xrange(0, 3):
if j == 0:
d0 = min(dp[1], dp[2]) + costs[i][0]
elif j == 1:
d1 = min(dp[0], dp[2]) + costs[i][1]
else:
d2 = min(dp[0], dp[1]) + costs[i][2]
dp[0], dp[1], dp[2] = d0, d1, d2
return min(dp)
|
class Solution(object):
def min_cost(self, costs):
"""
:type costs: List[List[int]]
:rtype: int
"""
if not costs:
return 0
dp = [0] * len(costs[0])
dp[:] = costs[0]
for i in xrange(1, len(costs)):
d0 = d1 = d2 = 0
for j in xrange(0, 3):
if j == 0:
d0 = min(dp[1], dp[2]) + costs[i][0]
elif j == 1:
d1 = min(dp[0], dp[2]) + costs[i][1]
else:
d2 = min(dp[0], dp[1]) + costs[i][2]
(dp[0], dp[1], dp[2]) = (d0, d1, d2)
return min(dp)
|
class Solution:
def romanToInt(self, s: str) -> int:
romanMap = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}
result = 0
prev = 1000
for c in s:
curr = romanMap[c]
if curr > prev:
result += curr - prev*2
else:
result += curr
prev = curr
return result
|
class Solution:
def roman_to_int(self, s: str) -> int:
roman_map = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}
result = 0
prev = 1000
for c in s:
curr = romanMap[c]
if curr > prev:
result += curr - prev * 2
else:
result += curr
prev = curr
return result
|
'''
Design a calculator which will solve all the problems correctly except for
1. 45*3 = 555
2. 56+9 = 77
3. 56/6 = 4
Your program should take two numbers, operator as input and show the output.
'''
def add(n1,n2):
''' To add the given numbers '''
result = n1+n2
return result
def sub(n1,n2):
''' To subtract given numbers '''
result = n1-n2
return result
def mul(n1,n2):
''' To multiply given numbers '''
result = n1*n2
return result
def div(n1,n2):
''' To divide the given numbers '''
result = n1/n2
return result
def CalculatorLogic(num1,num2,operator):
# Conditions for calculation including faulty ones
if(((num1 == 3 and num2 == 45) or (num1 == 45 and num2 == 3)) and operator == '*'): # Faulty condition 1
print(f"\t\n{num1} * {num2} = 555")
elif(((num1 == 56 and num2 == 9) or (num1 == 9 and num2 == 56)) and operator == '+'): # Faulty condition 2
print(f"\t\n{num1} + {num2} = 77")
elif(((num1 == 56 and num2 == 6) or (num1 == 6 and num2 == 56)) and operator == '/'): # Faulty condition 3
print(f"\t\n{num1} / {num2} = 4")
elif(operator == '+'): # If user wants to add numbers
print(f"\t\n{num1} + {num2} = {add(num1,num2)}")
elif(operator == '-'): # If user wants to subtract numbers
print(f"\t\n{num1} - {num2} = {sub(num1,num2)}")
elif(operator == '*'): # If user wants to multiply numbers
print(f"\t\n{num1} * {num2} = {mul(num1,num2)}")
elif(operator == '/'): # If user wants to divide numbers
print(f"\t\n{num1} / {num2} = {div(num1,num2)}")
else:
print("Invalid Option, please retry")
def main():
# Introducing the name of app to user
print("Faulty Calculator".center(40,"-"))
# Creating looping conditions for using calculator as long as user wants
cont = 'y'
while(cont == 'y'):
# Taking required inputs
n1 = int(input("Enter first number: "))
n2 = int(input("Enter second number: "))
operator = input("Enter the operator you want to use:")
# Calling the main logic behind the calculator
CalculatorLogic(n1,n2,operator)
cont = str(input("Do you want to continue? y or n? "))
cont = cont.lower()
# Thanking user for using our calculator
print("Thank you for using our calculator!")
if __name__ == "__main__":
main()
|
"""
Design a calculator which will solve all the problems correctly except for
1. 45*3 = 555
2. 56+9 = 77
3. 56/6 = 4
Your program should take two numbers, operator as input and show the output.
"""
def add(n1, n2):
""" To add the given numbers """
result = n1 + n2
return result
def sub(n1, n2):
""" To subtract given numbers """
result = n1 - n2
return result
def mul(n1, n2):
""" To multiply given numbers """
result = n1 * n2
return result
def div(n1, n2):
""" To divide the given numbers """
result = n1 / n2
return result
def calculator_logic(num1, num2, operator):
if (num1 == 3 and num2 == 45 or (num1 == 45 and num2 == 3)) and operator == '*':
print(f'\t\n{num1} * {num2} = 555')
elif (num1 == 56 and num2 == 9 or (num1 == 9 and num2 == 56)) and operator == '+':
print(f'\t\n{num1} + {num2} = 77')
elif (num1 == 56 and num2 == 6 or (num1 == 6 and num2 == 56)) and operator == '/':
print(f'\t\n{num1} / {num2} = 4')
elif operator == '+':
print(f'\t\n{num1} + {num2} = {add(num1, num2)}')
elif operator == '-':
print(f'\t\n{num1} - {num2} = {sub(num1, num2)}')
elif operator == '*':
print(f'\t\n{num1} * {num2} = {mul(num1, num2)}')
elif operator == '/':
print(f'\t\n{num1} / {num2} = {div(num1, num2)}')
else:
print('Invalid Option, please retry')
def main():
print('Faulty Calculator'.center(40, '-'))
cont = 'y'
while cont == 'y':
n1 = int(input('Enter first number: '))
n2 = int(input('Enter second number: '))
operator = input('Enter the operator you want to use:')
calculator_logic(n1, n2, operator)
cont = str(input('Do you want to continue? y or n? '))
cont = cont.lower()
print('Thank you for using our calculator!')
if __name__ == '__main__':
main()
|
'''
0: 1: 2: 3: 4:
aaaa .... aaaa aaaa ....
b c . c . c . c b c
b c . c . c . c b c
.... .... dddd dddd dddd
e f . f e . . f . f
e f . f e . . f . f
gggg .... gggg gggg ....
5: 6: 7: 8: 9:
aaaa aaaa aaaa aaaa aaaa
b . b . . c b c b c
b . b . . c b c b c
dddd dddd .... dddd dddd
. f e f . f e f . f
. f e f . f e f . f
gggg gggg .... gggg gggg
0 1 2 3 4 5 6 7 8 9
a x x x x x x x x
b x x x x x
c x x x x x x x x
d x x x x x x x
e x x x x x
f x x x x x x x x x
g x x x x x x x
'''
def get_easy_seg_count(filename):
easy = [2,3,4,7]
easy_segs = 0
with open(filename) as f:
while True:
line = f.readline().strip()
if not line:
break
else:
for seg in line.split('|')[1].split():
if len(seg) in easy:
easy_segs += 1
print("Number of easy signals in {} is {}".format(filename, easy_segs))
return easy_segs
def decode_fives(helper_rels, fives):
decoded = dict()
for f in fives:
if helper_rels['1'][0] in f and helper_rels['1'][1] in f:
decoded[f] = '3'
elif helper_rels["4-1"][0] in f and helper_rels["4-1"][1] in f:
decoded[f] = '5'
else:
decoded[f] = '2'
return decoded
def decode_sixes(helper_rels, sixes):
decoded = dict()
for s in sixes:
if not( helper_rels['1'][0] in s and helper_rels['1'][1] in s):
decoded[s] = '6'
elif helper_rels["4-1"][0] in s and helper_rels["4-1"][1] in s:
decoded[s] = '9'
else:
decoded[s] = '0'
return decoded
def decode_line(line):
decoded = dict()
helper_rels = dict()
## Decode simple digits
easy = { 2 : '1', 3 : '7', 4 : '4', 7 : '8'}
fives = list()
sixes = list()
for seg in line.split('|')[0].split():
seg = ''.join(sorted(seg))
if len(seg) in easy:
decoded[seg] = easy[len(seg)]
helper_rels[easy[len(seg)]] = seg
elif len(seg) == 5:
fives.append(seg)
elif len(seg) == 6:
sixes.append(seg)
helper_rels["7-1"] = helper_rels['7']
helper_rels["4-1"] = helper_rels['4']
for n in helper_rels['1']:
helper_rels["7-1"] = helper_rels["7-1"].replace(n,'')
helper_rels["4-1"] = helper_rels["4-1"].replace(n,'')
decoded.update(decode_fives(helper_rels,fives))
decoded.update(decode_sixes(helper_rels,sixes))
return decoded
def decoded_output(line):
decoded = decode_line(line)
output = ""
for seg in line.split('|')[1].split():
output = output + decoded[''.join(sorted(seg))]
return int(output)
def sum_all_outputs(filename):
all_outputs = 0
with open(filename) as f:
while True:
line = f.readline().strip()
if not line:
break
else:
all_outputs += decoded_output(line)
print("Sum of all outputs in {} is {}".format(filename,all_outputs))
return all_outputs
print("-- Part 1")
assert get_easy_seg_count("sample.txt") == 26
assert get_easy_seg_count("input.txt") == 554
print("\n-- Part 2")
assert sum_all_outputs("sample.txt") == 61229
assert sum_all_outputs("input.txt") == 990964
|
"""
0: 1: 2: 3: 4:
aaaa .... aaaa aaaa ....
b c . c . c . c b c
b c . c . c . c b c
.... .... dddd dddd dddd
e f . f e . . f . f
e f . f e . . f . f
gggg .... gggg gggg ....
5: 6: 7: 8: 9:
aaaa aaaa aaaa aaaa aaaa
b . b . . c b c b c
b . b . . c b c b c
dddd dddd .... dddd dddd
. f e f . f e f . f
. f e f . f e f . f
gggg gggg .... gggg gggg
0 1 2 3 4 5 6 7 8 9
a x x x x x x x x
b x x x x x
c x x x x x x x x
d x x x x x x x
e x x x x x
f x x x x x x x x x
g x x x x x x x
"""
def get_easy_seg_count(filename):
easy = [2, 3, 4, 7]
easy_segs = 0
with open(filename) as f:
while True:
line = f.readline().strip()
if not line:
break
else:
for seg in line.split('|')[1].split():
if len(seg) in easy:
easy_segs += 1
print('Number of easy signals in {} is {}'.format(filename, easy_segs))
return easy_segs
def decode_fives(helper_rels, fives):
decoded = dict()
for f in fives:
if helper_rels['1'][0] in f and helper_rels['1'][1] in f:
decoded[f] = '3'
elif helper_rels['4-1'][0] in f and helper_rels['4-1'][1] in f:
decoded[f] = '5'
else:
decoded[f] = '2'
return decoded
def decode_sixes(helper_rels, sixes):
decoded = dict()
for s in sixes:
if not (helper_rels['1'][0] in s and helper_rels['1'][1] in s):
decoded[s] = '6'
elif helper_rels['4-1'][0] in s and helper_rels['4-1'][1] in s:
decoded[s] = '9'
else:
decoded[s] = '0'
return decoded
def decode_line(line):
decoded = dict()
helper_rels = dict()
easy = {2: '1', 3: '7', 4: '4', 7: '8'}
fives = list()
sixes = list()
for seg in line.split('|')[0].split():
seg = ''.join(sorted(seg))
if len(seg) in easy:
decoded[seg] = easy[len(seg)]
helper_rels[easy[len(seg)]] = seg
elif len(seg) == 5:
fives.append(seg)
elif len(seg) == 6:
sixes.append(seg)
helper_rels['7-1'] = helper_rels['7']
helper_rels['4-1'] = helper_rels['4']
for n in helper_rels['1']:
helper_rels['7-1'] = helper_rels['7-1'].replace(n, '')
helper_rels['4-1'] = helper_rels['4-1'].replace(n, '')
decoded.update(decode_fives(helper_rels, fives))
decoded.update(decode_sixes(helper_rels, sixes))
return decoded
def decoded_output(line):
decoded = decode_line(line)
output = ''
for seg in line.split('|')[1].split():
output = output + decoded[''.join(sorted(seg))]
return int(output)
def sum_all_outputs(filename):
all_outputs = 0
with open(filename) as f:
while True:
line = f.readline().strip()
if not line:
break
else:
all_outputs += decoded_output(line)
print('Sum of all outputs in {} is {}'.format(filename, all_outputs))
return all_outputs
print('-- Part 1')
assert get_easy_seg_count('sample.txt') == 26
assert get_easy_seg_count('input.txt') == 554
print('\n-- Part 2')
assert sum_all_outputs('sample.txt') == 61229
assert sum_all_outputs('input.txt') == 990964
|
# Convert to str
number = 18
number_string = str(number)
print(type(number_string)) # 'str'
|
number = 18
number_string = str(number)
print(type(number_string))
|
n = int(input("Informe a quantidade de caracteres: "))
caracteres = []
consoantes = 0
i = 1
while i <= n:
c = input("Informe o %d caracter: " %i)
caracteres.append(c)
i += 1
i = 0
while i < n:
if caracteres[i] not in "aeiou":
consoantes += 1
i += 1
print("O total de consoantes eh: ", consoantes)
|
n = int(input('Informe a quantidade de caracteres: '))
caracteres = []
consoantes = 0
i = 1
while i <= n:
c = input('Informe o %d caracter: ' % i)
caracteres.append(c)
i += 1
i = 0
while i < n:
if caracteres[i] not in 'aeiou':
consoantes += 1
i += 1
print('O total de consoantes eh: ', consoantes)
|
# Advent of Code 2019 Solutions: Day 2, Puzzle 1
# https://github.com/emddudley/advent-of-code-solutions
with open('input', 'r') as f:
program = [int(x) for x in f.read().strip().split(',')]
program[1] = 12
program[2] = 2
for opcode_index in range(0, len(program), 4):
opcode = program[opcode_index]
if opcode == 99:
break
addr_a = program[opcode_index + 1]
addr_b = program[opcode_index + 2]
dest = program[opcode_index + 3]
if opcode == 1:
program[dest] = program[addr_a] + program[addr_b]
elif opcode == 2:
program[dest] = program[addr_a] * program[addr_b]
print(program[0])
|
with open('input', 'r') as f:
program = [int(x) for x in f.read().strip().split(',')]
program[1] = 12
program[2] = 2
for opcode_index in range(0, len(program), 4):
opcode = program[opcode_index]
if opcode == 99:
break
addr_a = program[opcode_index + 1]
addr_b = program[opcode_index + 2]
dest = program[opcode_index + 3]
if opcode == 1:
program[dest] = program[addr_a] + program[addr_b]
elif opcode == 2:
program[dest] = program[addr_a] * program[addr_b]
print(program[0])
|
class Solution:
def minDeletionSize(self, A: List[str]) -> int:
minDel = m = len(A[0])
dp = [1] * m
for j in range(m):
for i in range(j):
if all(A[k][i] <= A[k][j] for k in range(len(A))):
dp[j] = max(dp[j], dp[i] + 1)
minDel = min(minDel, m - dp[j])
return minDel
|
class Solution:
def min_deletion_size(self, A: List[str]) -> int:
min_del = m = len(A[0])
dp = [1] * m
for j in range(m):
for i in range(j):
if all((A[k][i] <= A[k][j] for k in range(len(A)))):
dp[j] = max(dp[j], dp[i] + 1)
min_del = min(minDel, m - dp[j])
return minDel
|
"""
https://leetcode.com/problems/power-of-two/
Given an integer, write a function to determine if it is a power of two.
Example 1:
Input: 1
Output: true
Explanation: 20 = 1
Example 2:
Input: 16
Output: true
Explanation: 24 = 16
Example 3:
Input: 218
Output: false
"""
# time complexity: O(logn), space complexity: O(1)
class Solution:
def isPowerOfTwo(self, n: int) -> bool:
if n <= 0:
return False
if n == 1:
return True
while n > 1:
if n % 2 == 0:
n = n // 2
else:
return False
return True
|
"""
https://leetcode.com/problems/power-of-two/
Given an integer, write a function to determine if it is a power of two.
Example 1:
Input: 1
Output: true
Explanation: 20 = 1
Example 2:
Input: 16
Output: true
Explanation: 24 = 16
Example 3:
Input: 218
Output: false
"""
class Solution:
def is_power_of_two(self, n: int) -> bool:
if n <= 0:
return False
if n == 1:
return True
while n > 1:
if n % 2 == 0:
n = n // 2
else:
return False
return True
|
key = int(input())
n = int(input())
message = ""
for x in range(n):
letters = input()
message += chr(ord(letters) + key)
print(message)
|
key = int(input())
n = int(input())
message = ''
for x in range(n):
letters = input()
message += chr(ord(letters) + key)
print(message)
|
def action_sanitize():
'''Make action suitable for use as a Pose Library
'''
pass
def apply_pose(pose_index=-1):
'''Apply specified Pose Library pose to the rig
:param pose_index: Pose, Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)
:type pose_index: int in [-2, inf], (optional)
'''
pass
def browse_interactive(pose_index=-1):
'''Interactively browse poses in 3D-View
:param pose_index: Pose, Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)
:type pose_index: int in [-2, inf], (optional)
'''
pass
def new():
'''Add New Pose Library to active Object
'''
pass
def pose_add(frame=1, name="Pose"):
'''Add the current Pose to the active Pose Library
:param frame: Frame, Frame to store pose on
:type frame: int in [0, inf], (optional)
:param name: Pose Name, Name of newly added Pose
:type name: string, (optional, never None)
'''
pass
def pose_move(pose='', direction='UP'):
'''Move the pose up or down in the active Pose Library
:param pose: Pose, The pose to move
:type pose: enum in [], (optional)
:param direction: Direction, Direction to move the chosen pose towards
:type direction: enum in ['UP', 'DOWN'], (optional)
'''
pass
def pose_remove(pose=''):
'''Remove nth pose from the active Pose Library
:param pose: Pose, The pose to remove
:type pose: enum in [], (optional)
'''
pass
def pose_rename(name="RenamedPose", pose=''):
'''Rename specified pose from the active Pose Library
:param name: New Pose Name, New name for pose
:type name: string, (optional, never None)
:param pose: Pose, The pose to rename
:type pose: enum in [], (optional)
'''
pass
def unlink():
'''Remove Pose Library from active Object
'''
pass
|
def action_sanitize():
"""Make action suitable for use as a Pose Library
"""
pass
def apply_pose(pose_index=-1):
"""Apply specified Pose Library pose to the rig
:param pose_index: Pose, Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)
:type pose_index: int in [-2, inf], (optional)
"""
pass
def browse_interactive(pose_index=-1):
"""Interactively browse poses in 3D-View
:param pose_index: Pose, Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)
:type pose_index: int in [-2, inf], (optional)
"""
pass
def new():
"""Add New Pose Library to active Object
"""
pass
def pose_add(frame=1, name='Pose'):
"""Add the current Pose to the active Pose Library
:param frame: Frame, Frame to store pose on
:type frame: int in [0, inf], (optional)
:param name: Pose Name, Name of newly added Pose
:type name: string, (optional, never None)
"""
pass
def pose_move(pose='', direction='UP'):
"""Move the pose up or down in the active Pose Library
:param pose: Pose, The pose to move
:type pose: enum in [], (optional)
:param direction: Direction, Direction to move the chosen pose towards
:type direction: enum in ['UP', 'DOWN'], (optional)
"""
pass
def pose_remove(pose=''):
"""Remove nth pose from the active Pose Library
:param pose: Pose, The pose to remove
:type pose: enum in [], (optional)
"""
pass
def pose_rename(name='RenamedPose', pose=''):
"""Rename specified pose from the active Pose Library
:param name: New Pose Name, New name for pose
:type name: string, (optional, never None)
:param pose: Pose, The pose to rename
:type pose: enum in [], (optional)
"""
pass
def unlink():
"""Remove Pose Library from active Object
"""
pass
|
class TreeNode:
def __init__(self, val):
self.val = val
self.left = None
self.right = None
class Solution(object):
def is_same_tree(self, p, q):
if p is None or q is None:
if p != q:
return False
return True
if p.val != q.val:
return False
if not self.is_same_tree(p.left, q.left):
return False
return self.is_same_tree(p.right, q.right)
|
class Treenode:
def __init__(self, val):
self.val = val
self.left = None
self.right = None
class Solution(object):
def is_same_tree(self, p, q):
if p is None or q is None:
if p != q:
return False
return True
if p.val != q.val:
return False
if not self.is_same_tree(p.left, q.left):
return False
return self.is_same_tree(p.right, q.right)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.