content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
my_variabel = "hai darmawan" for variabel_baru in my_variabel: print("for string: ",variabel_baru) my_list =["aku", "kamu", "dia"] my_tuple=(1,5,6,7) for variabel_baru3 in my_tuple: print("for list or tuple", variabel_baru3)
my_variabel = 'hai darmawan' for variabel_baru in my_variabel: print('for string: ', variabel_baru) my_list = ['aku', 'kamu', 'dia'] my_tuple = (1, 5, 6, 7) for variabel_baru3 in my_tuple: print('for list or tuple', variabel_baru3)
def main(): x=11 y=2 print("Addition X+Y=",x+y) print("Subtraction X-Y=",x-y) print("Multiplication X*Y=",x*y) print("Division X/Y=",x/y) print("Modulus X%Y=",x%y) print("Exponent X**Y=",x**y) print("Floor Division X//Y=",x//y) if __name__ == '__main__': main()
def main(): x = 11 y = 2 print('Addition X+Y=', x + y) print('Subtraction X-Y=', x - y) print('Multiplication X*Y=', x * y) print('Division X/Y=', x / y) print('Modulus X%Y=', x % y) print('Exponent X**Y=', x ** y) print('Floor Division X//Y=', x // y) if __name__ == '__main__': main()
def test_screen_two(): for num in range(0, 100): col = int(num * 0.01 * 2.0) y = (num * 0.01 - float(col) / 2.0) * 2.0 newY = y / 960.0 * 480.0 + 1.0 / 4.0 print('col:' + str(col) + ' num: ' + str(num) + ' y: ' + str(y) + ' newY: ' + str(newY)) # print(str(newY)) def test_scale(): for num in range(0, 100): col = num * 0.01 textureCoordinateToUse = col - 0.5 use = textureCoordinateToUse / 1.5 newUse = use + 0.5 print(' textureCoordinateToUse: ' + str(textureCoordinateToUse)[0:5] + ' use: ' + str(use)[0:5] + ' newUse: ' + str(newUse)[0:5] + ' ' + str(col / 1.5)[0:5]) if __name__ == "__main__": test_scale() # test_screen_two()
def test_screen_two(): for num in range(0, 100): col = int(num * 0.01 * 2.0) y = (num * 0.01 - float(col) / 2.0) * 2.0 new_y = y / 960.0 * 480.0 + 1.0 / 4.0 print('col:' + str(col) + ' num: ' + str(num) + ' y: ' + str(y) + ' newY: ' + str(newY)) def test_scale(): for num in range(0, 100): col = num * 0.01 texture_coordinate_to_use = col - 0.5 use = textureCoordinateToUse / 1.5 new_use = use + 0.5 print(' textureCoordinateToUse: ' + str(textureCoordinateToUse)[0:5] + ' use: ' + str(use)[0:5] + ' newUse: ' + str(newUse)[0:5] + ' ' + str(col / 1.5)[0:5]) if __name__ == '__main__': test_scale()
__project__ = "o3seespy" __author__ = "Maxim Millen & Minjie Zhu" __version__ = "3.1.0.18" __license__ = "MIT with OpenSees License"
__project__ = 'o3seespy' __author__ = 'Maxim Millen & Minjie Zhu' __version__ = '3.1.0.18' __license__ = 'MIT with OpenSees License'
class MyClass: def __init__(self): self.var = 'var' def method(self): print('method') x = MyClass() x.method() m = x.method m()
class Myclass: def __init__(self): self.var = 'var' def method(self): print('method') x = my_class() x.method() m = x.method m()
''' @author: l4zyc0d3r People who are happy makes other happy. I am gonna finish it slowly but definitely.cdt ''' class Solution: def kthFactor(self, n: int, k: int) -> int: for i in range(1, n+1): if n % i == 0: k-=1 if k == 0: return i return -1
""" @author: l4zyc0d3r People who are happy makes other happy. I am gonna finish it slowly but definitely.cdt """ class Solution: def kth_factor(self, n: int, k: int) -> int: for i in range(1, n + 1): if n % i == 0: k -= 1 if k == 0: return i return -1
_base_ = [ '../_base_/datasets/nus-mono3d.py', '../_base_/models/fcos3d.py', '../_base_/schedules/mmdet_schedule_1x.py', '../_base_/default_runtime.py' ] # model settings model = dict( backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), # frozen_stages=1, frozen_stages=1, norm_cfg=dict(type='SyncBN', requires_grad=True), # norm_cfg=dict(type='BN', requires_grad=False), norm_eval=False, # norm_eval=True, style='pytorch', # style='caffe' dcn=dict(type='DCNv2', deform_groups=1, fallback_on_stride=False), stage_with_dcn=(False, False, True, True) )) class_names = [ 'car', 'truck', 'trailer', 'bus', 'construction_vehicle', 'bicycle', 'motorcycle', 'pedestrian', 'traffic_cone', 'barrier' ] img_norm_cfg = dict( mean=[103.530, 116.280, 123.675], std=[1.0, 1.0, 1.0], to_rgb=False) train_pipeline = [ dict(type='LoadImageFromFileMono3D'), dict( type='LoadAnnotations3D', with_bbox=True, with_label=True, with_attr_label=True, with_bbox_3d=True, with_label_3d=True, with_bbox_depth=True), dict(type='Resize', img_scale=(1600, 900), keep_ratio=True), dict(type='RandomFlip3D', flip_ratio_bev_horizontal=0.5), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle3D', class_names=class_names), dict( type='Collect3D', keys=[ 'img', 'gt_bboxes', 'gt_labels', 'attr_labels', 'gt_bboxes_3d', 'gt_labels_3d', 'centers2d', 'depths' ]), ] test_pipeline = [ dict(type='LoadImageFromFileMono3D'), dict( type='MultiScaleFlipAug', scale_factor=1.0, flip=False, transforms=[ dict(type='RandomFlip3D'), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict( type='DefaultFormatBundle3D', class_names=class_names, with_label=False), dict(type='Collect3D', keys=['img']), ]) ] data = dict( samples_per_gpu=8, workers_per_gpu=8, train=dict(pipeline=train_pipeline), val=dict(pipeline=test_pipeline), test=dict(pipeline=test_pipeline)) # optimizer optimizer = dict( lr=0.008, paramwise_cfg=dict(bias_lr_mult=2., bias_decay_mult=0.)) optimizer_config = dict( _delete_=True, grad_clip=dict(max_norm=35, norm_type=2)) # learning policy lr_config = dict( policy='step', warmup='linear', warmup_iters=500, # warmup_iters=1500, # for moco warmup_ratio=1.0 / 3, step=[8, 11]) total_epochs = 12 evaluation = dict(interval=2) # load_from=None # load_from='checkpoints/waymo_ep50_with_backbone.pth' # load_from='checkpoints/imgsup_finetune_waymo_ep1_with_backbone.pth' # load_from='checkpoints/resnet50-19c8e357_convert_mono3d.pth' # load_from='checkpoints/imgsup_finetune_waymo_ep5_with_backbone_repro.pth' # load_from='checkpoints/imgsup_finetune_waymo_ep5_with_backbone_moco.pth' # load_from=None # load_from='checkpoints/mono3d_waymo_half.pth' # load_from='checkpoints/mono3d_waymo_oneten.pth' load_from='checkpoints/mono3d_waymo_full.pth' # load_from='checkpoints/mono3d_waymo_onefive.pth'
_base_ = ['../_base_/datasets/nus-mono3d.py', '../_base_/models/fcos3d.py', '../_base_/schedules/mmdet_schedule_1x.py', '../_base_/default_runtime.py'] model = dict(backbone=dict(type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='SyncBN', requires_grad=True), norm_eval=False, style='pytorch', dcn=dict(type='DCNv2', deform_groups=1, fallback_on_stride=False), stage_with_dcn=(False, False, True, True))) class_names = ['car', 'truck', 'trailer', 'bus', 'construction_vehicle', 'bicycle', 'motorcycle', 'pedestrian', 'traffic_cone', 'barrier'] img_norm_cfg = dict(mean=[103.53, 116.28, 123.675], std=[1.0, 1.0, 1.0], to_rgb=False) train_pipeline = [dict(type='LoadImageFromFileMono3D'), dict(type='LoadAnnotations3D', with_bbox=True, with_label=True, with_attr_label=True, with_bbox_3d=True, with_label_3d=True, with_bbox_depth=True), dict(type='Resize', img_scale=(1600, 900), keep_ratio=True), dict(type='RandomFlip3D', flip_ratio_bev_horizontal=0.5), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle3D', class_names=class_names), dict(type='Collect3D', keys=['img', 'gt_bboxes', 'gt_labels', 'attr_labels', 'gt_bboxes_3d', 'gt_labels_3d', 'centers2d', 'depths'])] test_pipeline = [dict(type='LoadImageFromFileMono3D'), dict(type='MultiScaleFlipAug', scale_factor=1.0, flip=False, transforms=[dict(type='RandomFlip3D'), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle3D', class_names=class_names, with_label=False), dict(type='Collect3D', keys=['img'])])] data = dict(samples_per_gpu=8, workers_per_gpu=8, train=dict(pipeline=train_pipeline), val=dict(pipeline=test_pipeline), test=dict(pipeline=test_pipeline)) optimizer = dict(lr=0.008, paramwise_cfg=dict(bias_lr_mult=2.0, bias_decay_mult=0.0)) optimizer_config = dict(_delete_=True, grad_clip=dict(max_norm=35, norm_type=2)) lr_config = dict(policy='step', warmup='linear', warmup_iters=500, warmup_ratio=1.0 / 3, step=[8, 11]) total_epochs = 12 evaluation = dict(interval=2) load_from = 'checkpoints/mono3d_waymo_full.pth'
#! /usr/bin/env python3 def main(): languages = { "Python": "Guido van Rossum", "Ruby": "Yukihiro Matsumoto", "PHP": "Rasmus Lerdorf" } for each in languages: print(each + " was created by " + languages[each]) if __name__ == "__main__": main()
def main(): languages = {'Python': 'Guido van Rossum', 'Ruby': 'Yukihiro Matsumoto', 'PHP': 'Rasmus Lerdorf'} for each in languages: print(each + ' was created by ' + languages[each]) if __name__ == '__main__': main()
ziehungen = input().split(",") ziehungen = [int(x) for x in ziehungen] boards = [] while True: leer = input() zeile = [input().split(" ")] zeile[0] = [int(x) for x in zeile[0] if x != ''] if zeile[0] != []: for i in range(1,5): zeile.append(input().split(" ")) zeile[i] = [int(x) for x in zeile[i] if x != ''] boards.append([zeile[0], zeile[1], zeile[2], zeile[3], zeile[4]]) else: break gewinn_brett = '' for n in range(len(ziehungen)): letzte_zahl = ziehungen[n-1] if gewinn_brett != '': break for i in range(len(boards)): for ii in range(5): for iii in range(5): if boards[i][ii][iii] == ziehungen[n]: boards[i][ii][iii] = "x" for i in range(len(boards)): if gewinn_brett != '': break for ii in range(5): nicht_x = False for iii in range(5): if boards[i][ii][iii] != "x": nicht_x = True if nicht_x == False: gewinn_brett = i break for i in range(len(boards)): if gewinn_brett != '': break for ii in range(5): nicht_x = False for iii in range(5): if boards[i][iii][ii] != "x": nicht_x = True if nicht_x == False: gewinn_brett = i break summe_unmarkierter = 0 for i in range(5): for ii in range(5): if boards[gewinn_brett][i][ii] != "x": summe_unmarkierter += boards[gewinn_brett][i][ii] print(summe_unmarkierter * letzte_zahl)
ziehungen = input().split(',') ziehungen = [int(x) for x in ziehungen] boards = [] while True: leer = input() zeile = [input().split(' ')] zeile[0] = [int(x) for x in zeile[0] if x != ''] if zeile[0] != []: for i in range(1, 5): zeile.append(input().split(' ')) zeile[i] = [int(x) for x in zeile[i] if x != ''] boards.append([zeile[0], zeile[1], zeile[2], zeile[3], zeile[4]]) else: break gewinn_brett = '' for n in range(len(ziehungen)): letzte_zahl = ziehungen[n - 1] if gewinn_brett != '': break for i in range(len(boards)): for ii in range(5): for iii in range(5): if boards[i][ii][iii] == ziehungen[n]: boards[i][ii][iii] = 'x' for i in range(len(boards)): if gewinn_brett != '': break for ii in range(5): nicht_x = False for iii in range(5): if boards[i][ii][iii] != 'x': nicht_x = True if nicht_x == False: gewinn_brett = i break for i in range(len(boards)): if gewinn_brett != '': break for ii in range(5): nicht_x = False for iii in range(5): if boards[i][iii][ii] != 'x': nicht_x = True if nicht_x == False: gewinn_brett = i break summe_unmarkierter = 0 for i in range(5): for ii in range(5): if boards[gewinn_brett][i][ii] != 'x': summe_unmarkierter += boards[gewinn_brett][i][ii] print(summe_unmarkierter * letzte_zahl)
def insertion_sort(arr): for i in range(1, len(arr)): key = arr[i] j = i - 1 while(j>=0 and arr[j]>key): arr[j+1]=arr[j] j = j - 1 arr[j+1] = key return arr def main(): arr = [6, 5, 8, 9, 3, 1, 4, 7, 2] sorted_arr = insertion_sort(arr) for i in sorted_arr: print(i, end=" ") if __name__ == "__main__": main()
def insertion_sort(arr): for i in range(1, len(arr)): key = arr[i] j = i - 1 while j >= 0 and arr[j] > key: arr[j + 1] = arr[j] j = j - 1 arr[j + 1] = key return arr def main(): arr = [6, 5, 8, 9, 3, 1, 4, 7, 2] sorted_arr = insertion_sort(arr) for i in sorted_arr: print(i, end=' ') if __name__ == '__main__': main()
# # PySNMP MIB module DNS-SERVER-MIB (http://pysnmp.sf.net) # ASN.1 source http://mibs.snmplabs.com:80/asn1/DNS-SERVER-MIB # Produced by pysmi-0.0.7 at Sun Feb 14 00:08:40 2016 # On host bldfarm platform Linux version 4.1.13-100.fc21.x86_64 by user goose # Using Python version 3.5.0 (default, Jan 5 2016, 17:11:52) # ( Integer, OctetString, ObjectIdentifier, ) = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection") ( NotificationGroup, ObjectGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance") ( IpAddress, iso, Counter32, ObjectIdentity, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, NotificationType, Unsigned32, mib_2, Integer32, Gauge32, ModuleIdentity, TimeTicks, MibIdentifier, ) = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "iso", "Counter32", "ObjectIdentity", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "NotificationType", "Unsigned32", "mib-2", "Integer32", "Gauge32", "ModuleIdentity", "TimeTicks", "MibIdentifier") ( TruthValue, TextualConvention, RowStatus, DisplayString, ) = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TextualConvention", "RowStatus", "DisplayString") dns = ObjectIdentity((1, 3, 6, 1, 2, 1, 32)) if mibBuilder.loadTexts: dns.setDescription('The OID assigned to DNS MIB work by the IANA.') dnsServMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 32, 1)) if mibBuilder.loadTexts: dnsServMIB.setLastUpdated('9401282251Z') if mibBuilder.loadTexts: dnsServMIB.setOrganization('IETF DNS Working Group') if mibBuilder.loadTexts: dnsServMIB.setContactInfo(' Rob Austein\n Postal: Epilogue Technology Corporation\n 268 Main Street, Suite 283\n North Reading, MA 10864\n US\n Tel: +1 617 245 0804\n Fax: +1 617 245 8122\n E-Mail: sra@epilogue.com\n\n Jon Saperia\n Postal: Digital Equipment Corporation\n 110 Spit Brook Road\n ZKO1-3/H18\n Nashua, NH 03062-2698\n US\n Tel: +1 603 881 0480\n Fax: +1 603 881 0120\n Email: saperia@zko.dec.com') if mibBuilder.loadTexts: dnsServMIB.setDescription('The MIB module for entities implementing the server side\n of the Domain Name System (DNS) protocol.') dnsServMIBObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 32, 1, 1)) dnsServConfig = MibIdentifier((1, 3, 6, 1, 2, 1, 32, 1, 1, 1)) dnsServCounter = MibIdentifier((1, 3, 6, 1, 2, 1, 32, 1, 1, 2)) dnsServOptCounter = MibIdentifier((1, 3, 6, 1, 2, 1, 32, 1, 1, 3)) dnsServZone = MibIdentifier((1, 3, 6, 1, 2, 1, 32, 1, 1, 4)) class DnsName(OctetString, TextualConvention): subtypeSpec = OctetString.subtypeSpec+ValueSizeConstraint(0,255) class DnsNameAsIndex(DnsName, TextualConvention): pass class DnsClass(Integer32, TextualConvention): displayHint = '2d' subtypeSpec = Integer32.subtypeSpec+ValueRangeConstraint(0,65535) class DnsType(Integer32, TextualConvention): displayHint = '2d' subtypeSpec = Integer32.subtypeSpec+ValueRangeConstraint(0,65535) class DnsQClass(Integer32, TextualConvention): displayHint = '2d' subtypeSpec = Integer32.subtypeSpec+ValueRangeConstraint(0,65535) class DnsQType(Integer32, TextualConvention): displayHint = '2d' subtypeSpec = Integer32.subtypeSpec+ValueRangeConstraint(0,65535) class DnsTime(Gauge32, TextualConvention): displayHint = '4d' class DnsOpCode(Integer32, TextualConvention): subtypeSpec = Integer32.subtypeSpec+ValueRangeConstraint(0,15) class DnsRespCode(Integer32, TextualConvention): subtypeSpec = Integer32.subtypeSpec+ValueRangeConstraint(0,15) dnsServConfigImplementIdent = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 1, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServConfigImplementIdent.setDescription("The implementation identification string for the DNS\n server software in use on the system, for example;\n `FNS-2.1'") dnsServConfigRecurs = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("available", 1), ("restricted", 2), ("unavailable", 3),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dnsServConfigRecurs.setDescription('This represents the recursion services offered by this\n name server. The values that can be read or written\n are:\n\n available(1) - performs recursion on requests from\n clients.\n\n restricted(2) - recursion is performed on requests only\n from certain clients, for example; clients on an access\n control list.\n\n unavailable(3) - recursion is not available.') dnsServConfigUpTime = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 1, 3), DnsTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServConfigUpTime.setDescription('If the server has a persistent state (e.g., a process),\n this value will be the time elapsed since it started.\n For software without persistant state, this value will\n be zero.') dnsServConfigResetTime = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 1, 4), DnsTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServConfigResetTime.setDescription("If the server has a persistent state (e.g., a process)\n and supports a `reset' operation (e.g., can be told to\n re-read configuration files), this value will be the\n time elapsed since the last time the name server was\n `reset.' For software that does not have persistence or\n does not support a `reset' operation, this value will be\n zero.") dnsServConfigReset = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4,))).clone(namedValues=NamedValues(("other", 1), ("reset", 2), ("initializing", 3), ("running", 4),))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dnsServConfigReset.setDescription('Status/action object to reinitialize any persistant name\n server state. When set to reset(2), any persistant\n name server state (such as a process) is reinitialized as\n if the name server had just been started. This value\n will never be returned by a read operation. When read,\n one of the following values will be returned:\n other(1) - server in some unknown state;\n initializing(3) - server (re)initializing;\n running(4) - server currently running.') dnsServCounterAuthAns = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterAuthAns.setDescription('Number of queries which were authoritatively answered.') dnsServCounterAuthNoNames = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterAuthNoNames.setDescription("Number of queries for which `authoritative no such name'\n responses were made.") dnsServCounterAuthNoDataResps = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterAuthNoDataResps.setDescription("Number of queries for which `authoritative no such data'\n (empty answer) responses were made.") dnsServCounterNonAuthDatas = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterNonAuthDatas.setDescription('Number of queries which were non-authoritatively\n answered (cached data).') dnsServCounterNonAuthNoDatas = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterNonAuthNoDatas.setDescription('Number of queries which were non-authoritatively\n answered with no data (empty answer).') dnsServCounterReferrals = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterReferrals.setDescription('Number of requests that were referred to other servers.') dnsServCounterErrors = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterErrors.setDescription('Number of requests the server has processed that were\n answered with errors (RCODE values other than 0 and 3).') dnsServCounterRelNames = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterRelNames.setDescription('Number of requests received by the server for names that\n are only 1 label long (text form - no internal dots).') dnsServCounterReqRefusals = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterReqRefusals.setDescription('Number of DNS requests refused by the server.') dnsServCounterReqUnparses = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterReqUnparses.setDescription('Number of requests received which were unparseable.') dnsServCounterOtherErrors = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterOtherErrors.setDescription('Number of requests which were aborted for other (local)\n server errors.') dnsServCounterTable = MibTable((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13), ) if mibBuilder.loadTexts: dnsServCounterTable.setDescription('Counter information broken down by DNS class and type.') dnsServCounterEntry = MibTableRow((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1), ).setIndexNames((0, "DNS-SERVER-MIB", "dnsServCounterOpCode"), (0, "DNS-SERVER-MIB", "dnsServCounterQClass"), (0, "DNS-SERVER-MIB", "dnsServCounterQType"), (0, "DNS-SERVER-MIB", "dnsServCounterTransport")) if mibBuilder.loadTexts: dnsServCounterEntry.setDescription("This table contains count information for each DNS class\n and type value known to the server. The index allows\n management software to to create indices to the table to\n get the specific information desired, e.g., number of\n queries over UDP for records with type value `A' which\n came to this server. In order to prevent an\n uncontrolled expansion of rows in the table; if\n dnsServCounterRequests is 0 and dnsServCounterResponses\n is 0, then the row does not exist and `no such' is\n returned when the agent is queried for such instances.") dnsServCounterOpCode = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1, 1), DnsOpCode()) if mibBuilder.loadTexts: dnsServCounterOpCode.setDescription('The DNS OPCODE being counted in this row of the table.') dnsServCounterQClass = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1, 2), DnsClass()) if mibBuilder.loadTexts: dnsServCounterQClass.setDescription('The class of record being counted in this row of the\n table.') dnsServCounterQType = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1, 3), DnsType()) if mibBuilder.loadTexts: dnsServCounterQType.setDescription('The type of record which is being counted in this row in\n the table.') dnsServCounterTransport = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("udp", 1), ("tcp", 2), ("other", 3),))) if mibBuilder.loadTexts: dnsServCounterTransport.setDescription('A value of udp(1) indicates that the queries reported on\n this row were sent using UDP.\n\n A value of tcp(2) indicates that the queries reported on\n this row were sent using TCP.\n\n A value of other(3) indicates that the queries reported\n on this row were sent using a transport that was neither\n TCP nor UDP.') dnsServCounterRequests = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterRequests.setDescription('Number of requests (queries) that have been recorded in\n this row of the table.') dnsServCounterResponses = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServCounterResponses.setDescription('Number of responses made by the server since\n initialization for the kind of query identified on this\n row of the table.') dnsServOptCounterSelfAuthAns = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterSelfAuthAns.setDescription('Number of requests the server has processed which\n originated from a resolver on the same host for which\n there has been an authoritative answer.') dnsServOptCounterSelfAuthNoNames = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterSelfAuthNoNames.setDescription('Number of requests the server has processed which\n originated from a resolver on the same host for which\n there has been an authoritative no such name answer\n given.') dnsServOptCounterSelfAuthNoDataResps = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterSelfAuthNoDataResps.setDescription('Number of requests the server has processed which\n originated from a resolver on the same host for which\n there has been an authoritative no such data answer\n (empty answer) made.') dnsServOptCounterSelfNonAuthDatas = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterSelfNonAuthDatas.setDescription('Number of requests the server has processed which\n originated from a resolver on the same host for which a\n non-authoritative answer (cached data) was made.') dnsServOptCounterSelfNonAuthNoDatas = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterSelfNonAuthNoDatas.setDescription("Number of requests the server has processed which\n originated from a resolver on the same host for which a\n `non-authoritative, no such data' response was made\n (empty answer).") dnsServOptCounterSelfReferrals = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterSelfReferrals.setDescription('Number of queries the server has processed which\n originated from a resolver on the same host and were\n referred to other servers.') dnsServOptCounterSelfErrors = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterSelfErrors.setDescription('Number of requests the server has processed which\n originated from a resolver on the same host which have\n been answered with errors (RCODEs other than 0 and 3).') dnsServOptCounterSelfRelNames = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterSelfRelNames.setDescription('Number of requests received for names that are only 1\n label long (text form - no internal dots) the server has\n processed which originated from a resolver on the same\n host.') dnsServOptCounterSelfReqRefusals = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterSelfReqRefusals.setDescription('Number of DNS requests refused by the server which\n originated from a resolver on the same host.') dnsServOptCounterSelfReqUnparses = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterSelfReqUnparses.setDescription('Number of requests received which were unparseable and\n which originated from a resolver on the same host.') dnsServOptCounterSelfOtherErrors = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterSelfOtherErrors.setDescription('Number of requests which were aborted for other (local)\n server errors and which originated on the same host.') dnsServOptCounterFriendsAuthAns = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterFriendsAuthAns.setDescription('Number of queries originating from friends which were\n authoritatively answered. The definition of friends is\n a locally defined matter.') dnsServOptCounterFriendsAuthNoNames = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterFriendsAuthNoNames.setDescription("Number of queries originating from friends, for which\n authoritative `no such name' responses were made. The\n definition of friends is a locally defined matter.") dnsServOptCounterFriendsAuthNoDataResps = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterFriendsAuthNoDataResps.setDescription('Number of queries originating from friends for which\n authoritative no such data (empty answer) responses were\n made. The definition of friends is a locally defined\n matter.') dnsServOptCounterFriendsNonAuthDatas = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterFriendsNonAuthDatas.setDescription('Number of queries originating from friends which were\n non-authoritatively answered (cached data). The\n definition of friends is a locally defined matter.') dnsServOptCounterFriendsNonAuthNoDatas = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterFriendsNonAuthNoDatas.setDescription('Number of queries originating from friends which were\n non-authoritatively answered with no such data (empty\n answer).') dnsServOptCounterFriendsReferrals = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterFriendsReferrals.setDescription('Number of requests which originated from friends that\n were referred to other servers. The definition of\n friends is a locally defined matter.') dnsServOptCounterFriendsErrors = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterFriendsErrors.setDescription('Number of requests the server has processed which\n originated from friends and were answered with errors\n (RCODE values other than 0 and 3). The definition of\n friends is a locally defined matter.') dnsServOptCounterFriendsRelNames = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterFriendsRelNames.setDescription('Number of requests received for names from friends that\n are only 1 label long (text form - no internal dots) the\n server has processed.') dnsServOptCounterFriendsReqRefusals = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterFriendsReqRefusals.setDescription("Number of DNS requests refused by the server which were\n received from `friends'.") dnsServOptCounterFriendsReqUnparses = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterFriendsReqUnparses.setDescription("Number of requests received which were unparseable and\n which originated from `friends'.") dnsServOptCounterFriendsOtherErrors = MibScalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServOptCounterFriendsOtherErrors.setDescription("Number of requests which were aborted for other (local)\n server errors and which originated from `friends'.") dnsServZoneTable = MibTable((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1), ) if mibBuilder.loadTexts: dnsServZoneTable.setDescription("Table of zones for which this name server provides\n information. Each of the zones may be loaded from stable\n storage via an implementation-specific mechanism or may\n be obtained from another name server via a zone transfer.\n\n If name server doesn't load any zones, this table is\n empty.") dnsServZoneEntry = MibTableRow((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1), ).setIndexNames((0, "DNS-SERVER-MIB", "dnsServZoneName"), (0, "DNS-SERVER-MIB", "dnsServZoneClass")) if mibBuilder.loadTexts: dnsServZoneEntry.setDescription('An entry in the name server zone table. New rows may be\n added either via SNMP or by the name server itself.') dnsServZoneName = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 1), DnsNameAsIndex()) if mibBuilder.loadTexts: dnsServZoneName.setDescription("DNS name of the zone described by this row of the table.\n This is the owner name of the SOA RR that defines the\n top of the zone. This is name is in uppercase:\n characters 'a' through 'z' are mapped to 'A' through 'Z'\n in order to make the lexical ordering useful.") dnsServZoneClass = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 2), DnsClass()) if mibBuilder.loadTexts: dnsServZoneClass.setDescription('DNS class of the RRs in this zone.') dnsServZoneLastReloadSuccess = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 3), DnsTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServZoneLastReloadSuccess.setDescription('Elapsed time in seconds since last successful reload of\n this zone.') dnsServZoneLastReloadAttempt = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 4), DnsTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServZoneLastReloadAttempt.setDescription('Elapsed time in seconds since last attempted reload of\n this zone.') dnsServZoneLastSourceAttempt = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 5), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServZoneLastSourceAttempt.setDescription('IP address of host from which most recent zone transfer\n of this zone was attempted. This value should match the\n value of dnsServZoneSourceSuccess if the attempt was\n succcessful. If zone transfer has not been attempted\n within the memory of this name server, this value should\n be 0.0.0.0.') dnsServZoneStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 6), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dnsServZoneStatus.setDescription('The status of the information represented in this row of\n the table.') dnsServZoneSerial = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServZoneSerial.setDescription('Zone serial number (from the SOA RR) of the zone\n represented by this row of the table. If the zone has\n not been successfully loaded within the memory of this\n name server, the value of this variable is zero.') dnsServZoneCurrent = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 8), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServZoneCurrent.setDescription("Whether the server's copy of the zone represented by\n this row of the table is currently valid. If the zone\n has never been successfully loaded or has expired since\n it was last succesfully loaded, this variable will have\n the value false(2), otherwise this variable will have\n the value true(1).") dnsServZoneLastSourceSuccess = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 9), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: dnsServZoneLastSourceSuccess.setDescription('IP address of host which was the source of the most\n recent successful zone transfer for this zone. If\n unknown (e.g., zone has never been successfully\n transfered) or irrelevant (e.g., zone was loaded from\n stable storage), this value should be 0.0.0.0.') dnsServZoneSrcTable = MibTable((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 2), ) if mibBuilder.loadTexts: dnsServZoneSrcTable.setDescription('This table is a list of IP addresses from which the\n server will attempt to load zone information using DNS\n zone transfer operations. A reload may occur due to SNMP\n operations that create a row in dnsServZoneTable or a\n SET to object dnsServZoneReload. This table is only\n used when the zone is loaded via zone transfer.') dnsServZoneSrcEntry = MibTableRow((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 2, 1), ).setIndexNames((0, "DNS-SERVER-MIB", "dnsServZoneSrcName"), (0, "DNS-SERVER-MIB", "dnsServZoneSrcClass"), (0, "DNS-SERVER-MIB", "dnsServZoneSrcAddr")) if mibBuilder.loadTexts: dnsServZoneSrcEntry.setDescription('An entry in the name server zone source table.') dnsServZoneSrcName = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 2, 1, 1), DnsNameAsIndex()) if mibBuilder.loadTexts: dnsServZoneSrcName.setDescription('DNS name of the zone to which this entry applies.') dnsServZoneSrcClass = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 2, 1, 2), DnsClass()) if mibBuilder.loadTexts: dnsServZoneSrcClass.setDescription('DNS class of zone to which this entry applies.') dnsServZoneSrcAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 2, 1, 3), IpAddress()) if mibBuilder.loadTexts: dnsServZoneSrcAddr.setDescription('IP address of name server host from which this zone\n might be obtainable.') dnsServZoneSrcStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 2, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: dnsServZoneSrcStatus.setDescription('The status of the information represented in this row of\n the table.') dnsServMIBGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 32, 1, 2)) dnsServConfigGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 32, 1, 2, 1)).setObjects(*(("DNS-SERVER-MIB", "dnsServConfigImplementIdent"), ("DNS-SERVER-MIB", "dnsServConfigRecurs"), ("DNS-SERVER-MIB", "dnsServConfigUpTime"), ("DNS-SERVER-MIB", "dnsServConfigResetTime"), ("DNS-SERVER-MIB", "dnsServConfigReset"),)) if mibBuilder.loadTexts: dnsServConfigGroup.setDescription('A collection of objects providing basic configuration\n control of a DNS name server.') dnsServCounterGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 32, 1, 2, 2)).setObjects(*(("DNS-SERVER-MIB", "dnsServCounterAuthAns"), ("DNS-SERVER-MIB", "dnsServCounterAuthNoNames"), ("DNS-SERVER-MIB", "dnsServCounterAuthNoDataResps"), ("DNS-SERVER-MIB", "dnsServCounterNonAuthDatas"), ("DNS-SERVER-MIB", "dnsServCounterNonAuthNoDatas"), ("DNS-SERVER-MIB", "dnsServCounterReferrals"), ("DNS-SERVER-MIB", "dnsServCounterErrors"), ("DNS-SERVER-MIB", "dnsServCounterRelNames"), ("DNS-SERVER-MIB", "dnsServCounterReqRefusals"), ("DNS-SERVER-MIB", "dnsServCounterReqUnparses"), ("DNS-SERVER-MIB", "dnsServCounterOtherErrors"), ("DNS-SERVER-MIB", "dnsServCounterOpCode"), ("DNS-SERVER-MIB", "dnsServCounterQClass"), ("DNS-SERVER-MIB", "dnsServCounterQType"), ("DNS-SERVER-MIB", "dnsServCounterTransport"), ("DNS-SERVER-MIB", "dnsServCounterRequests"), ("DNS-SERVER-MIB", "dnsServCounterResponses"),)) if mibBuilder.loadTexts: dnsServCounterGroup.setDescription('A collection of objects providing basic instrumentation\n of a DNS name server.') dnsServOptCounterGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 32, 1, 2, 3)).setObjects(*(("DNS-SERVER-MIB", "dnsServOptCounterSelfAuthAns"), ("DNS-SERVER-MIB", "dnsServOptCounterSelfAuthNoNames"), ("DNS-SERVER-MIB", "dnsServOptCounterSelfAuthNoDataResps"), ("DNS-SERVER-MIB", "dnsServOptCounterSelfNonAuthDatas"), ("DNS-SERVER-MIB", "dnsServOptCounterSelfNonAuthNoDatas"), ("DNS-SERVER-MIB", "dnsServOptCounterSelfReferrals"), ("DNS-SERVER-MIB", "dnsServOptCounterSelfErrors"), ("DNS-SERVER-MIB", "dnsServOptCounterSelfRelNames"), ("DNS-SERVER-MIB", "dnsServOptCounterSelfReqRefusals"), ("DNS-SERVER-MIB", "dnsServOptCounterSelfReqUnparses"), ("DNS-SERVER-MIB", "dnsServOptCounterSelfOtherErrors"), ("DNS-SERVER-MIB", "dnsServOptCounterFriendsAuthAns"), ("DNS-SERVER-MIB", "dnsServOptCounterFriendsAuthNoNames"), ("DNS-SERVER-MIB", "dnsServOptCounterFriendsAuthNoDataResps"), ("DNS-SERVER-MIB", "dnsServOptCounterFriendsNonAuthDatas"), ("DNS-SERVER-MIB", "dnsServOptCounterFriendsNonAuthNoDatas"), ("DNS-SERVER-MIB", "dnsServOptCounterFriendsReferrals"), ("DNS-SERVER-MIB", "dnsServOptCounterFriendsErrors"), ("DNS-SERVER-MIB", "dnsServOptCounterFriendsRelNames"), ("DNS-SERVER-MIB", "dnsServOptCounterFriendsReqRefusals"), ("DNS-SERVER-MIB", "dnsServOptCounterFriendsReqUnparses"), ("DNS-SERVER-MIB", "dnsServOptCounterFriendsOtherErrors"),)) if mibBuilder.loadTexts: dnsServOptCounterGroup.setDescription('A collection of objects providing extended\n instrumentation of a DNS name server.') dnsServZoneGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 32, 1, 2, 4)).setObjects(*(("DNS-SERVER-MIB", "dnsServZoneName"), ("DNS-SERVER-MIB", "dnsServZoneClass"), ("DNS-SERVER-MIB", "dnsServZoneLastReloadSuccess"), ("DNS-SERVER-MIB", "dnsServZoneLastReloadAttempt"), ("DNS-SERVER-MIB", "dnsServZoneLastSourceAttempt"), ("DNS-SERVER-MIB", "dnsServZoneLastSourceSuccess"), ("DNS-SERVER-MIB", "dnsServZoneStatus"), ("DNS-SERVER-MIB", "dnsServZoneSerial"), ("DNS-SERVER-MIB", "dnsServZoneCurrent"), ("DNS-SERVER-MIB", "dnsServZoneSrcName"), ("DNS-SERVER-MIB", "dnsServZoneSrcClass"), ("DNS-SERVER-MIB", "dnsServZoneSrcAddr"), ("DNS-SERVER-MIB", "dnsServZoneSrcStatus"),)) if mibBuilder.loadTexts: dnsServZoneGroup.setDescription('A collection of objects providing configuration control\n of a DNS name server which loads authoritative zones.') dnsServMIBCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 32, 1, 3)) dnsServMIBCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 32, 1, 3, 1)).setObjects(*(("DNS-SERVER-MIB", "dnsServConfigGroup"), ("DNS-SERVER-MIB", "dnsServCounterGroup"), ("DNS-SERVER-MIB", "dnsServOptCounterGroup"), ("DNS-SERVER-MIB", "dnsServZoneGroup"),)) if mibBuilder.loadTexts: dnsServMIBCompliance.setDescription('The compliance statement for agents implementing the DNS\n name server MIB extensions.') mibBuilder.exportSymbols("DNS-SERVER-MIB", dnsServOptCounterSelfAuthNoDataResps=dnsServOptCounterSelfAuthNoDataResps, dnsServMIBCompliances=dnsServMIBCompliances, dnsServOptCounterSelfAuthNoNames=dnsServOptCounterSelfAuthNoNames, dnsServOptCounterSelfReqUnparses=dnsServOptCounterSelfReqUnparses, dnsServConfig=dnsServConfig, dnsServCounterReqUnparses=dnsServCounterReqUnparses, dnsServOptCounterSelfRelNames=dnsServOptCounterSelfRelNames, DnsName=DnsName, dnsServConfigRecurs=dnsServConfigRecurs, dnsServCounterTable=dnsServCounterTable, dnsServCounterOtherErrors=dnsServCounterOtherErrors, dnsServOptCounterFriendsRelNames=dnsServOptCounterFriendsRelNames, dnsServOptCounterSelfNonAuthNoDatas=dnsServOptCounterSelfNonAuthNoDatas, dnsServZoneEntry=dnsServZoneEntry, dnsServOptCounterGroup=dnsServOptCounterGroup, dnsServCounterReqRefusals=dnsServCounterReqRefusals, dnsServZoneSrcEntry=dnsServZoneSrcEntry, DnsType=DnsType, dnsServZoneLastSourceAttempt=dnsServZoneLastSourceAttempt, dnsServCounter=dnsServCounter, dnsServCounterAuthAns=dnsServCounterAuthAns, dnsServCounterEntry=dnsServCounterEntry, dnsServZoneLastReloadSuccess=dnsServZoneLastReloadSuccess, dnsServZoneLastReloadAttempt=dnsServZoneLastReloadAttempt, dnsServCounterOpCode=dnsServCounterOpCode, dnsServZone=dnsServZone, dnsServConfigReset=dnsServConfigReset, dnsServOptCounterFriendsOtherErrors=dnsServOptCounterFriendsOtherErrors, dnsServZoneTable=dnsServZoneTable, DnsClass=DnsClass, dnsServCounterRelNames=dnsServCounterRelNames, dnsServConfigGroup=dnsServConfigGroup, dnsServCounterAuthNoDataResps=dnsServCounterAuthNoDataResps, dnsServCounterQClass=dnsServCounterQClass, dnsServZoneStatus=dnsServZoneStatus, dnsServMIB=dnsServMIB, PYSNMP_MODULE_ID=dnsServMIB, dnsServMIBObjects=dnsServMIBObjects, dnsServCounterReferrals=dnsServCounterReferrals, DnsQClass=DnsQClass, dnsServZoneSrcClass=dnsServZoneSrcClass, dnsServMIBGroups=dnsServMIBGroups, dnsServOptCounterSelfAuthAns=dnsServOptCounterSelfAuthAns, dnsServOptCounter=dnsServOptCounter, DnsOpCode=DnsOpCode, dnsServOptCounterFriendsNonAuthNoDatas=dnsServOptCounterFriendsNonAuthNoDatas, dnsServMIBCompliance=dnsServMIBCompliance, dnsServCounterRequests=dnsServCounterRequests, dnsServOptCounterSelfReferrals=dnsServOptCounterSelfReferrals, dnsServZoneSrcAddr=dnsServZoneSrcAddr, dns=dns, dnsServCounterNonAuthDatas=dnsServCounterNonAuthDatas, dnsServZoneCurrent=dnsServZoneCurrent, dnsServConfigResetTime=dnsServConfigResetTime, dnsServCounterErrors=dnsServCounterErrors, dnsServCounterQType=dnsServCounterQType, dnsServZoneSrcStatus=dnsServZoneSrcStatus, dnsServOptCounterFriendsAuthAns=dnsServOptCounterFriendsAuthAns, dnsServZoneGroup=dnsServZoneGroup, dnsServOptCounterFriendsNonAuthDatas=dnsServOptCounterFriendsNonAuthDatas, DnsQType=DnsQType, DnsRespCode=DnsRespCode, dnsServZoneClass=dnsServZoneClass, dnsServCounterNonAuthNoDatas=dnsServCounterNonAuthNoDatas, dnsServOptCounterSelfNonAuthDatas=dnsServOptCounterSelfNonAuthDatas, dnsServOptCounterFriendsErrors=dnsServOptCounterFriendsErrors, dnsServCounterResponses=dnsServCounterResponses, DnsNameAsIndex=DnsNameAsIndex, dnsServOptCounterFriendsReqRefusals=dnsServOptCounterFriendsReqRefusals, dnsServCounterGroup=dnsServCounterGroup, dnsServOptCounterSelfReqRefusals=dnsServOptCounterSelfReqRefusals, dnsServZoneLastSourceSuccess=dnsServZoneLastSourceSuccess, dnsServOptCounterSelfErrors=dnsServOptCounterSelfErrors, dnsServCounterTransport=dnsServCounterTransport, dnsServCounterAuthNoNames=dnsServCounterAuthNoNames, dnsServOptCounterSelfOtherErrors=dnsServOptCounterSelfOtherErrors, dnsServConfigUpTime=dnsServConfigUpTime, DnsTime=DnsTime, dnsServOptCounterFriendsAuthNoDataResps=dnsServOptCounterFriendsAuthNoDataResps, dnsServOptCounterFriendsReferrals=dnsServOptCounterFriendsReferrals, dnsServZoneName=dnsServZoneName, dnsServZoneSrcName=dnsServZoneSrcName, dnsServOptCounterFriendsAuthNoNames=dnsServOptCounterFriendsAuthNoNames, dnsServZoneSrcTable=dnsServZoneSrcTable, dnsServZoneSerial=dnsServZoneSerial, dnsServConfigImplementIdent=dnsServConfigImplementIdent, dnsServOptCounterFriendsReqUnparses=dnsServOptCounterFriendsReqUnparses)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, value_size_constraint, single_value_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ConstraintsIntersection') (notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance') (ip_address, iso, counter32, object_identity, bits, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, notification_type, unsigned32, mib_2, integer32, gauge32, module_identity, time_ticks, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'iso', 'Counter32', 'ObjectIdentity', 'Bits', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'NotificationType', 'Unsigned32', 'mib-2', 'Integer32', 'Gauge32', 'ModuleIdentity', 'TimeTicks', 'MibIdentifier') (truth_value, textual_convention, row_status, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'TextualConvention', 'RowStatus', 'DisplayString') dns = object_identity((1, 3, 6, 1, 2, 1, 32)) if mibBuilder.loadTexts: dns.setDescription('The OID assigned to DNS MIB work by the IANA.') dns_serv_mib = module_identity((1, 3, 6, 1, 2, 1, 32, 1)) if mibBuilder.loadTexts: dnsServMIB.setLastUpdated('9401282251Z') if mibBuilder.loadTexts: dnsServMIB.setOrganization('IETF DNS Working Group') if mibBuilder.loadTexts: dnsServMIB.setContactInfo(' Rob Austein\n Postal: Epilogue Technology Corporation\n 268 Main Street, Suite 283\n North Reading, MA 10864\n US\n Tel: +1 617 245 0804\n Fax: +1 617 245 8122\n E-Mail: sra@epilogue.com\n\n Jon Saperia\n Postal: Digital Equipment Corporation\n 110 Spit Brook Road\n ZKO1-3/H18\n Nashua, NH 03062-2698\n US\n Tel: +1 603 881 0480\n Fax: +1 603 881 0120\n Email: saperia@zko.dec.com') if mibBuilder.loadTexts: dnsServMIB.setDescription('The MIB module for entities implementing the server side\n of the Domain Name System (DNS) protocol.') dns_serv_mib_objects = mib_identifier((1, 3, 6, 1, 2, 1, 32, 1, 1)) dns_serv_config = mib_identifier((1, 3, 6, 1, 2, 1, 32, 1, 1, 1)) dns_serv_counter = mib_identifier((1, 3, 6, 1, 2, 1, 32, 1, 1, 2)) dns_serv_opt_counter = mib_identifier((1, 3, 6, 1, 2, 1, 32, 1, 1, 3)) dns_serv_zone = mib_identifier((1, 3, 6, 1, 2, 1, 32, 1, 1, 4)) class Dnsname(OctetString, TextualConvention): subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 255) class Dnsnameasindex(DnsName, TextualConvention): pass class Dnsclass(Integer32, TextualConvention): display_hint = '2d' subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 65535) class Dnstype(Integer32, TextualConvention): display_hint = '2d' subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 65535) class Dnsqclass(Integer32, TextualConvention): display_hint = '2d' subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 65535) class Dnsqtype(Integer32, TextualConvention): display_hint = '2d' subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 65535) class Dnstime(Gauge32, TextualConvention): display_hint = '4d' class Dnsopcode(Integer32, TextualConvention): subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 15) class Dnsrespcode(Integer32, TextualConvention): subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 15) dns_serv_config_implement_ident = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 1, 1), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServConfigImplementIdent.setDescription("The implementation identification string for the DNS\n server software in use on the system, for example;\n `FNS-2.1'") dns_serv_config_recurs = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('available', 1), ('restricted', 2), ('unavailable', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dnsServConfigRecurs.setDescription('This represents the recursion services offered by this\n name server. The values that can be read or written\n are:\n\n available(1) - performs recursion on requests from\n clients.\n\n restricted(2) - recursion is performed on requests only\n from certain clients, for example; clients on an access\n control list.\n\n unavailable(3) - recursion is not available.') dns_serv_config_up_time = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 1, 3), dns_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServConfigUpTime.setDescription('If the server has a persistent state (e.g., a process),\n this value will be the time elapsed since it started.\n For software without persistant state, this value will\n be zero.') dns_serv_config_reset_time = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 1, 4), dns_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServConfigResetTime.setDescription("If the server has a persistent state (e.g., a process)\n and supports a `reset' operation (e.g., can be told to\n re-read configuration files), this value will be the\n time elapsed since the last time the name server was\n `reset.' For software that does not have persistence or\n does not support a `reset' operation, this value will be\n zero.") dns_serv_config_reset = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('reset', 2), ('initializing', 3), ('running', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dnsServConfigReset.setDescription('Status/action object to reinitialize any persistant name\n server state. When set to reset(2), any persistant\n name server state (such as a process) is reinitialized as\n if the name server had just been started. This value\n will never be returned by a read operation. When read,\n one of the following values will be returned:\n other(1) - server in some unknown state;\n initializing(3) - server (re)initializing;\n running(4) - server currently running.') dns_serv_counter_auth_ans = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterAuthAns.setDescription('Number of queries which were authoritatively answered.') dns_serv_counter_auth_no_names = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterAuthNoNames.setDescription("Number of queries for which `authoritative no such name'\n responses were made.") dns_serv_counter_auth_no_data_resps = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterAuthNoDataResps.setDescription("Number of queries for which `authoritative no such data'\n (empty answer) responses were made.") dns_serv_counter_non_auth_datas = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterNonAuthDatas.setDescription('Number of queries which were non-authoritatively\n answered (cached data).') dns_serv_counter_non_auth_no_datas = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterNonAuthNoDatas.setDescription('Number of queries which were non-authoritatively\n answered with no data (empty answer).') dns_serv_counter_referrals = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterReferrals.setDescription('Number of requests that were referred to other servers.') dns_serv_counter_errors = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterErrors.setDescription('Number of requests the server has processed that were\n answered with errors (RCODE values other than 0 and 3).') dns_serv_counter_rel_names = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterRelNames.setDescription('Number of requests received by the server for names that\n are only 1 label long (text form - no internal dots).') dns_serv_counter_req_refusals = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterReqRefusals.setDescription('Number of DNS requests refused by the server.') dns_serv_counter_req_unparses = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterReqUnparses.setDescription('Number of requests received which were unparseable.') dns_serv_counter_other_errors = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterOtherErrors.setDescription('Number of requests which were aborted for other (local)\n server errors.') dns_serv_counter_table = mib_table((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13)) if mibBuilder.loadTexts: dnsServCounterTable.setDescription('Counter information broken down by DNS class and type.') dns_serv_counter_entry = mib_table_row((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1)).setIndexNames((0, 'DNS-SERVER-MIB', 'dnsServCounterOpCode'), (0, 'DNS-SERVER-MIB', 'dnsServCounterQClass'), (0, 'DNS-SERVER-MIB', 'dnsServCounterQType'), (0, 'DNS-SERVER-MIB', 'dnsServCounterTransport')) if mibBuilder.loadTexts: dnsServCounterEntry.setDescription("This table contains count information for each DNS class\n and type value known to the server. The index allows\n management software to to create indices to the table to\n get the specific information desired, e.g., number of\n queries over UDP for records with type value `A' which\n came to this server. In order to prevent an\n uncontrolled expansion of rows in the table; if\n dnsServCounterRequests is 0 and dnsServCounterResponses\n is 0, then the row does not exist and `no such' is\n returned when the agent is queried for such instances.") dns_serv_counter_op_code = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1, 1), dns_op_code()) if mibBuilder.loadTexts: dnsServCounterOpCode.setDescription('The DNS OPCODE being counted in this row of the table.') dns_serv_counter_q_class = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1, 2), dns_class()) if mibBuilder.loadTexts: dnsServCounterQClass.setDescription('The class of record being counted in this row of the\n table.') dns_serv_counter_q_type = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1, 3), dns_type()) if mibBuilder.loadTexts: dnsServCounterQType.setDescription('The type of record which is being counted in this row in\n the table.') dns_serv_counter_transport = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('udp', 1), ('tcp', 2), ('other', 3)))) if mibBuilder.loadTexts: dnsServCounterTransport.setDescription('A value of udp(1) indicates that the queries reported on\n this row were sent using UDP.\n\n A value of tcp(2) indicates that the queries reported on\n this row were sent using TCP.\n\n A value of other(3) indicates that the queries reported\n on this row were sent using a transport that was neither\n TCP nor UDP.') dns_serv_counter_requests = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterRequests.setDescription('Number of requests (queries) that have been recorded in\n this row of the table.') dns_serv_counter_responses = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 2, 13, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServCounterResponses.setDescription('Number of responses made by the server since\n initialization for the kind of query identified on this\n row of the table.') dns_serv_opt_counter_self_auth_ans = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterSelfAuthAns.setDescription('Number of requests the server has processed which\n originated from a resolver on the same host for which\n there has been an authoritative answer.') dns_serv_opt_counter_self_auth_no_names = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterSelfAuthNoNames.setDescription('Number of requests the server has processed which\n originated from a resolver on the same host for which\n there has been an authoritative no such name answer\n given.') dns_serv_opt_counter_self_auth_no_data_resps = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterSelfAuthNoDataResps.setDescription('Number of requests the server has processed which\n originated from a resolver on the same host for which\n there has been an authoritative no such data answer\n (empty answer) made.') dns_serv_opt_counter_self_non_auth_datas = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterSelfNonAuthDatas.setDescription('Number of requests the server has processed which\n originated from a resolver on the same host for which a\n non-authoritative answer (cached data) was made.') dns_serv_opt_counter_self_non_auth_no_datas = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterSelfNonAuthNoDatas.setDescription("Number of requests the server has processed which\n originated from a resolver on the same host for which a\n `non-authoritative, no such data' response was made\n (empty answer).") dns_serv_opt_counter_self_referrals = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterSelfReferrals.setDescription('Number of queries the server has processed which\n originated from a resolver on the same host and were\n referred to other servers.') dns_serv_opt_counter_self_errors = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterSelfErrors.setDescription('Number of requests the server has processed which\n originated from a resolver on the same host which have\n been answered with errors (RCODEs other than 0 and 3).') dns_serv_opt_counter_self_rel_names = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterSelfRelNames.setDescription('Number of requests received for names that are only 1\n label long (text form - no internal dots) the server has\n processed which originated from a resolver on the same\n host.') dns_serv_opt_counter_self_req_refusals = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterSelfReqRefusals.setDescription('Number of DNS requests refused by the server which\n originated from a resolver on the same host.') dns_serv_opt_counter_self_req_unparses = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterSelfReqUnparses.setDescription('Number of requests received which were unparseable and\n which originated from a resolver on the same host.') dns_serv_opt_counter_self_other_errors = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterSelfOtherErrors.setDescription('Number of requests which were aborted for other (local)\n server errors and which originated on the same host.') dns_serv_opt_counter_friends_auth_ans = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterFriendsAuthAns.setDescription('Number of queries originating from friends which were\n authoritatively answered. The definition of friends is\n a locally defined matter.') dns_serv_opt_counter_friends_auth_no_names = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterFriendsAuthNoNames.setDescription("Number of queries originating from friends, for which\n authoritative `no such name' responses were made. The\n definition of friends is a locally defined matter.") dns_serv_opt_counter_friends_auth_no_data_resps = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterFriendsAuthNoDataResps.setDescription('Number of queries originating from friends for which\n authoritative no such data (empty answer) responses were\n made. The definition of friends is a locally defined\n matter.') dns_serv_opt_counter_friends_non_auth_datas = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterFriendsNonAuthDatas.setDescription('Number of queries originating from friends which were\n non-authoritatively answered (cached data). The\n definition of friends is a locally defined matter.') dns_serv_opt_counter_friends_non_auth_no_datas = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterFriendsNonAuthNoDatas.setDescription('Number of queries originating from friends which were\n non-authoritatively answered with no such data (empty\n answer).') dns_serv_opt_counter_friends_referrals = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterFriendsReferrals.setDescription('Number of requests which originated from friends that\n were referred to other servers. The definition of\n friends is a locally defined matter.') dns_serv_opt_counter_friends_errors = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterFriendsErrors.setDescription('Number of requests the server has processed which\n originated from friends and were answered with errors\n (RCODE values other than 0 and 3). The definition of\n friends is a locally defined matter.') dns_serv_opt_counter_friends_rel_names = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterFriendsRelNames.setDescription('Number of requests received for names from friends that\n are only 1 label long (text form - no internal dots) the\n server has processed.') dns_serv_opt_counter_friends_req_refusals = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterFriendsReqRefusals.setDescription("Number of DNS requests refused by the server which were\n received from `friends'.") dns_serv_opt_counter_friends_req_unparses = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 21), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterFriendsReqUnparses.setDescription("Number of requests received which were unparseable and\n which originated from `friends'.") dns_serv_opt_counter_friends_other_errors = mib_scalar((1, 3, 6, 1, 2, 1, 32, 1, 1, 3, 22), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServOptCounterFriendsOtherErrors.setDescription("Number of requests which were aborted for other (local)\n server errors and which originated from `friends'.") dns_serv_zone_table = mib_table((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1)) if mibBuilder.loadTexts: dnsServZoneTable.setDescription("Table of zones for which this name server provides\n information. Each of the zones may be loaded from stable\n storage via an implementation-specific mechanism or may\n be obtained from another name server via a zone transfer.\n\n If name server doesn't load any zones, this table is\n empty.") dns_serv_zone_entry = mib_table_row((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1)).setIndexNames((0, 'DNS-SERVER-MIB', 'dnsServZoneName'), (0, 'DNS-SERVER-MIB', 'dnsServZoneClass')) if mibBuilder.loadTexts: dnsServZoneEntry.setDescription('An entry in the name server zone table. New rows may be\n added either via SNMP or by the name server itself.') dns_serv_zone_name = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 1), dns_name_as_index()) if mibBuilder.loadTexts: dnsServZoneName.setDescription("DNS name of the zone described by this row of the table.\n This is the owner name of the SOA RR that defines the\n top of the zone. This is name is in uppercase:\n characters 'a' through 'z' are mapped to 'A' through 'Z'\n in order to make the lexical ordering useful.") dns_serv_zone_class = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 2), dns_class()) if mibBuilder.loadTexts: dnsServZoneClass.setDescription('DNS class of the RRs in this zone.') dns_serv_zone_last_reload_success = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 3), dns_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServZoneLastReloadSuccess.setDescription('Elapsed time in seconds since last successful reload of\n this zone.') dns_serv_zone_last_reload_attempt = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 4), dns_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServZoneLastReloadAttempt.setDescription('Elapsed time in seconds since last attempted reload of\n this zone.') dns_serv_zone_last_source_attempt = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 5), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServZoneLastSourceAttempt.setDescription('IP address of host from which most recent zone transfer\n of this zone was attempted. This value should match the\n value of dnsServZoneSourceSuccess if the attempt was\n succcessful. If zone transfer has not been attempted\n within the memory of this name server, this value should\n be 0.0.0.0.') dns_serv_zone_status = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 6), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dnsServZoneStatus.setDescription('The status of the information represented in this row of\n the table.') dns_serv_zone_serial = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServZoneSerial.setDescription('Zone serial number (from the SOA RR) of the zone\n represented by this row of the table. If the zone has\n not been successfully loaded within the memory of this\n name server, the value of this variable is zero.') dns_serv_zone_current = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 8), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServZoneCurrent.setDescription("Whether the server's copy of the zone represented by\n this row of the table is currently valid. If the zone\n has never been successfully loaded or has expired since\n it was last succesfully loaded, this variable will have\n the value false(2), otherwise this variable will have\n the value true(1).") dns_serv_zone_last_source_success = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 1, 1, 9), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: dnsServZoneLastSourceSuccess.setDescription('IP address of host which was the source of the most\n recent successful zone transfer for this zone. If\n unknown (e.g., zone has never been successfully\n transfered) or irrelevant (e.g., zone was loaded from\n stable storage), this value should be 0.0.0.0.') dns_serv_zone_src_table = mib_table((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 2)) if mibBuilder.loadTexts: dnsServZoneSrcTable.setDescription('This table is a list of IP addresses from which the\n server will attempt to load zone information using DNS\n zone transfer operations. A reload may occur due to SNMP\n operations that create a row in dnsServZoneTable or a\n SET to object dnsServZoneReload. This table is only\n used when the zone is loaded via zone transfer.') dns_serv_zone_src_entry = mib_table_row((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 2, 1)).setIndexNames((0, 'DNS-SERVER-MIB', 'dnsServZoneSrcName'), (0, 'DNS-SERVER-MIB', 'dnsServZoneSrcClass'), (0, 'DNS-SERVER-MIB', 'dnsServZoneSrcAddr')) if mibBuilder.loadTexts: dnsServZoneSrcEntry.setDescription('An entry in the name server zone source table.') dns_serv_zone_src_name = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 2, 1, 1), dns_name_as_index()) if mibBuilder.loadTexts: dnsServZoneSrcName.setDescription('DNS name of the zone to which this entry applies.') dns_serv_zone_src_class = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 2, 1, 2), dns_class()) if mibBuilder.loadTexts: dnsServZoneSrcClass.setDescription('DNS class of zone to which this entry applies.') dns_serv_zone_src_addr = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 2, 1, 3), ip_address()) if mibBuilder.loadTexts: dnsServZoneSrcAddr.setDescription('IP address of name server host from which this zone\n might be obtainable.') dns_serv_zone_src_status = mib_table_column((1, 3, 6, 1, 2, 1, 32, 1, 1, 4, 2, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: dnsServZoneSrcStatus.setDescription('The status of the information represented in this row of\n the table.') dns_serv_mib_groups = mib_identifier((1, 3, 6, 1, 2, 1, 32, 1, 2)) dns_serv_config_group = object_group((1, 3, 6, 1, 2, 1, 32, 1, 2, 1)).setObjects(*(('DNS-SERVER-MIB', 'dnsServConfigImplementIdent'), ('DNS-SERVER-MIB', 'dnsServConfigRecurs'), ('DNS-SERVER-MIB', 'dnsServConfigUpTime'), ('DNS-SERVER-MIB', 'dnsServConfigResetTime'), ('DNS-SERVER-MIB', 'dnsServConfigReset'))) if mibBuilder.loadTexts: dnsServConfigGroup.setDescription('A collection of objects providing basic configuration\n control of a DNS name server.') dns_serv_counter_group = object_group((1, 3, 6, 1, 2, 1, 32, 1, 2, 2)).setObjects(*(('DNS-SERVER-MIB', 'dnsServCounterAuthAns'), ('DNS-SERVER-MIB', 'dnsServCounterAuthNoNames'), ('DNS-SERVER-MIB', 'dnsServCounterAuthNoDataResps'), ('DNS-SERVER-MIB', 'dnsServCounterNonAuthDatas'), ('DNS-SERVER-MIB', 'dnsServCounterNonAuthNoDatas'), ('DNS-SERVER-MIB', 'dnsServCounterReferrals'), ('DNS-SERVER-MIB', 'dnsServCounterErrors'), ('DNS-SERVER-MIB', 'dnsServCounterRelNames'), ('DNS-SERVER-MIB', 'dnsServCounterReqRefusals'), ('DNS-SERVER-MIB', 'dnsServCounterReqUnparses'), ('DNS-SERVER-MIB', 'dnsServCounterOtherErrors'), ('DNS-SERVER-MIB', 'dnsServCounterOpCode'), ('DNS-SERVER-MIB', 'dnsServCounterQClass'), ('DNS-SERVER-MIB', 'dnsServCounterQType'), ('DNS-SERVER-MIB', 'dnsServCounterTransport'), ('DNS-SERVER-MIB', 'dnsServCounterRequests'), ('DNS-SERVER-MIB', 'dnsServCounterResponses'))) if mibBuilder.loadTexts: dnsServCounterGroup.setDescription('A collection of objects providing basic instrumentation\n of a DNS name server.') dns_serv_opt_counter_group = object_group((1, 3, 6, 1, 2, 1, 32, 1, 2, 3)).setObjects(*(('DNS-SERVER-MIB', 'dnsServOptCounterSelfAuthAns'), ('DNS-SERVER-MIB', 'dnsServOptCounterSelfAuthNoNames'), ('DNS-SERVER-MIB', 'dnsServOptCounterSelfAuthNoDataResps'), ('DNS-SERVER-MIB', 'dnsServOptCounterSelfNonAuthDatas'), ('DNS-SERVER-MIB', 'dnsServOptCounterSelfNonAuthNoDatas'), ('DNS-SERVER-MIB', 'dnsServOptCounterSelfReferrals'), ('DNS-SERVER-MIB', 'dnsServOptCounterSelfErrors'), ('DNS-SERVER-MIB', 'dnsServOptCounterSelfRelNames'), ('DNS-SERVER-MIB', 'dnsServOptCounterSelfReqRefusals'), ('DNS-SERVER-MIB', 'dnsServOptCounterSelfReqUnparses'), ('DNS-SERVER-MIB', 'dnsServOptCounterSelfOtherErrors'), ('DNS-SERVER-MIB', 'dnsServOptCounterFriendsAuthAns'), ('DNS-SERVER-MIB', 'dnsServOptCounterFriendsAuthNoNames'), ('DNS-SERVER-MIB', 'dnsServOptCounterFriendsAuthNoDataResps'), ('DNS-SERVER-MIB', 'dnsServOptCounterFriendsNonAuthDatas'), ('DNS-SERVER-MIB', 'dnsServOptCounterFriendsNonAuthNoDatas'), ('DNS-SERVER-MIB', 'dnsServOptCounterFriendsReferrals'), ('DNS-SERVER-MIB', 'dnsServOptCounterFriendsErrors'), ('DNS-SERVER-MIB', 'dnsServOptCounterFriendsRelNames'), ('DNS-SERVER-MIB', 'dnsServOptCounterFriendsReqRefusals'), ('DNS-SERVER-MIB', 'dnsServOptCounterFriendsReqUnparses'), ('DNS-SERVER-MIB', 'dnsServOptCounterFriendsOtherErrors'))) if mibBuilder.loadTexts: dnsServOptCounterGroup.setDescription('A collection of objects providing extended\n instrumentation of a DNS name server.') dns_serv_zone_group = object_group((1, 3, 6, 1, 2, 1, 32, 1, 2, 4)).setObjects(*(('DNS-SERVER-MIB', 'dnsServZoneName'), ('DNS-SERVER-MIB', 'dnsServZoneClass'), ('DNS-SERVER-MIB', 'dnsServZoneLastReloadSuccess'), ('DNS-SERVER-MIB', 'dnsServZoneLastReloadAttempt'), ('DNS-SERVER-MIB', 'dnsServZoneLastSourceAttempt'), ('DNS-SERVER-MIB', 'dnsServZoneLastSourceSuccess'), ('DNS-SERVER-MIB', 'dnsServZoneStatus'), ('DNS-SERVER-MIB', 'dnsServZoneSerial'), ('DNS-SERVER-MIB', 'dnsServZoneCurrent'), ('DNS-SERVER-MIB', 'dnsServZoneSrcName'), ('DNS-SERVER-MIB', 'dnsServZoneSrcClass'), ('DNS-SERVER-MIB', 'dnsServZoneSrcAddr'), ('DNS-SERVER-MIB', 'dnsServZoneSrcStatus'))) if mibBuilder.loadTexts: dnsServZoneGroup.setDescription('A collection of objects providing configuration control\n of a DNS name server which loads authoritative zones.') dns_serv_mib_compliances = mib_identifier((1, 3, 6, 1, 2, 1, 32, 1, 3)) dns_serv_mib_compliance = module_compliance((1, 3, 6, 1, 2, 1, 32, 1, 3, 1)).setObjects(*(('DNS-SERVER-MIB', 'dnsServConfigGroup'), ('DNS-SERVER-MIB', 'dnsServCounterGroup'), ('DNS-SERVER-MIB', 'dnsServOptCounterGroup'), ('DNS-SERVER-MIB', 'dnsServZoneGroup'))) if mibBuilder.loadTexts: dnsServMIBCompliance.setDescription('The compliance statement for agents implementing the DNS\n name server MIB extensions.') mibBuilder.exportSymbols('DNS-SERVER-MIB', dnsServOptCounterSelfAuthNoDataResps=dnsServOptCounterSelfAuthNoDataResps, dnsServMIBCompliances=dnsServMIBCompliances, dnsServOptCounterSelfAuthNoNames=dnsServOptCounterSelfAuthNoNames, dnsServOptCounterSelfReqUnparses=dnsServOptCounterSelfReqUnparses, dnsServConfig=dnsServConfig, dnsServCounterReqUnparses=dnsServCounterReqUnparses, dnsServOptCounterSelfRelNames=dnsServOptCounterSelfRelNames, DnsName=DnsName, dnsServConfigRecurs=dnsServConfigRecurs, dnsServCounterTable=dnsServCounterTable, dnsServCounterOtherErrors=dnsServCounterOtherErrors, dnsServOptCounterFriendsRelNames=dnsServOptCounterFriendsRelNames, dnsServOptCounterSelfNonAuthNoDatas=dnsServOptCounterSelfNonAuthNoDatas, dnsServZoneEntry=dnsServZoneEntry, dnsServOptCounterGroup=dnsServOptCounterGroup, dnsServCounterReqRefusals=dnsServCounterReqRefusals, dnsServZoneSrcEntry=dnsServZoneSrcEntry, DnsType=DnsType, dnsServZoneLastSourceAttempt=dnsServZoneLastSourceAttempt, dnsServCounter=dnsServCounter, dnsServCounterAuthAns=dnsServCounterAuthAns, dnsServCounterEntry=dnsServCounterEntry, dnsServZoneLastReloadSuccess=dnsServZoneLastReloadSuccess, dnsServZoneLastReloadAttempt=dnsServZoneLastReloadAttempt, dnsServCounterOpCode=dnsServCounterOpCode, dnsServZone=dnsServZone, dnsServConfigReset=dnsServConfigReset, dnsServOptCounterFriendsOtherErrors=dnsServOptCounterFriendsOtherErrors, dnsServZoneTable=dnsServZoneTable, DnsClass=DnsClass, dnsServCounterRelNames=dnsServCounterRelNames, dnsServConfigGroup=dnsServConfigGroup, dnsServCounterAuthNoDataResps=dnsServCounterAuthNoDataResps, dnsServCounterQClass=dnsServCounterQClass, dnsServZoneStatus=dnsServZoneStatus, dnsServMIB=dnsServMIB, PYSNMP_MODULE_ID=dnsServMIB, dnsServMIBObjects=dnsServMIBObjects, dnsServCounterReferrals=dnsServCounterReferrals, DnsQClass=DnsQClass, dnsServZoneSrcClass=dnsServZoneSrcClass, dnsServMIBGroups=dnsServMIBGroups, dnsServOptCounterSelfAuthAns=dnsServOptCounterSelfAuthAns, dnsServOptCounter=dnsServOptCounter, DnsOpCode=DnsOpCode, dnsServOptCounterFriendsNonAuthNoDatas=dnsServOptCounterFriendsNonAuthNoDatas, dnsServMIBCompliance=dnsServMIBCompliance, dnsServCounterRequests=dnsServCounterRequests, dnsServOptCounterSelfReferrals=dnsServOptCounterSelfReferrals, dnsServZoneSrcAddr=dnsServZoneSrcAddr, dns=dns, dnsServCounterNonAuthDatas=dnsServCounterNonAuthDatas, dnsServZoneCurrent=dnsServZoneCurrent, dnsServConfigResetTime=dnsServConfigResetTime, dnsServCounterErrors=dnsServCounterErrors, dnsServCounterQType=dnsServCounterQType, dnsServZoneSrcStatus=dnsServZoneSrcStatus, dnsServOptCounterFriendsAuthAns=dnsServOptCounterFriendsAuthAns, dnsServZoneGroup=dnsServZoneGroup, dnsServOptCounterFriendsNonAuthDatas=dnsServOptCounterFriendsNonAuthDatas, DnsQType=DnsQType, DnsRespCode=DnsRespCode, dnsServZoneClass=dnsServZoneClass, dnsServCounterNonAuthNoDatas=dnsServCounterNonAuthNoDatas, dnsServOptCounterSelfNonAuthDatas=dnsServOptCounterSelfNonAuthDatas, dnsServOptCounterFriendsErrors=dnsServOptCounterFriendsErrors, dnsServCounterResponses=dnsServCounterResponses, DnsNameAsIndex=DnsNameAsIndex, dnsServOptCounterFriendsReqRefusals=dnsServOptCounterFriendsReqRefusals, dnsServCounterGroup=dnsServCounterGroup, dnsServOptCounterSelfReqRefusals=dnsServOptCounterSelfReqRefusals, dnsServZoneLastSourceSuccess=dnsServZoneLastSourceSuccess, dnsServOptCounterSelfErrors=dnsServOptCounterSelfErrors, dnsServCounterTransport=dnsServCounterTransport, dnsServCounterAuthNoNames=dnsServCounterAuthNoNames, dnsServOptCounterSelfOtherErrors=dnsServOptCounterSelfOtherErrors, dnsServConfigUpTime=dnsServConfigUpTime, DnsTime=DnsTime, dnsServOptCounterFriendsAuthNoDataResps=dnsServOptCounterFriendsAuthNoDataResps, dnsServOptCounterFriendsReferrals=dnsServOptCounterFriendsReferrals, dnsServZoneName=dnsServZoneName, dnsServZoneSrcName=dnsServZoneSrcName, dnsServOptCounterFriendsAuthNoNames=dnsServOptCounterFriendsAuthNoNames, dnsServZoneSrcTable=dnsServZoneSrcTable, dnsServZoneSerial=dnsServZoneSerial, dnsServConfigImplementIdent=dnsServConfigImplementIdent, dnsServOptCounterFriendsReqUnparses=dnsServOptCounterFriendsReqUnparses)
#MAIN PROGRAM STARTS HERE: num = int(input('Enter the number of rows and columns for the square: ')) k = 1 for x in range(0, num ): for y in range(0, num): print ('%d ' % (k), end='') k += 2 print()
num = int(input('Enter the number of rows and columns for the square: ')) k = 1 for x in range(0, num): for y in range(0, num): print('%d ' % k, end='') k += 2 print()
class Point(object): def __init__(self, x, y): self.x, self.y = x, y class PointHash(object): def __init__(self, x, y): self.x, self.y = x, y def __hash__(self): return hash((self.x, self.y)) def __eq__(self, other): return self.x == other.x and self.y == other.y if __name__ == "__main__": print("Test with default hash function") p1 = Point(1, 1) p2 = Point(1, 1) points = set([p1, p2]) print("Contents of set([p1, p2]): ", points) print("Point(1, 1) in set([p1, p2]) = ", (Point(1, 1) in points)) print("Test with custom hash function") p1 = PointHash(1, 1) p2 = PointHash(1, 1) points = set([p1, p2]) print("Contents of set([p1, p2]): ", points) print("Point(1, 1) in set([p1, p2]) = ", (PointHash(1, 1) in points))
class Point(object): def __init__(self, x, y): (self.x, self.y) = (x, y) class Pointhash(object): def __init__(self, x, y): (self.x, self.y) = (x, y) def __hash__(self): return hash((self.x, self.y)) def __eq__(self, other): return self.x == other.x and self.y == other.y if __name__ == '__main__': print('Test with default hash function') p1 = point(1, 1) p2 = point(1, 1) points = set([p1, p2]) print('Contents of set([p1, p2]): ', points) print('Point(1, 1) in set([p1, p2]) = ', point(1, 1) in points) print('Test with custom hash function') p1 = point_hash(1, 1) p2 = point_hash(1, 1) points = set([p1, p2]) print('Contents of set([p1, p2]): ', points) print('Point(1, 1) in set([p1, p2]) = ', point_hash(1, 1) in points)
# -*- coding: utf-8 -*- # 18/1/30 # create by: snower version = "0.1.1" version_info = (0,1.1)
version = '0.1.1' version_info = (0, 1.1)
class Logger: PRINT_INTERVAL = 10 def __init__(self): self.buckets = [-1 for _ in range(self.PRINT_INTERVAL)] self.sets = [set() for _ in range(self.PRINT_INTERVAL)] def shouldPrintMessage(self, timestamp: int, message: str) -> bool: bucket_index = timestamp % self.PRINT_INTERVAL if self.buckets[bucket_index] != timestamp: self.sets[bucket_index].clear() self.buckets[bucket_index] = timestamp for i, bucket_timestamp in enumerate(self.buckets): if timestamp - bucket_timestamp < self.PRINT_INTERVAL: if message in self.sets[i]: return False self.sets[bucket_index].add(message) return True
class Logger: print_interval = 10 def __init__(self): self.buckets = [-1 for _ in range(self.PRINT_INTERVAL)] self.sets = [set() for _ in range(self.PRINT_INTERVAL)] def should_print_message(self, timestamp: int, message: str) -> bool: bucket_index = timestamp % self.PRINT_INTERVAL if self.buckets[bucket_index] != timestamp: self.sets[bucket_index].clear() self.buckets[bucket_index] = timestamp for (i, bucket_timestamp) in enumerate(self.buckets): if timestamp - bucket_timestamp < self.PRINT_INTERVAL: if message in self.sets[i]: return False self.sets[bucket_index].add(message) return True
#!/usr/bin/env python NAME = 'WebTotem (WebTotem)' def is_waf(self): for attack in self.attacks: r = attack(self) if r is None: return _, page = r # WebTotem returns its name in blockpage if all(i in page for i in (b'The current request was blocked', b'WebTotem')): return True return False
name = 'WebTotem (WebTotem)' def is_waf(self): for attack in self.attacks: r = attack(self) if r is None: return (_, page) = r if all((i in page for i in (b'The current request was blocked', b'WebTotem'))): return True return False
{ 'targets': [ { 'target_name': 'node_expat_object', 'sources': [ 'src/parse.cc', 'src/node-expat-object.cc' ], 'include_dirs': [ '<!(node -e "require(\'nan\')")' ], 'dependencies': [ 'deps/libexpat/libexpat.gyp:expat' ] } ] }
{'targets': [{'target_name': 'node_expat_object', 'sources': ['src/parse.cc', 'src/node-expat-object.cc'], 'include_dirs': ['<!(node -e "require(\'nan\')")'], 'dependencies': ['deps/libexpat/libexpat.gyp:expat']}]}
list = ['Apple','Orange','Benana','Mango']; name = "Md Tazri"; print('"Apple" in list : ',"Apple" in list); print('"Kiwi" in list : ',"Kiwi" in list); print('"Water" not in list : ',"Water" not in list); print("'Md' in name : ",'Md' in name); print("'Tazri' not in name : ",'Tazri' not in name);
list = ['Apple', 'Orange', 'Benana', 'Mango'] name = 'Md Tazri' print('"Apple" in list : ', 'Apple' in list) print('"Kiwi" in list : ', 'Kiwi' in list) print('"Water" not in list : ', 'Water' not in list) print("'Md' in name : ", 'Md' in name) print("'Tazri' not in name : ", 'Tazri' not in name)
class DiceLoss(nn.Module): def __init__(self, tolerance=1e-8): super(DiceLoss, self).__init__() self.tolerance = tolerance def forward(self, pred, label): intersection = torch.sum(pred * label) + self.tolerance union = torch.sum(pred) + torch.sum(label) + self.tolerance dice_loss = 1 - 2 * intersection / union return dice_loss class EnsembleLoss(nn.Module): def __init__(self, mask_loss, loss_func): super(EnsembleLoss, self).__init__() self.mask_loss = mask_loss self.loss_func = loss_func def forward(self, masks, ensemble_mask, mask): ensemble_loss = 0 num_backbones = len(masks) for i in range(num_backbones): ensemble_loss = ensemble_loss + self.mask_loss(masks[i], mask) / num_backbones ensemble_loss = 0.5 * ensemble_loss + 0.5 * self.loss_func(ensemble_mask, mask) return ensemble_loss
class Diceloss(nn.Module): def __init__(self, tolerance=1e-08): super(DiceLoss, self).__init__() self.tolerance = tolerance def forward(self, pred, label): intersection = torch.sum(pred * label) + self.tolerance union = torch.sum(pred) + torch.sum(label) + self.tolerance dice_loss = 1 - 2 * intersection / union return dice_loss class Ensembleloss(nn.Module): def __init__(self, mask_loss, loss_func): super(EnsembleLoss, self).__init__() self.mask_loss = mask_loss self.loss_func = loss_func def forward(self, masks, ensemble_mask, mask): ensemble_loss = 0 num_backbones = len(masks) for i in range(num_backbones): ensemble_loss = ensemble_loss + self.mask_loss(masks[i], mask) / num_backbones ensemble_loss = 0.5 * ensemble_loss + 0.5 * self.loss_func(ensemble_mask, mask) return ensemble_loss
# # This is the Robotics Language compiler # # Transformations.py: Applies tranformations to the XML structure # # Created on: June 22, 2017 # Author: Gabriel A. D. Lopes # Licence: Apache 2.0 # Copyright: 2014-2017 Robot Care Systems BV, The Hague, The Netherlands. 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. atoms = { 'string':'Strings', 'boolean':'Booleans', 'real':'Reals', 'integer':'Integers' } def manySameNumbersOrStrings(x): '''number or string''' return all(map(lambda y: y in ['Reals', 'Integers'], x)) or all(map(lambda y: y == 'Strings', x)) def singleString(x): '''string''' return len(x) == 1 and x[0] == 'Strings' def singleReal(x): '''real''' return len(x) == 1 and (x[0] == 'Reals' or x[0] == 'Integers') def singleBoolean(x): '''boolean''' return len(x) == 1 and x[0] == 'Booleans' def manyStrings(x): '''string , ... , string''' return [ xi == 'Strings' for xi in x ] def manyExpressions(x): '''expression , ... , expression''' return [True] def manyCodeBlocks(x): '''code block , ... , code block''' return [ xi == 'CodeBlock' for xi in x ] def returnNothing(x): '''nothing''' return 'Nothing' def returnCodeBlock(x): '''code block''' return 'CodeBlock' def returnSameArgumentType(x): return x[0]
atoms = {'string': 'Strings', 'boolean': 'Booleans', 'real': 'Reals', 'integer': 'Integers'} def many_same_numbers_or_strings(x): """number or string""" return all(map(lambda y: y in ['Reals', 'Integers'], x)) or all(map(lambda y: y == 'Strings', x)) def single_string(x): """string""" return len(x) == 1 and x[0] == 'Strings' def single_real(x): """real""" return len(x) == 1 and (x[0] == 'Reals' or x[0] == 'Integers') def single_boolean(x): """boolean""" return len(x) == 1 and x[0] == 'Booleans' def many_strings(x): """string , ... , string""" return [xi == 'Strings' for xi in x] def many_expressions(x): """expression , ... , expression""" return [True] def many_code_blocks(x): """code block , ... , code block""" return [xi == 'CodeBlock' for xi in x] def return_nothing(x): """nothing""" return 'Nothing' def return_code_block(x): """code block""" return 'CodeBlock' def return_same_argument_type(x): return x[0]
class Contact: def __init__(self, firstname, lastname, company, address, telephone, mobile, tel_work, email, email_1, www): self.firstname = firstname self.lastname = lastname self.company = company self.address = address self.telephone = telephone self.mobile = mobile self.tel_work = tel_work self.email = email self.email_1 = email_1 self.www = www
class Contact: def __init__(self, firstname, lastname, company, address, telephone, mobile, tel_work, email, email_1, www): self.firstname = firstname self.lastname = lastname self.company = company self.address = address self.telephone = telephone self.mobile = mobile self.tel_work = tel_work self.email = email self.email_1 = email_1 self.www = www
# coding: utf-8 def array_pad(l, size, value): if size >= 0: return l + [value] * (size - len(l)) else: return [value] * (size * -1 - len(l)) + l if __name__ == '__main__': l = [12, 10, 9] print(array_pad(l, 5, 0)) print(array_pad(l, -7, -1)) print(array_pad(l, 2, 999))
def array_pad(l, size, value): if size >= 0: return l + [value] * (size - len(l)) else: return [value] * (size * -1 - len(l)) + l if __name__ == '__main__': l = [12, 10, 9] print(array_pad(l, 5, 0)) print(array_pad(l, -7, -1)) print(array_pad(l, 2, 999))
k=int (input()) l=int (input()) m=int (input()) n=int (input()) d=int (input()) damagedDragons = 0 for i in range (1, d+1): if i%k == 0 or i%l == 0 or i%m == 0 or i%n == 0: damagedDragons = damagedDragons + 1 print(damagedDragons)
k = int(input()) l = int(input()) m = int(input()) n = int(input()) d = int(input()) damaged_dragons = 0 for i in range(1, d + 1): if i % k == 0 or i % l == 0 or i % m == 0 or (i % n == 0): damaged_dragons = damagedDragons + 1 print(damagedDragons)
menu = [ [ "egg", "spam", "bacon"], [ "egg", "sausage", "bacon"], [ "egg", "spam"], [ "egg", "bacon", "spam"], [ "egg", "bacon", "sausage", "spam"], [ "spam", "bacon", "sausage", "spam"], [ "spam", "egg", "spam", "spam", "bacon","spam"], [ "spam", "egg", "sausage", "spam"], [ "chicken", "chips"] ] # normal method meals = [] for meal in menu: if "spam" not in meal: meals.append(meal) else: meals.append("a meal was skipped") print(meals) print("*" * 120) # for comprehension with basic conditional comprehension meals = [meal for meal in menu if "spam" not in meal and "chicken" not in meal] print(meals) print("*" * 120) # for comprehension with two conditional comprehension fussy_meals = [meal for meal in menu if "spam" in meal or "eggs" in meal if not ("bacon" in meal and "sausage" in meal)] print(fussy_meals) print("*" * 120) fussy_meals =[meal for meal in menu if ("spam" in meal or "eggs" in meal) and not ("bacon" in meal and "sausage" in meal)] print(fussy_meals)
menu = [['egg', 'spam', 'bacon'], ['egg', 'sausage', 'bacon'], ['egg', 'spam'], ['egg', 'bacon', 'spam'], ['egg', 'bacon', 'sausage', 'spam'], ['spam', 'bacon', 'sausage', 'spam'], ['spam', 'egg', 'spam', 'spam', 'bacon', 'spam'], ['spam', 'egg', 'sausage', 'spam'], ['chicken', 'chips']] meals = [] for meal in menu: if 'spam' not in meal: meals.append(meal) else: meals.append('a meal was skipped') print(meals) print('*' * 120) meals = [meal for meal in menu if 'spam' not in meal and 'chicken' not in meal] print(meals) print('*' * 120) fussy_meals = [meal for meal in menu if 'spam' in meal or 'eggs' in meal if not ('bacon' in meal and 'sausage' in meal)] print(fussy_meals) print('*' * 120) fussy_meals = [meal for meal in menu if ('spam' in meal or 'eggs' in meal) and (not ('bacon' in meal and 'sausage' in meal))] print(fussy_meals)
def divide(x: int, y: int) -> int: result, power = 0, 32 y_power = y << power while x >= y: while y_power > x: y_power >>=1 power -=1 result += 1<<power x -= y_power return result
def divide(x: int, y: int) -> int: (result, power) = (0, 32) y_power = y << power while x >= y: while y_power > x: y_power >>= 1 power -= 1 result += 1 << power x -= y_power return result
sum = 0 for x in range(10): sum = sum + x print(sum)
sum = 0 for x in range(10): sum = sum + x print(sum)
f = open("io/data/file1") print(f.readline()) print(f.readline(3)) print(f.readline(4)) print(f.readline(5)) print(f.readline()) # readline() on writable file f = open("io/data/file1", "ab") try: f.readline() except OSError: print("OSError") f.close()
f = open('io/data/file1') print(f.readline()) print(f.readline(3)) print(f.readline(4)) print(f.readline(5)) print(f.readline()) f = open('io/data/file1', 'ab') try: f.readline() except OSError: print('OSError') f.close()
# return an integere cycle length K of a permutation. Applying a permutation K-times to a list will return the original list. def permutation_cycle_length(permutation): initialArray = range(len(permutation)) permutedArray = range(len(permutation)) cycles = 0 while True: permutedArray = [permutedArray[permutation[i]] for i in range(len(initialArray))] cycles += 1 if(areEqual(initialArray, permutedArray)): break return cycles def areEqual(first, second): for i in range(len(first)): if(first[i] != second[i]): return False return True print(permutation_cycle_length([4, 3, 2, 0, 1]))
def permutation_cycle_length(permutation): initial_array = range(len(permutation)) permuted_array = range(len(permutation)) cycles = 0 while True: permuted_array = [permutedArray[permutation[i]] for i in range(len(initialArray))] cycles += 1 if are_equal(initialArray, permutedArray): break return cycles def are_equal(first, second): for i in range(len(first)): if first[i] != second[i]: return False return True print(permutation_cycle_length([4, 3, 2, 0, 1]))
BLOCKCHAIN = { 'class': 'thenewboston_node.business_logic.blockchain.file_blockchain.FileBlockchain', 'kwargs': {}, } BLOCKCHAIN_URL_PATH_PREFIX = '/blockchain/'
blockchain = {'class': 'thenewboston_node.business_logic.blockchain.file_blockchain.FileBlockchain', 'kwargs': {}} blockchain_url_path_prefix = '/blockchain/'
n = int(input()) a = n // 365 n = n - a*365 m = n // 30 n = n - m*30 d = n print('{} ano(s)'.format(a)) print('{} mes(es)'.format(m)) print('{} dia(s)'.format(d))
n = int(input()) a = n // 365 n = n - a * 365 m = n // 30 n = n - m * 30 d = n print('{} ano(s)'.format(a)) print('{} mes(es)'.format(m)) print('{} dia(s)'.format(d))
num=[10,20,30,40,50,60] n=[i for i in num] print(n) n=[10,20,30,40] s=[10,20] n1=[i for i in n] print(n1) n2=[j*j for j in n] print(n2) n3=[s+s for s in n ] print(n3) for m in n: s.append(m*m) print(s) #using lambda l=[1,2,3,4] p=list(map(lambda a:a*a ,l)) print(p) l=list(filter(lambda x:x%2==0,l)) print(l) v=[i for i in l if i%2==0] print(v) my=[] for letter in 'abcd': for num in range(4): my.append((letter,num)) print(my) x=[(letter,num)for letter in 'abcd' for num in range(4)] print(x)
num = [10, 20, 30, 40, 50, 60] n = [i for i in num] print(n) n = [10, 20, 30, 40] s = [10, 20] n1 = [i for i in n] print(n1) n2 = [j * j for j in n] print(n2) n3 = [s + s for s in n] print(n3) for m in n: s.append(m * m) print(s) l = [1, 2, 3, 4] p = list(map(lambda a: a * a, l)) print(p) l = list(filter(lambda x: x % 2 == 0, l)) print(l) v = [i for i in l if i % 2 == 0] print(v) my = [] for letter in 'abcd': for num in range(4): my.append((letter, num)) print(my) x = [(letter, num) for letter in 'abcd' for num in range(4)] print(x)
# # PySNMP MIB module CISCO-IPSEC-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-IPSEC-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:02:28 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint") ciscoExperiment, = mibBuilder.importSymbols("CISCO-SMI", "ciscoExperiment") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") iso, Gauge32, NotificationType, Integer32, ModuleIdentity, ObjectIdentity, Bits, TimeTicks, Counter32, MibIdentifier, Counter64, IpAddress, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Gauge32", "NotificationType", "Integer32", "ModuleIdentity", "ObjectIdentity", "Bits", "TimeTicks", "Counter32", "MibIdentifier", "Counter64", "IpAddress", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "TruthValue") ciscoIPsecMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 10, 62)) if mibBuilder.loadTexts: ciscoIPsecMIB.setLastUpdated('200008071139Z') if mibBuilder.loadTexts: ciscoIPsecMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoIPsecMIB.setContactInfo(' Cisco Systems Enterprise Business Management Unit Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-ipsecurity@cisco.com') if mibBuilder.loadTexts: ciscoIPsecMIB.setDescription("The MIB module for modeling Cisco-specific IPsec attributes Overview of Cisco IPsec MIB MIB description This MIB models the Cisco implementation-specific attributes of a Cisco entity that implements IPsec. This MIB is complementary to the standard IPsec MIB proposed jointly by Tivoli and Cisco. The ciscoIPsec MIB provides the operational information on Cisco's IPsec tunnelling implementation. The following entities are managed: 1) ISAKMP Group: a) ISAKMP global parameters b) ISAKMP Policy Table 2) IPSec Group: a) IPSec Global Parameters b) IPSec Global Traffic Parameters c) Cryptomap Group - Cryptomap Set Table - Cryptomap Table - CryptomapSet Binding Table 3) System Capacity & Capability Group: a) Capacity Parameters b) Capability Parameters 4) Trap Control Group 5) Notifications Group") class CIPsecLifetime(TextualConvention, Gauge32): description = 'Value in units of seconds' status = 'current' subtypeSpec = Gauge32.subtypeSpec + ValueRangeConstraint(120, 86400) class CIPsecLifesize(TextualConvention, Gauge32): description = 'Value in units of kilobytes' status = 'current' subtypeSpec = Gauge32.subtypeSpec + ValueRangeConstraint(2560, 536870912) class CIPsecNumCryptoMaps(TextualConvention, Gauge32): description = 'Integral units representing count of cryptomaps' status = 'current' subtypeSpec = Gauge32.subtypeSpec + ValueRangeConstraint(0, 2147483647) class CryptomapType(TextualConvention, Integer32): description = 'The type of a cryptomap entry. Cryptomap is a unit of IOS IPSec policy specification.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5)) namedValues = NamedValues(("cryptomapTypeNONE", 0), ("cryptomapTypeMANUAL", 1), ("cryptomapTypeISAKMP", 2), ("cryptomapTypeCET", 3), ("cryptomapTypeDYNAMIC", 4), ("cryptomapTypeDYNAMICDISCOVERY", 5)) class CryptomapSetBindStatus(TextualConvention, Integer32): description = "The status of the binding of a cryptomap set to the specified interface. The value qhen queried is always 'attached'. When set to 'detached', the cryptomap set if detached from the specified interface. Setting the value to 'attached' will result in SNMP General Error." status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2)) namedValues = NamedValues(("unknown", 0), ("attached", 1), ("detached", 2)) class IPSIpAddress(TextualConvention, OctetString): description = 'An IP V4 or V6 Address.' status = 'current' subtypeSpec = OctetString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(4, 4), ValueSizeConstraint(16, 16), ) class IkeHashAlgo(TextualConvention, Integer32): description = 'The hash algorithm used in IPsec Phase-1 IKE negotiations.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("none", 1), ("md5", 2), ("sha", 3)) class IkeAuthMethod(TextualConvention, Integer32): description = 'The authentication method used in IPsec Phase-1 IKE negotiations.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("none", 1), ("preSharedKey", 2), ("rsaSig", 3), ("rsaEncrypt", 4), ("revPublicKey", 5)) class IkeIdentityType(TextualConvention, Integer32): description = 'The type of identity used by the local entity to identity itself to the peer with which it performs IPSec Main Mode negotiations. This type decides the content of the Identification payload in the Main Mode of IPSec tunnel setup.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2)) namedValues = NamedValues(("isakmpIdTypeUNKNOWN", 0), ("isakmpIdTypeADDRESS", 1), ("isakmpIdTypeHOSTNAME", 2)) class DiffHellmanGrp(TextualConvention, Integer32): description = 'The Diffie Hellman Group used in negotiations.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("none", 1), ("dhGroup1", 2), ("dhGroup2", 3)) class EncryptAlgo(TextualConvention, Integer32): description = 'The encryption algorithm used in negotiations.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("none", 1), ("des", 2), ("des3", 3)) class TrapStatus(TextualConvention, Integer32): description = 'The administrative status for sending a TRAP.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("enabled", 1), ("disabled", 2)) ciscoIPsecMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1)) ciscoIPsecMIBNotificationPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 2)) ciscoIPsecMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 3)) cipsIsakmpGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1)) cipsIPsecGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2)) cipsIPsecGlobals = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1)) cipsIPsecStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 2)) cipsCryptomapGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3)) cipsSysCapacityGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 3)) cipsTrapCntlGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4)) cipsIsakmpEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 1), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsIsakmpEnabled.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpEnabled.setDescription('The value of this object is TRUE if ISAKMP has been enabled on the managed entity. Otherise the value of this object is FALSE.') cipsIsakmpIdentity = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 2), IkeIdentityType()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsIsakmpIdentity.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpIdentity.setDescription('The value of this object is shows the type of identity used by the managed entity in ISAKMP negotiations with another peer.') cipsIsakmpKeepaliveInterval = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 3600))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: cipsIsakmpKeepaliveInterval.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpKeepaliveInterval.setDescription('The value of this object is time interval in seconds between successive ISAKMP keepalive heartbeats issued to the peers to which IKE tunnels have been setup.') cipsNumIsakmpPolicies = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsNumIsakmpPolicies.setStatus('current') if mibBuilder.loadTexts: cipsNumIsakmpPolicies.setDescription('The value of this object is the number of ISAKMP policies that have been configured on the managed entity.') cipsIsakmpPolicyTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5), ) if mibBuilder.loadTexts: cipsIsakmpPolicyTable.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolicyTable.setDescription('The table containing the list of all ISAKMP policy entries configured by the operator.') cipsIsakmpPolicyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1), ).setIndexNames((0, "CISCO-IPSEC-MIB", "cipsIsakmpPolPriority")) if mibBuilder.loadTexts: cipsIsakmpPolicyEntry.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolicyEntry.setDescription('Each entry contains the attributes associated with a single ISAKMP Policy entry.') cipsIsakmpPolPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: cipsIsakmpPolPriority.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolPriority.setDescription('The priotity of this ISAKMP Policy entry. This is also the index of this table.') cipsIsakmpPolEncr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1, 2), EncryptAlgo()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsIsakmpPolEncr.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolEncr.setDescription('The encryption transform specified by this ISAKMP policy specification. The Internet Key Exchange (IKE) tunnels setup using this policy item would use the specified encryption transform to protect the ISAKMP PDUs.') cipsIsakmpPolHash = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1, 3), IkeHashAlgo()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsIsakmpPolHash.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolHash.setDescription('The hash transform specified by this ISAKMP policy specification. The IKE tunnels setup using this policy item would use the specified hash transform to protect the ISAKMP PDUs.') cipsIsakmpPolAuth = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1, 4), IkeAuthMethod()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsIsakmpPolAuth.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolAuth.setDescription('The peer authentication mthod specified by this ISAKMP policy specification. If this policy entity is selected for negotiation with a peer, the local entity would authenticate the peer using the method specified by this object.') cipsIsakmpPolGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1, 5), DiffHellmanGrp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsIsakmpPolGroup.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolGroup.setDescription('This object specifies the Oakley group used for Diffie Hellman exchange in the Main Mode. If this policy item is selected to negotiate Main Mode with an IKE peer, the local entity chooses the group specified by this object to perform Diffie Hellman exchange with the peer.') cipsIsakmpPolLifetime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(60, 86400))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: cipsIsakmpPolLifetime.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolLifetime.setDescription('This object specifies the lifetime in seconds of the IKE tunnels generated using this policy specification.') cipsSALifetime = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1, 1), CIPsecLifetime()).setUnits('Seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: cipsSALifetime.setStatus('current') if mibBuilder.loadTexts: cipsSALifetime.setDescription('The default lifetime (in seconds) assigned to an SA as a global policy (maybe overridden in specific cryptomap definitions).') cipsSALifesize = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1, 2), CIPsecLifesize()).setUnits('KBytes').setMaxAccess("readonly") if mibBuilder.loadTexts: cipsSALifesize.setStatus('current') if mibBuilder.loadTexts: cipsSALifesize.setDescription('The default lifesize in KBytes assigned to an SA as a global policy (unless overridden in cryptomap definition)') cipsNumStaticCryptomapSets = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1, 3), CIPsecNumCryptoMaps()).setUnits('Integral Units').setMaxAccess("readonly") if mibBuilder.loadTexts: cipsNumStaticCryptomapSets.setStatus('current') if mibBuilder.loadTexts: cipsNumStaticCryptomapSets.setDescription('The number of Cryptomap Sets that are are fully configured. Statically defined cryptomap sets are ones where the operator has fully specified all the parameters required set up IPSec Virtual Private Networks (VPNs).') cipsNumCETCryptomapSets = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1, 4), CIPsecNumCryptoMaps()).setUnits('Integral Units').setMaxAccess("readonly") if mibBuilder.loadTexts: cipsNumCETCryptomapSets.setStatus('current') if mibBuilder.loadTexts: cipsNumCETCryptomapSets.setDescription('The number of static Cryptomap Sets that have at least one CET cryptomap element as a member of the set.') cipsNumDynamicCryptomapSets = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1, 5), CIPsecNumCryptoMaps()).setUnits('Integral Units').setMaxAccess("readonly") if mibBuilder.loadTexts: cipsNumDynamicCryptomapSets.setStatus('current') if mibBuilder.loadTexts: cipsNumDynamicCryptomapSets.setDescription("The number of dynamic IPSec Policy templates (called 'dynamic cryptomap templates') configured on the managed entity.") cipsNumTEDCryptomapSets = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1, 6), CIPsecNumCryptoMaps()).setUnits('Integral Units').setMaxAccess("readonly") if mibBuilder.loadTexts: cipsNumTEDCryptomapSets.setStatus('current') if mibBuilder.loadTexts: cipsNumTEDCryptomapSets.setDescription('The number of static Cryptomap Sets that have at least one dynamic cryptomap template bound to them which has the Tunnel Endpoint Discovery (TED) enabled.') cipsNumTEDProbesReceived = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 2, 1), Counter32()).setUnits('Integral Units').setMaxAccess("readonly") if mibBuilder.loadTexts: cipsNumTEDProbesReceived.setStatus('current') if mibBuilder.loadTexts: cipsNumTEDProbesReceived.setDescription('The number of TED probes that were received by this managed entity since bootup. Not affected by any CLI operation.') cipsNumTEDProbesSent = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 2, 2), Counter32()).setUnits('Integral Units').setMaxAccess("readonly") if mibBuilder.loadTexts: cipsNumTEDProbesSent.setStatus('current') if mibBuilder.loadTexts: cipsNumTEDProbesSent.setDescription('The number of TED probes that were dispatched by all the dynamic cryptomaps in this managed entity since bootup. Not affected by any CLI operation.') cipsNumTEDFailures = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 2, 3), Counter32()).setUnits('Integral Units').setMaxAccess("readonly") if mibBuilder.loadTexts: cipsNumTEDFailures.setStatus('current') if mibBuilder.loadTexts: cipsNumTEDFailures.setDescription('The number of TED probes that were dispatched by the local entity and that failed to locate crypto endpoint. Not affected by any CLI operation.') cipsMaxSAs = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setUnits('Integral Units').setMaxAccess("readonly") if mibBuilder.loadTexts: cipsMaxSAs.setStatus('current') if mibBuilder.loadTexts: cipsMaxSAs.setDescription('The maximum number of IPsec Security Associations that can be established on this managed entity. If no theoretical limit exists, this returns value 0. Not affected by any CLI operation.') cips3DesCapable = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 3, 2), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cips3DesCapable.setStatus('current') if mibBuilder.loadTexts: cips3DesCapable.setDescription('The value of this object is TRUE if the managed entity has the hardware nad software features to support 3DES encryption algorithm. Not affected by any CLI operation.') cipsStaticCryptomapSetTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1), ) if mibBuilder.loadTexts: cipsStaticCryptomapSetTable.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetTable.setDescription('The table containing the list of all cryptomap sets that are fully specified and are not wild-carded. The operator may include different types of cryptomaps in such a set - manual, CET, ISAKMP or dynamic.') cipsStaticCryptomapSetEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1), ).setIndexNames((0, "CISCO-IPSEC-MIB", "cipsStaticCryptomapSetName")) if mibBuilder.loadTexts: cipsStaticCryptomapSetEntry.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetEntry.setDescription('Each entry contains the attributes associated with a single static cryptomap set.') cipsStaticCryptomapSetName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 1), DisplayString()) if mibBuilder.loadTexts: cipsStaticCryptomapSetName.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetName.setDescription('The index of the static cryptomap table. The value of the string is the name string assigned by the operator in defining the cryptomap set.') cipsStaticCryptomapSetSize = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 2), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapSetSize.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetSize.setDescription('The total number of cryptomap entries contained in this cryptomap set. ') cipsStaticCryptomapSetNumIsakmp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 3), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapSetNumIsakmp.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumIsakmp.setDescription('The number of cryptomaps associated with this cryptomap set that use ISAKMP protocol to do key exchange.') cipsStaticCryptomapSetNumManual = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapSetNumManual.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumManual.setDescription('The number of cryptomaps associated with this cryptomap set that require the operator to manually setup the keys and SPIs.') cipsStaticCryptomapSetNumCET = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapSetNumCET.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumCET.setDescription("The number of cryptomaps of type 'ipsec-cisco' associated with this cryptomap set. Such cryptomap elements implement Cisco Encryption Technology based Virtual Private Networks.") cipsStaticCryptomapSetNumDynamic = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapSetNumDynamic.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumDynamic.setDescription('The number of dynamic cryptomap templates linked to this cryptomap set.') cipsStaticCryptomapSetNumDisc = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapSetNumDisc.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumDisc.setDescription('The number of dynamic cryptomap templates linked to this cryptomap set that have Tunnel Endpoint Discovery (TED) enabled.') cipsStaticCryptomapSetNumSAs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 8), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapSetNumSAs.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumSAs.setDescription('The number of and IPsec Security Associations that are active and were setup using this cryptomap. ') cipsDynamicCryptomapSetTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 2), ) if mibBuilder.loadTexts: cipsDynamicCryptomapSetTable.setStatus('current') if mibBuilder.loadTexts: cipsDynamicCryptomapSetTable.setDescription('The table containing the list of all dynamic cryptomaps that use IKE, defined on the managed entity.') cipsDynamicCryptomapSetEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 2, 1), ).setIndexNames((0, "CISCO-IPSEC-MIB", "cipsDynamicCryptomapSetName")) if mibBuilder.loadTexts: cipsDynamicCryptomapSetEntry.setStatus('current') if mibBuilder.loadTexts: cipsDynamicCryptomapSetEntry.setDescription('Each entry contains the attributes associated with a single dynamic cryptomap template.') cipsDynamicCryptomapSetName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 2, 1, 1), DisplayString()) if mibBuilder.loadTexts: cipsDynamicCryptomapSetName.setStatus('current') if mibBuilder.loadTexts: cipsDynamicCryptomapSetName.setDescription('The index of the dynamic cryptomap table. The value of the string is the one assigned by the operator in defining the cryptomap set.') cipsDynamicCryptomapSetSize = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 2, 1, 2), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsDynamicCryptomapSetSize.setStatus('current') if mibBuilder.loadTexts: cipsDynamicCryptomapSetSize.setDescription('The number of cryptomap entries in this cryptomap.') cipsDynamicCryptomapSetNumAssoc = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 2, 1, 3), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsDynamicCryptomapSetNumAssoc.setStatus('current') if mibBuilder.loadTexts: cipsDynamicCryptomapSetNumAssoc.setDescription('The number of static cryptomap sets with which this dynamic cryptomap is associated. ') cipsStaticCryptomapTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3), ) if mibBuilder.loadTexts: cipsStaticCryptomapTable.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapTable.setDescription('The table ilisting the member cryptomaps of the cryptomap sets that are configured on the managed entity.') cipsStaticCryptomapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1), ).setIndexNames((0, "CISCO-IPSEC-MIB", "cipsStaticCryptomapSetName"), (0, "CISCO-IPSEC-MIB", "cipsStaticCryptomapPriority")) if mibBuilder.loadTexts: cipsStaticCryptomapEntry.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapEntry.setDescription('Each entry contains the attributes associated with a single static (fully specified) cryptomap entry. This table does not include the members of dynamic cryptomap sets that may be linked with the parent static cryptomap set.') cipsStaticCryptomapPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: cipsStaticCryptomapPriority.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapPriority.setDescription('The priority of the cryptomap entry in the cryptomap set. This is the second index component of this table.') cipsStaticCryptomapType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 2), CryptomapType()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapType.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapType.setDescription('The type of the cryptomap entry. This can be an ISAKMP cryptomap, CET or manual. Dynamic cryptomaps are not counted in this table.') cipsStaticCryptomapDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapDescr.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapDescr.setDescription('The description string entered by the operatoir while creating this cryptomap. The string generally identifies a description and the purpose of this policy.') cipsStaticCryptomapPeer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 4), IPSIpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapPeer.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapPeer.setDescription('The IP address of the current peer associated with this IPSec policy item. Traffic that is protected by this cryptomap is protected by a tunnel that terminates at the device whose IP address is specified by this object.') cipsStaticCryptomapNumPeers = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 40))).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapNumPeers.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapNumPeers.setDescription("The number of peers associated with this cryptomap entry. The peers other than the one identified by 'cipsStaticCryptomapPeer' are backup peers. Manual cryptomaps may have only one peer.") cipsStaticCryptomapPfs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 6), DiffHellmanGrp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapPfs.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapPfs.setDescription('This object identifies if the tunnels instantiated due to this policy item should use Perfect Forward Secrecy (PFS) and if so, what group of Oakley they should use.') cipsStaticCryptomapLifetime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(120, 86400), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapLifetime.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapLifetime.setDescription('This object identifies the lifetime of the IPSec Security Associations (SA) created using this IPSec policy entry. If this value is zero, the lifetime assumes the value specified by the global lifetime parameter.') cipsStaticCryptomapLifesize = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(2560, 536870912), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapLifesize.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapLifesize.setDescription('This object identifies the lifesize (maximum traffic in bytes that may be carried) of the IPSec SAs created using this IPSec policy entry. If this value is zero, the lifetime assumes the value specified by the global lifesize parameter.') cipsStaticCryptomapLevelHost = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 9), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsStaticCryptomapLevelHost.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapLevelHost.setDescription('This object identifies the granularity of the IPSec SAs created using this IPSec policy entry. If this value is TRUE, distinct SA bundles are created for distinct hosts at the end of the application traffic.') cipsCryptomapSetIfTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 4), ) if mibBuilder.loadTexts: cipsCryptomapSetIfTable.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapSetIfTable.setDescription('The table lists the binding of cryptomap sets to the interfaces of the managed entity.') cipsCryptomapSetIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 4, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "CISCO-IPSEC-MIB", "cipsStaticCryptomapSetName")) if mibBuilder.loadTexts: cipsCryptomapSetIfEntry.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapSetIfEntry.setDescription('Each entry contains the record of the association between an interface and a cryptomap set (static) that is defined on the managed entity. Note that the cryptomap set identified in this binding must static. Dynamic cryptomaps cannot be bound to interfaces.') cipsCryptomapSetIfVirtual = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 4, 1, 1), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cipsCryptomapSetIfVirtual.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapSetIfVirtual.setDescription('The value of this object identifies if the interface to which the cryptomap set is attached is a tunnel (such as a GRE or PPTP tunnel).') cipsCryptomapSetIfStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 4, 1, 2), CryptomapSetBindStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cipsCryptomapSetIfStatus.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapSetIfStatus.setDescription("This object identifies the status of the binding of the specified cryptomap set with the specified interface. The value when queried is always 'attached'. When set to 'detached', the cryptomap set if detached from the specified interface. The effect of this is same as the CLI command config-if# no crypto map cryptomapSetName Setting the value to 'attached' will result in SNMP General Error.") cipsCntlIsakmpPolicyAdded = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 1), TrapStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cipsCntlIsakmpPolicyAdded.setStatus('current') if mibBuilder.loadTexts: cipsCntlIsakmpPolicyAdded.setDescription('This object defines the administrative state of sending the IOS IPsec ISAKMP Policy Add trap.') cipsCntlIsakmpPolicyDeleted = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 2), TrapStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cipsCntlIsakmpPolicyDeleted.setStatus('current') if mibBuilder.loadTexts: cipsCntlIsakmpPolicyDeleted.setDescription('This object defines the administrative state of sending the IOS IPsec ISAKMP Policy Delete trap.') cipsCntlCryptomapAdded = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 3), TrapStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cipsCntlCryptomapAdded.setStatus('current') if mibBuilder.loadTexts: cipsCntlCryptomapAdded.setDescription('This object defines the administrative state of sending the IOS IPsec Cryptomap Add trap.') cipsCntlCryptomapDeleted = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 4), TrapStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cipsCntlCryptomapDeleted.setStatus('current') if mibBuilder.loadTexts: cipsCntlCryptomapDeleted.setDescription('This object defines the administrative state of sending the IOS IPsec Cryptomap Delete trap.') cipsCntlCryptomapSetAttached = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 5), TrapStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cipsCntlCryptomapSetAttached.setStatus('current') if mibBuilder.loadTexts: cipsCntlCryptomapSetAttached.setDescription('This object defines the administrative state of sending the IOS IPsec trap that is issued when a cryptomap set is attached to an interface.') cipsCntlCryptomapSetDetached = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 6), TrapStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cipsCntlCryptomapSetDetached.setStatus('current') if mibBuilder.loadTexts: cipsCntlCryptomapSetDetached.setDescription('This object defines the administrative state of sending the IOS IPsec trap that is issued when a cryptomap set is detached from an interface. to which it was earlier bound.') cipsCntlTooManySAs = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 7), TrapStatus().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cipsCntlTooManySAs.setStatus('current') if mibBuilder.loadTexts: cipsCntlTooManySAs.setDescription('This object defines the administrative state of sending the IOS IPsec trap that is issued when the number of SAs crosses the maximum number of SAs that may be supported on the managed entity.') cipsMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0)) cipsIsakmpPolicyAdded = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 1)).setObjects(("CISCO-IPSEC-MIB", "cipsNumIsakmpPolicies")) if mibBuilder.loadTexts: cipsIsakmpPolicyAdded.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolicyAdded.setDescription('This trap is generated when a new ISAKMP policy element is defined on the managed entity. The context of the event includes the updated number of ISAKMP policy elements currently available.') cipsIsakmpPolicyDeleted = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 2)).setObjects(("CISCO-IPSEC-MIB", "cipsNumIsakmpPolicies")) if mibBuilder.loadTexts: cipsIsakmpPolicyDeleted.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolicyDeleted.setDescription('This trap is generated when an existing ISAKMP policy element is deleted on the managed entity. The context of the event includes the updated number of ISAKMP policy elements currently available.') cipsCryptomapAdded = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 3)).setObjects(("CISCO-IPSEC-MIB", "cipsStaticCryptomapType"), ("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetSize")) if mibBuilder.loadTexts: cipsCryptomapAdded.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapAdded.setDescription('This trap is generated when a new cryptomap is added to the specified cryptomap set.') cipsCryptomapDeleted = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 4)).setObjects(("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetSize")) if mibBuilder.loadTexts: cipsCryptomapDeleted.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapDeleted.setDescription('This trap is generated when a cryptomap is removed from the specified cryptomap set.') cipsCryptomapSetAttached = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 5)).setObjects(("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetSize"), ("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetNumIsakmp"), ("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetNumDynamic")) if mibBuilder.loadTexts: cipsCryptomapSetAttached.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapSetAttached.setDescription('A cryptomap set must be attached to an interface of the device in order for it to be operational. This trap is generated when the cryptomap set attached to an active interface of the managed entity. The context of the notification includes: Size of the attached cryptomap set, Number of ISAKMP cryptomaps in the set and Number of Dynamic cryptomaps in the set.') cipsCryptomapSetDetached = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 6)).setObjects(("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetSize")) if mibBuilder.loadTexts: cipsCryptomapSetDetached.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapSetDetached.setDescription('This trap is generated when a cryptomap set is detached from an interafce to which it was bound earlier. The context of the event identifies the size of the cryptomap set.') cipsTooManySAs = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 7)).setObjects(("CISCO-IPSEC-MIB", "cipsMaxSAs")) if mibBuilder.loadTexts: cipsTooManySAs.setStatus('current') if mibBuilder.loadTexts: cipsTooManySAs.setDescription('This trap is generated when a new SA is attempted to be setup while the number of currently active SAs equals the maximum configurable. The variables are: cipsMaxSAs') cipsMIBConformances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 1)) cipsMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2)) cipsMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 1, 1)).setObjects(("CISCO-IPSEC-MIB", "cipsMIBConfIsakmpGroup"), ("CISCO-IPSEC-MIB", "cipsMIBConfIPSecGlobalsGroup"), ("CISCO-IPSEC-MIB", "cipsMIBConfCapacityGroup"), ("CISCO-IPSEC-MIB", "cipsMIBStaticCryptomapGroup"), ("CISCO-IPSEC-MIB", "cipsMIBMandatoryNotifCntlGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cipsMIBCompliance = cipsMIBCompliance.setStatus('current') if mibBuilder.loadTexts: cipsMIBCompliance.setDescription('The compliance statement for entities which implement the Cisco IPsec MIB') cipsMIBConfIsakmpGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 1)).setObjects(("CISCO-IPSEC-MIB", "cipsIsakmpEnabled"), ("CISCO-IPSEC-MIB", "cipsIsakmpIdentity"), ("CISCO-IPSEC-MIB", "cipsIsakmpKeepaliveInterval"), ("CISCO-IPSEC-MIB", "cipsNumIsakmpPolicies")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cipsMIBConfIsakmpGroup = cipsMIBConfIsakmpGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBConfIsakmpGroup.setDescription('A collection of objects providing Global ISAKMP policy monitoring capability to a Cisco IPsec capable VPN router.') cipsMIBConfIPSecGlobalsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 2)).setObjects(("CISCO-IPSEC-MIB", "cipsSALifetime"), ("CISCO-IPSEC-MIB", "cipsSALifesize")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cipsMIBConfIPSecGlobalsGroup = cipsMIBConfIPSecGlobalsGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBConfIPSecGlobalsGroup.setDescription('A collection of objects providing Global IPSec policy monitoring capability to a Cisco IPsec capable VPN router.') cipsMIBConfCapacityGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 3)).setObjects(("CISCO-IPSEC-MIB", "cipsMaxSAs"), ("CISCO-IPSEC-MIB", "cips3DesCapable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cipsMIBConfCapacityGroup = cipsMIBConfCapacityGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBConfCapacityGroup.setDescription('A collection of objects providing IPsec System Capacity monitoring capability to a Cisco IPsec capable VPN router.') cipsMIBStaticCryptomapGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 4)).setObjects(("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetSize"), ("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetNumIsakmp"), ("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetNumCET"), ("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetNumSAs")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cipsMIBStaticCryptomapGroup = cipsMIBStaticCryptomapGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBStaticCryptomapGroup.setDescription('A collection of objects instrumenting the properties of the Static (fully specified) Cryptomap Sets on an IPsec-capable IOS router.') cipsMIBManualCryptomapGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 5)).setObjects(("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetNumManual")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cipsMIBManualCryptomapGroup = cipsMIBManualCryptomapGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBManualCryptomapGroup.setDescription('A collection of objects instrumenting the properties of the Manual Cryptomap entries on a Cisco IPsec capable IOS router.') cipsMIBDynamicCryptomapGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 6)).setObjects(("CISCO-IPSEC-MIB", "cipsNumTEDProbesReceived"), ("CISCO-IPSEC-MIB", "cipsNumTEDProbesSent"), ("CISCO-IPSEC-MIB", "cipsNumTEDFailures"), ("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetNumDynamic"), ("CISCO-IPSEC-MIB", "cipsStaticCryptomapSetNumDisc"), ("CISCO-IPSEC-MIB", "cipsNumTEDCryptomapSets"), ("CISCO-IPSEC-MIB", "cipsDynamicCryptomapSetSize"), ("CISCO-IPSEC-MIB", "cipsDynamicCryptomapSetNumAssoc")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cipsMIBDynamicCryptomapGroup = cipsMIBDynamicCryptomapGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBDynamicCryptomapGroup.setDescription('A collection of objects instrumenting the properties of the Dynamic Cryptomap group on a Cisco IPsec capable IOS router.') cipsMIBMandatoryNotifCntlGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 7)).setObjects(("CISCO-IPSEC-MIB", "cipsCntlIsakmpPolicyAdded"), ("CISCO-IPSEC-MIB", "cipsCntlIsakmpPolicyDeleted"), ("CISCO-IPSEC-MIB", "cipsCntlCryptomapAdded"), ("CISCO-IPSEC-MIB", "cipsCntlCryptomapDeleted"), ("CISCO-IPSEC-MIB", "cipsCntlCryptomapSetAttached"), ("CISCO-IPSEC-MIB", "cipsCntlCryptomapSetDetached"), ("CISCO-IPSEC-MIB", "cipsCntlTooManySAs")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cipsMIBMandatoryNotifCntlGroup = cipsMIBMandatoryNotifCntlGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBMandatoryNotifCntlGroup.setDescription('A collection of objects providing IPsec Notification capability to a IPsec-capable IOS router. It is mandatory to implement this set of objects pertaining to IOS notifications about IPSec activity.') mibBuilder.exportSymbols("CISCO-IPSEC-MIB", cipsIPsecGlobals=cipsIPsecGlobals, cipsCryptomapSetIfVirtual=cipsCryptomapSetIfVirtual, cipsStaticCryptomapSetNumManual=cipsStaticCryptomapSetNumManual, cipsStaticCryptomapDescr=cipsStaticCryptomapDescr, cipsIsakmpGroup=cipsIsakmpGroup, cipsDynamicCryptomapSetSize=cipsDynamicCryptomapSetSize, cipsCryptomapAdded=cipsCryptomapAdded, cipsTrapCntlGroup=cipsTrapCntlGroup, cipsCryptomapSetIfEntry=cipsCryptomapSetIfEntry, cipsMIBConfIPSecGlobalsGroup=cipsMIBConfIPSecGlobalsGroup, cipsStaticCryptomapSetNumIsakmp=cipsStaticCryptomapSetNumIsakmp, cipsMIBMandatoryNotifCntlGroup=cipsMIBMandatoryNotifCntlGroup, cipsNumTEDFailures=cipsNumTEDFailures, ciscoIPsecMIB=ciscoIPsecMIB, cipsStaticCryptomapPfs=cipsStaticCryptomapPfs, cipsStaticCryptomapSetSize=cipsStaticCryptomapSetSize, CryptomapSetBindStatus=CryptomapSetBindStatus, ciscoIPsecMIBNotificationPrefix=ciscoIPsecMIBNotificationPrefix, cipsNumCETCryptomapSets=cipsNumCETCryptomapSets, cipsNumStaticCryptomapSets=cipsNumStaticCryptomapSets, cipsIsakmpPolPriority=cipsIsakmpPolPriority, IkeHashAlgo=IkeHashAlgo, cipsCryptomapSetAttached=cipsCryptomapSetAttached, cipsMIBDynamicCryptomapGroup=cipsMIBDynamicCryptomapGroup, cips3DesCapable=cips3DesCapable, cipsIsakmpPolicyTable=cipsIsakmpPolicyTable, cipsStaticCryptomapPeer=cipsStaticCryptomapPeer, cipsSysCapacityGroup=cipsSysCapacityGroup, cipsStaticCryptomapLevelHost=cipsStaticCryptomapLevelHost, cipsIsakmpKeepaliveInterval=cipsIsakmpKeepaliveInterval, cipsMIBCompliance=cipsMIBCompliance, cipsNumDynamicCryptomapSets=cipsNumDynamicCryptomapSets, cipsIsakmpPolicyEntry=cipsIsakmpPolicyEntry, cipsStaticCryptomapType=cipsStaticCryptomapType, cipsDynamicCryptomapSetEntry=cipsDynamicCryptomapSetEntry, cipsIsakmpPolEncr=cipsIsakmpPolEncr, ciscoIPsecMIBObjects=ciscoIPsecMIBObjects, cipsMIBStaticCryptomapGroup=cipsMIBStaticCryptomapGroup, cipsStaticCryptomapSetName=cipsStaticCryptomapSetName, cipsNumTEDProbesSent=cipsNumTEDProbesSent, cipsMIBConfCapacityGroup=cipsMIBConfCapacityGroup, cipsCntlTooManySAs=cipsCntlTooManySAs, cipsIsakmpPolAuth=cipsIsakmpPolAuth, IPSIpAddress=IPSIpAddress, ciscoIPsecMIBConformance=ciscoIPsecMIBConformance, cipsMaxSAs=cipsMaxSAs, cipsDynamicCryptomapSetNumAssoc=cipsDynamicCryptomapSetNumAssoc, cipsIsakmpPolHash=cipsIsakmpPolHash, cipsStaticCryptomapTable=cipsStaticCryptomapTable, CryptomapType=CryptomapType, cipsMIBConformances=cipsMIBConformances, cipsStaticCryptomapNumPeers=cipsStaticCryptomapNumPeers, cipsNumTEDProbesReceived=cipsNumTEDProbesReceived, cipsCryptomapDeleted=cipsCryptomapDeleted, cipsStaticCryptomapSetNumSAs=cipsStaticCryptomapSetNumSAs, cipsStaticCryptomapSetNumDynamic=cipsStaticCryptomapSetNumDynamic, cipsStaticCryptomapLifesize=cipsStaticCryptomapLifesize, cipsCntlCryptomapAdded=cipsCntlCryptomapAdded, cipsIsakmpPolicyAdded=cipsIsakmpPolicyAdded, IkeIdentityType=IkeIdentityType, cipsIsakmpIdentity=cipsIsakmpIdentity, cipsCryptomapSetIfTable=cipsCryptomapSetIfTable, cipsDynamicCryptomapSetTable=cipsDynamicCryptomapSetTable, PYSNMP_MODULE_ID=ciscoIPsecMIB, cipsMIBManualCryptomapGroup=cipsMIBManualCryptomapGroup, cipsMIBNotifications=cipsMIBNotifications, cipsIsakmpEnabled=cipsIsakmpEnabled, cipsTooManySAs=cipsTooManySAs, cipsStaticCryptomapSetEntry=cipsStaticCryptomapSetEntry, cipsCntlCryptomapSetAttached=cipsCntlCryptomapSetAttached, cipsMIBConfIsakmpGroup=cipsMIBConfIsakmpGroup, CIPsecLifesize=CIPsecLifesize, cipsDynamicCryptomapSetName=cipsDynamicCryptomapSetName, cipsCryptomapGroup=cipsCryptomapGroup, cipsCntlCryptomapDeleted=cipsCntlCryptomapDeleted, TrapStatus=TrapStatus, cipsNumIsakmpPolicies=cipsNumIsakmpPolicies, cipsIsakmpPolicyDeleted=cipsIsakmpPolicyDeleted, cipsStaticCryptomapLifetime=cipsStaticCryptomapLifetime, cipsCntlCryptomapSetDetached=cipsCntlCryptomapSetDetached, EncryptAlgo=EncryptAlgo, cipsIPsecStatistics=cipsIPsecStatistics, cipsCntlIsakmpPolicyAdded=cipsCntlIsakmpPolicyAdded, IkeAuthMethod=IkeAuthMethod, cipsSALifetime=cipsSALifetime, cipsStaticCryptomapSetNumCET=cipsStaticCryptomapSetNumCET, cipsStaticCryptomapSetTable=cipsStaticCryptomapSetTable, cipsCntlIsakmpPolicyDeleted=cipsCntlIsakmpPolicyDeleted, cipsIsakmpPolLifetime=cipsIsakmpPolLifetime, cipsStaticCryptomapEntry=cipsStaticCryptomapEntry, DiffHellmanGrp=DiffHellmanGrp, cipsCryptomapSetDetached=cipsCryptomapSetDetached, cipsStaticCryptomapSetNumDisc=cipsStaticCryptomapSetNumDisc, CIPsecNumCryptoMaps=CIPsecNumCryptoMaps, cipsNumTEDCryptomapSets=cipsNumTEDCryptomapSets, cipsSALifesize=cipsSALifesize, cipsCryptomapSetIfStatus=cipsCryptomapSetIfStatus, CIPsecLifetime=CIPsecLifetime, cipsStaticCryptomapPriority=cipsStaticCryptomapPriority, cipsIsakmpPolGroup=cipsIsakmpPolGroup, cipsIPsecGroup=cipsIPsecGroup, cipsMIBGroups=cipsMIBGroups)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, value_size_constraint, constraints_union, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'SingleValueConstraint') (cisco_experiment,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoExperiment') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup') (iso, gauge32, notification_type, integer32, module_identity, object_identity, bits, time_ticks, counter32, mib_identifier, counter64, ip_address, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'Gauge32', 'NotificationType', 'Integer32', 'ModuleIdentity', 'ObjectIdentity', 'Bits', 'TimeTicks', 'Counter32', 'MibIdentifier', 'Counter64', 'IpAddress', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn') (textual_convention, display_string, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'TruthValue') cisco_i_psec_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 10, 62)) if mibBuilder.loadTexts: ciscoIPsecMIB.setLastUpdated('200008071139Z') if mibBuilder.loadTexts: ciscoIPsecMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoIPsecMIB.setContactInfo(' Cisco Systems Enterprise Business Management Unit Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-ipsecurity@cisco.com') if mibBuilder.loadTexts: ciscoIPsecMIB.setDescription("The MIB module for modeling Cisco-specific IPsec attributes Overview of Cisco IPsec MIB MIB description This MIB models the Cisco implementation-specific attributes of a Cisco entity that implements IPsec. This MIB is complementary to the standard IPsec MIB proposed jointly by Tivoli and Cisco. The ciscoIPsec MIB provides the operational information on Cisco's IPsec tunnelling implementation. The following entities are managed: 1) ISAKMP Group: a) ISAKMP global parameters b) ISAKMP Policy Table 2) IPSec Group: a) IPSec Global Parameters b) IPSec Global Traffic Parameters c) Cryptomap Group - Cryptomap Set Table - Cryptomap Table - CryptomapSet Binding Table 3) System Capacity & Capability Group: a) Capacity Parameters b) Capability Parameters 4) Trap Control Group 5) Notifications Group") class Cipseclifetime(TextualConvention, Gauge32): description = 'Value in units of seconds' status = 'current' subtype_spec = Gauge32.subtypeSpec + value_range_constraint(120, 86400) class Cipseclifesize(TextualConvention, Gauge32): description = 'Value in units of kilobytes' status = 'current' subtype_spec = Gauge32.subtypeSpec + value_range_constraint(2560, 536870912) class Cipsecnumcryptomaps(TextualConvention, Gauge32): description = 'Integral units representing count of cryptomaps' status = 'current' subtype_spec = Gauge32.subtypeSpec + value_range_constraint(0, 2147483647) class Cryptomaptype(TextualConvention, Integer32): description = 'The type of a cryptomap entry. Cryptomap is a unit of IOS IPSec policy specification.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5)) named_values = named_values(('cryptomapTypeNONE', 0), ('cryptomapTypeMANUAL', 1), ('cryptomapTypeISAKMP', 2), ('cryptomapTypeCET', 3), ('cryptomapTypeDYNAMIC', 4), ('cryptomapTypeDYNAMICDISCOVERY', 5)) class Cryptomapsetbindstatus(TextualConvention, Integer32): description = "The status of the binding of a cryptomap set to the specified interface. The value qhen queried is always 'attached'. When set to 'detached', the cryptomap set if detached from the specified interface. Setting the value to 'attached' will result in SNMP General Error." status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2)) named_values = named_values(('unknown', 0), ('attached', 1), ('detached', 2)) class Ipsipaddress(TextualConvention, OctetString): description = 'An IP V4 or V6 Address.' status = 'current' subtype_spec = OctetString.subtypeSpec + constraints_union(value_size_constraint(4, 4), value_size_constraint(16, 16)) class Ikehashalgo(TextualConvention, Integer32): description = 'The hash algorithm used in IPsec Phase-1 IKE negotiations.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('none', 1), ('md5', 2), ('sha', 3)) class Ikeauthmethod(TextualConvention, Integer32): description = 'The authentication method used in IPsec Phase-1 IKE negotiations.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5)) named_values = named_values(('none', 1), ('preSharedKey', 2), ('rsaSig', 3), ('rsaEncrypt', 4), ('revPublicKey', 5)) class Ikeidentitytype(TextualConvention, Integer32): description = 'The type of identity used by the local entity to identity itself to the peer with which it performs IPSec Main Mode negotiations. This type decides the content of the Identification payload in the Main Mode of IPSec tunnel setup.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2)) named_values = named_values(('isakmpIdTypeUNKNOWN', 0), ('isakmpIdTypeADDRESS', 1), ('isakmpIdTypeHOSTNAME', 2)) class Diffhellmangrp(TextualConvention, Integer32): description = 'The Diffie Hellman Group used in negotiations.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('none', 1), ('dhGroup1', 2), ('dhGroup2', 3)) class Encryptalgo(TextualConvention, Integer32): description = 'The encryption algorithm used in negotiations.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('none', 1), ('des', 2), ('des3', 3)) class Trapstatus(TextualConvention, Integer32): description = 'The administrative status for sending a TRAP.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('enabled', 1), ('disabled', 2)) cisco_i_psec_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1)) cisco_i_psec_mib_notification_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 2)) cisco_i_psec_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 3)) cips_isakmp_group = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1)) cips_i_psec_group = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2)) cips_i_psec_globals = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1)) cips_i_psec_statistics = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 2)) cips_cryptomap_group = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3)) cips_sys_capacity_group = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 3)) cips_trap_cntl_group = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4)) cips_isakmp_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 1), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsIsakmpEnabled.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpEnabled.setDescription('The value of this object is TRUE if ISAKMP has been enabled on the managed entity. Otherise the value of this object is FALSE.') cips_isakmp_identity = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 2), ike_identity_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsIsakmpIdentity.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpIdentity.setDescription('The value of this object is shows the type of identity used by the managed entity in ISAKMP negotiations with another peer.') cips_isakmp_keepalive_interval = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(10, 3600))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: cipsIsakmpKeepaliveInterval.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpKeepaliveInterval.setDescription('The value of this object is time interval in seconds between successive ISAKMP keepalive heartbeats issued to the peers to which IKE tunnels have been setup.') cips_num_isakmp_policies = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsNumIsakmpPolicies.setStatus('current') if mibBuilder.loadTexts: cipsNumIsakmpPolicies.setDescription('The value of this object is the number of ISAKMP policies that have been configured on the managed entity.') cips_isakmp_policy_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5)) if mibBuilder.loadTexts: cipsIsakmpPolicyTable.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolicyTable.setDescription('The table containing the list of all ISAKMP policy entries configured by the operator.') cips_isakmp_policy_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1)).setIndexNames((0, 'CISCO-IPSEC-MIB', 'cipsIsakmpPolPriority')) if mibBuilder.loadTexts: cipsIsakmpPolicyEntry.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolicyEntry.setDescription('Each entry contains the attributes associated with a single ISAKMP Policy entry.') cips_isakmp_pol_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))) if mibBuilder.loadTexts: cipsIsakmpPolPriority.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolPriority.setDescription('The priotity of this ISAKMP Policy entry. This is also the index of this table.') cips_isakmp_pol_encr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1, 2), encrypt_algo()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsIsakmpPolEncr.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolEncr.setDescription('The encryption transform specified by this ISAKMP policy specification. The Internet Key Exchange (IKE) tunnels setup using this policy item would use the specified encryption transform to protect the ISAKMP PDUs.') cips_isakmp_pol_hash = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1, 3), ike_hash_algo()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsIsakmpPolHash.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolHash.setDescription('The hash transform specified by this ISAKMP policy specification. The IKE tunnels setup using this policy item would use the specified hash transform to protect the ISAKMP PDUs.') cips_isakmp_pol_auth = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1, 4), ike_auth_method()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsIsakmpPolAuth.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolAuth.setDescription('The peer authentication mthod specified by this ISAKMP policy specification. If this policy entity is selected for negotiation with a peer, the local entity would authenticate the peer using the method specified by this object.') cips_isakmp_pol_group = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1, 5), diff_hellman_grp()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsIsakmpPolGroup.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolGroup.setDescription('This object specifies the Oakley group used for Diffie Hellman exchange in the Main Mode. If this policy item is selected to negotiate Main Mode with an IKE peer, the local entity chooses the group specified by this object to perform Diffie Hellman exchange with the peer.') cips_isakmp_pol_lifetime = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 1, 5, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(60, 86400))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: cipsIsakmpPolLifetime.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolLifetime.setDescription('This object specifies the lifetime in seconds of the IKE tunnels generated using this policy specification.') cips_sa_lifetime = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1, 1), ci_psec_lifetime()).setUnits('Seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: cipsSALifetime.setStatus('current') if mibBuilder.loadTexts: cipsSALifetime.setDescription('The default lifetime (in seconds) assigned to an SA as a global policy (maybe overridden in specific cryptomap definitions).') cips_sa_lifesize = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1, 2), ci_psec_lifesize()).setUnits('KBytes').setMaxAccess('readonly') if mibBuilder.loadTexts: cipsSALifesize.setStatus('current') if mibBuilder.loadTexts: cipsSALifesize.setDescription('The default lifesize in KBytes assigned to an SA as a global policy (unless overridden in cryptomap definition)') cips_num_static_cryptomap_sets = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1, 3), ci_psec_num_crypto_maps()).setUnits('Integral Units').setMaxAccess('readonly') if mibBuilder.loadTexts: cipsNumStaticCryptomapSets.setStatus('current') if mibBuilder.loadTexts: cipsNumStaticCryptomapSets.setDescription('The number of Cryptomap Sets that are are fully configured. Statically defined cryptomap sets are ones where the operator has fully specified all the parameters required set up IPSec Virtual Private Networks (VPNs).') cips_num_cet_cryptomap_sets = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1, 4), ci_psec_num_crypto_maps()).setUnits('Integral Units').setMaxAccess('readonly') if mibBuilder.loadTexts: cipsNumCETCryptomapSets.setStatus('current') if mibBuilder.loadTexts: cipsNumCETCryptomapSets.setDescription('The number of static Cryptomap Sets that have at least one CET cryptomap element as a member of the set.') cips_num_dynamic_cryptomap_sets = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1, 5), ci_psec_num_crypto_maps()).setUnits('Integral Units').setMaxAccess('readonly') if mibBuilder.loadTexts: cipsNumDynamicCryptomapSets.setStatus('current') if mibBuilder.loadTexts: cipsNumDynamicCryptomapSets.setDescription("The number of dynamic IPSec Policy templates (called 'dynamic cryptomap templates') configured on the managed entity.") cips_num_ted_cryptomap_sets = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 1, 6), ci_psec_num_crypto_maps()).setUnits('Integral Units').setMaxAccess('readonly') if mibBuilder.loadTexts: cipsNumTEDCryptomapSets.setStatus('current') if mibBuilder.loadTexts: cipsNumTEDCryptomapSets.setDescription('The number of static Cryptomap Sets that have at least one dynamic cryptomap template bound to them which has the Tunnel Endpoint Discovery (TED) enabled.') cips_num_ted_probes_received = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 2, 1), counter32()).setUnits('Integral Units').setMaxAccess('readonly') if mibBuilder.loadTexts: cipsNumTEDProbesReceived.setStatus('current') if mibBuilder.loadTexts: cipsNumTEDProbesReceived.setDescription('The number of TED probes that were received by this managed entity since bootup. Not affected by any CLI operation.') cips_num_ted_probes_sent = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 2, 2), counter32()).setUnits('Integral Units').setMaxAccess('readonly') if mibBuilder.loadTexts: cipsNumTEDProbesSent.setStatus('current') if mibBuilder.loadTexts: cipsNumTEDProbesSent.setDescription('The number of TED probes that were dispatched by all the dynamic cryptomaps in this managed entity since bootup. Not affected by any CLI operation.') cips_num_ted_failures = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 2, 3), counter32()).setUnits('Integral Units').setMaxAccess('readonly') if mibBuilder.loadTexts: cipsNumTEDFailures.setStatus('current') if mibBuilder.loadTexts: cipsNumTEDFailures.setDescription('The number of TED probes that were dispatched by the local entity and that failed to locate crypto endpoint. Not affected by any CLI operation.') cips_max_s_as = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 3, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setUnits('Integral Units').setMaxAccess('readonly') if mibBuilder.loadTexts: cipsMaxSAs.setStatus('current') if mibBuilder.loadTexts: cipsMaxSAs.setDescription('The maximum number of IPsec Security Associations that can be established on this managed entity. If no theoretical limit exists, this returns value 0. Not affected by any CLI operation.') cips3_des_capable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 3, 2), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cips3DesCapable.setStatus('current') if mibBuilder.loadTexts: cips3DesCapable.setDescription('The value of this object is TRUE if the managed entity has the hardware nad software features to support 3DES encryption algorithm. Not affected by any CLI operation.') cips_static_cryptomap_set_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1)) if mibBuilder.loadTexts: cipsStaticCryptomapSetTable.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetTable.setDescription('The table containing the list of all cryptomap sets that are fully specified and are not wild-carded. The operator may include different types of cryptomaps in such a set - manual, CET, ISAKMP or dynamic.') cips_static_cryptomap_set_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1)).setIndexNames((0, 'CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetName')) if mibBuilder.loadTexts: cipsStaticCryptomapSetEntry.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetEntry.setDescription('Each entry contains the attributes associated with a single static cryptomap set.') cips_static_cryptomap_set_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 1), display_string()) if mibBuilder.loadTexts: cipsStaticCryptomapSetName.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetName.setDescription('The index of the static cryptomap table. The value of the string is the name string assigned by the operator in defining the cryptomap set.') cips_static_cryptomap_set_size = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 2), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapSetSize.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetSize.setDescription('The total number of cryptomap entries contained in this cryptomap set. ') cips_static_cryptomap_set_num_isakmp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 3), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumIsakmp.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumIsakmp.setDescription('The number of cryptomaps associated with this cryptomap set that use ISAKMP protocol to do key exchange.') cips_static_cryptomap_set_num_manual = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 4), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumManual.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumManual.setDescription('The number of cryptomaps associated with this cryptomap set that require the operator to manually setup the keys and SPIs.') cips_static_cryptomap_set_num_cet = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 5), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumCET.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumCET.setDescription("The number of cryptomaps of type 'ipsec-cisco' associated with this cryptomap set. Such cryptomap elements implement Cisco Encryption Technology based Virtual Private Networks.") cips_static_cryptomap_set_num_dynamic = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 6), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumDynamic.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumDynamic.setDescription('The number of dynamic cryptomap templates linked to this cryptomap set.') cips_static_cryptomap_set_num_disc = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 7), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumDisc.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumDisc.setDescription('The number of dynamic cryptomap templates linked to this cryptomap set that have Tunnel Endpoint Discovery (TED) enabled.') cips_static_cryptomap_set_num_s_as = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 1, 1, 8), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumSAs.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapSetNumSAs.setDescription('The number of and IPsec Security Associations that are active and were setup using this cryptomap. ') cips_dynamic_cryptomap_set_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 2)) if mibBuilder.loadTexts: cipsDynamicCryptomapSetTable.setStatus('current') if mibBuilder.loadTexts: cipsDynamicCryptomapSetTable.setDescription('The table containing the list of all dynamic cryptomaps that use IKE, defined on the managed entity.') cips_dynamic_cryptomap_set_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 2, 1)).setIndexNames((0, 'CISCO-IPSEC-MIB', 'cipsDynamicCryptomapSetName')) if mibBuilder.loadTexts: cipsDynamicCryptomapSetEntry.setStatus('current') if mibBuilder.loadTexts: cipsDynamicCryptomapSetEntry.setDescription('Each entry contains the attributes associated with a single dynamic cryptomap template.') cips_dynamic_cryptomap_set_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 2, 1, 1), display_string()) if mibBuilder.loadTexts: cipsDynamicCryptomapSetName.setStatus('current') if mibBuilder.loadTexts: cipsDynamicCryptomapSetName.setDescription('The index of the dynamic cryptomap table. The value of the string is the one assigned by the operator in defining the cryptomap set.') cips_dynamic_cryptomap_set_size = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 2, 1, 2), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsDynamicCryptomapSetSize.setStatus('current') if mibBuilder.loadTexts: cipsDynamicCryptomapSetSize.setDescription('The number of cryptomap entries in this cryptomap.') cips_dynamic_cryptomap_set_num_assoc = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 2, 1, 3), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsDynamicCryptomapSetNumAssoc.setStatus('current') if mibBuilder.loadTexts: cipsDynamicCryptomapSetNumAssoc.setDescription('The number of static cryptomap sets with which this dynamic cryptomap is associated. ') cips_static_cryptomap_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3)) if mibBuilder.loadTexts: cipsStaticCryptomapTable.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapTable.setDescription('The table ilisting the member cryptomaps of the cryptomap sets that are configured on the managed entity.') cips_static_cryptomap_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1)).setIndexNames((0, 'CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetName'), (0, 'CISCO-IPSEC-MIB', 'cipsStaticCryptomapPriority')) if mibBuilder.loadTexts: cipsStaticCryptomapEntry.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapEntry.setDescription('Each entry contains the attributes associated with a single static (fully specified) cryptomap entry. This table does not include the members of dynamic cryptomap sets that may be linked with the parent static cryptomap set.') cips_static_cryptomap_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))) if mibBuilder.loadTexts: cipsStaticCryptomapPriority.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapPriority.setDescription('The priority of the cryptomap entry in the cryptomap set. This is the second index component of this table.') cips_static_cryptomap_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 2), cryptomap_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapType.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapType.setDescription('The type of the cryptomap entry. This can be an ISAKMP cryptomap, CET or manual. Dynamic cryptomaps are not counted in this table.') cips_static_cryptomap_descr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 3), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapDescr.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapDescr.setDescription('The description string entered by the operatoir while creating this cryptomap. The string generally identifies a description and the purpose of this policy.') cips_static_cryptomap_peer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 4), ips_ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapPeer.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapPeer.setDescription('The IP address of the current peer associated with this IPSec policy item. Traffic that is protected by this cryptomap is protected by a tunnel that terminates at the device whose IP address is specified by this object.') cips_static_cryptomap_num_peers = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 40))).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapNumPeers.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapNumPeers.setDescription("The number of peers associated with this cryptomap entry. The peers other than the one identified by 'cipsStaticCryptomapPeer' are backup peers. Manual cryptomaps may have only one peer.") cips_static_cryptomap_pfs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 6), diff_hellman_grp()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapPfs.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapPfs.setDescription('This object identifies if the tunnels instantiated due to this policy item should use Perfect Forward Secrecy (PFS) and if so, what group of Oakley they should use.') cips_static_cryptomap_lifetime = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 7), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(120, 86400)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapLifetime.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapLifetime.setDescription('This object identifies the lifetime of the IPSec Security Associations (SA) created using this IPSec policy entry. If this value is zero, the lifetime assumes the value specified by the global lifetime parameter.') cips_static_cryptomap_lifesize = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 8), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(2560, 536870912)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapLifesize.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapLifesize.setDescription('This object identifies the lifesize (maximum traffic in bytes that may be carried) of the IPSec SAs created using this IPSec policy entry. If this value is zero, the lifetime assumes the value specified by the global lifesize parameter.') cips_static_cryptomap_level_host = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 3, 1, 9), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsStaticCryptomapLevelHost.setStatus('current') if mibBuilder.loadTexts: cipsStaticCryptomapLevelHost.setDescription('This object identifies the granularity of the IPSec SAs created using this IPSec policy entry. If this value is TRUE, distinct SA bundles are created for distinct hosts at the end of the application traffic.') cips_cryptomap_set_if_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 4)) if mibBuilder.loadTexts: cipsCryptomapSetIfTable.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapSetIfTable.setDescription('The table lists the binding of cryptomap sets to the interfaces of the managed entity.') cips_cryptomap_set_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 4, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetName')) if mibBuilder.loadTexts: cipsCryptomapSetIfEntry.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapSetIfEntry.setDescription('Each entry contains the record of the association between an interface and a cryptomap set (static) that is defined on the managed entity. Note that the cryptomap set identified in this binding must static. Dynamic cryptomaps cannot be bound to interfaces.') cips_cryptomap_set_if_virtual = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 4, 1, 1), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cipsCryptomapSetIfVirtual.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapSetIfVirtual.setDescription('The value of this object identifies if the interface to which the cryptomap set is attached is a tunnel (such as a GRE or PPTP tunnel).') cips_cryptomap_set_if_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 2, 3, 4, 1, 2), cryptomap_set_bind_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cipsCryptomapSetIfStatus.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapSetIfStatus.setDescription("This object identifies the status of the binding of the specified cryptomap set with the specified interface. The value when queried is always 'attached'. When set to 'detached', the cryptomap set if detached from the specified interface. The effect of this is same as the CLI command config-if# no crypto map cryptomapSetName Setting the value to 'attached' will result in SNMP General Error.") cips_cntl_isakmp_policy_added = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 1), trap_status().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cipsCntlIsakmpPolicyAdded.setStatus('current') if mibBuilder.loadTexts: cipsCntlIsakmpPolicyAdded.setDescription('This object defines the administrative state of sending the IOS IPsec ISAKMP Policy Add trap.') cips_cntl_isakmp_policy_deleted = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 2), trap_status().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cipsCntlIsakmpPolicyDeleted.setStatus('current') if mibBuilder.loadTexts: cipsCntlIsakmpPolicyDeleted.setDescription('This object defines the administrative state of sending the IOS IPsec ISAKMP Policy Delete trap.') cips_cntl_cryptomap_added = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 3), trap_status().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cipsCntlCryptomapAdded.setStatus('current') if mibBuilder.loadTexts: cipsCntlCryptomapAdded.setDescription('This object defines the administrative state of sending the IOS IPsec Cryptomap Add trap.') cips_cntl_cryptomap_deleted = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 4), trap_status().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cipsCntlCryptomapDeleted.setStatus('current') if mibBuilder.loadTexts: cipsCntlCryptomapDeleted.setDescription('This object defines the administrative state of sending the IOS IPsec Cryptomap Delete trap.') cips_cntl_cryptomap_set_attached = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 5), trap_status().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cipsCntlCryptomapSetAttached.setStatus('current') if mibBuilder.loadTexts: cipsCntlCryptomapSetAttached.setDescription('This object defines the administrative state of sending the IOS IPsec trap that is issued when a cryptomap set is attached to an interface.') cips_cntl_cryptomap_set_detached = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 6), trap_status().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cipsCntlCryptomapSetDetached.setStatus('current') if mibBuilder.loadTexts: cipsCntlCryptomapSetDetached.setDescription('This object defines the administrative state of sending the IOS IPsec trap that is issued when a cryptomap set is detached from an interface. to which it was earlier bound.') cips_cntl_too_many_s_as = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 62, 1, 4, 7), trap_status().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cipsCntlTooManySAs.setStatus('current') if mibBuilder.loadTexts: cipsCntlTooManySAs.setDescription('This object defines the administrative state of sending the IOS IPsec trap that is issued when the number of SAs crosses the maximum number of SAs that may be supported on the managed entity.') cips_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0)) cips_isakmp_policy_added = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 1)).setObjects(('CISCO-IPSEC-MIB', 'cipsNumIsakmpPolicies')) if mibBuilder.loadTexts: cipsIsakmpPolicyAdded.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolicyAdded.setDescription('This trap is generated when a new ISAKMP policy element is defined on the managed entity. The context of the event includes the updated number of ISAKMP policy elements currently available.') cips_isakmp_policy_deleted = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 2)).setObjects(('CISCO-IPSEC-MIB', 'cipsNumIsakmpPolicies')) if mibBuilder.loadTexts: cipsIsakmpPolicyDeleted.setStatus('current') if mibBuilder.loadTexts: cipsIsakmpPolicyDeleted.setDescription('This trap is generated when an existing ISAKMP policy element is deleted on the managed entity. The context of the event includes the updated number of ISAKMP policy elements currently available.') cips_cryptomap_added = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 3)).setObjects(('CISCO-IPSEC-MIB', 'cipsStaticCryptomapType'), ('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetSize')) if mibBuilder.loadTexts: cipsCryptomapAdded.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapAdded.setDescription('This trap is generated when a new cryptomap is added to the specified cryptomap set.') cips_cryptomap_deleted = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 4)).setObjects(('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetSize')) if mibBuilder.loadTexts: cipsCryptomapDeleted.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapDeleted.setDescription('This trap is generated when a cryptomap is removed from the specified cryptomap set.') cips_cryptomap_set_attached = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 5)).setObjects(('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetSize'), ('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetNumIsakmp'), ('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetNumDynamic')) if mibBuilder.loadTexts: cipsCryptomapSetAttached.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapSetAttached.setDescription('A cryptomap set must be attached to an interface of the device in order for it to be operational. This trap is generated when the cryptomap set attached to an active interface of the managed entity. The context of the notification includes: Size of the attached cryptomap set, Number of ISAKMP cryptomaps in the set and Number of Dynamic cryptomaps in the set.') cips_cryptomap_set_detached = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 6)).setObjects(('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetSize')) if mibBuilder.loadTexts: cipsCryptomapSetDetached.setStatus('current') if mibBuilder.loadTexts: cipsCryptomapSetDetached.setDescription('This trap is generated when a cryptomap set is detached from an interafce to which it was bound earlier. The context of the event identifies the size of the cryptomap set.') cips_too_many_s_as = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 62, 2, 0, 7)).setObjects(('CISCO-IPSEC-MIB', 'cipsMaxSAs')) if mibBuilder.loadTexts: cipsTooManySAs.setStatus('current') if mibBuilder.loadTexts: cipsTooManySAs.setDescription('This trap is generated when a new SA is attempted to be setup while the number of currently active SAs equals the maximum configurable. The variables are: cipsMaxSAs') cips_mib_conformances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 1)) cips_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2)) cips_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 1, 1)).setObjects(('CISCO-IPSEC-MIB', 'cipsMIBConfIsakmpGroup'), ('CISCO-IPSEC-MIB', 'cipsMIBConfIPSecGlobalsGroup'), ('CISCO-IPSEC-MIB', 'cipsMIBConfCapacityGroup'), ('CISCO-IPSEC-MIB', 'cipsMIBStaticCryptomapGroup'), ('CISCO-IPSEC-MIB', 'cipsMIBMandatoryNotifCntlGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cips_mib_compliance = cipsMIBCompliance.setStatus('current') if mibBuilder.loadTexts: cipsMIBCompliance.setDescription('The compliance statement for entities which implement the Cisco IPsec MIB') cips_mib_conf_isakmp_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 1)).setObjects(('CISCO-IPSEC-MIB', 'cipsIsakmpEnabled'), ('CISCO-IPSEC-MIB', 'cipsIsakmpIdentity'), ('CISCO-IPSEC-MIB', 'cipsIsakmpKeepaliveInterval'), ('CISCO-IPSEC-MIB', 'cipsNumIsakmpPolicies')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cips_mib_conf_isakmp_group = cipsMIBConfIsakmpGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBConfIsakmpGroup.setDescription('A collection of objects providing Global ISAKMP policy monitoring capability to a Cisco IPsec capable VPN router.') cips_mib_conf_ip_sec_globals_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 2)).setObjects(('CISCO-IPSEC-MIB', 'cipsSALifetime'), ('CISCO-IPSEC-MIB', 'cipsSALifesize')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cips_mib_conf_ip_sec_globals_group = cipsMIBConfIPSecGlobalsGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBConfIPSecGlobalsGroup.setDescription('A collection of objects providing Global IPSec policy monitoring capability to a Cisco IPsec capable VPN router.') cips_mib_conf_capacity_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 3)).setObjects(('CISCO-IPSEC-MIB', 'cipsMaxSAs'), ('CISCO-IPSEC-MIB', 'cips3DesCapable')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cips_mib_conf_capacity_group = cipsMIBConfCapacityGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBConfCapacityGroup.setDescription('A collection of objects providing IPsec System Capacity monitoring capability to a Cisco IPsec capable VPN router.') cips_mib_static_cryptomap_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 4)).setObjects(('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetSize'), ('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetNumIsakmp'), ('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetNumCET'), ('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetNumSAs')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cips_mib_static_cryptomap_group = cipsMIBStaticCryptomapGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBStaticCryptomapGroup.setDescription('A collection of objects instrumenting the properties of the Static (fully specified) Cryptomap Sets on an IPsec-capable IOS router.') cips_mib_manual_cryptomap_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 5)).setObjects(('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetNumManual')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cips_mib_manual_cryptomap_group = cipsMIBManualCryptomapGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBManualCryptomapGroup.setDescription('A collection of objects instrumenting the properties of the Manual Cryptomap entries on a Cisco IPsec capable IOS router.') cips_mib_dynamic_cryptomap_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 6)).setObjects(('CISCO-IPSEC-MIB', 'cipsNumTEDProbesReceived'), ('CISCO-IPSEC-MIB', 'cipsNumTEDProbesSent'), ('CISCO-IPSEC-MIB', 'cipsNumTEDFailures'), ('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetNumDynamic'), ('CISCO-IPSEC-MIB', 'cipsStaticCryptomapSetNumDisc'), ('CISCO-IPSEC-MIB', 'cipsNumTEDCryptomapSets'), ('CISCO-IPSEC-MIB', 'cipsDynamicCryptomapSetSize'), ('CISCO-IPSEC-MIB', 'cipsDynamicCryptomapSetNumAssoc')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cips_mib_dynamic_cryptomap_group = cipsMIBDynamicCryptomapGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBDynamicCryptomapGroup.setDescription('A collection of objects instrumenting the properties of the Dynamic Cryptomap group on a Cisco IPsec capable IOS router.') cips_mib_mandatory_notif_cntl_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 62, 3, 2, 7)).setObjects(('CISCO-IPSEC-MIB', 'cipsCntlIsakmpPolicyAdded'), ('CISCO-IPSEC-MIB', 'cipsCntlIsakmpPolicyDeleted'), ('CISCO-IPSEC-MIB', 'cipsCntlCryptomapAdded'), ('CISCO-IPSEC-MIB', 'cipsCntlCryptomapDeleted'), ('CISCO-IPSEC-MIB', 'cipsCntlCryptomapSetAttached'), ('CISCO-IPSEC-MIB', 'cipsCntlCryptomapSetDetached'), ('CISCO-IPSEC-MIB', 'cipsCntlTooManySAs')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cips_mib_mandatory_notif_cntl_group = cipsMIBMandatoryNotifCntlGroup.setStatus('current') if mibBuilder.loadTexts: cipsMIBMandatoryNotifCntlGroup.setDescription('A collection of objects providing IPsec Notification capability to a IPsec-capable IOS router. It is mandatory to implement this set of objects pertaining to IOS notifications about IPSec activity.') mibBuilder.exportSymbols('CISCO-IPSEC-MIB', cipsIPsecGlobals=cipsIPsecGlobals, cipsCryptomapSetIfVirtual=cipsCryptomapSetIfVirtual, cipsStaticCryptomapSetNumManual=cipsStaticCryptomapSetNumManual, cipsStaticCryptomapDescr=cipsStaticCryptomapDescr, cipsIsakmpGroup=cipsIsakmpGroup, cipsDynamicCryptomapSetSize=cipsDynamicCryptomapSetSize, cipsCryptomapAdded=cipsCryptomapAdded, cipsTrapCntlGroup=cipsTrapCntlGroup, cipsCryptomapSetIfEntry=cipsCryptomapSetIfEntry, cipsMIBConfIPSecGlobalsGroup=cipsMIBConfIPSecGlobalsGroup, cipsStaticCryptomapSetNumIsakmp=cipsStaticCryptomapSetNumIsakmp, cipsMIBMandatoryNotifCntlGroup=cipsMIBMandatoryNotifCntlGroup, cipsNumTEDFailures=cipsNumTEDFailures, ciscoIPsecMIB=ciscoIPsecMIB, cipsStaticCryptomapPfs=cipsStaticCryptomapPfs, cipsStaticCryptomapSetSize=cipsStaticCryptomapSetSize, CryptomapSetBindStatus=CryptomapSetBindStatus, ciscoIPsecMIBNotificationPrefix=ciscoIPsecMIBNotificationPrefix, cipsNumCETCryptomapSets=cipsNumCETCryptomapSets, cipsNumStaticCryptomapSets=cipsNumStaticCryptomapSets, cipsIsakmpPolPriority=cipsIsakmpPolPriority, IkeHashAlgo=IkeHashAlgo, cipsCryptomapSetAttached=cipsCryptomapSetAttached, cipsMIBDynamicCryptomapGroup=cipsMIBDynamicCryptomapGroup, cips3DesCapable=cips3DesCapable, cipsIsakmpPolicyTable=cipsIsakmpPolicyTable, cipsStaticCryptomapPeer=cipsStaticCryptomapPeer, cipsSysCapacityGroup=cipsSysCapacityGroup, cipsStaticCryptomapLevelHost=cipsStaticCryptomapLevelHost, cipsIsakmpKeepaliveInterval=cipsIsakmpKeepaliveInterval, cipsMIBCompliance=cipsMIBCompliance, cipsNumDynamicCryptomapSets=cipsNumDynamicCryptomapSets, cipsIsakmpPolicyEntry=cipsIsakmpPolicyEntry, cipsStaticCryptomapType=cipsStaticCryptomapType, cipsDynamicCryptomapSetEntry=cipsDynamicCryptomapSetEntry, cipsIsakmpPolEncr=cipsIsakmpPolEncr, ciscoIPsecMIBObjects=ciscoIPsecMIBObjects, cipsMIBStaticCryptomapGroup=cipsMIBStaticCryptomapGroup, cipsStaticCryptomapSetName=cipsStaticCryptomapSetName, cipsNumTEDProbesSent=cipsNumTEDProbesSent, cipsMIBConfCapacityGroup=cipsMIBConfCapacityGroup, cipsCntlTooManySAs=cipsCntlTooManySAs, cipsIsakmpPolAuth=cipsIsakmpPolAuth, IPSIpAddress=IPSIpAddress, ciscoIPsecMIBConformance=ciscoIPsecMIBConformance, cipsMaxSAs=cipsMaxSAs, cipsDynamicCryptomapSetNumAssoc=cipsDynamicCryptomapSetNumAssoc, cipsIsakmpPolHash=cipsIsakmpPolHash, cipsStaticCryptomapTable=cipsStaticCryptomapTable, CryptomapType=CryptomapType, cipsMIBConformances=cipsMIBConformances, cipsStaticCryptomapNumPeers=cipsStaticCryptomapNumPeers, cipsNumTEDProbesReceived=cipsNumTEDProbesReceived, cipsCryptomapDeleted=cipsCryptomapDeleted, cipsStaticCryptomapSetNumSAs=cipsStaticCryptomapSetNumSAs, cipsStaticCryptomapSetNumDynamic=cipsStaticCryptomapSetNumDynamic, cipsStaticCryptomapLifesize=cipsStaticCryptomapLifesize, cipsCntlCryptomapAdded=cipsCntlCryptomapAdded, cipsIsakmpPolicyAdded=cipsIsakmpPolicyAdded, IkeIdentityType=IkeIdentityType, cipsIsakmpIdentity=cipsIsakmpIdentity, cipsCryptomapSetIfTable=cipsCryptomapSetIfTable, cipsDynamicCryptomapSetTable=cipsDynamicCryptomapSetTable, PYSNMP_MODULE_ID=ciscoIPsecMIB, cipsMIBManualCryptomapGroup=cipsMIBManualCryptomapGroup, cipsMIBNotifications=cipsMIBNotifications, cipsIsakmpEnabled=cipsIsakmpEnabled, cipsTooManySAs=cipsTooManySAs, cipsStaticCryptomapSetEntry=cipsStaticCryptomapSetEntry, cipsCntlCryptomapSetAttached=cipsCntlCryptomapSetAttached, cipsMIBConfIsakmpGroup=cipsMIBConfIsakmpGroup, CIPsecLifesize=CIPsecLifesize, cipsDynamicCryptomapSetName=cipsDynamicCryptomapSetName, cipsCryptomapGroup=cipsCryptomapGroup, cipsCntlCryptomapDeleted=cipsCntlCryptomapDeleted, TrapStatus=TrapStatus, cipsNumIsakmpPolicies=cipsNumIsakmpPolicies, cipsIsakmpPolicyDeleted=cipsIsakmpPolicyDeleted, cipsStaticCryptomapLifetime=cipsStaticCryptomapLifetime, cipsCntlCryptomapSetDetached=cipsCntlCryptomapSetDetached, EncryptAlgo=EncryptAlgo, cipsIPsecStatistics=cipsIPsecStatistics, cipsCntlIsakmpPolicyAdded=cipsCntlIsakmpPolicyAdded, IkeAuthMethod=IkeAuthMethod, cipsSALifetime=cipsSALifetime, cipsStaticCryptomapSetNumCET=cipsStaticCryptomapSetNumCET, cipsStaticCryptomapSetTable=cipsStaticCryptomapSetTable, cipsCntlIsakmpPolicyDeleted=cipsCntlIsakmpPolicyDeleted, cipsIsakmpPolLifetime=cipsIsakmpPolLifetime, cipsStaticCryptomapEntry=cipsStaticCryptomapEntry, DiffHellmanGrp=DiffHellmanGrp, cipsCryptomapSetDetached=cipsCryptomapSetDetached, cipsStaticCryptomapSetNumDisc=cipsStaticCryptomapSetNumDisc, CIPsecNumCryptoMaps=CIPsecNumCryptoMaps, cipsNumTEDCryptomapSets=cipsNumTEDCryptomapSets, cipsSALifesize=cipsSALifesize, cipsCryptomapSetIfStatus=cipsCryptomapSetIfStatus, CIPsecLifetime=CIPsecLifetime, cipsStaticCryptomapPriority=cipsStaticCryptomapPriority, cipsIsakmpPolGroup=cipsIsakmpPolGroup, cipsIPsecGroup=cipsIPsecGroup, cipsMIBGroups=cipsMIBGroups)
sensorData = open('input.txt').read().splitlines() diff = [-1, 0, 1] key = None trenchMap = set() y = 0 for line in sensorData: if not key: key = line elif len(line) > 0: for x in range(len(line)): if line[x] == '#': trenchMap.add((x, y)) y += 1 neighboorhood = set() for point in trenchMap: x, y = point for dx in diff: for dy in diff: neighboorhood.add((x + dx, y + dy)) print(len(key)) def oneStep(trenchMap, neighboorhood, itr=0): itrKey = {'#': '1', '.': '0'} pointToSave = '#' if key[0] == '#' and key[-1] == '.': if itr > 0 and (itr % 2) == 0: itrKey = {'#': '0', '.': '1'} else: pointToSave = '.' newTrenchMap = set() newNeighboorhood = set() for point in neighboorhood: number = '' x, y = point for dy in diff: for dx in diff: if (x + dx, y + dy) in trenchMap: number += itrKey['#'] else: number += itrKey['.'] if key[int(number, 2)] == pointToSave: newTrenchMap.add(point) for dy in diff: for dx in diff: newNeighboorhood.add((x + dx, y + dy)) return newTrenchMap, newNeighboorhood def printMap(trenchMap): minY = len(trenchMap) minX = len(trenchMap) maxY = 0 maxX = 0 for point in trenchMap: x, y = point if y < minY: minY = y if y > maxY: maxY = y if x < minX: minX = x if x > maxX: maxX = x for y in range(minY, maxY + 1): for x in range(minX, maxX + 1): if (x, y) in trenchMap: print('#', end='') else: print('.', end='') print('') print('') for i in range(50): trenchMap, neighboorhood = oneStep(trenchMap, neighboorhood, itr=i + 1) if (i + 1) == 2: print("Answer part A: the number of lit points is {}".format(len(trenchMap))) print("Answer part B: the number of lit points is {}".format(len(trenchMap)))
sensor_data = open('input.txt').read().splitlines() diff = [-1, 0, 1] key = None trench_map = set() y = 0 for line in sensorData: if not key: key = line elif len(line) > 0: for x in range(len(line)): if line[x] == '#': trenchMap.add((x, y)) y += 1 neighboorhood = set() for point in trenchMap: (x, y) = point for dx in diff: for dy in diff: neighboorhood.add((x + dx, y + dy)) print(len(key)) def one_step(trenchMap, neighboorhood, itr=0): itr_key = {'#': '1', '.': '0'} point_to_save = '#' if key[0] == '#' and key[-1] == '.': if itr > 0 and itr % 2 == 0: itr_key = {'#': '0', '.': '1'} else: point_to_save = '.' new_trench_map = set() new_neighboorhood = set() for point in neighboorhood: number = '' (x, y) = point for dy in diff: for dx in diff: if (x + dx, y + dy) in trenchMap: number += itrKey['#'] else: number += itrKey['.'] if key[int(number, 2)] == pointToSave: newTrenchMap.add(point) for dy in diff: for dx in diff: newNeighboorhood.add((x + dx, y + dy)) return (newTrenchMap, newNeighboorhood) def print_map(trenchMap): min_y = len(trenchMap) min_x = len(trenchMap) max_y = 0 max_x = 0 for point in trenchMap: (x, y) = point if y < minY: min_y = y if y > maxY: max_y = y if x < minX: min_x = x if x > maxX: max_x = x for y in range(minY, maxY + 1): for x in range(minX, maxX + 1): if (x, y) in trenchMap: print('#', end='') else: print('.', end='') print('') print('') for i in range(50): (trench_map, neighboorhood) = one_step(trenchMap, neighboorhood, itr=i + 1) if i + 1 == 2: print('Answer part A: the number of lit points is {}'.format(len(trenchMap))) print('Answer part B: the number of lit points is {}'.format(len(trenchMap)))
class Config(object): CHROME_PATH = '/Library/Application Support/Google/chromedriver76.0.3809.68' BROWSERMOB_PATH = '/usr/local/bin/browsermob-proxy-2.1.4/bin/browsermob-proxy' class Docker(Config): CHROME_PATH = '/usr/local/bin/chromedriver'
class Config(object): chrome_path = '/Library/Application Support/Google/chromedriver76.0.3809.68' browsermob_path = '/usr/local/bin/browsermob-proxy-2.1.4/bin/browsermob-proxy' class Docker(Config): chrome_path = '/usr/local/bin/chromedriver'
numbers = [1, 2, 3, 4, 5] for x in numbers: print(x) print("--------") for x in reversed(numbers): print(x) print(numbers)
numbers = [1, 2, 3, 4, 5] for x in numbers: print(x) print('--------') for x in reversed(numbers): print(x) print(numbers)
a=int(input()) def s(n): if n==3:return['***','* *','***'] x=s(n//3) y=list(zip(x,x,x)) for i in range(len(y)): y[i]=''.join(y[i]) z=list(zip(x,[' '*(n//3)]*(n//3),x)) for i in range(len(z)): z[i]=''.join(z[i]) return y+z+y print('\n'.join(s(a)))
a = int(input()) def s(n): if n == 3: return ['***', '* *', '***'] x = s(n // 3) y = list(zip(x, x, x)) for i in range(len(y)): y[i] = ''.join(y[i]) z = list(zip(x, [' ' * (n // 3)] * (n // 3), x)) for i in range(len(z)): z[i] = ''.join(z[i]) return y + z + y print('\n'.join(s(a)))
def dictTolist(data): result = [] if isinstance(data, dict) and data.__len__() > 0: result.append(data) elif isinstance(data, list) and data.__len__() > 0: result = data else: result = None return result
def dict_tolist(data): result = [] if isinstance(data, dict) and data.__len__() > 0: result.append(data) elif isinstance(data, list) and data.__len__() > 0: result = data else: result = None return result
######################## # * First Solution ######################## class Solution: def searchInsert(self, nums: List[int], target: int) -> int: low = 0 high = len(nums)-1 while low < high: mid = (low+high) // 2 if nums[mid] == target: return mid elif nums[mid] > target: high = mid-1 elif nums[mid] < target: low = mid+1 for i in range(len(nums)): if nums[i] >= target: return i return len(nums) ######################## # * Second Solution ######################## class Solution: def searchInsert(self, nums: List[int], target: int) -> int: # ? Border Cases if target > nums[-1]: return len(nums) if target <= nums[0]: return 0 ############ # * Binary Search here low = 0 high = len(nums)-1 while low < high: mid = (low+high) // 2 if nums[mid] == target: return mid elif nums[mid] > target: high = mid-1 elif nums[mid] < target: low = mid+1 # * Simple Traversal here for i in range(len(nums)): if nums[i] >= target: return i
class Solution: def search_insert(self, nums: List[int], target: int) -> int: low = 0 high = len(nums) - 1 while low < high: mid = (low + high) // 2 if nums[mid] == target: return mid elif nums[mid] > target: high = mid - 1 elif nums[mid] < target: low = mid + 1 for i in range(len(nums)): if nums[i] >= target: return i return len(nums) class Solution: def search_insert(self, nums: List[int], target: int) -> int: if target > nums[-1]: return len(nums) if target <= nums[0]: return 0 low = 0 high = len(nums) - 1 while low < high: mid = (low + high) // 2 if nums[mid] == target: return mid elif nums[mid] > target: high = mid - 1 elif nums[mid] < target: low = mid + 1 for i in range(len(nums)): if nums[i] >= target: return i
# Dictionary # length (len), check a key, get, set, add # Dictionary 1 ------------------------------------------- print(" Dictionary with string keys ".center(44, "-")) dict_employee_IDs = {"ID01": 'John Papa', "ID02": 'David Thompson', "ID03": 'Terry Gao', "ID04": 'Barry Tex'} print(dict_employee_IDs) # len ------------------------------------------- print(" dictionary length ".center(44, "-")) dict_employee_IDs_length = len(dict_employee_IDs) print(str(dict_employee_IDs_length)) # Check if a key is in dictionary ------------------------------------------- print(" Check if a key is in dictionary ".center(44, "-")) emp_id = "ID02" # emp_id = "ID05" # Invalid Key if emp_id in dict_employee_IDs: name = dict_employee_IDs[emp_id] print('Employee ID {} is {}.'.format(emp_id, name)) else: print('Employee ID {} not found!'.format(emp_id)) # Dictionary 2 ------------------------------------------- print(" Dictionary with string keys ".center(44, "-")) dict_employee1_Info = {"Name": 'John Papa', "Department": 'Network', "DataOfBirth": '02/24/1975', "Salary": '$60K US'} print(dict_employee1_Info) # get ------------------------------------------- print(" Getting data from dictionary ".center(44, "-")) name = dict_employee1_Info.get("Name") department = dict_employee1_Info.get("Department") dob = dict_employee1_Info.get("DataOfBirth") salary = dict_employee1_Info.get("Salary") print('{} works in {} department with a salary of {}. His data of birth is {}'.format(name, department, salary, dob)) print(dict_employee1_Info.get("City")) print(dict_employee1_Info.get("Branch", "Unknown")) # set ------------------------------------------- print(" Setting value for an item in dictionary ".center(60, "-")) dict_employee1_Info["Department"] = 'Development' dict_employee1_Info["Salary"] = '$70K US' print('{} works in {} department with a salary of {}. His data of birth is {}'.format(name, department, salary, dob)) department = dict_employee1_Info.get("Department") salary = dict_employee1_Info.get("Salary") print('{} works in {} department with a salary of {}. His data of birth is {}'.format(name, department, salary, dob)) print(dict_employee1_Info) # add ------------------------------------------- print(" Add to dictionary ".center(60, "-")) dict_employee1_Info["Branch"] = "Airport Branch" dict_employee1_Info["City"] = "Boston" print(dict_employee1_Info) print(dict_employee1_Info.get("City")) print(dict_employee1_Info.get("Branch", "Unknown"))
print(' Dictionary with string keys '.center(44, '-')) dict_employee_i_ds = {'ID01': 'John Papa', 'ID02': 'David Thompson', 'ID03': 'Terry Gao', 'ID04': 'Barry Tex'} print(dict_employee_IDs) print(' dictionary length '.center(44, '-')) dict_employee_i_ds_length = len(dict_employee_IDs) print(str(dict_employee_IDs_length)) print(' Check if a key is in dictionary '.center(44, '-')) emp_id = 'ID02' if emp_id in dict_employee_IDs: name = dict_employee_IDs[emp_id] print('Employee ID {} is {}.'.format(emp_id, name)) else: print('Employee ID {} not found!'.format(emp_id)) print(' Dictionary with string keys '.center(44, '-')) dict_employee1__info = {'Name': 'John Papa', 'Department': 'Network', 'DataOfBirth': '02/24/1975', 'Salary': '$60K US'} print(dict_employee1_Info) print(' Getting data from dictionary '.center(44, '-')) name = dict_employee1_Info.get('Name') department = dict_employee1_Info.get('Department') dob = dict_employee1_Info.get('DataOfBirth') salary = dict_employee1_Info.get('Salary') print('{} works in {} department with a salary of {}. His data of birth is {}'.format(name, department, salary, dob)) print(dict_employee1_Info.get('City')) print(dict_employee1_Info.get('Branch', 'Unknown')) print(' Setting value for an item in dictionary '.center(60, '-')) dict_employee1_Info['Department'] = 'Development' dict_employee1_Info['Salary'] = '$70K US' print('{} works in {} department with a salary of {}. His data of birth is {}'.format(name, department, salary, dob)) department = dict_employee1_Info.get('Department') salary = dict_employee1_Info.get('Salary') print('{} works in {} department with a salary of {}. His data of birth is {}'.format(name, department, salary, dob)) print(dict_employee1_Info) print(' Add to dictionary '.center(60, '-')) dict_employee1_Info['Branch'] = 'Airport Branch' dict_employee1_Info['City'] = 'Boston' print(dict_employee1_Info) print(dict_employee1_Info.get('City')) print(dict_employee1_Info.get('Branch', 'Unknown'))
# Processing functions for various USMTF message formats def tacelint(logger_item, message_dict, lines_list, processed_message_list): prev_soi = [] prev_line = [] for line in lines_list: if len(prev_line) == 0: prev_line.append(line) else: del prev_line[0] prev_line.append(line) line_split = line.split("/") if line_split[0] == 'SOI': if len(prev_soi) == 0: prev_soi.append(line) else: del prev_soi[0] prev_soi.append(line) message_dict['tar-sig-id'] = line_split[1] message_dict['time-up'] = line_split[2] message_dict['time-down'] = line_split[3] message_dict['sort-code'] = line_split[4] message_dict['emitter-desig'] = line_split[5] try: message_dict['event-loc'] = line_split[6] except: pass try: message_dict['tgt-id'] = line_split[7] except: pass try: message_dict['enemy-uid'] = line_split[8] except: pass try: message_dict['wpn-type'] = line_split[9] except: pass try: message_dict['emitter-func-code'] = line_split[10] except: pass continue if line_split[0] == 'EMLOC': message_dict['data-entry'] = line_split[1] message_dict['emitter-loc-cat'] = line_split[2] message_dict['loc'] = line_split[3].split(":")[1] message_dict['orientation'] = line_split[5][:-1] message_dict['semi-major'] = line_split[6][:-2] message_dict['semi-minor'] = line_split[7][:-2] message_dict['units'] = line_split[6][-2:] continue if line_split[0] == 'PRM': message_dict['data-entry'] = line_split[1] message_dict['freq'] = line_split[2][:-3] message_dict['freq-units'] = line_split[2][-3:] message_dict['rf-op-mode'] = line_split[3] message_dict['pri'] = line_split[4].split(":")[1] try: message_dict['pri-ac'] = line_split[5] except: pass try: message_dict['pd'] = line_split[6].split(":")[1] except: pass try: message_dict['scan-type'] = line_split[7] except: pass try: message_dict['scan-rate'] = line_split[8] except: pass try: message_dict['ant-pol'] = line_split[9] except: pass processed_message_list.append(message_dict) continue if line_split[0] == 'REF': message_dict['serial-letter'] = line_split[1] message_dict['ref-type'] = line_split[2] message_dict['originiator'] = line_split[3] message_dict['dt-ref'] = line_split[4] continue if line_split[0] == 'AMPN': message_dict['ampn'] = line_split[1] processed_message_list.append(message_dict) continue if line_split[0] == 'NARR': message_dict['narr'] = line_split[1] processed_message_list.append(message_dict) continue if line_split[0] == 'COLLINFO': try: message_dict['collector-di'] = line_split[1] except: pass try: message_dict['collector-tri'] = line_split[2] except: pass try: message_dict['coll-msn-num'] = line_split[3] except: pass try: message_dict['coll-proj-name'] = line_split[4] except: pass continue if line_split[0] == 'FORCODE': message_dict['forcode'] = line_split[1] processed_message_list.append(message_dict) continue if line_split[0] == 'PLATID': message_dict['scn'] = line_split[1] message_dict['pt-d'] = line_split[2] message_dict['pt'] = line_split[3] message_dict['plat-name'] = line_split[4] message_dict['ship-name'] = line_split[5] try: message_dict['pen-num'] = line_split[6] except: pass try: message_dict['nationality'] = line_split[7] except: pass try: message_dict['track-num'] = line_split[8] except: pass processed_message_list.append(message_dict) continue if line_split[0] == 'DECL': message_dict['source-class'] = line_split[1] message_dict['class-reason'] = line_split[2] message_dict['dg-inst'] = line_split[3] try: message_dict['dg-exempt-code'] = line_split[4] except: pass processed_message_list.append(message_dict) continue
def tacelint(logger_item, message_dict, lines_list, processed_message_list): prev_soi = [] prev_line = [] for line in lines_list: if len(prev_line) == 0: prev_line.append(line) else: del prev_line[0] prev_line.append(line) line_split = line.split('/') if line_split[0] == 'SOI': if len(prev_soi) == 0: prev_soi.append(line) else: del prev_soi[0] prev_soi.append(line) message_dict['tar-sig-id'] = line_split[1] message_dict['time-up'] = line_split[2] message_dict['time-down'] = line_split[3] message_dict['sort-code'] = line_split[4] message_dict['emitter-desig'] = line_split[5] try: message_dict['event-loc'] = line_split[6] except: pass try: message_dict['tgt-id'] = line_split[7] except: pass try: message_dict['enemy-uid'] = line_split[8] except: pass try: message_dict['wpn-type'] = line_split[9] except: pass try: message_dict['emitter-func-code'] = line_split[10] except: pass continue if line_split[0] == 'EMLOC': message_dict['data-entry'] = line_split[1] message_dict['emitter-loc-cat'] = line_split[2] message_dict['loc'] = line_split[3].split(':')[1] message_dict['orientation'] = line_split[5][:-1] message_dict['semi-major'] = line_split[6][:-2] message_dict['semi-minor'] = line_split[7][:-2] message_dict['units'] = line_split[6][-2:] continue if line_split[0] == 'PRM': message_dict['data-entry'] = line_split[1] message_dict['freq'] = line_split[2][:-3] message_dict['freq-units'] = line_split[2][-3:] message_dict['rf-op-mode'] = line_split[3] message_dict['pri'] = line_split[4].split(':')[1] try: message_dict['pri-ac'] = line_split[5] except: pass try: message_dict['pd'] = line_split[6].split(':')[1] except: pass try: message_dict['scan-type'] = line_split[7] except: pass try: message_dict['scan-rate'] = line_split[8] except: pass try: message_dict['ant-pol'] = line_split[9] except: pass processed_message_list.append(message_dict) continue if line_split[0] == 'REF': message_dict['serial-letter'] = line_split[1] message_dict['ref-type'] = line_split[2] message_dict['originiator'] = line_split[3] message_dict['dt-ref'] = line_split[4] continue if line_split[0] == 'AMPN': message_dict['ampn'] = line_split[1] processed_message_list.append(message_dict) continue if line_split[0] == 'NARR': message_dict['narr'] = line_split[1] processed_message_list.append(message_dict) continue if line_split[0] == 'COLLINFO': try: message_dict['collector-di'] = line_split[1] except: pass try: message_dict['collector-tri'] = line_split[2] except: pass try: message_dict['coll-msn-num'] = line_split[3] except: pass try: message_dict['coll-proj-name'] = line_split[4] except: pass continue if line_split[0] == 'FORCODE': message_dict['forcode'] = line_split[1] processed_message_list.append(message_dict) continue if line_split[0] == 'PLATID': message_dict['scn'] = line_split[1] message_dict['pt-d'] = line_split[2] message_dict['pt'] = line_split[3] message_dict['plat-name'] = line_split[4] message_dict['ship-name'] = line_split[5] try: message_dict['pen-num'] = line_split[6] except: pass try: message_dict['nationality'] = line_split[7] except: pass try: message_dict['track-num'] = line_split[8] except: pass processed_message_list.append(message_dict) continue if line_split[0] == 'DECL': message_dict['source-class'] = line_split[1] message_dict['class-reason'] = line_split[2] message_dict['dg-inst'] = line_split[3] try: message_dict['dg-exempt-code'] = line_split[4] except: pass processed_message_list.append(message_dict) continue
def first(n_1): line_1 = set() for i in range(n_1): number = int(input()) line_1.add(number) return line_1 def second(n_2): line_2 = set() for i in range(n_2): number = int(input()) line_2.add(number) return line_2 data = input().split() n_1 = int(data[0]) n_2 =int(data[1]) first_line = first(n_1) second_line = second(n_2) common = first_line.intersection(second_line) for i in common: print(i)
def first(n_1): line_1 = set() for i in range(n_1): number = int(input()) line_1.add(number) return line_1 def second(n_2): line_2 = set() for i in range(n_2): number = int(input()) line_2.add(number) return line_2 data = input().split() n_1 = int(data[0]) n_2 = int(data[1]) first_line = first(n_1) second_line = second(n_2) common = first_line.intersection(second_line) for i in common: print(i)
class UnityPackException(Exception): pass class ArchiveNotFound(UnityPackException): pass
class Unitypackexception(Exception): pass class Archivenotfound(UnityPackException): pass
# Interview Question #5 # The problem is that we want to find duplicates in a one-dimensional array of integers in O(N) running time # where the integer values are smaller than the length of the array! # For example: if we have a list [1, 2, 3, 1, 5] then the algorithm can detect that there are a duplicate with value 1. # Note: the array can not contain items smaller than 0 and items with values greater than the size of the list. # This is how we can achieve O(N) linear running time complexity! def duplicate_finder_1(nums): duplicates = [] for n in set(nums): if nums.count(n) > 1: duplicates.append(n) return duplicates if duplicates else 'The array does not contain any duplicates!' def duplicate_finder_2(nums): duplicates = set() for i, n in enumerate(sorted(nums)): if i + 1 < len(nums) and n == nums[i + 1]: duplicates.add(n) return list(duplicates) if duplicates else 'The array does not contain any duplicates!' # Course implementation def duplicate_finder_3(nums): duplicates = set() for n in nums: if nums[abs(n)] >= 0: nums[abs(n)] *= -1 else: duplicates.add(n) return list({-n if n < 0 else n for n in duplicates}) if duplicates \ else 'The array does not contain any duplicates!' # return list(map(lambda n: n * -1 if n < 0 else n, # duplicates)) if duplicates else 'The array does not contain any duplicates!' # My solutions allow the use of numbers greater than the length of the array print(duplicate_finder_1([1, 2, 3, 4])) print(duplicate_finder_1([1, 1, 2, 3, 3, 4])) print(duplicate_finder_2([5, 6, 7, 8])) print(duplicate_finder_2([5, 6, 6, 6, 7, 7, 9])) print(duplicate_finder_3([2, 3, 1, 2, 4, 3, 3])) print(duplicate_finder_3([0, 1, 2]))
def duplicate_finder_1(nums): duplicates = [] for n in set(nums): if nums.count(n) > 1: duplicates.append(n) return duplicates if duplicates else 'The array does not contain any duplicates!' def duplicate_finder_2(nums): duplicates = set() for (i, n) in enumerate(sorted(nums)): if i + 1 < len(nums) and n == nums[i + 1]: duplicates.add(n) return list(duplicates) if duplicates else 'The array does not contain any duplicates!' def duplicate_finder_3(nums): duplicates = set() for n in nums: if nums[abs(n)] >= 0: nums[abs(n)] *= -1 else: duplicates.add(n) return list({-n if n < 0 else n for n in duplicates}) if duplicates else 'The array does not contain any duplicates!' print(duplicate_finder_1([1, 2, 3, 4])) print(duplicate_finder_1([1, 1, 2, 3, 3, 4])) print(duplicate_finder_2([5, 6, 7, 8])) print(duplicate_finder_2([5, 6, 6, 6, 7, 7, 9])) print(duplicate_finder_3([2, 3, 1, 2, 4, 3, 3])) print(duplicate_finder_3([0, 1, 2]))
''' sgqlc - Simple GraphQL Client ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Access GraphQL endpoints using Python ===================================== This package provide the following modules: - :mod:`sgqlc.endpoint.base`: with abstract class :class:`sgqlc.endpoint.base.BaseEndpoint` and helpful logging utilities to transform errors into JSON objects. - :mod:`sgqlc.endpoint.http`: concrete :class:`sgqlc.endpoint.http.HTTPEndpoint` using :func:`urllib.request.urlopen()`. :license: ISC ''' __docformat__ = 'reStructuredText en'
""" sgqlc - Simple GraphQL Client ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Access GraphQL endpoints using Python ===================================== This package provide the following modules: - :mod:`sgqlc.endpoint.base`: with abstract class :class:`sgqlc.endpoint.base.BaseEndpoint` and helpful logging utilities to transform errors into JSON objects. - :mod:`sgqlc.endpoint.http`: concrete :class:`sgqlc.endpoint.http.HTTPEndpoint` using :func:`urllib.request.urlopen()`. :license: ISC """ __docformat__ = 'reStructuredText en'
START = { "type": "http.response.start", "status": 200, "headers": [ (b"content-length", b"13"), (b"content-type", b"text/html; charset=utf-8"), ], } BODY1 = {"type": "http.response.body", "body": b"Hello"} BODY2 = {"type": "http.response.body", "body": b", world!"} async def helloworld(scope, receive, send) -> None: await send(START) await send(BODY1) await send(BODY2) async def receiver(scope, receive, send) -> None: while True: try: await receive() except StopAsyncIteration: break await send(START) await send(BODY1) await send(BODY2) async def handle_404(scope, receive, send): await send( { "type": "http.response.start", "status": 404, "headers": [], } ) await send({"type": "http.response.body"}) routes = { "/": helloworld, "/receiver": receiver, } async def app(scope, receive, send): path = scope["path"] handler = routes.get(path, handle_404) await handler(scope, receive, send)
start = {'type': 'http.response.start', 'status': 200, 'headers': [(b'content-length', b'13'), (b'content-type', b'text/html; charset=utf-8')]} body1 = {'type': 'http.response.body', 'body': b'Hello'} body2 = {'type': 'http.response.body', 'body': b', world!'} async def helloworld(scope, receive, send) -> None: await send(START) await send(BODY1) await send(BODY2) async def receiver(scope, receive, send) -> None: while True: try: await receive() except StopAsyncIteration: break await send(START) await send(BODY1) await send(BODY2) async def handle_404(scope, receive, send): await send({'type': 'http.response.start', 'status': 404, 'headers': []}) await send({'type': 'http.response.body'}) routes = {'/': helloworld, '/receiver': receiver} async def app(scope, receive, send): path = scope['path'] handler = routes.get(path, handle_404) await handler(scope, receive, send)
load("@fbcode_macros//build_defs:platform_utils.bzl", "platform_utils") def get_ppx_bin(): return "third-party-buck/{}/build/ocaml-lwt_ppx/lib/lwt_ppx/ppx.exe".format(platform_utils.get_platform_for_base_path(get_base_path()))
load('@fbcode_macros//build_defs:platform_utils.bzl', 'platform_utils') def get_ppx_bin(): return 'third-party-buck/{}/build/ocaml-lwt_ppx/lib/lwt_ppx/ppx.exe'.format(platform_utils.get_platform_for_base_path(get_base_path()))
# -*- coding: utf-8 -*- class Solution: def maxProduct(self, nums): best_max, current_max, current_min = float('-inf'), 1, 1 for num in nums: current_max, current_min = max(current_min * num, num, current_max * num),\ min(current_min * num, num, current_max * num) best_max = max(best_max, current_max) return best_max if __name__ == '__main__': solution = Solution() assert 6 == solution.maxProduct([2, 3, -2, 4]) assert 0 == solution.maxProduct([-2, 0, -1])
class Solution: def max_product(self, nums): (best_max, current_max, current_min) = (float('-inf'), 1, 1) for num in nums: (current_max, current_min) = (max(current_min * num, num, current_max * num), min(current_min * num, num, current_max * num)) best_max = max(best_max, current_max) return best_max if __name__ == '__main__': solution = solution() assert 6 == solution.maxProduct([2, 3, -2, 4]) assert 0 == solution.maxProduct([-2, 0, -1])
def limpar(tela): telaPrincipal = tela lista = [telaPrincipal.telefone, telaPrincipal.nome, telaPrincipal.cep, telaPrincipal.end, telaPrincipal.numero, telaPrincipal.bairro, telaPrincipal.ref, telaPrincipal.complemento, telaPrincipal.devendo, telaPrincipal.taxa_2] for i in lista: i.clear() telaPrincipal.label_cadastrado.hide() telaPrincipal.label_atualizado.hide()
def limpar(tela): tela_principal = tela lista = [telaPrincipal.telefone, telaPrincipal.nome, telaPrincipal.cep, telaPrincipal.end, telaPrincipal.numero, telaPrincipal.bairro, telaPrincipal.ref, telaPrincipal.complemento, telaPrincipal.devendo, telaPrincipal.taxa_2] for i in lista: i.clear() telaPrincipal.label_cadastrado.hide() telaPrincipal.label_atualizado.hide()
#Embedded file name: ACEStream\version.pyo VERSION = '2.0.8.7' VERSION_REV = '2191' VERSION_DATE = '2013/03/28 18:36:41'
version = '2.0.8.7' version_rev = '2191' version_date = '2013/03/28 18:36:41'
credentials = { 'ldap': { 'user': '', 'pass': '' }, 'rocket': { 'user': '', 'pass': '' } }
credentials = {'ldap': {'user': '', 'pass': ''}, 'rocket': {'user': '', 'pass': ''}}
# https://edabit.com/challenge/KWoj7kWiHRqJtG6S2 # There is a single operator in Python # capable of providing the remainder of a division operation. # Two numbers are passed as parameters. # The first parameter divided by the second parameter will have a remainder, possibly zero. # Return that value. def remainder(int1: int, int2: int) -> int: leftovers = int1 % int2 return leftovers print(remainder(5, 5))
def remainder(int1: int, int2: int) -> int: leftovers = int1 % int2 return leftovers print(remainder(5, 5))
# Script Name : data.py # Author : Howard Zhang # Created : 14th June 2018 # Last Modified : 14th June 2018 # Version : 1.0 # Modifications : # Description : The struct of data to sort and display. class Data: # Total of data to sort data_count = 32 def __init__(self, value): self.value = value self.set_color() def set_color(self, rgba = None): if not rgba: rgba = (0, 1 - self.value / (self.data_count * 2), self.value / (self.data_count * 2) + 0.5, 1) self.color = rgba
class Data: data_count = 32 def __init__(self, value): self.value = value self.set_color() def set_color(self, rgba=None): if not rgba: rgba = (0, 1 - self.value / (self.data_count * 2), self.value / (self.data_count * 2) + 0.5, 1) self.color = rgba
class Plugin: def __init__(self): pass def execute(self): print("HELLO WORLD 2. :D")
class Plugin: def __init__(self): pass def execute(self): print('HELLO WORLD 2. :D')
class NotAuthenticatedError(Exception): pass class AuthenticationFailedError(Exception): pass
class Notauthenticatederror(Exception): pass class Authenticationfailederror(Exception): pass
OPERATION_TYPES = [ 'ADD', 'REMOVE', 'CHANGE_DATA', 'PATCH_METADATA' ] USER_CHANGEABLE_RELEASE_STATUSES = { 'MUTABLE': [ 'DRAFT', 'PENDING_RELEASE', 'PENDING_DELETE' ], 'IMMUTABLE': [ 'RELEASED', 'DELETED' ] } RELEASE_STATUS_ALLOWED_TRANSITIONS = { 'DRAFT': ['PENDING_RELEASE'], 'PENDING_RELEASE': ['DRAFT'], 'PENDING_DELETE': [], 'RELEASED': ['DRAFT', 'PENDING_DELETE'], 'DELETED': [] }
operation_types = ['ADD', 'REMOVE', 'CHANGE_DATA', 'PATCH_METADATA'] user_changeable_release_statuses = {'MUTABLE': ['DRAFT', 'PENDING_RELEASE', 'PENDING_DELETE'], 'IMMUTABLE': ['RELEASED', 'DELETED']} release_status_allowed_transitions = {'DRAFT': ['PENDING_RELEASE'], 'PENDING_RELEASE': ['DRAFT'], 'PENDING_DELETE': [], 'RELEASED': ['DRAFT', 'PENDING_DELETE'], 'DELETED': []}
total_taxis = 100 size = 4 expected_customers = 120 size_without_driver = size - 1 number_of_cars_required = expected_customers/size_without_driver print(f"number of cars required {number_of_cars_required}")
total_taxis = 100 size = 4 expected_customers = 120 size_without_driver = size - 1 number_of_cars_required = expected_customers / size_without_driver print(f'number of cars required {number_of_cars_required}')
lst = ["Peace", "of", "the", "mind", 2, 4, 7] for i in lst: place = "".join(map(str, lst)) print(place)
lst = ['Peace', 'of', 'the', 'mind', 2, 4, 7] for i in lst: place = ''.join(map(str, lst)) print(place)
choice = '' def add(num1, num2): return num1 + num2 def subs(num1, num2): return num1 - num2 def mult(num1, num2): return num1 * num2 def div(num1, num2): return num1 / num2 def mod(num1, num2): return num1 % num2 def power(num1, num2): result = 1 for i in range(num2): result *= num1 return result def input_checker(item): try: checked = int(item) return True except: print("\nSorry your input is invalid") return False def get_user_inputs(): while True: num1 = input("Input first number: ") num2 = input("Input second number: ") if input_checker(num1) & input_checker(num2): num1 = int(num1) num2 = int(num2) break return num1, num2 def main(): while True: print("Please select operations you want: \n 1. Adding\n 2. Substracting\n 3. Multiplying\n 4. Dividing\n 5. Modulo\n 6. Powering") choice = input("\nYour choice (1,2,3,4,5,6): ") if input_checker(choice): choice = int(choice) num1, num2 = get_user_inputs() if choice==1: print(num1, "+", num2, " = ", add(num1,num2)) elif choice==2: print(num1, "-", num2, " = ", subs(num1,num2)) elif choice==3: print(num1, "*", num2, " = ", mult(num1,num2)) elif choice==4: print(num1, "/", num2, " = ", div(num1,num2)) elif choice==5: print(num1, "%", num2, " = ", mod(num1,num2)) elif choice==6: print(num1, "^", num2, " = ", power(num1,num2)) else: print("Choose between 1 - 6!") print('\n') if __name__ == "__main__": main()
choice = '' def add(num1, num2): return num1 + num2 def subs(num1, num2): return num1 - num2 def mult(num1, num2): return num1 * num2 def div(num1, num2): return num1 / num2 def mod(num1, num2): return num1 % num2 def power(num1, num2): result = 1 for i in range(num2): result *= num1 return result def input_checker(item): try: checked = int(item) return True except: print('\nSorry your input is invalid') return False def get_user_inputs(): while True: num1 = input('Input first number: ') num2 = input('Input second number: ') if input_checker(num1) & input_checker(num2): num1 = int(num1) num2 = int(num2) break return (num1, num2) def main(): while True: print('Please select operations you want: \n 1. Adding\n 2. Substracting\n 3. Multiplying\n 4. Dividing\n 5. Modulo\n 6. Powering') choice = input('\nYour choice (1,2,3,4,5,6): ') if input_checker(choice): choice = int(choice) (num1, num2) = get_user_inputs() if choice == 1: print(num1, '+', num2, ' = ', add(num1, num2)) elif choice == 2: print(num1, '-', num2, ' = ', subs(num1, num2)) elif choice == 3: print(num1, '*', num2, ' = ', mult(num1, num2)) elif choice == 4: print(num1, '/', num2, ' = ', div(num1, num2)) elif choice == 5: print(num1, '%', num2, ' = ', mod(num1, num2)) elif choice == 6: print(num1, '^', num2, ' = ', power(num1, num2)) else: print('Choose between 1 - 6!') print('\n') if __name__ == '__main__': main()
#!/usr/bin/env python '''\ Given two strings, remove all characters contained in the latter from the former. Note that order is preserved. For example: "ab", "b" -> "a" "abcdabcd", "acec" -> "bdbd" What is the run-time of your algorithm? How much memory does it use? Is it optimal? linear search with memcpy: O(nh**2) linear search without memcpy: O(nh) sort then binary search: O(n log n + h log n) table lookup: O(n + h) ''' def remove_needles(haystack, needles): needles_set = frozenset(needles) return ''.join(c for c in haystack if c not in needles_set) def remove_needles_test(haystack, needles, expected): actual = remove_needles(haystack, needles) assert actual == expected def main(): remove_needles_test('', '', ''); remove_needles_test('a', '', 'a'); remove_needles_test('', 'a', ''); remove_needles_test('ab', 'b', 'a'); remove_needles_test('bab', 'b', 'a'); remove_needles_test('bab', 'a', 'bb'); remove_needles_test('abcdabcd', 'acec', 'bdbd'); if __name__ == '__main__': main()
"""Given two strings, remove all characters contained in the latter from the former. Note that order is preserved. For example: "ab", "b" -> "a" "abcdabcd", "acec" -> "bdbd" What is the run-time of your algorithm? How much memory does it use? Is it optimal? linear search with memcpy: O(nh**2) linear search without memcpy: O(nh) sort then binary search: O(n log n + h log n) table lookup: O(n + h) """ def remove_needles(haystack, needles): needles_set = frozenset(needles) return ''.join((c for c in haystack if c not in needles_set)) def remove_needles_test(haystack, needles, expected): actual = remove_needles(haystack, needles) assert actual == expected def main(): remove_needles_test('', '', '') remove_needles_test('a', '', 'a') remove_needles_test('', 'a', '') remove_needles_test('ab', 'b', 'a') remove_needles_test('bab', 'b', 'a') remove_needles_test('bab', 'a', 'bb') remove_needles_test('abcdabcd', 'acec', 'bdbd') if __name__ == '__main__': main()
# Set the following variables and rename to credentials.py USER = RPC_USERNAME PASSWORD = RPC_PASSWORD SITE_SECRET_KEY = BYTE_STRING
user = RPC_USERNAME password = RPC_PASSWORD site_secret_key = BYTE_STRING
def GetXSection(fileName): #[pb] #Cross Section derived from sample name using https://cms-gen-dev.cern.ch/xsdb/ #TODO UL QCD files have PSWeights in their name, but xsdb does not include it in its name fileName = fileName.replace("PSWeights_", "") #TODO: UL Single Top xSection only defined for filename without inclusive decays specified fileName = fileName.replace("5f_InclusiveDecays_", "5f_") #TODO: UL tZq_ll_4f_ckm_NLO_TuneCP5_13TeV-amcatnlo-pythia8 only defined with PSWeights... fileName = fileName.replace("tZq_ll_4f_ckm_NLO_TuneCP5_13TeV-amcatnlo-pythia8", "tZq_ll_4f_ckm_NLO_TuneCP5_PSweights_13TeV-amcatnlo-pythia8") if fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_mtop1695_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8") !=-1 : return 70.89 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_mtop1735_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8") !=-1 : return 68.45 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_mtop1715_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8") !=-1 : return 69.66 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_mtop1715_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8") !=-1 : return 116.1 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8") !=-1 : return 112.5 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_mtop1695_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8") !=-1 : return 118.0 elif fileName.find("ST_s-channel_4f_leptonDecays_TuneCP5_PSweights_13TeV-amcatnlo-pythia8_correctnPartonsInBorn") !=-1 : return 3.74 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_mtop1735_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8") !=-1 : return 114.4 elif fileName.find("ST_t-channel_antitop_4f_hdampdown_InclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 67.91 elif fileName.find("ST_tW_antitop_5f_hdampdown_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.99 elif fileName.find("ST_t-channel_antitop_4f_hdampdown_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8") !=-1 : return 69.09 elif fileName.find("ST_t-channel_antitop_4f_hdampup_InclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 67.91 elif fileName.find("ST_tW_antitop_5f_hdampup_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.96 elif fileName.find("DYJetsToLL_BGenFilter_Zpt-100to200_M-50_TuneCP5_13TeV-madgraphMLM-pythia8_newgridpack") !=-1 : return 2.678 elif fileName.find("DYJetsToLL_BGenFilter_Zpt-200toInf_M-50_TuneCP5_13TeV-madgraphMLM-pythia8_newgridpack") !=-1 : return 0.3909 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5_erdON_PSweights_13TeV-powheg-pythia8") !=-1 : return 67.91 elif fileName.find("ST_t-channel_antitop_5f_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8_vtd_vts_decay") !=-1 : return 82.52 elif fileName.find("ST_t-channel_antitop_4f_hdampup_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8") !=-1 : return 69.09 elif fileName.find("ST_t-channel_top_4f_hdampdown_InclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 113.3 elif fileName.find("ST_tW_top_5f_hdampdown_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.92 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5_erdON_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("ST_t-channel_antitop_5f_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8_vtd_vts_prod") !=-1 : return 225.5 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5down_PSweights_13TeV-powheg-pythia8") !=-1 : return 67.91 elif fileName.find("ST_t-channel_top_4f_hdampup_InclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 113.3 elif fileName.find("ST_t-channel_top_4f_hdampdown_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8") !=-1 : return 115.3 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5_erdON_13TeV-powheg-madspin-pythia8") !=-1 : return 69.09 elif fileName.find("ST_tW_top_5f_hdampup_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.9 elif fileName.find("DYJetsToTauTau_ForcedMuEleDecay_M-50_TuneCP5_PSweights_13TeV-amcatnloFXFX-pythia8") !=-1 : return 6505.0 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5CR1_PSweights_13TeV-powheg-pythia8") !=-1 : return 67.91 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5down_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("DYJetsToTauTau_ForcedMuEleDecay_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8_ext1") !=-1 : return 1991.0 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5CR2_PSweights_13TeV-powheg-pythia8") !=-1 : return 67.91 elif fileName.find("ST_tW_antitop_5f_inclusiveDecays_mtop1695_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 36.65 elif fileName.find("ST_tW_antitop_5f_inclusiveDecays_mtop1735_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.44 elif fileName.find("ST_t-channel_top_4f_hdampup_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8") !=-1 : return 115.3 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5CR1_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5up_PSweights_13TeV-powheg-pythia8") !=-1 : return 67.91 elif fileName.find("ST_t-channel_top_5f_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8_vtd_vts_decay") !=-1 : return 138.1 elif fileName.find("ST_tW_antitop_5f_inclusiveDecays_mtop1755_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 33.4 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_TuneCP5_erdON_PSweights_13TeV-powheg-pythia8") !=-1 : return 113.3 elif fileName.find("ST_tW_antitop_5f_inclusiveDecays_mtop1715_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 35.52 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5down_13TeV-powheg-madspin-pythia8") !=-1 : return 69.09 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5CR2_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("ST_tW_antitop_5f_DS_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 35.25 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5CR2_13TeV-powheg-madspin-pythia8") !=-1 : return 69.09 elif fileName.find("ST_t-channel_top_5f_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8_vtd_vts_prod") !=-1 : return 547.2 elif fileName.find("TTZToLLNuNu_M-10_TuneCP5_PSweights_correctnPartonsInBorn_13TeV-amcatnlo-pythia8") !=-1 : return 0.2432 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5_erdON_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5up_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5CR1_13TeV-powheg-madspin-pythia8") !=-1 : return 69.09 elif fileName.find("DYJetsToLL_BGenFilter_Zpt-200toInf_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 0.5082 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_TuneCP5_erdON_13TeV-powheg-madspin-pythia8") !=-1 : return 115.3 elif fileName.find("TTWJetsToLNu_TuneCP5CR2_GluonMove_PSweights_13TeV-amcatnloFXFX-madspin-pythia8") !=-1 : return 0.2183 elif fileName.find("ST_s-channel_4f_leptonDecays_mtop1715_TuneCP5_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 3.824 elif fileName.find("ST_s-channel_4f_leptonDecays_mtop1755_TuneCP5_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 3.506 elif fileName.find("ST_s-channel_4f_leptonDecays_mtop1695_TuneCP5_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 3.991 elif fileName.find("DYJetsToLL_BGenFilter_Zpt-100to200_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 3.41 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 67.91 elif fileName.find("ST_t-channel_antitop_4f_inclusiveDecays_TuneCP5_13TeV-powhegV2-madspin-pythia8") !=-1 : return 67.91 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5up_13TeV-powheg-madspin-pythia8") !=-1 : return 69.09 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_TuneCP5down_PSweights_13TeV-powheg-pythia8") !=-1 : return 113.3 elif fileName.find("ST_s-channel_4f_leptonDecays_mtop1735_TuneCP5_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 3.653 elif fileName.find("TTWJetsToLNu_TuneCP5CR1_QCDbased_PSweights_13TeV-amcatnloFXFX-madspin-pythia8") !=-1 : return 0.2169 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5down_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_TuneCP5CR1_PSweights_13TeV-powheg-pythia8") !=-1 : return 113.3 elif fileName.find("ST_tW_antitop_5f_hdampdown_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 34.98 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_TuneCP5CR2_PSweights_13TeV-powheg-pythia8") !=-1 : return 113.3 elif fileName.find("ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8") !=-1 : return 69.09 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_mtop1715_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 36.65 elif fileName.find("ST_tW_top_5f_inclusiveDecays_mtop1695_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 36.58 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5CR2_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5CR1_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_mtop1735_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 36.65 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_TuneCP5up_PSweights_13TeV-powheg-pythia8") !=-1 : return 113.3 elif fileName.find("DYJetsToLL_Zpt-200toInf_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8_TuneDown") !=-1 : return 6.714 elif fileName.find("DYJetsToTauTau_ForcedMuEleDecay_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 1981.0 elif fileName.find("ST_tW_top_5f_inclusiveDecays_mtop1735_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.38 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_mtop1695_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 36.65 elif fileName.find("ST_tW_top_5f_DS_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 33.75 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_mtop1755_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 36.65 elif fileName.find("ST_tW_top_5f_inclusiveDecays_mtop1715_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 35.46 elif fileName.find("DYJetsToLL_M-105To160_VBFFilter_TuneCP5_PSweights_13TeV-amcatnloFXFX-pythia8") !=-1 : return 2.01 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_TuneCP5down_13TeV-powheg-madspin-pythia8") !=-1 : return 115.3 elif fileName.find("ST_tW_top_5f_inclusiveDecays_mtop1755_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 33.34 elif fileName.find("DYJetsToLL_M-105To160_VBFFilter_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 1.526 elif fileName.find("DYBJetsToLL_M-50_Zpt-200toInf_TuneCP5_13TeV-madgraphMLM-pythia8_newgridpack") !=-1 : return 0.3282 elif fileName.find("ST_tW_antitop_5f_inclusiveDecays_TuneCP5down_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_TuneCP5CR2_13TeV-powheg-madspin-pythia8") !=-1 : return 115.3 elif fileName.find("ST_t-channel_eleDecays_anomwtbLVRV_LVRVunphys_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 47.81 elif fileName.find("ST_tW_antitop_5f_hdampup_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("ST_t-channel_tauDecays_anomwtbLVRV_LVRVunphys_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 47.69 elif fileName.find("DYBJetsToLL_M-50_Zpt-100to200_TuneCP5_13TeV-madgraphMLM-pythia8_newgridpack") !=-1 : return 3.21 elif fileName.find("ST_t-channel_tauDecays_anomwtbLVLT_LVLTunphys_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 84.72 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5up_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_TuneCP5CR1_13TeV-powheg-madspin-pythia8") !=-1 : return 115.3 elif fileName.find("DYJetsToLL_M-4to50_HT-100to200_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 203.3 elif fileName.find("DYJetsToLL_Zpt-200toInf_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8_TuneUp") !=-1 : return 6.716 elif fileName.find("TTToSemiLepton_HT500Njet9_hdampDOWN_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 3.884 elif fileName.find("ST_tW_antitop_5f_DS_inclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 35.25 elif fileName.find("DYJetsToLL_M-4to50_HT-600toInf_TuneCP5_PSWeights_13TeV-madgraphMLM-pythia8") !=-1 : return 1.837 elif fileName.find("ST_t-channel_muDecays_anomwtbLVLT_LVLTunphys_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 84.86 elif fileName.find("DYJetsToLL_M-4to50_HT-200to400_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 54.31 elif fileName.find("ST_t-channel_top_4f_inclusiveDecays_TuneCP5_13TeV-powhegV2-madspin-pythia8") !=-1 : return 113.3 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_TuneCP5up_13TeV-powheg-madspin-pythia8") !=-1 : return 115.3 elif fileName.find("ST_t-channel_antitop_5f_TuneCP5_13TeV-powheg-madspin-pythia8_vtd_vts_decay") !=-1 : return 82.52 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 113.3 elif fileName.find("ST_t-channel_muDecays_anomwtbLVRV_LVRVunphys_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 47.63 elif fileName.find("DYJetsToLL_CGenFilter_Zpt-200toInf_M-50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 3.184 elif fileName.find("DYJetsToLL_M-4to50_HT-70to100_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 146.6 elif fileName.find("DYJetsToLL_M-50_HT-1200to2500_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 0.1937 elif fileName.find("ST_s-channel_4f_leptonDecays_TuneCP5down_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 3.74 elif fileName.find("ST_t-channel_eDecays_anomwtbLVLT_LVLTunphys_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 84.84 elif fileName.find("DYJetsToLL_BGenFilter_Zpt-200toInf_M-50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 0.5327 elif fileName.find("DYJetsToLL_BGenFilter_Zpt-100to200_M-50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 3.384 elif fileName.find("ST_tW_top_5f_hdampdown_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("DYJetsToLL_CGenFilter_Zpt-100to200_M-50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 25.86 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5_erdON_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("ST_t-channel_antitop_5f_TuneCP5_13TeV-powheg-madspin-pythia8_vtd_vts_prod") !=-1 : return 225.5 elif fileName.find("ST_tW_antitop_5f_inclusiveDecays_TuneCP5up_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("DYJetsToTauTau_ForcedMuDecay_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 1990.0 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_mtop1695_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 36.65 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_mtop1715_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 36.65 elif fileName.find("TTToSemiLepton_HT500Njet9_hdampUP_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 4.613 elif fileName.find("DYJetsToLL_M-50_HT-800to1200_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 0.8021 elif fileName.find("DYJetsToLL_M-50_HT-2500toInf_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 0.003514 elif fileName.find("ST_s-channel_4f_leptonDecays_TuneCP5CR2_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 3.74 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_mtop1735_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 36.65 elif fileName.find("ST_s-channel_4f_leptonDecays_TuneCP5CR1_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 3.74 elif fileName.find("ST_t-channel_top_4f_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8") !=-1 : return 115.3 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_mtop1755_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 36.65 elif fileName.find("TTToSemilepton_ttbbFilter_TuneCUETP8M2_ttHtranche3_13TeV-powheg-pythia8") !=-1 : return 31.06 elif fileName.find("ST_s-channel_4f_leptonDecays_TuneCP5up_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 3.74 elif fileName.find("ST_t-channel_tauDecays_anomwtbLVRT_LV2RT2_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 102.2 elif fileName.find("DYJetsToEE_M-50_LTbinned_800To2000_5f_LO_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.01009 elif fileName.find("DYJetsToLL_M-50_HT-100to200_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 160.7 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5down_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("ST_tW_antitop_5f_inclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("ST_tW_top_5f_inclusiveDecays_TuneCP5down_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("ST_t-channel_tauDecays_anomwtbLVRT_LV1RT4_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 108.3 elif fileName.find("ST_t-channel_tauDecays_anomwtbLVRT_LV3RT1_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 54.52 elif fileName.find("DYJetsToLL_M-50_HT-200to400_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 48.63 elif fileName.find("DYJetsToLL_M-50_HT-600to800_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 1.761 elif fileName.find("DYJetsToTauTau_ForcedMuEleDecay_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 6458.0 elif fileName.find("ST_tW_top_5f_hdampup_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 34.9 elif fileName.find("DYJetsToLL_M-50_HT-400to600_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 6.993 elif fileName.find("DYJetsToEE_M-50_LTbinned_100To200_5f_LO_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 93.51 elif fileName.find("ST_t-channel_muDecays_anomwtbLVRT_LV1RT4_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 108.6 elif fileName.find("tZq_ll_4f_ckm_NLO_TuneCP5CR1_QCDbased_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 0.07358 elif fileName.find("DYJetsToLL_M-50_VBFFilter_TuneCP5_PSweights_13TeV-amcatnloFXFX-pythia8") !=-1 : return 266.1 elif fileName.find("DYJetsToEE_M-50_LTbinned_200To400_5f_LO_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 4.121 elif fileName.find("ST_t-channel_muDecays_anomwtbLVRT_LV2RT2_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 102.7 elif fileName.find("DYJetsToLL_M-50_HT-70to100_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 146.5 elif fileName.find("ST_tW_top_5f_DS_inclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 33.75 elif fileName.find("ST_tW_antitop_5f_DS_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 35.13 elif fileName.find("TTZToLLNuNu_M-10_TuneCP5CR2_GluonMove_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 0.2432 elif fileName.find("DYJetsToEE_M-50_LTbinned_400To800_5f_LO_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.2445 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5CR1_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5CR2_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("TTJets_SingleLeptFromTbar_genMET-150_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 6.167 elif fileName.find("ST_t-channel_muDecays_anomwtbLVRT_LV3RT1_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 54.72 elif fileName.find("DYJetsToLL_M-5to50_HT-600toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 1.107 elif fileName.find("ST_t-channel_eDecays_anomwtbLVRT_LV2RT2_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 102.9 elif fileName.find("ST_s-channel_4f_leptonDecays_TuneCP5_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 3.74 elif fileName.find("TTTo2L2Nu_HT500Njet7_hdampDOWN_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 10.56 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5_erdON_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("DYJetsToEE_M-50_LTbinned_95To100_5f_LO_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 47.14 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5up_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("TTJets_SingleLeptFromTbar_genMET-80_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 31.68 elif fileName.find("ST_tW_top_5f_inclusiveDecays_TuneCP5up_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("ST_t-channel_4f_leptonDecays_TuneCP5_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 70.9 elif fileName.find("DYJetsToLL_M-5to50_HT-400to600_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 3.628 elif fileName.find("ST_t-channel_eDecays_anomwtbLVRT_LV1RT4_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 108.9 elif fileName.find("TTZToLLNuNu_M-10_TuneCP5CR1_QCDbased_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 0.2432 elif fileName.find("DYJetsToLL_M-50_VBFFilter_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 202.3 elif fileName.find("DYJetsToLL_M-5to50_HT-100to200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 224.4 elif fileName.find("ST_t-channel_top_5f_TuneCP5_13TeV-powheg-madspin-pythia8_vtd_vts_prod") !=-1 : return 547.2 elif fileName.find("DYJetsToLL_M-5to50_HT-200to400_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 37.87 elif fileName.find("TTWJetsToLNu_TuneCP5CR2_GluonMove_13TeV-amcatnloFXFX-madspin-pythia8") !=-1 : return 0.2188 elif fileName.find("DYBJetsToLL_M-50_Zpt-100to200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 3.088 elif fileName.find("ST_t-channel_tauDecays_anomwtbLVRT_RT4_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 53.84 elif fileName.find("DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8_CUETP8M1Down") !=-1 : return 5940.0 elif fileName.find("DYJetsToLL_M-1To5_HT-400to600_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 65.9 elif fileName.find("TTToSemiLepton_HT500Njet9_TuneCP5down_PSweights_13TeV-powheg-pythia8") !=-1 : return 4.179 elif fileName.find("DYJetsToLL_M-1To5_HT-200to400_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 789.8 elif fileName.find("DYJetsToEE_M-50_LTbinned_80To85_5f_LO_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 174.1 elif fileName.find("DYBJetsToLL_M-50_Zpt-200toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 0.3159 elif fileName.find("DYJetsToEE_M-50_LTbinned_90To95_5f_LO_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 179.6 elif fileName.find("DYJetsToTauTau_ForcedMuDecay_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 6503.0 elif fileName.find("DYJetsToLL_M-1To5_HT-600toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 16.72 elif fileName.find("DYJetsToLL_M-5to50_HT-70to100_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 301.0 elif fileName.find("DYJetsToLL_M-1To5_HT-150to200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 1124.0 elif fileName.find("DYJetsToEE_M-50_LTbinned_85To90_5f_LO_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 250.6 elif fileName.find("DYJetsToLL_M-50_HT-1200to2500_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 0.1512 elif fileName.find("TTToSemiLeptonic_TuneCP5CR2_GluonMove_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-160_MZp-2_13TeV-madgraph") !=-1 : return 0.0001077 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-100_MZp-8_13TeV-madgraph") !=-1 : return 1.563e-05 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-160_MZp-5_13TeV-madgraph") !=-1 : return 4.298e-05 elif fileName.find("TTToSemiLeptonic_TuneCP5CR1_QCDbased_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-150_MZp-8_13TeV-madgraph") !=-1 : return 5.117e-05 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-150_MZp-5_13TeV-madgraph") !=-1 : return 8.237e-05 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-120_MZp-2_13TeV-madgraph") !=-1 : return 0.0002052 elif fileName.find("TTJets_SingleLeptFromT_genMET-150_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 6.212 elif fileName.find("TTTo2L2Nu_HT500Njet7_hdampUP_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 12.41 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-140_MZp-8_13TeV-madgraph") !=-1 : return 6.504e-05 elif fileName.find("DYJetsToLL_M-50_HT-2500toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 0.003659 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-130_MZp-2_13TeV-madgraph") !=-1 : return 0.0002577 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-150_MZp-2_13TeV-madgraph") !=-1 : return 0.0002047 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-140_MZp-2_13TeV-madgraph") !=-1 : return 0.0002613 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-130_MZp-5_13TeV-madgraph") !=-1 : return 0.0001031 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-100_MZp-2_13TeV-madgraph") !=-1 : return 5.684e-05 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-110_MZp-8_13TeV-madgraph") !=-1 : return 3.331e-05 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-130_MZp-8_13TeV-madgraph") !=-1 : return 6.456e-05 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-100_MZp-5_13TeV-madgraph") !=-1 : return 2.343e-05 elif fileName.find("ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-120_13TeV_amcatnlo_pythia8") !=-1 : return 7.402 elif fileName.find("ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-150_13TeV_amcatnlo_pythia8") !=-1 : return 1.686 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-110_MZp-5_13TeV-madgraph") !=-1 : return 5.221e-05 elif fileName.find("ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-140_13TeV_amcatnlo_pythia8") !=-1 : return 3.367 elif fileName.find("ST_tW_top_5f_inclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("ST_t-channel_tauDecays_anomwtbLVRV_RV_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 24.06 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-110_MZp-2_13TeV-madgraph") !=-1 : return 0.0001291 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-120_MZp-8_13TeV-madgraph") !=-1 : return 5.201e-05 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-140_MZp-5_13TeV-madgraph") !=-1 : return 0.0001043 elif fileName.find("ST_t-channel_tauDecays_anomwtbLVLT_LT_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 71.8 elif fileName.find("ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-160_13TeV_amcatnlo_pythia8") !=-1 : return 0.4841 elif fileName.find("TTWJetsToLNu_TuneCP5CR1_QCDbased_13TeV-amcatnloFXFX-madspin-pythia8") !=-1 : return 0.2183 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5down_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-100_13TeV_amcatnlo_pythia8") !=-1 : return 11.62 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-160_MZp-8_13TeV-madgraph") !=-1 : return 2.687e-05 elif fileName.find("DYJetsToLL_Zpt-200toInf_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 6.733 elif fileName.find("DYJetsToLL_M-50_HT-800to1200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 0.6229 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-120_MZp-5_13TeV-madgraph") !=-1 : return 8.243e-05 elif fileName.find("DYJetsToLL_Zpt-100to200_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 57.3 elif fileName.find("ST_t-channel_muDecays_anomwtbLVRT_RT4_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 53.81 elif fileName.find("DYJetsToLL_M-50_Zpt-150toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 18.36 elif fileName.find("ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-155_13TeV_amcatnlo_pythia8") !=-1 : return 1.008 elif fileName.find("DYJetsToLL_M-50_HT-200to400_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 41.04 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-90_MZp-8_13TeV-madgraph") !=-1 : return 3.684e-06 elif fileName.find("DYJetsToLL_M-105To160_TuneCP5_PSweights_13TeV-amcatnloFXFX-pythia8") !=-1 : return 47.05 elif fileName.find("tZq_Zhad_Wlept_4f_ckm_NLO_TuneCP5_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 0.1518 elif fileName.find("TTJets_SingleLeptFromT_genMET-80_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 32.27 elif fileName.find("DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8_CUETP8M1Up") !=-1 : return 5872.0 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5CR2_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-90_MZp-5_13TeV-madgraph") !=-1 : return 5.859e-06 elif fileName.find("TTToSemiLepton_HT500Njet9_TuneCP5up_PSweights_13TeV-powheg-pythia8") !=-1 : return 4.295 elif fileName.find("DYJetsToLL_M-50_HT-100to200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 147.4 elif fileName.find("DYJetsToLL_M-105To160_VBFFilter_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 2.026 elif fileName.find("DYJetsToLL_M-50_HT-600to800_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 1.358 elif fileName.find("ST_t-channel_muDecays_anomwtbLVRV_RV_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 24.21 elif fileName.find("ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-90_13TeV_amcatnlo_pythia8") !=-1 : return 13.46 elif fileName.find("ST_t-channel_muDecays_anomwtbLVLT_LT_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 71.67 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5CR1_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-80_13TeV_amcatnlo_pythia8") !=-1 : return 15.03 elif fileName.find("DYJetsToLL_M-50_HT-400to600_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 5.674 elif fileName.find("ST_t-channel_eDecays_anomwtbLVRT_RT4_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 53.7 elif fileName.find("ST_tW_top_5f_DS_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 33.67 elif fileName.find("TTTo2L2Nu_ttbbFilter_TuneCUETP8M2_ttHtranche3_13TeV-powheg-pythia8") !=-1 : return 7.269 elif fileName.find("TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-90_MZp-2_13TeV-madgraph") !=-1 : return 1.318e-05 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-140_MZp-2_13TeV-madgraph") !=-1 : return 0.0001947 elif fileName.find("DYJetsToNuNu_PtZ-400To650_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.2783 elif fileName.find("DYJetsToLL_BGenFilter_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 255.2 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-130_MZp-8_13TeV-madgraph") !=-1 : return 4.803e-05 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-110_MZp-5_13TeV-madgraph") !=-1 : return 3.898e-05 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-110_MZp-8_13TeV-madgraph") !=-1 : return 2.495e-05 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-100_MZp-5_13TeV-madgraph") !=-1 : return 1.776e-05 elif fileName.find("DYJetsToNuNu_PtZ-100To250_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 54.86 elif fileName.find("TTToSemiLeptonic_hdampDOWN_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("ST_tW_antitop_5f_inclusiveDecays_TuneCP5down_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-120_MZp-8_13TeV-madgraph") !=-1 : return 3.87e-05 elif fileName.find("TTToSemiLeptonic_mtop178p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 584.6 elif fileName.find("DYJetsToNuNu_PtZ-250To400_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 2.073 elif fileName.find("TTToSemiLeptonic_mtop175p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 633.4 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-130_MZp-5_13TeV-madgraph") !=-1 : return 7.685e-05 elif fileName.find("TTToSemiLeptonic_mtop169p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 746.2 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-160_MZp-5_13TeV-madgraph") !=-1 : return 3.199e-05 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-160_MZp-8_13TeV-madgraph") !=-1 : return 1.993e-05 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-120_MZp-2_13TeV-madgraph") !=-1 : return 0.0001529 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-160_MZp-2_13TeV-madgraph") !=-1 : return 7.999e-05 elif fileName.find("DYJetsToLL_M-105To160_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8") !=-1 : return 38.81 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-100_MZp-2_13TeV-madgraph") !=-1 : return 4.276e-05 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-150_MZp-5_13TeV-madgraph") !=-1 : return 6.133e-05 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5up_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("TTToSemiLeptonic_mtop173p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 668.6 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-140_MZp-8_13TeV-madgraph") !=-1 : return 4.869e-05 elif fileName.find("TTToSemiLeptonic_mtop166p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 811.4 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-150_MZp-8_13TeV-madgraph") !=-1 : return 3.827e-05 elif fileName.find("ST_t-channel_eDecays_anomwtbLVRV_RV_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 24.12 elif fileName.find("DYJetsToNuNu_PtZ-650ToInf_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.02603 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-140_MZp-5_13TeV-madgraph") !=-1 : return 7.75e-05 elif fileName.find("ST_t-channel_eDecays_anomwtbLVLT_LT_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 71.81 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-110_MZp-2_13TeV-madgraph") !=-1 : return 9.633e-05 elif fileName.find("TTWJetsToLNu_TuneCP5_PSweights_13TeV-amcatnloFXFX-madspin-pythia8") !=-1 : return 0.2198 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-130_MZp-2_13TeV-madgraph") !=-1 : return 0.0001914 elif fileName.find("TTToSemiLeptonic_mtop171p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 706.1 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-120_MZp-5_13TeV-madgraph") !=-1 : return 6.122e-05 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-150_MZp-2_13TeV-madgraph") !=-1 : return 0.000153 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-100_MZp-8_13TeV-madgraph") !=-1 : return 1.168e-05 elif fileName.find("DYJetsToLL_M-105To160_VBFFilter_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 1.518 elif fileName.find("DYJetsToLL_M-4to50_HT-600toInf_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 1.85 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-160_MA-25_13TeV-madgraph") !=-1 : return 0.01724 elif fileName.find("DY2JetsToLL_M-50_LHEZpT_400-inf_TuneCP5_13TeV-amcnloFXFX-pythia8") !=-1 : return 0.4477 elif fileName.find("DY1JetsToLL_M-50_LHEZpT_400-inf_TuneCP5_13TeV-amcnloFXFX-pythia8") !=-1 : return 0.1193 elif fileName.find("DY2JetsToLL_M-50_LHEZpT_250-400_TuneCP5_13TeV-amcnloFXFX-pythia8") !=-1 : return 2.737 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-120_MA-30_13TeV-madgraph") !=-1 : return 0.01416 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-160_MA-35_13TeV-madgraph") !=-1 : return 0.02032 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-140_MA-25_13TeV-madgraph") !=-1 : return 0.03673 elif fileName.find("DYJetsToNuNu_PtZ-50To100_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 237.2 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-90_MZp-8_13TeV-madgraph") !=-1 : return 2.736e-06 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-100_MA-20_13TeV-madgraph") !=-1 : return 0.0008489 elif fileName.find("DY1JetsToLL_M-50_LHEZpT_250-400_TuneCP5_13TeV-amcnloFXFX-pythia8") !=-1 : return 1.098 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-90_MZp-5_13TeV-madgraph") !=-1 : return 4.393e-06 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-140_MA-20_13TeV-madgraph") !=-1 : return 0.03297 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-130_MA-25_13TeV-madgraph") !=-1 : return 0.03162 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-140_MA-10_13TeV-madgraph") !=-1 : return 0.01898 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-110_MA-25_13TeV-madgraph") !=-1 : return 0.005135 elif fileName.find("DYJetsToLL_M-4to50_HT-200to400_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 54.39 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-110_MA-20_13TeV-madgraph") !=-1 : return 0.008633 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-100_MA-10_13TeV-madgraph") !=-1 : return 0.002968 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-140_MA-35_13TeV-madgraph") !=-1 : return 0.03638 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-160_MA-15_13TeV-madgraph") !=-1 : return 0.01158 elif fileName.find("DYJetsToLL_M-4to50_HT-400to600_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 5.697 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-100_MA-15_13TeV-madgraph") !=-1 : return 0.002361 elif fileName.find("TTToSemiLepton_HT500Njet9_hdampDOWN_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 3.899 elif fileName.find("ST_tW_DS_antitop_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 35.13 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-120_MA-20_13TeV-madgraph") !=-1 : return 0.02027 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-120_MA-10_13TeV-madgraph") !=-1 : return 0.01418 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-150_MA-25_13TeV-madgraph") !=-1 : return 0.03152 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-150_MA-35_13TeV-madgraph") !=-1 : return 0.0346 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-150_MA-30_13TeV-madgraph") !=-1 : return 0.03397 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-120_MA-25_13TeV-madgraph") !=-1 : return 0.0188 elif fileName.find("DY1JetsToLL_M-50_LHEZpT_150-250_TuneCP5_13TeV-amcnloFXFX-pythia8") !=-1 : return 9.543 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-110_MA-30_13TeV-madgraph") !=-1 : return 0.001474 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-150_MA-10_13TeV-madgraph") !=-1 : return 0.01521 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-160_MA-30_13TeV-madgraph") !=-1 : return 0.01928 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-150_MA-15_13TeV-madgraph") !=-1 : return 0.02175 elif fileName.find("DYJetsToLL_M-4to50_HT-100to200_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 204.0 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-140_MA-15_13TeV-madgraph") !=-1 : return 0.0269 elif fileName.find("TTToSemiLepton_HT500Njet9_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 4.253 elif fileName.find("DYBJetsToNuNu_Zpt-40toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 48.71 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-130_MA-30_13TeV-madgraph") !=-1 : return 0.02977 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-160_MA-20_13TeV-madgraph") !=-1 : return 0.01481 elif fileName.find("TTToHadronic_TuneCP5CR2_GluonMove_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-130_MA-20_13TeV-madgraph") !=-1 : return 0.03 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-120_MA-15_13TeV-madgraph") !=-1 : return 0.01866 elif fileName.find("TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-90_MZp-2_13TeV-madgraph") !=-1 : return 9.812e-06 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-130_MA-10_13TeV-madgraph") !=-1 : return 0.01839 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-130_MA-15_13TeV-madgraph") !=-1 : return 0.02536 elif fileName.find("DY2JetsToLL_M-50_LHEZpT_150-250_TuneCP5_13TeV-amcnloFXFX-pythia8") !=-1 : return 15.65 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-160_MA-10_13TeV-madgraph") !=-1 : return 0.008011 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-110_MA-15_13TeV-madgraph") !=-1 : return 0.009756 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-120_MA-35_13TeV-madgraph") !=-1 : return 0.007598 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-110_MA-10_13TeV-madgraph") !=-1 : return 0.008264 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-130_MA-35_13TeV-madgraph") !=-1 : return 0.02491 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-140_MA-30_13TeV-madgraph") !=-1 : return 0.03793 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-150_MA-20_13TeV-madgraph") !=-1 : return 0.02735 elif fileName.find("DYJetsToLL_M-50_HT-1200to2500_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 0.1933 elif fileName.find("DYJetsToLL_M-1500to2000_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.00218 elif fileName.find("ST_s-channel_4f_leptonDecays_TuneCP5down_13TeV-amcatnlo-pythia8") !=-1 : return 3.74 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-150_MA-35_13TeV-madgraph") !=-1 : return 0.02608 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-130_MA-20_13TeV-madgraph") !=-1 : return 0.02245 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-140_MA-20_13TeV-madgraph") !=-1 : return 0.02486 elif fileName.find("TTToHadronic_TuneCP5CR1_QCDbased_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-120_MA-25_13TeV-madgraph") !=-1 : return 0.01403 elif fileName.find("DYBJetsToLL_M-50_Zpt-100to200_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 4.042 elif fileName.find("ST_tW_antitop_5f_inclusiveDecays_TuneCP5up_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("DYJetsToLL_M-1to4_HT-600toInf_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 2.453 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-110_MA-30_13TeV-madgraph") !=-1 : return 0.0011 elif fileName.find("DYJetsToLL_M-1to4_HT-100to200_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 479.6 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-110_MA-25_13TeV-madgraph") !=-1 : return 0.003863 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-160_MA-25_13TeV-madgraph") !=-1 : return 0.01305 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-130_MA-35_13TeV-madgraph") !=-1 : return 0.01856 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-140_MA-30_13TeV-madgraph") !=-1 : return 0.02827 elif fileName.find("DY1JetsToLL_M-50_LHEZpT_50-150_TuneCP5_13TeV-amcnloFXFX-pythia8") !=-1 : return 316.6 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-120_MA-20_13TeV-madgraph") !=-1 : return 0.01516 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-140_MA-35_13TeV-madgraph") !=-1 : return 0.02718 elif fileName.find("DYJetsToLL_M-50_HT-1200to2500_TuneCP5_14TeV-madgraphMLM-pythia8") !=-1 : return 0.2466 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-160_MA-10_13TeV-madgraph") !=-1 : return 0.006028 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-120_MA-35_13TeV-madgraph") !=-1 : return 0.005625 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-160_MA-35_13TeV-madgraph") !=-1 : return 0.01527 elif fileName.find("DYJetsToLL_M-1to4_HT-400to600_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 8.207 elif fileName.find("TTToSemiLeptonic_hdampUP_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.0 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-150_MA-10_13TeV-madgraph") !=-1 : return 0.01143 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-110_MA-20_13TeV-madgraph") !=-1 : return 0.006446 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-160_MA-30_13TeV-madgraph") !=-1 : return 0.01449 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-110_MA-15_13TeV-madgraph") !=-1 : return 0.007288 elif fileName.find("DY2JetsToLL_M-50_LHEZpT_50-150_TuneCP5_13TeV-amcnloFXFX-pythia8") !=-1 : return 169.6 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-150_MA-20_13TeV-madgraph") !=-1 : return 0.02056 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-150_MA-30_13TeV-madgraph") !=-1 : return 0.02555 elif fileName.find("DYJetsToLL_M-2000to3000_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.0005156 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-130_MA-25_13TeV-madgraph") !=-1 : return 0.02348 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-150_MA-25_13TeV-madgraph") !=-1 : return 0.02368 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-160_MA-20_13TeV-madgraph") !=-1 : return 0.01108 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-130_MA-10_13TeV-madgraph") !=-1 : return 0.01375 elif fileName.find("ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("TTTo2L2Nu_HT500Njet7_TuneCP5down_PSweights_13TeV-powheg-pythia8") !=-1 : return 11.34 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-140_MA-25_13TeV-madgraph") !=-1 : return 0.02774 elif fileName.find("DYJetsToLL_M-4to50_HT-70to100_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 145.5 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-100_MA-20_13TeV-madgraph") !=-1 : return 0.0006391 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-140_MA-10_13TeV-madgraph") !=-1 : return 0.01428 elif fileName.find("DYJetsToLL_M-1000to1500_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.01636 elif fileName.find("DYJetsToEE_M-50_LTbinned_800To2000_5f_LO_13TeV-madgraph_pythia8") !=-1 : return 0.008352 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-100_MA-15_13TeV-madgraph") !=-1 : return 0.001767 elif fileName.find("DYBJetsToLL_M-50_Zpt-200toInf_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 0.4286 elif fileName.find("TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-90_MA-10_13TeV-madgraph") !=-1 : return 0.0002799 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-130_MA-30_13TeV-madgraph") !=-1 : return 0.02227 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-130_MA-15_13TeV-madgraph") !=-1 : return 0.01906 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-160_MA-15_13TeV-madgraph") !=-1 : return 0.008748 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-150_MA-15_13TeV-madgraph") !=-1 : return 0.01638 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-140_MA-15_13TeV-madgraph") !=-1 : return 0.02024 elif fileName.find("DYJetsToLL_M-1to4_HT-200to400_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 85.85 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-100_MA-10_13TeV-madgraph") !=-1 : return 0.002219 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-120_MA-30_13TeV-madgraph") !=-1 : return 0.01063 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-110_MA-10_13TeV-madgraph") !=-1 : return 0.006195 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-120_MA-10_13TeV-madgraph") !=-1 : return 0.01064 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-120_MA-15_13TeV-madgraph") !=-1 : return 0.014 elif fileName.find("TTToSemiLepton_HT500Njet9_hdampUP_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 4.571 elif fileName.find("DYJetsToLL_M-50_HT-2500toInf_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 0.003468 elif fileName.find("ST_s-channel_4f_leptonDecays_TuneCP5CR2_13TeV-amcatnlo-pythia8") !=-1 : return 3.74 elif fileName.find("DYJetsToEE_M-50_LTbinned_200To400_5f_LO_13TeV-madgraph_pythia8") !=-1 : return 3.574 elif fileName.find("ST_t-channel_antitop_5f_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 71.74 elif fileName.find("TTZPrimeToMuMu_M-1700_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 9.353e-05 elif fileName.find("TTZPrimeToMuMu_M-2000_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 3.577e-05 elif fileName.find("TTZPrimeToMuMu_M-1600_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.0001325 elif fileName.find("DYJetsToLL_M-50_Zpt-150toInf_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 22.93 elif fileName.find("TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-90_MA-10_13TeV-madgraph") !=-1 : return 0.0002095 elif fileName.find("DYJetsToLL_M-1to4_HT-70to100_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 626.8 elif fileName.find("TTZPrimeToMuMu_M-1300_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.0004131 elif fileName.find("DYJetsToEE_M-50_LTbinned_100To200_5f_LO_13TeV-madgraph_pythia8") !=-1 : return 94.34 elif fileName.find("DYJetsToEE_M-50_LTbinned_400To800_5f_LO_13TeV-madgraph_pythia8") !=-1 : return 0.2005 elif fileName.find("DYJetsToLL_Pt-100To250_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 81.22 elif fileName.find("DYJetsToLL_M-50_HT-800to1200_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 0.8052 elif fileName.find("TTZPrimeToMuMu_M-1500_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.0001903 elif fileName.find("TTZPrimeToMuMu_M-1900_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 4.862e-05 elif fileName.find("TTZPrimeToMuMu_M-1000_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.00154 elif fileName.find("DYJetsToLL_Pt-400To650_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.3882 elif fileName.find("TTZPrimeToMuMu_M-1800_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 6.693e-05 elif fileName.find("TTZPrimeToMuMu_M-1400_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.0002778 elif fileName.find("TTZPrimeToMuMu_M-1200_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.0006259 elif fileName.find("DYJetsToLL_Pt-250To400_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 2.991 elif fileName.find("DYJetsToLL_M-800to1000_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.03047 elif fileName.find("TTToSemiLeptonic_WspTgt150_TuneCUETP8M2T4_13TeV-powheg-pythia8") !=-1 : return 34.49 elif fileName.find("DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8_DownPS") !=-1 : return 5735.0 elif fileName.find("ST_s-channel_4f_leptonDecays_TuneCP5CR1_13TeV-amcatnlo-pythia8") !=-1 : return 3.74 elif fileName.find("DYJetsToLL_Pt-650ToInf_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.03737 elif fileName.find("TTZPrimeToMuMu_M-900_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.002515 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-160_MZ-2_13TeV-madgraph") !=-1 : return 5.559e-05 elif fileName.find("DYJetsToLL_M-700to800_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.03614 elif fileName.find("DYJetsToLL_M-200to400_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 7.77 elif fileName.find("DYJetsToLL_M-400to500_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.4065 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-140_MZ-8_13TeV-madgraph") !=-1 : return 4.225e-05 elif fileName.find("ST_tW_antitop_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 34.97 elif fileName.find("DYJetsToEE_M-50_LTbinned_95To100_5f_LO_13TeV-madgraph_pythia8") !=-1 : return 48.2 elif fileName.find("TTZPrimeToMuMu_M-800_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.004257 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-130_MZ-2_13TeV-madgraph") !=-1 : return 0.000168 elif fileName.find("Test_ZprimeToTT_M-4500_W-45_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 0.000701 elif fileName.find("TTTo2L2Nu_HT500Njet7_TuneCP5up_PSweights_13TeV-powheg-pythia8") !=-1 : return 11.59 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-160_MZ-8_13TeV-madgraph") !=-1 : return 1.365e-05 elif fileName.find("TTTo2L2Nu_TuneCP5CR2_GluonMove_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTZPrimeToMuMu_M-400_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.06842 elif fileName.find("TTToHadronic_hdampDOWN_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("ST_s-channel_4f_leptonDecays_TuneCP5up_13TeV-amcatnlo-pythia8") !=-1 : return 3.74 elif fileName.find("TTToHadronic_mtop175p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 633.4 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-110_MZ-5_13TeV-madgraph") !=-1 : return 2.886e-05 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-120_MZ-5_13TeV-madgraph") !=-1 : return 5.067e-05 elif fileName.find("DYJetsToLL_M-500to700_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.2334 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-140_MZ-2_13TeV-madgraph") !=-1 : return 0.0001727 elif fileName.find("TTZPrimeToMuMu_M-300_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.2194 elif fileName.find("DYJetsToLL_Pt-50To100_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 354.8 elif fileName.find("TTToHadronic_mtop171p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 706.1 elif fileName.find("TTZPrimeToMuMu_M-600_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.01409 elif fileName.find("TTZPrimeToMuMu_M-500_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.0287 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-110_MZ-8_13TeV-madgraph") !=-1 : return 1.808e-05 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-100_MZ-2_13TeV-madgraph") !=-1 : return 2.652e-05 elif fileName.find("TTZToLLNuNu_M-10_TuneCP5down_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 0.2432 elif fileName.find("TTToHadronic_mtop169p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 746.2 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-130_MZ-5_13TeV-madgraph") !=-1 : return 6.649e-05 elif fileName.find("TTZPrimeToMuMu_M-700_TuneCP5_PSWeights_13TeV-madgraph-pythia8") !=-1 : return 0.007522 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-100_MZ-8_13TeV-madgraph") !=-1 : return 6.686e-06 elif fileName.find("DYJetsToLL_M-50_HT-100to200_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 161.1 elif fileName.find("TTToHadronic_mtop166p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 811.4 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-130_MZ-8_13TeV-madgraph") !=-1 : return 4.106e-05 elif fileName.find("TTToHadronic_mtop173p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 668.6 elif fileName.find("ST_s-channel_4f_hadronicDecays_TuneCP5_13TeV-amcatnlo-pythia8") !=-1 : return 11.24 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-150_MZ-5_13TeV-madgraph") !=-1 : return 5.214e-05 elif fileName.find("DYJetsToLL_M-50_HT-600to800_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 1.743 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-120_MZ-8_13TeV-madgraph") !=-1 : return 3.151e-05 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-150_MZ-2_13TeV-madgraph") !=-1 : return 0.0001319 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-100_MZ-5_13TeV-madgraph") !=-1 : return 1.058e-05 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-140_MZ-5_13TeV-madgraph") !=-1 : return 6.855e-05 elif fileName.find("DYJetsToLL_M-50_HT-200to400_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 48.66 elif fileName.find("BdToPsi2sKst_MuTrkFilter_DGamma0_TuneCP5_13TeV-pythia8-evtgen") !=-1 : return 5942000.0 elif fileName.find("DYJetsToLL_M-100to200_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 226.6 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-120_MZ-2_13TeV-madgraph") !=-1 : return 0.0001282 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-110_MZ-2_13TeV-madgraph") !=-1 : return 7.276e-05 elif fileName.find("TTToHadronic_mtop178p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 584.6 elif fileName.find("DYJetsToLL_M-50_HT-400to600_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 6.968 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-150_MZ-8_13TeV-madgraph") !=-1 : return 3.237e-05 elif fileName.find("ST_s-channel_4f_hadronicDecays_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 11.24 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-160_MZ-5_13TeV-madgraph") !=-1 : return 2.198e-05 elif fileName.find("DYJetsToLL_Zpt-0To50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 5375.0 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-150_MZ-2_13TeV-madgraph") !=-1 : return 0.0001309 elif fileName.find("DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8_UpPS") !=-1 : return 6005.0 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-110_MZ-8_13TeV-madgraph") !=-1 : return 1.802e-05 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-140_MZ-2_13TeV-madgraph") !=-1 : return 0.0001729 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-120_MZ-8_13TeV-madgraph") !=-1 : return 3.146e-05 elif fileName.find("tZq_nunu_4f_ckm_NLO_TuneCP5_PSweights_13TeV-madgraph-pythia8") !=-1 : return 0.1337 elif fileName.find("DYJetsToEE_M-50_LTbinned_90To95_5f_LO_13TeV-madgraph_pythia8") !=-1 : return 167.3 elif fileName.find("DYJetsToEE_M-50_LTbinned_80To85_5f_LO_13TeV-madgraph_pythia8") !=-1 : return 159.9 elif fileName.find("DYJetsToEE_M-50_LTbinned_75To80_5f_LO_13TeV-madgraph_pythia8") !=-1 : return 134.6 elif fileName.find("TTZToLLNuNu_M-10_TuneCP5CR2_GluonMove_13TeV-amcatnlo-pythia8") !=-1 : return 0.2432 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-160_MZ-2_13TeV-madgraph") !=-1 : return 5.542e-05 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-90_MZ-8_13TeV-madgraph") !=-1 : return 9.926e-07 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-90_MZ-5_13TeV-madgraph") !=-1 : return 1.652e-06 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-140_MZ-5_13TeV-madgraph") !=-1 : return 6.851e-05 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-110_MZ-2_13TeV-madgraph") !=-1 : return 7.265e-05 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-140_MZ-8_13TeV-madgraph") !=-1 : return 4.231e-05 elif fileName.find("DYJetsToEE_M-50_LTbinned_85To90_5f_LO_13TeV-madgraph_pythia8") !=-1 : return 229.4 elif fileName.find("TTToSemilepton_TuneCUETP8M2_ttHtranche3_13TeV-powheg-pythia8") !=-1 : return 320.1 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-150_MZ-8_13TeV-madgraph") !=-1 : return 3.234e-05 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-160_MZ-5_13TeV-madgraph") !=-1 : return 2.212e-05 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-160_MZ-8_13TeV-madgraph") !=-1 : return 1.364e-05 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-130_MZ-8_13TeV-madgraph") !=-1 : return 4.116e-05 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-100_MZ-5_13TeV-madgraph") !=-1 : return 1.06e-05 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-100_MZ-2_13TeV-madgraph") !=-1 : return 2.654e-05 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-150_MZ-5_13TeV-madgraph") !=-1 : return 5.234e-05 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-110_MZ-5_13TeV-madgraph") !=-1 : return 2.894e-05 elif fileName.find("TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-90_MZ-2_13TeV-madgraph") !=-1 : return 4.124e-06 elif fileName.find("ST_tW_DS_top_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 33.67 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-120_MZ-5_13TeV-madgraph") !=-1 : return 5.064e-05 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-120_MZ-2_13TeV-madgraph") !=-1 : return 0.0001276 elif fileName.find("TTTo2L2Nu_TuneCP5CR1_QCDbased_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-130_MZ-2_13TeV-madgraph") !=-1 : return 0.0001671 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-100_MZ-8_13TeV-madgraph") !=-1 : return 6.706e-06 elif fileName.find("DYJetsToLL_M-50_HT-70to100_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 146.7 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-130_MZ-5_13TeV-madgraph") !=-1 : return 6.66e-05 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-90_MZ-2_13TeV-madgraph") !=-1 : return 4.126e-06 elif fileName.find("TTToSemiLeptonic_TuneCP5down_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DYToMuMu_M-4500To6000_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 3.566e-07 elif fileName.find("ST_s-channel_4f_leptonDecays_TuneCP5_13TeV-amcatnlo-pythia8") !=-1 : return 3.74 elif fileName.find("DYJetsToLL_M-50_HT-40to70_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 311.4 elif fileName.find("DYToMuMu_M-3500To4500_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 3.317e-06 elif fileName.find("DYToMuMu_M-2300To3500_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 7.34e-05 elif fileName.find("ST_s-channel_4f_leptonDecays_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 3.74 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-90_MZ-8_13TeV-madgraph") !=-1 : return 9.872e-07 elif fileName.find("TTZToLLNuNu_M-10_TuneCP5up_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 0.2432 elif fileName.find("DY1JetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 730.3 elif fileName.find("DY2JetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 387.4 elif fileName.find("DYJetsToEE_M-50_LTbinned_5To75_5f_LO_13TeV-madgraph_pythia8") !=-1 : return 866.2 elif fileName.find("TTToHplusToWZprime_WToENu_ZToMuMu_MH-90_MZ-5_13TeV-madgraph") !=-1 : return 1.655e-06 elif fileName.find("DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 18810.0 elif fileName.find("TTZToLLNuNu_M-10_TuneCP5CR1_QCDbased_13TeV-amcatnlo-pythia8") !=-1 : return 0.2432 elif fileName.find("DYJetsToEE_M-50_LTbinned_0To75_5f_LO_13TeV-madgraph_pythia8") !=-1 : return 948.2 elif fileName.find("TTToHadronic_hdampUP_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.0 elif fileName.find("TTJets_SingleLeptFromTbar_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 108.7 elif fileName.find("TTTo2L2Nu_HT500Njet7_hdampDOWN_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 10.58 elif fileName.find("DY3JetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 95.02 elif fileName.find("TTTo2L2Nu_HT500Njet7_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 11.37 elif fileName.find("DY4JetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 36.71 elif fileName.find("TTZJetsToQQ_Dilept_TuneCP5_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 0.0568 elif fileName.find("DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-herwigpp_30M") !=-1 : return 14240.0 elif fileName.find("DYToMuMu_M-1400To2300_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 0.001178 elif fileName.find("DYJetsToLL_M-1500to2000_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.002367 elif fileName.find("TTJets_DiLept_genMET-150_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 3.655 elif fileName.find("TTTo2L2Nu_mtop166p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 811.4 elif fileName.find("TTToSemiLepton_HT500Njet9_TuneCP5down_13TeV-powheg-pythia8") !=-1 : return 4.216 elif fileName.find("tZq_ll_4f_ckm_NLO_TuneCP5_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 0.07358 elif fileName.find("DYToMuMu_M-800To1400_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 0.01437 elif fileName.find("DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 16270.0 elif fileName.find("TTTo2L2Nu_hdampDOWN_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("QCD_HT1500to2000_BGenFilter_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 13.61 elif fileName.find("DYToMuMu_M-6000ToInf_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 1.576e-08 elif fileName.find("TTToSemiLeptonic_TuneCP5CR2_GluonMove_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("QCD_HT1000to1500_BGenFilter_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 138.2 elif fileName.find("DYJetsToLL_M-2000to3000_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.0005409 elif fileName.find("TTTo2L2Nu_mtop173p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 668.6 elif fileName.find("DYJetsToLL_M-10to50_TuneCUETP8M1_14TeV-madgraphMLM-pythia8") !=-1 : return 17230.0 elif fileName.find("TTTo2L2Nu_mtop169p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 746.2 elif fileName.find("TTTo2L2Nu_mtop175p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 633.4 elif fileName.find("DYJetsToLL_M-1000to1500_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.01828 elif fileName.find("TTTo2L2Nu_mtop178p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 584.6 elif fileName.find("TTTo2L2Nu_mtop171p5_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 706.1 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-140_MA-15_13TeV-madgraph") !=-1 : return 0.01533 elif fileName.find("QCD_HT2000toInf_BGenFilter_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 2.92 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-110_MA-20_13TeV-madgraph") !=-1 : return 0.004946 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-110_MA-10_13TeV-madgraph") !=-1 : return 0.003822 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-160_MA-25_13TeV-madgraph") !=-1 : return 0.00815 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-130_MA-30_13TeV-madgraph") !=-1 : return 0.01965 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-150_MA-25_13TeV-madgraph") !=-1 : return 0.0186 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-140_MA-10_13TeV-madgraph") !=-1 : return 0.01061 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-120_MA-20_13TeV-madgraph") !=-1 : return 0.01191 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-110_MA-30_13TeV-madgraph") !=-1 : return 0.0009769 elif fileName.find("DYJetsToLL_Pt-650ToInf_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.04796 elif fileName.find("DYToEE_M-3500To4500_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 3.327e-06 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-100_MA-15_13TeV-madgraph") !=-1 : return 0.001117 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-110_MA-15_13TeV-madgraph") !=-1 : return 0.004958 elif fileName.find("TTToSemiLeptonic_TuneCP5up_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-140_MA-25_13TeV-madgraph") !=-1 : return 0.02274 elif fileName.find("DYJetsToLL_Pt-250To400_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 3.774 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-140_MA-20_13TeV-madgraph") !=-1 : return 0.01947 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-120_MA-35_13TeV-madgraph") !=-1 : return 0.005199 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-160_MA-10_13TeV-madgraph") !=-1 : return 0.003564 elif fileName.find("TTTo2L2Nu_HT500Njet7_hdampUP_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 12.39 elif fileName.find("DYJetsToLL_M-800to1000_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.03406 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-160_MA-30_13TeV-madgraph") !=-1 : return 0.009303 elif fileName.find("DYJetsToLL_M-3000toInf_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 3.048e-05 elif fileName.find("ST_tW_top_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 34.91 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-120_MA-30_13TeV-madgraph") !=-1 : return 0.009536 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-130_MA-35_13TeV-madgraph") !=-1 : return 0.01695 elif fileName.find("DYToMuMu_M-200To400_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 2.342 elif fileName.find("DYJetsToLL_Pt-400To650_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.5164 elif fileName.find("BdToXKst_MuTrkFilter_DGamma0_TuneCP5_13TeV-pythia8-evtgen") !=-1 : return 7990000.0 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-150_MA-35_13TeV-madgraph") !=-1 : return 0.02178 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-150_MA-10_13TeV-madgraph") !=-1 : return 0.008312 elif fileName.find("DYToEE_M-4500To6000_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 3.551e-07 elif fileName.find("DYToEE_M-2300To3500_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 7.405e-05 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-140_MA-30_13TeV-madgraph") !=-1 : return 0.02451 elif fileName.find("TTToSemiLeptonic_TuneCP5CR1_QCDbased_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-150_MA-30_13TeV-madgraph") !=-1 : return 0.02076 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-130_MA-15_13TeV-madgraph") !=-1 : return 0.01426 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-110_MA-25_13TeV-madgraph") !=-1 : return 0.003278 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-120_MA-15_13TeV-madgraph") !=-1 : return 0.01005 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-160_MA-35_13TeV-madgraph") !=-1 : return 0.01012 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-120_MA-10_13TeV-madgraph") !=-1 : return 0.007271 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-140_MA-35_13TeV-madgraph") !=-1 : return 0.02426 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-130_MA-25_13TeV-madgraph") !=-1 : return 0.01975 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-130_MA-10_13TeV-madgraph") !=-1 : return 0.01005 elif fileName.find("QCD_HT700to1000_BGenFilter_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 721.8 elif fileName.find("DYToEE_M-1400To2300_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 0.001177 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-100_MA-20_13TeV-madgraph") !=-1 : return 0.0004878 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-130_MA-20_13TeV-madgraph") !=-1 : return 0.01767 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-150_MA-20_13TeV-madgraph") !=-1 : return 0.01555 elif fileName.find("DYJetsToLL_Pt-100To250_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 96.8 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-160_MA-15_13TeV-madgraph") !=-1 : return 0.005209 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-160_MA-20_13TeV-madgraph") !=-1 : return 0.006725 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-100_MA-10_13TeV-madgraph") !=-1 : return 0.001144 elif fileName.find("TTJets_DiLept_genMET-80_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 22.45 elif fileName.find("DYJetsToLL_M-1to10_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 173100.0 elif fileName.find("TTZToLLNuNu_M-10_TuneCP5_PSweights_13TeV-amcatnlo-pythia8") !=-1 : return 0.2432 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-150_MA-15_13TeV-madgraph") !=-1 : return 0.01206 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-120_MA-25_13TeV-madgraph") !=-1 : return 0.01188 elif fileName.find("DYToMuMu_M-400To800_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 0.2084 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-100_MA-15_13TeV-madgraph") !=-1 : return 0.001121 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-160_MA-15_13TeV-madgraph") !=-1 : return 0.005207 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-150_MA-35_13TeV-madgraph") !=-1 : return 0.02177 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-160_MA-10_13TeV-madgraph") !=-1 : return 0.003565 elif fileName.find("QCD_HT500to700_BGenFilter_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 3078.0 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-100_MA-10_13TeV-madgraph") !=-1 : return 0.001146 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-110_MA-25_13TeV-madgraph") !=-1 : return 0.003271 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-140_MA-20_13TeV-madgraph") !=-1 : return 0.01949 elif fileName.find("DYJetsToLL_M-500to700_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.2558 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-110_MA-30_13TeV-madgraph") !=-1 : return 0.0009777 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-130_MA-30_13TeV-madgraph") !=-1 : return 0.0196 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-150_MA-25_13TeV-madgraph") !=-1 : return 0.01853 elif fileName.find("TTToSemiLepton_HT500Njet9_TuneCP5up_13TeV-powheg-pythia8") !=-1 : return 4.281 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-140_MA-10_13TeV-madgraph") !=-1 : return 0.01066 elif fileName.find("TTToHplusToWA_WToMuNu_AToMuMu_MH-90_MA-10_13TeV-madgraph") !=-1 : return 0.000107 elif fileName.find("TTTo2L2Nu_hdampUP_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.0 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-130_MA-25_13TeV-madgraph") !=-1 : return 0.01975 elif fileName.find("TTToSemiLeptonic_widthx1p15_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-120_MA-30_13TeV-madgraph") !=-1 : return 0.009525 elif fileName.find("ST_tWnunu_5f_LO_TuneCP5_PSweights_13TeV-madgraph-pythia8") !=-1 : return 0.02099 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-150_MA-10_13TeV-madgraph") !=-1 : return 0.008305 elif fileName.find("QCD_HT200to300_BGenFilter_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 111700.0 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-150_MA-15_13TeV-madgraph") !=-1 : return 0.01205 elif fileName.find("QCD_HT100to200_BGenFilter_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 1275000.0 elif fileName.find("DYJetsToLL_Pt-50To100_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 407.9 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-130_MA-35_13TeV-madgraph") !=-1 : return 0.01689 elif fileName.find("DYJetsToLL_M-200to400_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 8.502 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-160_MA-20_13TeV-madgraph") !=-1 : return 0.006756 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-160_MA-30_13TeV-madgraph") !=-1 : return 0.00934 elif fileName.find("DYJetsToLL_M-700to800_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.04023 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-160_MA-35_13TeV-madgraph") !=-1 : return 0.01011 elif fileName.find("DY4JetsToTauTau_M-50_TuneCUETP8M1_13TeV-madgraph-pythia8") !=-1 : return 18.17 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-130_MA-15_13TeV-madgraph") !=-1 : return 0.01429 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-120_MA-15_13TeV-madgraph") !=-1 : return 0.01007 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-110_MA-20_13TeV-madgraph") !=-1 : return 0.004962 elif fileName.find("DY2JetsToTauTau_M-50_TuneCUETP8M1_13TeV-madgraph-pythia8") !=-1 : return 111.1 elif fileName.find("DYToEE_M-800To1400_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 0.01445 elif fileName.find("DY3JetsToTauTau_M-50_TuneCUETP8M1_13TeV-madgraph-pythia8") !=-1 : return 34.04 elif fileName.find("DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8_Fall17") !=-1 : return 5350.0 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-120_MA-10_13TeV-madgraph") !=-1 : return 0.007278 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-150_MA-30_13TeV-madgraph") !=-1 : return 0.02073 elif fileName.find("DYJetsToLL_M-400to500_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 0.4514 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-150_MA-20_13TeV-madgraph") !=-1 : return 0.01554 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-140_MA-15_13TeV-madgraph") !=-1 : return 0.01535 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-160_MA-25_13TeV-madgraph") !=-1 : return 0.008158 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-110_MA-10_13TeV-madgraph") !=-1 : return 0.003828 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-130_MA-20_13TeV-madgraph") !=-1 : return 0.0177 elif fileName.find("DYToEE_M-6000ToInf_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 1.585e-08 elif fileName.find("TTToSemiLeptonic_widthx0p85_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-120_MA-25_13TeV-madgraph") !=-1 : return 0.0119 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-120_MA-20_13TeV-madgraph") !=-1 : return 0.0119 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-110_MA-15_13TeV-madgraph") !=-1 : return 0.004967 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-140_MA-25_13TeV-madgraph") !=-1 : return 0.02275 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-130_MA-10_13TeV-madgraph") !=-1 : return 0.009985 elif fileName.find("TTJets_SingleLeptFromT_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 109.6 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-100_MA-20_13TeV-madgraph") !=-1 : return 0.0004875 elif fileName.find("QCD_HT300to500_BGenFilter_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 27960.0 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-140_MA-35_13TeV-madgraph") !=-1 : return 0.02431 elif fileName.find("DYJetsToLL_M-100to200_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 247.8 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-120_MA-35_13TeV-madgraph") !=-1 : return 0.00514 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-140_MA-30_13TeV-madgraph") !=-1 : return 0.02449 elif fileName.find("DY2JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 334.7 elif fileName.find("TTToSemiLeptonic_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DY3JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 102.3 elif fileName.find("DY1JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 1012.0 elif fileName.find("DY4JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 54.52 elif fileName.find("TTToLL_MLL_1200To1800_TuneCUETP8M1_13TeV-powheg-pythia8") !=-1 : return 76.63 elif fileName.find("TTToSemiLeptonic_TuneCP2_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8") !=-1 : return 5941.0 elif fileName.find("TTToHplusToWA_WToENu_AToMuMu_MH-90_MA-10_13TeV-madgraph") !=-1 : return 0.000107 elif fileName.find("TTToSemiLeptonic_mtop166p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 811.4 elif fileName.find("TTToSemiLeptonic_widthx1p3_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToSemiLeptonic_mtop173p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 668.6 elif fileName.find("TTToSemiLeptonic_mtop178p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 584.6 elif fileName.find("DYBJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 70.08 elif fileName.find("TTTo2L2Nu_TuneCUETP8M2_ttHtranche3_13TeV-powheg-pythia8") !=-1 : return 76.7 elif fileName.find("DYToEE_M-200To400_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 2.341 elif fileName.find("TTToSemiLeptonic_hdampDOWN_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToSemiLeptonic_mtop169p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 746.2 elif fileName.find("TTToSemiLeptonic_mtop171p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 706.1 elif fileName.find("TTToSemiLeptonic_widthx0p7_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DYToEE_M-400To800_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8") !=-1 : return 0.208 elif fileName.find("TTToHadronic_TuneCP5down_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTWJetsToLNu_TuneCP5_13TeV-amcatnloFXFX-madspin-pythia8") !=-1 : return 0.2149 elif fileName.find("TTToSemiLeptonic_mtop175p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 633.4 elif fileName.find("DYJetsToLL_M-50_TuneCUETHS1_13TeV-madgraphMLM-herwigpp") !=-1 : return 358.6 elif fileName.find("TTToLL_MLL_1800ToInf_TuneCUETP8M1_13TeV-powheg-pythia8") !=-1 : return 76.63 elif fileName.find("TTToHadronic_TuneCP5CR2_GluonMove_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DYJetsToLL_Pt-0To50_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 106300.0 elif fileName.find("DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8") !=-1 : return 4963.0 elif fileName.find("TTWJetsToQQ_TuneCP5_13TeV-amcatnloFXFX-madspin-pythia8") !=-1 : return 0.4316 elif fileName.find("TTToSemiLepton_HT500Njet9_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 4.239 elif fileName.find("ST_tWll_5f_LO_TuneCP5_PSweights_13TeV-madgraph-pythia8") !=-1 : return 0.01103 elif fileName.find("TTToLL_MLL_800To1200_TuneCUETP8M1_13TeV-powheg-pythia8") !=-1 : return 76.63 elif fileName.find("Test_BulkGravToWW_narrow_M-4000_13TeV_TuneCP5-madgraph") !=-1 : return 4.543e-05 elif fileName.find("TTJets_HT-1200to2500_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 0.1316 elif fileName.find("tZq_W_lept_Z_hadron_4f_ckm_NLO_13TeV_amcatnlo_pythia8") !=-1 : return 0.1573 elif fileName.find("DYJetsToLL_M-10to50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 15810 elif fileName.find("ttHTobb_ttToSemiLep_M125_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 0.5418 elif fileName.find("TTJets_HT-2500toInf_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 0.001407 elif fileName.find("TTTo2L2Nu_HT500Njet7_TuneCP5down_13TeV-powheg-pythia8") !=-1 : return 11.38 elif fileName.find("TTToHadronic_TuneCP5up_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTJets_HT-800to1200_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 0.7532 elif fileName.find("TTToSemiLeptonic_hdampUP_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.0 elif fileName.find("TTToLL_MLL_500To800_TuneCUETP8M1_13TeV-powheg-pythia8") !=-1 : return 76.63 elif fileName.find("TTToHadronic_TuneCP5CR1_QCDbased_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTTo2L2Nu_TuneCP5down_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTZPrimeToMuMu_M-1800_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 6.694e-05 elif fileName.find("TTZPrimeToMuMu_M-1600_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.0001324 elif fileName.find("TTZPrimeToMuMu_M-1200_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.0006278 elif fileName.find("ST_t-channel_antitop_5f_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 82.52 elif fileName.find("TTZPrimeToMuMu_M-1500_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.0001899 elif fileName.find("TTZPrimeToMuMu_M-1700_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 9.354e-05 elif fileName.find("TTJets_HT-600to800_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 1.821 elif fileName.find("TTZPrimeToMuMu_M-1000_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.001539 elif fileName.find("ST_t-channel_eleDecays_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 24.85 elif fileName.find("ST_t-channel_tauDecays_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 24.7 elif fileName.find("DYJetsToLL_M-5to50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 81880.0 elif fileName.find("TTZPrimeToMuMu_M-2000_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.001539 elif fileName.find("TTZPrimeToMuMu_M-1400_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.0002776 elif fileName.find("TTZPrimeToMuMu_M-1300_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.0004127 elif fileName.find("TTZPrimeToMuMu_M-1900_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 4.857e-05 elif fileName.find("TTToHadronic_hdampDOWN_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToHadronic_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTZPrimeToMuMu_M-600_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.01408 elif fileName.find("TTToHadronic_mtop169p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 746.2 elif fileName.find("TTZPrimeToMuMu_M-300_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.22 elif fileName.find("TTToSemiLeptonic_TuneCP5_erdON_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTZToLLNuNu_M-10_TuneCP5down_13TeV-amcatnlo-pythia8") !=-1 : return 0.2432 elif fileName.find("ST_t-channel_muDecays_13TeV-comphep-pythia8_TuneCP5") !=-1 : return 24.72 elif fileName.find("TTToHadronic_mtop171p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 706.1 elif fileName.find("TTZPrimeToMuMu_M-400_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.0684 elif fileName.find("DYBBJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 14.49 elif fileName.find("TTToHadronic_mtop166p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 811.4 elif fileName.find("ttHTobb_ttTo2L2Nu_M125_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 0.5418 elif fileName.find("TTTo2L2Nu_HT500Njet7_TuneCP5up_13TeV-powheg-pythia8") !=-1 : return 11.43 elif fileName.find("TTZPrimeToMuMu_M-900_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.002517 elif fileName.find("TTToHadronic_mtop178p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 584.6 elif fileName.find("TTToHadronic_mtop173p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 668.6 elif fileName.find("TTZPrimeToMuMu_M-700_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.007514 elif fileName.find("TTZPrimeToMuMu_M-500_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.02871 elif fileName.find("TTZPrimeToMuMu_M-800_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.004255 elif fileName.find("TTTo2L2Nu_TuneCP5CR2_GluonMove_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToHadronic_mtop175p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 633.4 elif fileName.find("TTTo2L2Nu_noSC_TuneCUETP8M2T4_13TeV-powheg-pythia8") !=-1 : return 76.7 elif fileName.find("DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 877.8 elif fileName.find("DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 6529.0 elif fileName.find("QCD_HT1000to1500_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 1092.0 elif fileName.find("DY4JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 44.03 elif fileName.find("TTTo2L2Nu_TuneCP5up_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("QCD_HT1500to2000_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 99.76 elif fileName.find("TTTo2L2Nu_TuneCP5CR1_QCDbased_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DY3JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 111.5 elif fileName.find("DY2JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 304.4 elif fileName.find("TTToHadrons_mtop178p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 584.6 elif fileName.find("DYJetsToQQ_HT180_13TeV_TuneCP5-madgraphMLM-pythia8") !=-1 : return 1728.0 elif fileName.find("DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 5343.0 elif fileName.find("QCD_HT2000toInf_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 20.35 elif fileName.find("TTZToLLNuNu_M-10_TuneCP5up_13TeV-amcatnlo-pythia8") !=-1 : return 0.2432 elif fileName.find("TTTo2L2Nu_widthx1p15_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DYTo2Mu_M1300_CUETP8M1_13TeV_Pythia8_Corrected-v3") !=-1 : return 0.001656 elif fileName.find("DYJetsToLL_M-50_TuneCH3_13TeV-madgraphMLM-herwig7") !=-1 : return 9.402 elif fileName.find("TTTo2L2Nu_HT500Njet7_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 11.28 elif fileName.find("DYJetsToEE_M-50_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 1795.0 elif fileName.find("QCD_HT700to1000_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 6344.0 elif fileName.find("TTToSemiLeptonic_TuneCP5down_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DYJetsToLL_M-50_TuneCP2_13TeV-madgraphMLM-pythia8") !=-1 : return 4878.0 elif fileName.find("DYJetsToLL_M-50_TuneCP1_13TeV-madgraphMLM-pythia8") !=-1 : return 4661.0 elif fileName.find("TTToHadronic_hdampUP_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.0 elif fileName.find("TTTo2L2Nu_widthx0p85_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DYTo2E_M1300_CUETP8M1_13TeV_Pythia8_Corrected-v3") !=-1 : return 0.001661 elif fileName.find("DYTo2Mu_M800_CUETP8M1_13TeV_Pythia8_Corrected-v3") !=-1 : return 0.01419 elif fileName.find("TTTo2L2Nu_TuneCP5_PSweights_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DYTo2Mu_M300_CUETP8M1_13TeV_Pythia8_Corrected-v3") !=-1 : return 0.5658 elif fileName.find("TTTo2L2Nu_mtop175p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 633.4 elif fileName.find("TTTo2L2Nu_mtop169p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 746.2 elif fileName.find("DYJetsToLL_1J_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 955.8 elif fileName.find("QCD_HT300to500_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 323400.0 elif fileName.find("DYToEE_M-50_NNPDF31_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 2137.0 elif fileName.find("TTTo2L2Nu_mtop173p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 668.6 elif fileName.find("TTTo2L2Nu_hdampDOWN_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DYJetsToLL_0J_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 5313.0 elif fileName.find("DYJetsToLL_2J_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 360.4 elif fileName.find("TTTo2L2Nu_mtop178p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 584.6 elif fileName.find("TTTo2L2Nu_mtop171p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 706.1 elif fileName.find("QCD_HT200to300_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 1551000.0 elif fileName.find("TTTo2L2Nu_widthx0p7_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("QCD_HT500to700_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 30140.0 elif fileName.find("TTTo2L2Nu_mtop166p5_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 811.4 elif fileName.find("ST_t-channel_top_5f_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 119.7 elif fileName.find("TTTo2L2Nu_widthx1p3_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("QCD_HT100to200_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 23590000.0 elif fileName.find("QCD_HT50to100_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 185300000.0 elif fileName.find("TTZToLLNuNu_M-10_TuneCP5_13TeV-amcatnlo-pythia8") !=-1 : return 0.2432 elif fileName.find("TTToSemiLeptonic_TuneCP5up_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTJets_DiLept_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 54.23 elif fileName.find("QCD_HT1000to1500_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 1088.0 elif fileName.find("TTToHadronic_TuneCP5_erdON_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToLL_MLL_500To800_41to65_NNPDF31_13TeV-powheg") !=-1 : return 687.1 elif fileName.find("QCD_HT1500to2000_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 99.11 elif fileName.find("TTZToLL_M-1to10_TuneCP5_13TeV-amcatnlo-pythia8") !=-1 : return 0.05324 elif fileName.find("TTTo2L2Nu_hdampUP_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.0 elif fileName.find("QCD_HT700to1000_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 6334.0 elif fileName.find("QCD_HT2000toInf_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 20.23 elif fileName.find("ST_tWlnuZ_5f_LO_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.001267 elif fileName.find("TTToLL_MLL_500To800_0to20_NNPDF31_13TeV-powheg") !=-1 : return 687.1 elif fileName.find("W4JetsToLNu_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 544.3 elif fileName.find("QCD_HT300to500_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 322600.0 elif fileName.find("W2JetsToLNu_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 2793.0 elif fileName.find("TTZZTo4b_5f_LO_TuneCP5_13TeV_madgraph_pythia8") !=-1 : return 0.001385 elif fileName.find("TTToSemiLeptonic_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("W3JetsToLNu_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 992.5 elif fileName.find("QCD_HT500to700_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 29980.0 elif fileName.find("QCD_HT200to300_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 1547000.0 elif fileName.find("W1JetsToLNu_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 8873.0 elif fileName.find("TTToHadronic_TuneCP5down_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("QCD_HT100to200_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 23700000.0 elif fileName.find("ST_tWqqZ_5f_LO_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.001122 elif fileName.find("DYToMuMu_pomflux_Pt-30_TuneCP5_13TeV-pythia8") !=-1 : return 4.219 elif fileName.find("WJetsToLNu_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 52940.0 elif fileName.find("TTTo2L2Nu_TuneCP5_erdON_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTToHadronic_TuneCP5up_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTTo2L2Nu_TuneCUETP8M1_14TeV-powheg-pythia8") !=-1 : return 90.75 elif fileName.find("TTToLL_MLL_1200To1800_NNPDF31_13TeV-powheg") !=-1 : return 687.1 elif fileName.find("TTTo2L2Nu_TuneCP5down_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DYJetsToQQ_HT180_13TeV-madgraphMLM-pythia8") !=-1 : return 1208.0 elif fileName.find("tZq_ll_4f_scaledown_13TeV-amcatnlo-pythia8") !=-1 : return 0.0758 elif fileName.find("TTToLL_MLL_1800ToInf_NNPDF31_13TeV-powheg") !=-1 : return 687.1 elif fileName.find("TTJets_TuneCP5_13TeV-amcatnloFXFX-pythia8") !=-1 : return 722.8 elif fileName.find("ttZJets_TuneCP5_13TeV_madgraphMLM_pythia8") !=-1 : return 0.5407 elif fileName.find("TTToHadronic_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("tZq_ll_4f_ckm_NLO_13TeV-amcatnlo-herwigpp") !=-1 : return 0.07579 elif fileName.find("ttWJets_TuneCP5_13TeV_madgraphMLM_pythia8") !=-1 : return 0.4611 elif fileName.find("TTToLL_MLL_800To1200_NNPDF31_13TeV-powheg") !=-1 : return 687.1 elif fileName.find("tZq_ll_4f_scaleup_13TeV-amcatnlo-pythia8") !=-1 : return 0.0758 elif fileName.find("DYToEE_M-50_NNPDF31_13TeV-powheg-pythia8") !=-1 : return 2137.0 elif fileName.find("TTJets_TuneCP5_13TeV-madgraphMLM-pythia8") !=-1 : return 496.1 elif fileName.find("DYToLL-M-50_3J_14TeV-madgraphMLM-pythia8") !=-1 : return 191.7 elif fileName.find("DYToLL-M-50_0J_14TeV-madgraphMLM-pythia8") !=-1 : return 3676.0 elif fileName.find("TTTo2L2Nu_TuneCP5up_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("DYToLL-M-50_1J_14TeV-madgraphMLM-pythia8") !=-1 : return 1090.0 elif fileName.find("DYToLL-M-50_2J_14TeV-madgraphMLM-pythia8") !=-1 : return 358.7 elif fileName.find("TTZToQQ_TuneCP5_13TeV-amcatnlo-pythia8") !=-1 : return 0.5104 elif fileName.find("TTTo2L2Nu_TuneCP5_13TeV-powheg-pythia8") !=-1 : return 687.1 elif fileName.find("TTZToBB_TuneCP5_13TeV-amcatnlo-pythia8") !=-1 : return 0.1118 elif fileName.find("DYToLL_M_1_TuneCUETP8M1_13TeV_pythia8") !=-1 : return 19670.0 elif fileName.find("DYToLL_2J_13TeV-amcatnloFXFX-pythia8") !=-1 : return 340.5 elif fileName.find("DYToLL_0J_13TeV-amcatnloFXFX-pythia8") !=-1 : return 4757.0 elif fileName.find("DYTo2Mu_M1300_CUETP8M1_13TeV-pythia8") !=-1 : return 78420000000.0 elif fileName.find("TTWZ_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.002441 elif fileName.find("TTWW_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.006979 elif fileName.find("TTZZ_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.001386 elif fileName.find("DYTo2Mu_M300_CUETP8M1_13TeV-pythia8") !=-1 : return 78390000000.0 elif fileName.find("TTZH_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.00113 elif fileName.find("TTTW_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.0007314 elif fileName.find("DYTo2E_M1300_CUETP8M1_13TeV-pythia8") !=-1 : return 78390000000.0 elif fileName.find("DYTo2Mu_M800_CUETP8M1_13TeV-pythia8") !=-1 : return 78420000000.0 elif fileName.find("TTWH_TuneCP5_13TeV-madgraph-pythia8") !=-1 : return 0.001141 elif fileName.find("WZ_TuneCP5_PSweights_13TeV-pythia8") !=-1 : return 27.52 elif fileName.find("WWZ_TuneCP5_13TeV-amcatnlo-pythia8") !=-1 : return 0.1676 elif fileName.find("DYTo2E_M800_CUETP8M1_13TeV-pythia8") !=-1 : return 78420000000.0 elif fileName.find("WW_TuneCP5_PSweights_13TeV-pythia8") !=-1 : return 76.15 elif fileName.find("ZZZ_TuneCP5_13TeV-amcatnlo-pythia8") !=-1 : return 0.01398 elif fileName.find("DYTo2E_M300_CUETP8M1_13TeV-pythia8") !=-1 : return 78420000000.0 elif fileName.find("WZZ_TuneCP5_13TeV-amcatnlo-pythia8") !=-1 : return 0.05565 elif fileName.find("tZq_ll_4f_13TeV-amcatnlo-herwigpp") !=-1 : return 0.0758 elif fileName.find("tZq_ll_4f_13TeV-amcatnlo-pythia8") !=-1 : return 0.0758 elif fileName.find("DYToLL_M-50_14TeV_pythia8_pilot1") !=-1 : return 4927.0 elif fileName.find("DYToLL_M-50_14TeV_pythia8") !=-1 : return 4963.0 elif fileName.find("WZ_TuneCP5_13TeV-pythia8") !=-1 : return 27.6 elif fileName.find("ZZ_TuneCP5_13TeV-pythia8") !=-1 : return 12.14 elif fileName.find("WW_TuneCP5_13TeV-pythia8") !=-1 : return 75.8 elif fileName.find("DYJetsToLL_Pt-100To250") !=-1 : return 84.014804 elif fileName.find("DYJetsToLL_Pt-400To650") !=-1 : return 0.436041144 elif fileName.find("DYJetsToLL_Pt-650ToInf") !=-1 : return 0.040981055 elif fileName.find("DYJetsToLL_Pt-250To400") !=-1 : return 3.228256512 elif fileName.find("DYJetsToLL_Pt-50To100") !=-1 : return 363.81428 elif fileName.find("DYJetsToLL_Zpt-0To50") !=-1 : return 5352.57924 elif fileName.find("TTToSemiLeptonic") !=-1 : return 365.34 elif fileName.find("TTToHadronic") !=-1 : return 377.96 elif fileName.find("TTJetsFXFX") !=-1 : return 831.76 elif fileName.find("TTTo2L2Nu") !=-1 : return 88.29 elif fileName.find("DYToLL_0J") !=-1 : return 4620.519036 elif fileName.find("DYToLL_2J") !=-1 : return 338.258531 elif fileName.find("DYToLL_1J") !=-1 : return 859.589402 elif fileName.find("SingleMuon")!=-1 or fileName.find("SingleElectron") !=-1 or fileName.find("JetHT") !=-1 or fileName.find("MET") !=-1 or fileName.find("MTHT") !=-1: return 1. else: print("Cross section not defined! Returning 0 and skipping sample:\n{}\n".format(fileName)) return 0
def get_x_section(fileName): file_name = fileName.replace('PSWeights_', '') file_name = fileName.replace('5f_InclusiveDecays_', '5f_') file_name = fileName.replace('tZq_ll_4f_ckm_NLO_TuneCP5_13TeV-amcatnlo-pythia8', 'tZq_ll_4f_ckm_NLO_TuneCP5_PSweights_13TeV-amcatnlo-pythia8') if fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_mtop1695_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8') != -1: return 70.89 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_mtop1735_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8') != -1: return 68.45 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_mtop1715_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8') != -1: return 69.66 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_mtop1715_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8') != -1: return 116.1 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8') != -1: return 112.5 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_mtop1695_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8') != -1: return 118.0 elif fileName.find('ST_s-channel_4f_leptonDecays_TuneCP5_PSweights_13TeV-amcatnlo-pythia8_correctnPartonsInBorn') != -1: return 3.74 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_mtop1735_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8') != -1: return 114.4 elif fileName.find('ST_t-channel_antitop_4f_hdampdown_InclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 67.91 elif fileName.find('ST_tW_antitop_5f_hdampdown_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 34.99 elif fileName.find('ST_t-channel_antitop_4f_hdampdown_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8') != -1: return 69.09 elif fileName.find('ST_t-channel_antitop_4f_hdampup_InclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 67.91 elif fileName.find('ST_tW_antitop_5f_hdampup_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 34.96 elif fileName.find('DYJetsToLL_BGenFilter_Zpt-100to200_M-50_TuneCP5_13TeV-madgraphMLM-pythia8_newgridpack') != -1: return 2.678 elif fileName.find('DYJetsToLL_BGenFilter_Zpt-200toInf_M-50_TuneCP5_13TeV-madgraphMLM-pythia8_newgridpack') != -1: return 0.3909 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5_erdON_PSweights_13TeV-powheg-pythia8') != -1: return 67.91 elif fileName.find('ST_t-channel_antitop_5f_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8_vtd_vts_decay') != -1: return 82.52 elif fileName.find('ST_t-channel_antitop_4f_hdampup_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8') != -1: return 69.09 elif fileName.find('ST_t-channel_top_4f_hdampdown_InclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 113.3 elif fileName.find('ST_tW_top_5f_hdampdown_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 34.92 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5_erdON_PSweights_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('ST_t-channel_antitop_5f_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8_vtd_vts_prod') != -1: return 225.5 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5down_PSweights_13TeV-powheg-pythia8') != -1: return 67.91 elif fileName.find('ST_t-channel_top_4f_hdampup_InclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 113.3 elif fileName.find('ST_t-channel_top_4f_hdampdown_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8') != -1: return 115.3 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5_erdON_13TeV-powheg-madspin-pythia8') != -1: return 69.09 elif fileName.find('ST_tW_top_5f_hdampup_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 34.9 elif fileName.find('DYJetsToTauTau_ForcedMuEleDecay_M-50_TuneCP5_PSweights_13TeV-amcatnloFXFX-pythia8') != -1: return 6505.0 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5CR1_PSweights_13TeV-powheg-pythia8') != -1: return 67.91 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5down_PSweights_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('DYJetsToTauTau_ForcedMuEleDecay_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8_ext1') != -1: return 1991.0 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5CR2_PSweights_13TeV-powheg-pythia8') != -1: return 67.91 elif fileName.find('ST_tW_antitop_5f_inclusiveDecays_mtop1695_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 36.65 elif fileName.find('ST_tW_antitop_5f_inclusiveDecays_mtop1735_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 34.44 elif fileName.find('ST_t-channel_top_4f_hdampup_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8') != -1: return 115.3 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5CR1_PSweights_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5up_PSweights_13TeV-powheg-pythia8') != -1: return 67.91 elif fileName.find('ST_t-channel_top_5f_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8_vtd_vts_decay') != -1: return 138.1 elif fileName.find('ST_tW_antitop_5f_inclusiveDecays_mtop1755_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 33.4 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_TuneCP5_erdON_PSweights_13TeV-powheg-pythia8') != -1: return 113.3 elif fileName.find('ST_tW_antitop_5f_inclusiveDecays_mtop1715_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 35.52 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5down_13TeV-powheg-madspin-pythia8') != -1: return 69.09 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5CR2_PSweights_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('ST_tW_antitop_5f_DS_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 35.25 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5CR2_13TeV-powheg-madspin-pythia8') != -1: return 69.09 elif fileName.find('ST_t-channel_top_5f_TuneCP5_PSweights_13TeV-powheg-madspin-pythia8_vtd_vts_prod') != -1: return 547.2 elif fileName.find('TTZToLLNuNu_M-10_TuneCP5_PSweights_correctnPartonsInBorn_13TeV-amcatnlo-pythia8') != -1: return 0.2432 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5_erdON_PSweights_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5up_PSweights_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5CR1_13TeV-powheg-madspin-pythia8') != -1: return 69.09 elif fileName.find('DYJetsToLL_BGenFilter_Zpt-200toInf_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 0.5082 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_TuneCP5_erdON_13TeV-powheg-madspin-pythia8') != -1: return 115.3 elif fileName.find('TTWJetsToLNu_TuneCP5CR2_GluonMove_PSweights_13TeV-amcatnloFXFX-madspin-pythia8') != -1: return 0.2183 elif fileName.find('ST_s-channel_4f_leptonDecays_mtop1715_TuneCP5_PSweights_13TeV-amcatnlo-pythia8') != -1: return 3.824 elif fileName.find('ST_s-channel_4f_leptonDecays_mtop1755_TuneCP5_PSweights_13TeV-amcatnlo-pythia8') != -1: return 3.506 elif fileName.find('ST_s-channel_4f_leptonDecays_mtop1695_TuneCP5_PSweights_13TeV-amcatnlo-pythia8') != -1: return 3.991 elif fileName.find('DYJetsToLL_BGenFilter_Zpt-100to200_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 3.41 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 67.91 elif fileName.find('ST_t-channel_antitop_4f_inclusiveDecays_TuneCP5_13TeV-powhegV2-madspin-pythia8') != -1: return 67.91 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5up_13TeV-powheg-madspin-pythia8') != -1: return 69.09 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_TuneCP5down_PSweights_13TeV-powheg-pythia8') != -1: return 113.3 elif fileName.find('ST_s-channel_4f_leptonDecays_mtop1735_TuneCP5_PSweights_13TeV-amcatnlo-pythia8') != -1: return 3.653 elif fileName.find('TTWJetsToLNu_TuneCP5CR1_QCDbased_PSweights_13TeV-amcatnloFXFX-madspin-pythia8') != -1: return 0.2169 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5down_PSweights_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_TuneCP5CR1_PSweights_13TeV-powheg-pythia8') != -1: return 113.3 elif fileName.find('ST_tW_antitop_5f_hdampdown_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8') != -1: return 34.98 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_TuneCP5CR2_PSweights_13TeV-powheg-pythia8') != -1: return 113.3 elif fileName.find('ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8') != -1: return 69.09 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_mtop1715_TuneCP5_13TeV-powheg-pythia8') != -1: return 36.65 elif fileName.find('ST_tW_top_5f_inclusiveDecays_mtop1695_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 36.58 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5CR2_PSweights_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5CR1_PSweights_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_mtop1735_TuneCP5_13TeV-powheg-pythia8') != -1: return 36.65 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_TuneCP5up_PSweights_13TeV-powheg-pythia8') != -1: return 113.3 elif fileName.find('DYJetsToLL_Zpt-200toInf_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8_TuneDown') != -1: return 6.714 elif fileName.find('DYJetsToTauTau_ForcedMuEleDecay_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 1981.0 elif fileName.find('ST_tW_top_5f_inclusiveDecays_mtop1735_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 34.38 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_mtop1695_TuneCP5_13TeV-powheg-pythia8') != -1: return 36.65 elif fileName.find('ST_tW_top_5f_DS_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 33.75 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_mtop1755_TuneCP5_13TeV-powheg-pythia8') != -1: return 36.65 elif fileName.find('ST_tW_top_5f_inclusiveDecays_mtop1715_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 35.46 elif fileName.find('DYJetsToLL_M-105To160_VBFFilter_TuneCP5_PSweights_13TeV-amcatnloFXFX-pythia8') != -1: return 2.01 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_TuneCP5down_13TeV-powheg-madspin-pythia8') != -1: return 115.3 elif fileName.find('ST_tW_top_5f_inclusiveDecays_mtop1755_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 33.34 elif fileName.find('DYJetsToLL_M-105To160_VBFFilter_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 1.526 elif fileName.find('DYBJetsToLL_M-50_Zpt-200toInf_TuneCP5_13TeV-madgraphMLM-pythia8_newgridpack') != -1: return 0.3282 elif fileName.find('ST_tW_antitop_5f_inclusiveDecays_TuneCP5down_PSweights_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_TuneCP5CR2_13TeV-powheg-madspin-pythia8') != -1: return 115.3 elif fileName.find('ST_t-channel_eleDecays_anomwtbLVRV_LVRVunphys_13TeV-comphep-pythia8_TuneCP5') != -1: return 47.81 elif fileName.find('ST_tW_antitop_5f_hdampup_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('ST_t-channel_tauDecays_anomwtbLVRV_LVRVunphys_13TeV-comphep-pythia8_TuneCP5') != -1: return 47.69 elif fileName.find('DYBJetsToLL_M-50_Zpt-100to200_TuneCP5_13TeV-madgraphMLM-pythia8_newgridpack') != -1: return 3.21 elif fileName.find('ST_t-channel_tauDecays_anomwtbLVLT_LVLTunphys_13TeV-comphep-pythia8_TuneCP5') != -1: return 84.72 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5up_PSweights_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_TuneCP5CR1_13TeV-powheg-madspin-pythia8') != -1: return 115.3 elif fileName.find('DYJetsToLL_M-4to50_HT-100to200_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 203.3 elif fileName.find('DYJetsToLL_Zpt-200toInf_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8_TuneUp') != -1: return 6.716 elif fileName.find('TTToSemiLepton_HT500Njet9_hdampDOWN_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 3.884 elif fileName.find('ST_tW_antitop_5f_DS_inclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 35.25 elif fileName.find('DYJetsToLL_M-4to50_HT-600toInf_TuneCP5_PSWeights_13TeV-madgraphMLM-pythia8') != -1: return 1.837 elif fileName.find('ST_t-channel_muDecays_anomwtbLVLT_LVLTunphys_13TeV-comphep-pythia8_TuneCP5') != -1: return 84.86 elif fileName.find('DYJetsToLL_M-4to50_HT-200to400_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 54.31 elif fileName.find('ST_t-channel_top_4f_inclusiveDecays_TuneCP5_13TeV-powhegV2-madspin-pythia8') != -1: return 113.3 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_TuneCP5up_13TeV-powheg-madspin-pythia8') != -1: return 115.3 elif fileName.find('ST_t-channel_antitop_5f_TuneCP5_13TeV-powheg-madspin-pythia8_vtd_vts_decay') != -1: return 82.52 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 113.3 elif fileName.find('ST_t-channel_muDecays_anomwtbLVRV_LVRVunphys_13TeV-comphep-pythia8_TuneCP5') != -1: return 47.63 elif fileName.find('DYJetsToLL_CGenFilter_Zpt-200toInf_M-50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 3.184 elif fileName.find('DYJetsToLL_M-4to50_HT-70to100_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 146.6 elif fileName.find('DYJetsToLL_M-50_HT-1200to2500_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 0.1937 elif fileName.find('ST_s-channel_4f_leptonDecays_TuneCP5down_PSweights_13TeV-amcatnlo-pythia8') != -1: return 3.74 elif fileName.find('ST_t-channel_eDecays_anomwtbLVLT_LVLTunphys_13TeV-comphep-pythia8_TuneCP5') != -1: return 84.84 elif fileName.find('DYJetsToLL_BGenFilter_Zpt-200toInf_M-50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 0.5327 elif fileName.find('DYJetsToLL_BGenFilter_Zpt-100to200_M-50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 3.384 elif fileName.find('ST_tW_top_5f_hdampdown_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('DYJetsToLL_CGenFilter_Zpt-100to200_M-50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 25.86 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5_erdON_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('ST_t-channel_antitop_5f_TuneCP5_13TeV-powheg-madspin-pythia8_vtd_vts_prod') != -1: return 225.5 elif fileName.find('ST_tW_antitop_5f_inclusiveDecays_TuneCP5up_PSweights_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('DYJetsToTauTau_ForcedMuDecay_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 1990.0 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_mtop1695_TuneCP5_13TeV-powheg-pythia8') != -1: return 36.65 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_mtop1715_TuneCP5_13TeV-powheg-pythia8') != -1: return 36.65 elif fileName.find('TTToSemiLepton_HT500Njet9_hdampUP_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 4.613 elif fileName.find('DYJetsToLL_M-50_HT-800to1200_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 0.8021 elif fileName.find('DYJetsToLL_M-50_HT-2500toInf_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 0.003514 elif fileName.find('ST_s-channel_4f_leptonDecays_TuneCP5CR2_PSweights_13TeV-amcatnlo-pythia8') != -1: return 3.74 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_mtop1735_TuneCP5_13TeV-powheg-pythia8') != -1: return 36.65 elif fileName.find('ST_s-channel_4f_leptonDecays_TuneCP5CR1_PSweights_13TeV-amcatnlo-pythia8') != -1: return 3.74 elif fileName.find('ST_t-channel_top_4f_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8') != -1: return 115.3 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_mtop1755_TuneCP5_13TeV-powheg-pythia8') != -1: return 36.65 elif fileName.find('TTToSemilepton_ttbbFilter_TuneCUETP8M2_ttHtranche3_13TeV-powheg-pythia8') != -1: return 31.06 elif fileName.find('ST_s-channel_4f_leptonDecays_TuneCP5up_PSweights_13TeV-amcatnlo-pythia8') != -1: return 3.74 elif fileName.find('ST_t-channel_tauDecays_anomwtbLVRT_LV2RT2_13TeV-comphep-pythia8_TuneCP5') != -1: return 102.2 elif fileName.find('DYJetsToEE_M-50_LTbinned_800To2000_5f_LO_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.01009 elif fileName.find('DYJetsToLL_M-50_HT-100to200_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 160.7 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5down_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('ST_tW_antitop_5f_inclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('ST_tW_top_5f_inclusiveDecays_TuneCP5down_PSweights_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('ST_t-channel_tauDecays_anomwtbLVRT_LV1RT4_13TeV-comphep-pythia8_TuneCP5') != -1: return 108.3 elif fileName.find('ST_t-channel_tauDecays_anomwtbLVRT_LV3RT1_13TeV-comphep-pythia8_TuneCP5') != -1: return 54.52 elif fileName.find('DYJetsToLL_M-50_HT-200to400_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 48.63 elif fileName.find('DYJetsToLL_M-50_HT-600to800_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 1.761 elif fileName.find('DYJetsToTauTau_ForcedMuEleDecay_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 6458.0 elif fileName.find('ST_tW_top_5f_hdampup_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8') != -1: return 34.9 elif fileName.find('DYJetsToLL_M-50_HT-400to600_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 6.993 elif fileName.find('DYJetsToEE_M-50_LTbinned_100To200_5f_LO_TuneCP5_13TeV-madgraph-pythia8') != -1: return 93.51 elif fileName.find('ST_t-channel_muDecays_anomwtbLVRT_LV1RT4_13TeV-comphep-pythia8_TuneCP5') != -1: return 108.6 elif fileName.find('tZq_ll_4f_ckm_NLO_TuneCP5CR1_QCDbased_PSweights_13TeV-amcatnlo-pythia8') != -1: return 0.07358 elif fileName.find('DYJetsToLL_M-50_VBFFilter_TuneCP5_PSweights_13TeV-amcatnloFXFX-pythia8') != -1: return 266.1 elif fileName.find('DYJetsToEE_M-50_LTbinned_200To400_5f_LO_TuneCP5_13TeV-madgraph-pythia8') != -1: return 4.121 elif fileName.find('ST_t-channel_muDecays_anomwtbLVRT_LV2RT2_13TeV-comphep-pythia8_TuneCP5') != -1: return 102.7 elif fileName.find('DYJetsToLL_M-50_HT-70to100_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 146.5 elif fileName.find('ST_tW_top_5f_DS_inclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 33.75 elif fileName.find('ST_tW_antitop_5f_DS_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8') != -1: return 35.13 elif fileName.find('TTZToLLNuNu_M-10_TuneCP5CR2_GluonMove_PSweights_13TeV-amcatnlo-pythia8') != -1: return 0.2432 elif fileName.find('DYJetsToEE_M-50_LTbinned_400To800_5f_LO_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.2445 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5CR1_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5CR2_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('TTJets_SingleLeptFromTbar_genMET-150_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 6.167 elif fileName.find('ST_t-channel_muDecays_anomwtbLVRT_LV3RT1_13TeV-comphep-pythia8_TuneCP5') != -1: return 54.72 elif fileName.find('DYJetsToLL_M-5to50_HT-600toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 1.107 elif fileName.find('ST_t-channel_eDecays_anomwtbLVRT_LV2RT2_13TeV-comphep-pythia8_TuneCP5') != -1: return 102.9 elif fileName.find('ST_s-channel_4f_leptonDecays_TuneCP5_PSweights_13TeV-amcatnlo-pythia8') != -1: return 3.74 elif fileName.find('TTTo2L2Nu_HT500Njet7_hdampDOWN_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 10.56 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5_erdON_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('DYJetsToEE_M-50_LTbinned_95To100_5f_LO_TuneCP5_13TeV-madgraph-pythia8') != -1: return 47.14 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5up_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('TTJets_SingleLeptFromTbar_genMET-80_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 31.68 elif fileName.find('ST_tW_top_5f_inclusiveDecays_TuneCP5up_PSweights_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('ST_t-channel_4f_leptonDecays_TuneCP5_PSweights_13TeV-amcatnlo-pythia8') != -1: return 70.9 elif fileName.find('DYJetsToLL_M-5to50_HT-400to600_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 3.628 elif fileName.find('ST_t-channel_eDecays_anomwtbLVRT_LV1RT4_13TeV-comphep-pythia8_TuneCP5') != -1: return 108.9 elif fileName.find('TTZToLLNuNu_M-10_TuneCP5CR1_QCDbased_PSweights_13TeV-amcatnlo-pythia8') != -1: return 0.2432 elif fileName.find('DYJetsToLL_M-50_VBFFilter_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 202.3 elif fileName.find('DYJetsToLL_M-5to50_HT-100to200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 224.4 elif fileName.find('ST_t-channel_top_5f_TuneCP5_13TeV-powheg-madspin-pythia8_vtd_vts_prod') != -1: return 547.2 elif fileName.find('DYJetsToLL_M-5to50_HT-200to400_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 37.87 elif fileName.find('TTWJetsToLNu_TuneCP5CR2_GluonMove_13TeV-amcatnloFXFX-madspin-pythia8') != -1: return 0.2188 elif fileName.find('DYBJetsToLL_M-50_Zpt-100to200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 3.088 elif fileName.find('ST_t-channel_tauDecays_anomwtbLVRT_RT4_13TeV-comphep-pythia8_TuneCP5') != -1: return 53.84 elif fileName.find('DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8_CUETP8M1Down') != -1: return 5940.0 elif fileName.find('DYJetsToLL_M-1To5_HT-400to600_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 65.9 elif fileName.find('TTToSemiLepton_HT500Njet9_TuneCP5down_PSweights_13TeV-powheg-pythia8') != -1: return 4.179 elif fileName.find('DYJetsToLL_M-1To5_HT-200to400_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 789.8 elif fileName.find('DYJetsToEE_M-50_LTbinned_80To85_5f_LO_TuneCP5_13TeV-madgraph-pythia8') != -1: return 174.1 elif fileName.find('DYBJetsToLL_M-50_Zpt-200toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 0.3159 elif fileName.find('DYJetsToEE_M-50_LTbinned_90To95_5f_LO_TuneCP5_13TeV-madgraph-pythia8') != -1: return 179.6 elif fileName.find('DYJetsToTauTau_ForcedMuDecay_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 6503.0 elif fileName.find('DYJetsToLL_M-1To5_HT-600toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 16.72 elif fileName.find('DYJetsToLL_M-5to50_HT-70to100_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 301.0 elif fileName.find('DYJetsToLL_M-1To5_HT-150to200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 1124.0 elif fileName.find('DYJetsToEE_M-50_LTbinned_85To90_5f_LO_TuneCP5_13TeV-madgraph-pythia8') != -1: return 250.6 elif fileName.find('DYJetsToLL_M-50_HT-1200to2500_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 0.1512 elif fileName.find('TTToSemiLeptonic_TuneCP5CR2_GluonMove_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-160_MZp-2_13TeV-madgraph') != -1: return 0.0001077 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-100_MZp-8_13TeV-madgraph') != -1: return 1.563e-05 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-160_MZp-5_13TeV-madgraph') != -1: return 4.298e-05 elif fileName.find('TTToSemiLeptonic_TuneCP5CR1_QCDbased_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-150_MZp-8_13TeV-madgraph') != -1: return 5.117e-05 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-150_MZp-5_13TeV-madgraph') != -1: return 8.237e-05 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-120_MZp-2_13TeV-madgraph') != -1: return 0.0002052 elif fileName.find('TTJets_SingleLeptFromT_genMET-150_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 6.212 elif fileName.find('TTTo2L2Nu_HT500Njet7_hdampUP_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 12.41 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-140_MZp-8_13TeV-madgraph') != -1: return 6.504e-05 elif fileName.find('DYJetsToLL_M-50_HT-2500toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 0.003659 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-130_MZp-2_13TeV-madgraph') != -1: return 0.0002577 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-150_MZp-2_13TeV-madgraph') != -1: return 0.0002047 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-140_MZp-2_13TeV-madgraph') != -1: return 0.0002613 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-130_MZp-5_13TeV-madgraph') != -1: return 0.0001031 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-100_MZp-2_13TeV-madgraph') != -1: return 5.684e-05 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-110_MZp-8_13TeV-madgraph') != -1: return 3.331e-05 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-130_MZp-8_13TeV-madgraph') != -1: return 6.456e-05 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-100_MZp-5_13TeV-madgraph') != -1: return 2.343e-05 elif fileName.find('ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-120_13TeV_amcatnlo_pythia8') != -1: return 7.402 elif fileName.find('ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-150_13TeV_amcatnlo_pythia8') != -1: return 1.686 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-110_MZp-5_13TeV-madgraph') != -1: return 5.221e-05 elif fileName.find('ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-140_13TeV_amcatnlo_pythia8') != -1: return 3.367 elif fileName.find('ST_tW_top_5f_inclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('ST_t-channel_tauDecays_anomwtbLVRV_RV_13TeV-comphep-pythia8_TuneCP5') != -1: return 24.06 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-110_MZp-2_13TeV-madgraph') != -1: return 0.0001291 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-120_MZp-8_13TeV-madgraph') != -1: return 5.201e-05 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-140_MZp-5_13TeV-madgraph') != -1: return 0.0001043 elif fileName.find('ST_t-channel_tauDecays_anomwtbLVLT_LT_13TeV-comphep-pythia8_TuneCP5') != -1: return 71.8 elif fileName.find('ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-160_13TeV_amcatnlo_pythia8') != -1: return 0.4841 elif fileName.find('TTWJetsToLNu_TuneCP5CR1_QCDbased_13TeV-amcatnloFXFX-madspin-pythia8') != -1: return 0.2183 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5down_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('ST_tW_antitop_5f_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-100_13TeV_amcatnlo_pythia8') != -1: return 11.62 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-160_MZp-8_13TeV-madgraph') != -1: return 2.687e-05 elif fileName.find('DYJetsToLL_Zpt-200toInf_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 6.733 elif fileName.find('DYJetsToLL_M-50_HT-800to1200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 0.6229 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-120_MZp-5_13TeV-madgraph') != -1: return 8.243e-05 elif fileName.find('DYJetsToLL_Zpt-100to200_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 57.3 elif fileName.find('ST_t-channel_muDecays_anomwtbLVRT_RT4_13TeV-comphep-pythia8_TuneCP5') != -1: return 53.81 elif fileName.find('DYJetsToLL_M-50_Zpt-150toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 18.36 elif fileName.find('ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-155_13TeV_amcatnlo_pythia8') != -1: return 1.008 elif fileName.find('DYJetsToLL_M-50_HT-200to400_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 41.04 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-90_MZp-8_13TeV-madgraph') != -1: return 3.684e-06 elif fileName.find('DYJetsToLL_M-105To160_TuneCP5_PSweights_13TeV-amcatnloFXFX-pythia8') != -1: return 47.05 elif fileName.find('tZq_Zhad_Wlept_4f_ckm_NLO_TuneCP5_PSweights_13TeV-amcatnlo-pythia8') != -1: return 0.1518 elif fileName.find('TTJets_SingleLeptFromT_genMET-80_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 32.27 elif fileName.find('DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8_CUETP8M1Up') != -1: return 5872.0 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5CR2_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-90_MZp-5_13TeV-madgraph') != -1: return 5.859e-06 elif fileName.find('TTToSemiLepton_HT500Njet9_TuneCP5up_PSweights_13TeV-powheg-pythia8') != -1: return 4.295 elif fileName.find('DYJetsToLL_M-50_HT-100to200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 147.4 elif fileName.find('DYJetsToLL_M-105To160_VBFFilter_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 2.026 elif fileName.find('DYJetsToLL_M-50_HT-600to800_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 1.358 elif fileName.find('ST_t-channel_muDecays_anomwtbLVRV_RV_13TeV-comphep-pythia8_TuneCP5') != -1: return 24.21 elif fileName.find('ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-90_13TeV_amcatnlo_pythia8') != -1: return 13.46 elif fileName.find('ST_t-channel_muDecays_anomwtbLVLT_LT_13TeV-comphep-pythia8_TuneCP5') != -1: return 71.67 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5CR1_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('ChargedHiggs_TTToHplusBWB_HplusToTauNu_M-80_13TeV_amcatnlo_pythia8') != -1: return 15.03 elif fileName.find('DYJetsToLL_M-50_HT-400to600_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 5.674 elif fileName.find('ST_t-channel_eDecays_anomwtbLVRT_RT4_13TeV-comphep-pythia8_TuneCP5') != -1: return 53.7 elif fileName.find('ST_tW_top_5f_DS_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8') != -1: return 33.67 elif fileName.find('TTTo2L2Nu_ttbbFilter_TuneCUETP8M2_ttHtranche3_13TeV-powheg-pythia8') != -1: return 7.269 elif fileName.find('TTToHplusToWZp_WToTauNu_WuToQQ_ZpToMuMu_MH-90_MZp-2_13TeV-madgraph') != -1: return 1.318e-05 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-140_MZp-2_13TeV-madgraph') != -1: return 0.0001947 elif fileName.find('DYJetsToNuNu_PtZ-400To650_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 0.2783 elif fileName.find('DYJetsToLL_BGenFilter_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 255.2 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-130_MZp-8_13TeV-madgraph') != -1: return 4.803e-05 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-110_MZp-5_13TeV-madgraph') != -1: return 3.898e-05 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-110_MZp-8_13TeV-madgraph') != -1: return 2.495e-05 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-100_MZp-5_13TeV-madgraph') != -1: return 1.776e-05 elif fileName.find('DYJetsToNuNu_PtZ-100To250_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 54.86 elif fileName.find('TTToSemiLeptonic_hdampDOWN_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('ST_tW_antitop_5f_inclusiveDecays_TuneCP5down_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-120_MZp-8_13TeV-madgraph') != -1: return 3.87e-05 elif fileName.find('TTToSemiLeptonic_mtop178p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 584.6 elif fileName.find('DYJetsToNuNu_PtZ-250To400_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 2.073 elif fileName.find('TTToSemiLeptonic_mtop175p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 633.4 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-130_MZp-5_13TeV-madgraph') != -1: return 7.685e-05 elif fileName.find('TTToSemiLeptonic_mtop169p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 746.2 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-160_MZp-5_13TeV-madgraph') != -1: return 3.199e-05 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-160_MZp-8_13TeV-madgraph') != -1: return 1.993e-05 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-120_MZp-2_13TeV-madgraph') != -1: return 0.0001529 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-160_MZp-2_13TeV-madgraph') != -1: return 7.999e-05 elif fileName.find('DYJetsToLL_M-105To160_TuneCP5_PSweights_13TeV-madgraphMLM-pythia8') != -1: return 38.81 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-100_MZp-2_13TeV-madgraph') != -1: return 4.276e-05 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-150_MZp-5_13TeV-madgraph') != -1: return 6.133e-05 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5up_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('TTToSemiLeptonic_mtop173p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 668.6 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-140_MZp-8_13TeV-madgraph') != -1: return 4.869e-05 elif fileName.find('TTToSemiLeptonic_mtop166p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 811.4 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-150_MZp-8_13TeV-madgraph') != -1: return 3.827e-05 elif fileName.find('ST_t-channel_eDecays_anomwtbLVRV_RV_13TeV-comphep-pythia8_TuneCP5') != -1: return 24.12 elif fileName.find('DYJetsToNuNu_PtZ-650ToInf_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 0.02603 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-140_MZp-5_13TeV-madgraph') != -1: return 7.75e-05 elif fileName.find('ST_t-channel_eDecays_anomwtbLVLT_LT_13TeV-comphep-pythia8_TuneCP5') != -1: return 71.81 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-110_MZp-2_13TeV-madgraph') != -1: return 9.633e-05 elif fileName.find('TTWJetsToLNu_TuneCP5_PSweights_13TeV-amcatnloFXFX-madspin-pythia8') != -1: return 0.2198 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-130_MZp-2_13TeV-madgraph') != -1: return 0.0001914 elif fileName.find('TTToSemiLeptonic_mtop171p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 706.1 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-120_MZp-5_13TeV-madgraph') != -1: return 6.122e-05 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-150_MZp-2_13TeV-madgraph') != -1: return 0.000153 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-100_MZp-8_13TeV-madgraph') != -1: return 1.168e-05 elif fileName.find('DYJetsToLL_M-105To160_VBFFilter_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 1.518 elif fileName.find('DYJetsToLL_M-4to50_HT-600toInf_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 1.85 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-160_MA-25_13TeV-madgraph') != -1: return 0.01724 elif fileName.find('DY2JetsToLL_M-50_LHEZpT_400-inf_TuneCP5_13TeV-amcnloFXFX-pythia8') != -1: return 0.4477 elif fileName.find('DY1JetsToLL_M-50_LHEZpT_400-inf_TuneCP5_13TeV-amcnloFXFX-pythia8') != -1: return 0.1193 elif fileName.find('DY2JetsToLL_M-50_LHEZpT_250-400_TuneCP5_13TeV-amcnloFXFX-pythia8') != -1: return 2.737 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-120_MA-30_13TeV-madgraph') != -1: return 0.01416 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-160_MA-35_13TeV-madgraph') != -1: return 0.02032 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-140_MA-25_13TeV-madgraph') != -1: return 0.03673 elif fileName.find('DYJetsToNuNu_PtZ-50To100_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 237.2 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-90_MZp-8_13TeV-madgraph') != -1: return 2.736e-06 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-100_MA-20_13TeV-madgraph') != -1: return 0.0008489 elif fileName.find('DY1JetsToLL_M-50_LHEZpT_250-400_TuneCP5_13TeV-amcnloFXFX-pythia8') != -1: return 1.098 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-90_MZp-5_13TeV-madgraph') != -1: return 4.393e-06 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-140_MA-20_13TeV-madgraph') != -1: return 0.03297 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-130_MA-25_13TeV-madgraph') != -1: return 0.03162 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-140_MA-10_13TeV-madgraph') != -1: return 0.01898 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-110_MA-25_13TeV-madgraph') != -1: return 0.005135 elif fileName.find('DYJetsToLL_M-4to50_HT-200to400_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 54.39 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-110_MA-20_13TeV-madgraph') != -1: return 0.008633 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-100_MA-10_13TeV-madgraph') != -1: return 0.002968 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-140_MA-35_13TeV-madgraph') != -1: return 0.03638 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-160_MA-15_13TeV-madgraph') != -1: return 0.01158 elif fileName.find('DYJetsToLL_M-4to50_HT-400to600_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 5.697 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-100_MA-15_13TeV-madgraph') != -1: return 0.002361 elif fileName.find('TTToSemiLepton_HT500Njet9_hdampDOWN_TuneCP5_13TeV-powheg-pythia8') != -1: return 3.899 elif fileName.find('ST_tW_DS_antitop_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8') != -1: return 35.13 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-120_MA-20_13TeV-madgraph') != -1: return 0.02027 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-120_MA-10_13TeV-madgraph') != -1: return 0.01418 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-150_MA-25_13TeV-madgraph') != -1: return 0.03152 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-150_MA-35_13TeV-madgraph') != -1: return 0.0346 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-150_MA-30_13TeV-madgraph') != -1: return 0.03397 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-120_MA-25_13TeV-madgraph') != -1: return 0.0188 elif fileName.find('DY1JetsToLL_M-50_LHEZpT_150-250_TuneCP5_13TeV-amcnloFXFX-pythia8') != -1: return 9.543 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-110_MA-30_13TeV-madgraph') != -1: return 0.001474 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-150_MA-10_13TeV-madgraph') != -1: return 0.01521 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-160_MA-30_13TeV-madgraph') != -1: return 0.01928 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-150_MA-15_13TeV-madgraph') != -1: return 0.02175 elif fileName.find('DYJetsToLL_M-4to50_HT-100to200_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 204.0 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-140_MA-15_13TeV-madgraph') != -1: return 0.0269 elif fileName.find('TTToSemiLepton_HT500Njet9_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 4.253 elif fileName.find('DYBJetsToNuNu_Zpt-40toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 48.71 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-130_MA-30_13TeV-madgraph') != -1: return 0.02977 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-160_MA-20_13TeV-madgraph') != -1: return 0.01481 elif fileName.find('TTToHadronic_TuneCP5CR2_GluonMove_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-130_MA-20_13TeV-madgraph') != -1: return 0.03 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-120_MA-15_13TeV-madgraph') != -1: return 0.01866 elif fileName.find('TTToHplusToWZp_WToLNu_WToLNu_ZpToMuMu_MH-90_MZp-2_13TeV-madgraph') != -1: return 9.812e-06 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-130_MA-10_13TeV-madgraph') != -1: return 0.01839 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-130_MA-15_13TeV-madgraph') != -1: return 0.02536 elif fileName.find('DY2JetsToLL_M-50_LHEZpT_150-250_TuneCP5_13TeV-amcnloFXFX-pythia8') != -1: return 15.65 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-160_MA-10_13TeV-madgraph') != -1: return 0.008011 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-110_MA-15_13TeV-madgraph') != -1: return 0.009756 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-120_MA-35_13TeV-madgraph') != -1: return 0.007598 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-110_MA-10_13TeV-madgraph') != -1: return 0.008264 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-130_MA-35_13TeV-madgraph') != -1: return 0.02491 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-140_MA-30_13TeV-madgraph') != -1: return 0.03793 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-150_MA-20_13TeV-madgraph') != -1: return 0.02735 elif fileName.find('DYJetsToLL_M-50_HT-1200to2500_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 0.1933 elif fileName.find('DYJetsToLL_M-1500to2000_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 0.00218 elif fileName.find('ST_s-channel_4f_leptonDecays_TuneCP5down_13TeV-amcatnlo-pythia8') != -1: return 3.74 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-150_MA-35_13TeV-madgraph') != -1: return 0.02608 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-130_MA-20_13TeV-madgraph') != -1: return 0.02245 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-140_MA-20_13TeV-madgraph') != -1: return 0.02486 elif fileName.find('TTToHadronic_TuneCP5CR1_QCDbased_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-120_MA-25_13TeV-madgraph') != -1: return 0.01403 elif fileName.find('DYBJetsToLL_M-50_Zpt-100to200_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 4.042 elif fileName.find('ST_tW_antitop_5f_inclusiveDecays_TuneCP5up_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('DYJetsToLL_M-1to4_HT-600toInf_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 2.453 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-110_MA-30_13TeV-madgraph') != -1: return 0.0011 elif fileName.find('DYJetsToLL_M-1to4_HT-100to200_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 479.6 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-110_MA-25_13TeV-madgraph') != -1: return 0.003863 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-160_MA-25_13TeV-madgraph') != -1: return 0.01305 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-130_MA-35_13TeV-madgraph') != -1: return 0.01856 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-140_MA-30_13TeV-madgraph') != -1: return 0.02827 elif fileName.find('DY1JetsToLL_M-50_LHEZpT_50-150_TuneCP5_13TeV-amcnloFXFX-pythia8') != -1: return 316.6 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-120_MA-20_13TeV-madgraph') != -1: return 0.01516 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-140_MA-35_13TeV-madgraph') != -1: return 0.02718 elif fileName.find('DYJetsToLL_M-50_HT-1200to2500_TuneCP5_14TeV-madgraphMLM-pythia8') != -1: return 0.2466 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-160_MA-10_13TeV-madgraph') != -1: return 0.006028 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-120_MA-35_13TeV-madgraph') != -1: return 0.005625 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-160_MA-35_13TeV-madgraph') != -1: return 0.01527 elif fileName.find('DYJetsToLL_M-1to4_HT-400to600_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 8.207 elif fileName.find('TTToSemiLeptonic_hdampUP_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 687.0 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-150_MA-10_13TeV-madgraph') != -1: return 0.01143 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-110_MA-20_13TeV-madgraph') != -1: return 0.006446 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-160_MA-30_13TeV-madgraph') != -1: return 0.01449 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-110_MA-15_13TeV-madgraph') != -1: return 0.007288 elif fileName.find('DY2JetsToLL_M-50_LHEZpT_50-150_TuneCP5_13TeV-amcnloFXFX-pythia8') != -1: return 169.6 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-150_MA-20_13TeV-madgraph') != -1: return 0.02056 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-150_MA-30_13TeV-madgraph') != -1: return 0.02555 elif fileName.find('DYJetsToLL_M-2000to3000_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 0.0005156 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-130_MA-25_13TeV-madgraph') != -1: return 0.02348 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-150_MA-25_13TeV-madgraph') != -1: return 0.02368 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-160_MA-20_13TeV-madgraph') != -1: return 0.01108 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-130_MA-10_13TeV-madgraph') != -1: return 0.01375 elif fileName.find('ST_tW_top_5f_NoFullyHadronicDecays_TuneCP5_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('TTTo2L2Nu_HT500Njet7_TuneCP5down_PSweights_13TeV-powheg-pythia8') != -1: return 11.34 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-140_MA-25_13TeV-madgraph') != -1: return 0.02774 elif fileName.find('DYJetsToLL_M-4to50_HT-70to100_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 145.5 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-100_MA-20_13TeV-madgraph') != -1: return 0.0006391 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-140_MA-10_13TeV-madgraph') != -1: return 0.01428 elif fileName.find('DYJetsToLL_M-1000to1500_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 0.01636 elif fileName.find('DYJetsToEE_M-50_LTbinned_800To2000_5f_LO_13TeV-madgraph_pythia8') != -1: return 0.008352 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-100_MA-15_13TeV-madgraph') != -1: return 0.001767 elif fileName.find('DYBJetsToLL_M-50_Zpt-200toInf_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 0.4286 elif fileName.find('TTToHplusToWA_WToTauNu_WToQQ_AToMuMu_MH-90_MA-10_13TeV-madgraph') != -1: return 0.0002799 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-130_MA-30_13TeV-madgraph') != -1: return 0.02227 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-130_MA-15_13TeV-madgraph') != -1: return 0.01906 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-160_MA-15_13TeV-madgraph') != -1: return 0.008748 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-150_MA-15_13TeV-madgraph') != -1: return 0.01638 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-140_MA-15_13TeV-madgraph') != -1: return 0.02024 elif fileName.find('DYJetsToLL_M-1to4_HT-200to400_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 85.85 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-100_MA-10_13TeV-madgraph') != -1: return 0.002219 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-120_MA-30_13TeV-madgraph') != -1: return 0.01063 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-110_MA-10_13TeV-madgraph') != -1: return 0.006195 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-120_MA-10_13TeV-madgraph') != -1: return 0.01064 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-120_MA-15_13TeV-madgraph') != -1: return 0.014 elif fileName.find('TTToSemiLepton_HT500Njet9_hdampUP_TuneCP5_13TeV-powheg-pythia8') != -1: return 4.571 elif fileName.find('DYJetsToLL_M-50_HT-2500toInf_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 0.003468 elif fileName.find('ST_s-channel_4f_leptonDecays_TuneCP5CR2_13TeV-amcatnlo-pythia8') != -1: return 3.74 elif fileName.find('DYJetsToEE_M-50_LTbinned_200To400_5f_LO_13TeV-madgraph_pythia8') != -1: return 3.574 elif fileName.find('ST_t-channel_antitop_5f_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 71.74 elif fileName.find('TTZPrimeToMuMu_M-1700_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 9.353e-05 elif fileName.find('TTZPrimeToMuMu_M-2000_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 3.577e-05 elif fileName.find('TTZPrimeToMuMu_M-1600_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.0001325 elif fileName.find('DYJetsToLL_M-50_Zpt-150toInf_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 22.93 elif fileName.find('TTToHplusToWA_WToLNu_WToLNu_AToMuMu_MH-90_MA-10_13TeV-madgraph') != -1: return 0.0002095 elif fileName.find('DYJetsToLL_M-1to4_HT-70to100_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 626.8 elif fileName.find('TTZPrimeToMuMu_M-1300_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.0004131 elif fileName.find('DYJetsToEE_M-50_LTbinned_100To200_5f_LO_13TeV-madgraph_pythia8') != -1: return 94.34 elif fileName.find('DYJetsToEE_M-50_LTbinned_400To800_5f_LO_13TeV-madgraph_pythia8') != -1: return 0.2005 elif fileName.find('DYJetsToLL_Pt-100To250_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 81.22 elif fileName.find('DYJetsToLL_M-50_HT-800to1200_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 0.8052 elif fileName.find('TTZPrimeToMuMu_M-1500_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.0001903 elif fileName.find('TTZPrimeToMuMu_M-1900_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 4.862e-05 elif fileName.find('TTZPrimeToMuMu_M-1000_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.00154 elif fileName.find('DYJetsToLL_Pt-400To650_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 0.3882 elif fileName.find('TTZPrimeToMuMu_M-1800_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 6.693e-05 elif fileName.find('TTZPrimeToMuMu_M-1400_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.0002778 elif fileName.find('TTZPrimeToMuMu_M-1200_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.0006259 elif fileName.find('DYJetsToLL_Pt-250To400_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 2.991 elif fileName.find('DYJetsToLL_M-800to1000_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 0.03047 elif fileName.find('TTToSemiLeptonic_WspTgt150_TuneCUETP8M2T4_13TeV-powheg-pythia8') != -1: return 34.49 elif fileName.find('DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8_DownPS') != -1: return 5735.0 elif fileName.find('ST_s-channel_4f_leptonDecays_TuneCP5CR1_13TeV-amcatnlo-pythia8') != -1: return 3.74 elif fileName.find('DYJetsToLL_Pt-650ToInf_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 0.03737 elif fileName.find('TTZPrimeToMuMu_M-900_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.002515 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-160_MZ-2_13TeV-madgraph') != -1: return 5.559e-05 elif fileName.find('DYJetsToLL_M-700to800_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 0.03614 elif fileName.find('DYJetsToLL_M-200to400_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 7.77 elif fileName.find('DYJetsToLL_M-400to500_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 0.4065 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-140_MZ-8_13TeV-madgraph') != -1: return 4.225e-05 elif fileName.find('ST_tW_antitop_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8') != -1: return 34.97 elif fileName.find('DYJetsToEE_M-50_LTbinned_95To100_5f_LO_13TeV-madgraph_pythia8') != -1: return 48.2 elif fileName.find('TTZPrimeToMuMu_M-800_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.004257 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-130_MZ-2_13TeV-madgraph') != -1: return 0.000168 elif fileName.find('Test_ZprimeToTT_M-4500_W-45_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 0.000701 elif fileName.find('TTTo2L2Nu_HT500Njet7_TuneCP5up_PSweights_13TeV-powheg-pythia8') != -1: return 11.59 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-160_MZ-8_13TeV-madgraph') != -1: return 1.365e-05 elif fileName.find('TTTo2L2Nu_TuneCP5CR2_GluonMove_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTZPrimeToMuMu_M-400_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.06842 elif fileName.find('TTToHadronic_hdampDOWN_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('ST_s-channel_4f_leptonDecays_TuneCP5up_13TeV-amcatnlo-pythia8') != -1: return 3.74 elif fileName.find('TTToHadronic_mtop175p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 633.4 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-110_MZ-5_13TeV-madgraph') != -1: return 2.886e-05 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-120_MZ-5_13TeV-madgraph') != -1: return 5.067e-05 elif fileName.find('DYJetsToLL_M-500to700_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 0.2334 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-140_MZ-2_13TeV-madgraph') != -1: return 0.0001727 elif fileName.find('TTZPrimeToMuMu_M-300_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.2194 elif fileName.find('DYJetsToLL_Pt-50To100_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 354.8 elif fileName.find('TTToHadronic_mtop171p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 706.1 elif fileName.find('TTZPrimeToMuMu_M-600_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.01409 elif fileName.find('TTZPrimeToMuMu_M-500_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.0287 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-110_MZ-8_13TeV-madgraph') != -1: return 1.808e-05 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-100_MZ-2_13TeV-madgraph') != -1: return 2.652e-05 elif fileName.find('TTZToLLNuNu_M-10_TuneCP5down_PSweights_13TeV-amcatnlo-pythia8') != -1: return 0.2432 elif fileName.find('TTToHadronic_mtop169p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 746.2 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-130_MZ-5_13TeV-madgraph') != -1: return 6.649e-05 elif fileName.find('TTZPrimeToMuMu_M-700_TuneCP5_PSWeights_13TeV-madgraph-pythia8') != -1: return 0.007522 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-100_MZ-8_13TeV-madgraph') != -1: return 6.686e-06 elif fileName.find('DYJetsToLL_M-50_HT-100to200_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 161.1 elif fileName.find('TTToHadronic_mtop166p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 811.4 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-130_MZ-8_13TeV-madgraph') != -1: return 4.106e-05 elif fileName.find('TTToHadronic_mtop173p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 668.6 elif fileName.find('ST_s-channel_4f_hadronicDecays_TuneCP5_13TeV-amcatnlo-pythia8') != -1: return 11.24 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-150_MZ-5_13TeV-madgraph') != -1: return 5.214e-05 elif fileName.find('DYJetsToLL_M-50_HT-600to800_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 1.743 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-120_MZ-8_13TeV-madgraph') != -1: return 3.151e-05 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-150_MZ-2_13TeV-madgraph') != -1: return 0.0001319 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-100_MZ-5_13TeV-madgraph') != -1: return 1.058e-05 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-140_MZ-5_13TeV-madgraph') != -1: return 6.855e-05 elif fileName.find('DYJetsToLL_M-50_HT-200to400_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 48.66 elif fileName.find('BdToPsi2sKst_MuTrkFilter_DGamma0_TuneCP5_13TeV-pythia8-evtgen') != -1: return 5942000.0 elif fileName.find('DYJetsToLL_M-100to200_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 226.6 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-120_MZ-2_13TeV-madgraph') != -1: return 0.0001282 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-110_MZ-2_13TeV-madgraph') != -1: return 7.276e-05 elif fileName.find('TTToHadronic_mtop178p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 584.6 elif fileName.find('DYJetsToLL_M-50_HT-400to600_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 6.968 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-150_MZ-8_13TeV-madgraph') != -1: return 3.237e-05 elif fileName.find('ST_s-channel_4f_hadronicDecays_TuneCP5_13TeV-madgraph-pythia8') != -1: return 11.24 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-160_MZ-5_13TeV-madgraph') != -1: return 2.198e-05 elif fileName.find('DYJetsToLL_Zpt-0To50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 5375.0 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-150_MZ-2_13TeV-madgraph') != -1: return 0.0001309 elif fileName.find('DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8_UpPS') != -1: return 6005.0 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-110_MZ-8_13TeV-madgraph') != -1: return 1.802e-05 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-140_MZ-2_13TeV-madgraph') != -1: return 0.0001729 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-120_MZ-8_13TeV-madgraph') != -1: return 3.146e-05 elif fileName.find('tZq_nunu_4f_ckm_NLO_TuneCP5_PSweights_13TeV-madgraph-pythia8') != -1: return 0.1337 elif fileName.find('DYJetsToEE_M-50_LTbinned_90To95_5f_LO_13TeV-madgraph_pythia8') != -1: return 167.3 elif fileName.find('DYJetsToEE_M-50_LTbinned_80To85_5f_LO_13TeV-madgraph_pythia8') != -1: return 159.9 elif fileName.find('DYJetsToEE_M-50_LTbinned_75To80_5f_LO_13TeV-madgraph_pythia8') != -1: return 134.6 elif fileName.find('TTZToLLNuNu_M-10_TuneCP5CR2_GluonMove_13TeV-amcatnlo-pythia8') != -1: return 0.2432 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-160_MZ-2_13TeV-madgraph') != -1: return 5.542e-05 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-90_MZ-8_13TeV-madgraph') != -1: return 9.926e-07 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-90_MZ-5_13TeV-madgraph') != -1: return 1.652e-06 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-140_MZ-5_13TeV-madgraph') != -1: return 6.851e-05 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-110_MZ-2_13TeV-madgraph') != -1: return 7.265e-05 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-140_MZ-8_13TeV-madgraph') != -1: return 4.231e-05 elif fileName.find('DYJetsToEE_M-50_LTbinned_85To90_5f_LO_13TeV-madgraph_pythia8') != -1: return 229.4 elif fileName.find('TTToSemilepton_TuneCUETP8M2_ttHtranche3_13TeV-powheg-pythia8') != -1: return 320.1 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-150_MZ-8_13TeV-madgraph') != -1: return 3.234e-05 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-160_MZ-5_13TeV-madgraph') != -1: return 2.212e-05 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-160_MZ-8_13TeV-madgraph') != -1: return 1.364e-05 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-130_MZ-8_13TeV-madgraph') != -1: return 4.116e-05 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-100_MZ-5_13TeV-madgraph') != -1: return 1.06e-05 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-100_MZ-2_13TeV-madgraph') != -1: return 2.654e-05 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-150_MZ-5_13TeV-madgraph') != -1: return 5.234e-05 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-110_MZ-5_13TeV-madgraph') != -1: return 2.894e-05 elif fileName.find('TTToHplusToWZprime_WToMuNu_ZToMuMu_MH-90_MZ-2_13TeV-madgraph') != -1: return 4.124e-06 elif fileName.find('ST_tW_DS_top_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8') != -1: return 33.67 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-120_MZ-5_13TeV-madgraph') != -1: return 5.064e-05 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-120_MZ-2_13TeV-madgraph') != -1: return 0.0001276 elif fileName.find('TTTo2L2Nu_TuneCP5CR1_QCDbased_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-130_MZ-2_13TeV-madgraph') != -1: return 0.0001671 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-100_MZ-8_13TeV-madgraph') != -1: return 6.706e-06 elif fileName.find('DYJetsToLL_M-50_HT-70to100_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 146.7 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-130_MZ-5_13TeV-madgraph') != -1: return 6.66e-05 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-90_MZ-2_13TeV-madgraph') != -1: return 4.126e-06 elif fileName.find('TTToSemiLeptonic_TuneCP5down_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DYToMuMu_M-4500To6000_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 3.566e-07 elif fileName.find('ST_s-channel_4f_leptonDecays_TuneCP5_13TeV-amcatnlo-pythia8') != -1: return 3.74 elif fileName.find('DYJetsToLL_M-50_HT-40to70_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 311.4 elif fileName.find('DYToMuMu_M-3500To4500_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 3.317e-06 elif fileName.find('DYToMuMu_M-2300To3500_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 7.34e-05 elif fileName.find('ST_s-channel_4f_leptonDecays_TuneCP5_13TeV-madgraph-pythia8') != -1: return 3.74 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-90_MZ-8_13TeV-madgraph') != -1: return 9.872e-07 elif fileName.find('TTZToLLNuNu_M-10_TuneCP5up_PSweights_13TeV-amcatnlo-pythia8') != -1: return 0.2432 elif fileName.find('DY1JetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 730.3 elif fileName.find('DY2JetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 387.4 elif fileName.find('DYJetsToEE_M-50_LTbinned_5To75_5f_LO_13TeV-madgraph_pythia8') != -1: return 866.2 elif fileName.find('TTToHplusToWZprime_WToENu_ZToMuMu_MH-90_MZ-5_13TeV-madgraph') != -1: return 1.655e-06 elif fileName.find('DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 18810.0 elif fileName.find('TTZToLLNuNu_M-10_TuneCP5CR1_QCDbased_13TeV-amcatnlo-pythia8') != -1: return 0.2432 elif fileName.find('DYJetsToEE_M-50_LTbinned_0To75_5f_LO_13TeV-madgraph_pythia8') != -1: return 948.2 elif fileName.find('TTToHadronic_hdampUP_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 687.0 elif fileName.find('TTJets_SingleLeptFromTbar_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 108.7 elif fileName.find('TTTo2L2Nu_HT500Njet7_hdampDOWN_TuneCP5_13TeV-powheg-pythia8') != -1: return 10.58 elif fileName.find('DY3JetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 95.02 elif fileName.find('TTTo2L2Nu_HT500Njet7_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 11.37 elif fileName.find('DY4JetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 36.71 elif fileName.find('TTZJetsToQQ_Dilept_TuneCP5_PSweights_13TeV-amcatnlo-pythia8') != -1: return 0.0568 elif fileName.find('DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-herwigpp_30M') != -1: return 14240.0 elif fileName.find('DYToMuMu_M-1400To2300_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 0.001178 elif fileName.find('DYJetsToLL_M-1500to2000_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 0.002367 elif fileName.find('TTJets_DiLept_genMET-150_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 3.655 elif fileName.find('TTTo2L2Nu_mtop166p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 811.4 elif fileName.find('TTToSemiLepton_HT500Njet9_TuneCP5down_13TeV-powheg-pythia8') != -1: return 4.216 elif fileName.find('tZq_ll_4f_ckm_NLO_TuneCP5_PSweights_13TeV-amcatnlo-pythia8') != -1: return 0.07358 elif fileName.find('DYToMuMu_M-800To1400_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 0.01437 elif fileName.find('DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 16270.0 elif fileName.find('TTTo2L2Nu_hdampDOWN_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('QCD_HT1500to2000_BGenFilter_TuneCP5_13TeV-madgraph-pythia8') != -1: return 13.61 elif fileName.find('DYToMuMu_M-6000ToInf_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 1.576e-08 elif fileName.find('TTToSemiLeptonic_TuneCP5CR2_GluonMove_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('QCD_HT1000to1500_BGenFilter_TuneCP5_13TeV-madgraph-pythia8') != -1: return 138.2 elif fileName.find('DYJetsToLL_M-2000to3000_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 0.0005409 elif fileName.find('TTTo2L2Nu_mtop173p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 668.6 elif fileName.find('DYJetsToLL_M-10to50_TuneCUETP8M1_14TeV-madgraphMLM-pythia8') != -1: return 17230.0 elif fileName.find('TTTo2L2Nu_mtop169p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 746.2 elif fileName.find('TTTo2L2Nu_mtop175p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 633.4 elif fileName.find('DYJetsToLL_M-1000to1500_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 0.01828 elif fileName.find('TTTo2L2Nu_mtop178p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 584.6 elif fileName.find('TTTo2L2Nu_mtop171p5_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 706.1 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-140_MA-15_13TeV-madgraph') != -1: return 0.01533 elif fileName.find('QCD_HT2000toInf_BGenFilter_TuneCP5_13TeV-madgraph-pythia8') != -1: return 2.92 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-110_MA-20_13TeV-madgraph') != -1: return 0.004946 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-110_MA-10_13TeV-madgraph') != -1: return 0.003822 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-160_MA-25_13TeV-madgraph') != -1: return 0.00815 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-130_MA-30_13TeV-madgraph') != -1: return 0.01965 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-150_MA-25_13TeV-madgraph') != -1: return 0.0186 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-140_MA-10_13TeV-madgraph') != -1: return 0.01061 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-120_MA-20_13TeV-madgraph') != -1: return 0.01191 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-110_MA-30_13TeV-madgraph') != -1: return 0.0009769 elif fileName.find('DYJetsToLL_Pt-650ToInf_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 0.04796 elif fileName.find('DYToEE_M-3500To4500_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 3.327e-06 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-100_MA-15_13TeV-madgraph') != -1: return 0.001117 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-110_MA-15_13TeV-madgraph') != -1: return 0.004958 elif fileName.find('TTToSemiLeptonic_TuneCP5up_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-140_MA-25_13TeV-madgraph') != -1: return 0.02274 elif fileName.find('DYJetsToLL_Pt-250To400_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 3.774 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-140_MA-20_13TeV-madgraph') != -1: return 0.01947 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-120_MA-35_13TeV-madgraph') != -1: return 0.005199 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-160_MA-10_13TeV-madgraph') != -1: return 0.003564 elif fileName.find('TTTo2L2Nu_HT500Njet7_hdampUP_TuneCP5_13TeV-powheg-pythia8') != -1: return 12.39 elif fileName.find('DYJetsToLL_M-800to1000_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 0.03406 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-160_MA-30_13TeV-madgraph') != -1: return 0.009303 elif fileName.find('DYJetsToLL_M-3000toInf_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 3.048e-05 elif fileName.find('ST_tW_top_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8') != -1: return 34.91 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-120_MA-30_13TeV-madgraph') != -1: return 0.009536 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-130_MA-35_13TeV-madgraph') != -1: return 0.01695 elif fileName.find('DYToMuMu_M-200To400_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 2.342 elif fileName.find('DYJetsToLL_Pt-400To650_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 0.5164 elif fileName.find('BdToXKst_MuTrkFilter_DGamma0_TuneCP5_13TeV-pythia8-evtgen') != -1: return 7990000.0 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-150_MA-35_13TeV-madgraph') != -1: return 0.02178 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-150_MA-10_13TeV-madgraph') != -1: return 0.008312 elif fileName.find('DYToEE_M-4500To6000_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 3.551e-07 elif fileName.find('DYToEE_M-2300To3500_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 7.405e-05 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-140_MA-30_13TeV-madgraph') != -1: return 0.02451 elif fileName.find('TTToSemiLeptonic_TuneCP5CR1_QCDbased_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-150_MA-30_13TeV-madgraph') != -1: return 0.02076 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-130_MA-15_13TeV-madgraph') != -1: return 0.01426 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-110_MA-25_13TeV-madgraph') != -1: return 0.003278 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-120_MA-15_13TeV-madgraph') != -1: return 0.01005 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-160_MA-35_13TeV-madgraph') != -1: return 0.01012 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-120_MA-10_13TeV-madgraph') != -1: return 0.007271 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-140_MA-35_13TeV-madgraph') != -1: return 0.02426 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-130_MA-25_13TeV-madgraph') != -1: return 0.01975 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-130_MA-10_13TeV-madgraph') != -1: return 0.01005 elif fileName.find('QCD_HT700to1000_BGenFilter_TuneCP5_13TeV-madgraph-pythia8') != -1: return 721.8 elif fileName.find('DYToEE_M-1400To2300_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 0.001177 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-100_MA-20_13TeV-madgraph') != -1: return 0.0004878 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-130_MA-20_13TeV-madgraph') != -1: return 0.01767 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-150_MA-20_13TeV-madgraph') != -1: return 0.01555 elif fileName.find('DYJetsToLL_Pt-100To250_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 96.8 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-160_MA-15_13TeV-madgraph') != -1: return 0.005209 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-160_MA-20_13TeV-madgraph') != -1: return 0.006725 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-100_MA-10_13TeV-madgraph') != -1: return 0.001144 elif fileName.find('TTJets_DiLept_genMET-80_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 22.45 elif fileName.find('DYJetsToLL_M-1to10_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 173100.0 elif fileName.find('TTZToLLNuNu_M-10_TuneCP5_PSweights_13TeV-amcatnlo-pythia8') != -1: return 0.2432 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-150_MA-15_13TeV-madgraph') != -1: return 0.01206 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-120_MA-25_13TeV-madgraph') != -1: return 0.01188 elif fileName.find('DYToMuMu_M-400To800_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 0.2084 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-100_MA-15_13TeV-madgraph') != -1: return 0.001121 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-160_MA-15_13TeV-madgraph') != -1: return 0.005207 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-150_MA-35_13TeV-madgraph') != -1: return 0.02177 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-160_MA-10_13TeV-madgraph') != -1: return 0.003565 elif fileName.find('QCD_HT500to700_BGenFilter_TuneCP5_13TeV-madgraph-pythia8') != -1: return 3078.0 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-100_MA-10_13TeV-madgraph') != -1: return 0.001146 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-110_MA-25_13TeV-madgraph') != -1: return 0.003271 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-140_MA-20_13TeV-madgraph') != -1: return 0.01949 elif fileName.find('DYJetsToLL_M-500to700_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 0.2558 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-110_MA-30_13TeV-madgraph') != -1: return 0.0009777 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-130_MA-30_13TeV-madgraph') != -1: return 0.0196 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-150_MA-25_13TeV-madgraph') != -1: return 0.01853 elif fileName.find('TTToSemiLepton_HT500Njet9_TuneCP5up_13TeV-powheg-pythia8') != -1: return 4.281 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-140_MA-10_13TeV-madgraph') != -1: return 0.01066 elif fileName.find('TTToHplusToWA_WToMuNu_AToMuMu_MH-90_MA-10_13TeV-madgraph') != -1: return 0.000107 elif fileName.find('TTTo2L2Nu_hdampUP_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 687.0 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-130_MA-25_13TeV-madgraph') != -1: return 0.01975 elif fileName.find('TTToSemiLeptonic_widthx1p15_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-120_MA-30_13TeV-madgraph') != -1: return 0.009525 elif fileName.find('ST_tWnunu_5f_LO_TuneCP5_PSweights_13TeV-madgraph-pythia8') != -1: return 0.02099 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-150_MA-10_13TeV-madgraph') != -1: return 0.008305 elif fileName.find('QCD_HT200to300_BGenFilter_TuneCP5_13TeV-madgraph-pythia8') != -1: return 111700.0 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-150_MA-15_13TeV-madgraph') != -1: return 0.01205 elif fileName.find('QCD_HT100to200_BGenFilter_TuneCP5_13TeV-madgraph-pythia8') != -1: return 1275000.0 elif fileName.find('DYJetsToLL_Pt-50To100_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 407.9 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-130_MA-35_13TeV-madgraph') != -1: return 0.01689 elif fileName.find('DYJetsToLL_M-200to400_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 8.502 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-160_MA-20_13TeV-madgraph') != -1: return 0.006756 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-160_MA-30_13TeV-madgraph') != -1: return 0.00934 elif fileName.find('DYJetsToLL_M-700to800_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 0.04023 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-160_MA-35_13TeV-madgraph') != -1: return 0.01011 elif fileName.find('DY4JetsToTauTau_M-50_TuneCUETP8M1_13TeV-madgraph-pythia8') != -1: return 18.17 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-130_MA-15_13TeV-madgraph') != -1: return 0.01429 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-120_MA-15_13TeV-madgraph') != -1: return 0.01007 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-110_MA-20_13TeV-madgraph') != -1: return 0.004962 elif fileName.find('DY2JetsToTauTau_M-50_TuneCUETP8M1_13TeV-madgraph-pythia8') != -1: return 111.1 elif fileName.find('DYToEE_M-800To1400_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 0.01445 elif fileName.find('DY3JetsToTauTau_M-50_TuneCUETP8M1_13TeV-madgraph-pythia8') != -1: return 34.04 elif fileName.find('DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8_Fall17') != -1: return 5350.0 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-120_MA-10_13TeV-madgraph') != -1: return 0.007278 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-150_MA-30_13TeV-madgraph') != -1: return 0.02073 elif fileName.find('DYJetsToLL_M-400to500_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 0.4514 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-150_MA-20_13TeV-madgraph') != -1: return 0.01554 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-140_MA-15_13TeV-madgraph') != -1: return 0.01535 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-160_MA-25_13TeV-madgraph') != -1: return 0.008158 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-110_MA-10_13TeV-madgraph') != -1: return 0.003828 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-130_MA-20_13TeV-madgraph') != -1: return 0.0177 elif fileName.find('DYToEE_M-6000ToInf_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 1.585e-08 elif fileName.find('TTToSemiLeptonic_widthx0p85_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-120_MA-25_13TeV-madgraph') != -1: return 0.0119 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-120_MA-20_13TeV-madgraph') != -1: return 0.0119 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-110_MA-15_13TeV-madgraph') != -1: return 0.004967 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-140_MA-25_13TeV-madgraph') != -1: return 0.02275 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-130_MA-10_13TeV-madgraph') != -1: return 0.009985 elif fileName.find('TTJets_SingleLeptFromT_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 109.6 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-100_MA-20_13TeV-madgraph') != -1: return 0.0004875 elif fileName.find('QCD_HT300to500_BGenFilter_TuneCP5_13TeV-madgraph-pythia8') != -1: return 27960.0 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-140_MA-35_13TeV-madgraph') != -1: return 0.02431 elif fileName.find('DYJetsToLL_M-100to200_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 247.8 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-120_MA-35_13TeV-madgraph') != -1: return 0.00514 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-140_MA-30_13TeV-madgraph') != -1: return 0.02449 elif fileName.find('DY2JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 334.7 elif fileName.find('TTToSemiLeptonic_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DY3JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 102.3 elif fileName.find('DY1JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 1012.0 elif fileName.find('DY4JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 54.52 elif fileName.find('TTToLL_MLL_1200To1800_TuneCUETP8M1_13TeV-powheg-pythia8') != -1: return 76.63 elif fileName.find('TTToSemiLeptonic_TuneCP2_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8') != -1: return 5941.0 elif fileName.find('TTToHplusToWA_WToENu_AToMuMu_MH-90_MA-10_13TeV-madgraph') != -1: return 0.000107 elif fileName.find('TTToSemiLeptonic_mtop166p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 811.4 elif fileName.find('TTToSemiLeptonic_widthx1p3_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToSemiLeptonic_mtop173p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 668.6 elif fileName.find('TTToSemiLeptonic_mtop178p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 584.6 elif fileName.find('DYBJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 70.08 elif fileName.find('TTTo2L2Nu_TuneCUETP8M2_ttHtranche3_13TeV-powheg-pythia8') != -1: return 76.7 elif fileName.find('DYToEE_M-200To400_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 2.341 elif fileName.find('TTToSemiLeptonic_hdampDOWN_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToSemiLeptonic_mtop169p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 746.2 elif fileName.find('TTToSemiLeptonic_mtop171p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 706.1 elif fileName.find('TTToSemiLeptonic_widthx0p7_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DYToEE_M-400To800_NNPDF30NLO_TuneCUETP8M1_13TeV-pythia8') != -1: return 0.208 elif fileName.find('TTToHadronic_TuneCP5down_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTWJetsToLNu_TuneCP5_13TeV-amcatnloFXFX-madspin-pythia8') != -1: return 0.2149 elif fileName.find('TTToSemiLeptonic_mtop175p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 633.4 elif fileName.find('DYJetsToLL_M-50_TuneCUETHS1_13TeV-madgraphMLM-herwigpp') != -1: return 358.6 elif fileName.find('TTToLL_MLL_1800ToInf_TuneCUETP8M1_13TeV-powheg-pythia8') != -1: return 76.63 elif fileName.find('TTToHadronic_TuneCP5CR2_GluonMove_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DYJetsToLL_Pt-0To50_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 106300.0 elif fileName.find('DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8') != -1: return 4963.0 elif fileName.find('TTWJetsToQQ_TuneCP5_13TeV-amcatnloFXFX-madspin-pythia8') != -1: return 0.4316 elif fileName.find('TTToSemiLepton_HT500Njet9_TuneCP5_13TeV-powheg-pythia8') != -1: return 4.239 elif fileName.find('ST_tWll_5f_LO_TuneCP5_PSweights_13TeV-madgraph-pythia8') != -1: return 0.01103 elif fileName.find('TTToLL_MLL_800To1200_TuneCUETP8M1_13TeV-powheg-pythia8') != -1: return 76.63 elif fileName.find('Test_BulkGravToWW_narrow_M-4000_13TeV_TuneCP5-madgraph') != -1: return 4.543e-05 elif fileName.find('TTJets_HT-1200to2500_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 0.1316 elif fileName.find('tZq_W_lept_Z_hadron_4f_ckm_NLO_13TeV_amcatnlo_pythia8') != -1: return 0.1573 elif fileName.find('DYJetsToLL_M-10to50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 15810 elif fileName.find('ttHTobb_ttToSemiLep_M125_TuneCP5_13TeV-powheg-pythia8') != -1: return 0.5418 elif fileName.find('TTJets_HT-2500toInf_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 0.001407 elif fileName.find('TTTo2L2Nu_HT500Njet7_TuneCP5down_13TeV-powheg-pythia8') != -1: return 11.38 elif fileName.find('TTToHadronic_TuneCP5up_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTJets_HT-800to1200_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 0.7532 elif fileName.find('TTToSemiLeptonic_hdampUP_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.0 elif fileName.find('TTToLL_MLL_500To800_TuneCUETP8M1_13TeV-powheg-pythia8') != -1: return 76.63 elif fileName.find('TTToHadronic_TuneCP5CR1_QCDbased_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTTo2L2Nu_TuneCP5down_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTZPrimeToMuMu_M-1800_TuneCP5_13TeV-madgraph-pythia8') != -1: return 6.694e-05 elif fileName.find('TTZPrimeToMuMu_M-1600_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.0001324 elif fileName.find('TTZPrimeToMuMu_M-1200_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.0006278 elif fileName.find('ST_t-channel_antitop_5f_TuneCP5_13TeV-powheg-pythia8') != -1: return 82.52 elif fileName.find('TTZPrimeToMuMu_M-1500_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.0001899 elif fileName.find('TTZPrimeToMuMu_M-1700_TuneCP5_13TeV-madgraph-pythia8') != -1: return 9.354e-05 elif fileName.find('TTJets_HT-600to800_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 1.821 elif fileName.find('TTZPrimeToMuMu_M-1000_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.001539 elif fileName.find('ST_t-channel_eleDecays_13TeV-comphep-pythia8_TuneCP5') != -1: return 24.85 elif fileName.find('ST_t-channel_tauDecays_13TeV-comphep-pythia8_TuneCP5') != -1: return 24.7 elif fileName.find('DYJetsToLL_M-5to50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 81880.0 elif fileName.find('TTZPrimeToMuMu_M-2000_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.001539 elif fileName.find('TTZPrimeToMuMu_M-1400_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.0002776 elif fileName.find('TTZPrimeToMuMu_M-1300_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.0004127 elif fileName.find('TTZPrimeToMuMu_M-1900_TuneCP5_13TeV-madgraph-pythia8') != -1: return 4.857e-05 elif fileName.find('TTToHadronic_hdampDOWN_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToHadronic_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTZPrimeToMuMu_M-600_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.01408 elif fileName.find('TTToHadronic_mtop169p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 746.2 elif fileName.find('TTZPrimeToMuMu_M-300_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.22 elif fileName.find('TTToSemiLeptonic_TuneCP5_erdON_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTZToLLNuNu_M-10_TuneCP5down_13TeV-amcatnlo-pythia8') != -1: return 0.2432 elif fileName.find('ST_t-channel_muDecays_13TeV-comphep-pythia8_TuneCP5') != -1: return 24.72 elif fileName.find('TTToHadronic_mtop171p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 706.1 elif fileName.find('TTZPrimeToMuMu_M-400_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.0684 elif fileName.find('DYBBJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 14.49 elif fileName.find('TTToHadronic_mtop166p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 811.4 elif fileName.find('ttHTobb_ttTo2L2Nu_M125_TuneCP5_13TeV-powheg-pythia8') != -1: return 0.5418 elif fileName.find('TTTo2L2Nu_HT500Njet7_TuneCP5up_13TeV-powheg-pythia8') != -1: return 11.43 elif fileName.find('TTZPrimeToMuMu_M-900_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.002517 elif fileName.find('TTToHadronic_mtop178p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 584.6 elif fileName.find('TTToHadronic_mtop173p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 668.6 elif fileName.find('TTZPrimeToMuMu_M-700_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.007514 elif fileName.find('TTZPrimeToMuMu_M-500_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.02871 elif fileName.find('TTZPrimeToMuMu_M-800_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.004255 elif fileName.find('TTTo2L2Nu_TuneCP5CR2_GluonMove_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToHadronic_mtop175p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 633.4 elif fileName.find('TTTo2L2Nu_noSC_TuneCUETP8M2T4_13TeV-powheg-pythia8') != -1: return 76.7 elif fileName.find('DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 877.8 elif fileName.find('DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 6529.0 elif fileName.find('QCD_HT1000to1500_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 1092.0 elif fileName.find('DY4JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 44.03 elif fileName.find('TTTo2L2Nu_TuneCP5up_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('QCD_HT1500to2000_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 99.76 elif fileName.find('TTTo2L2Nu_TuneCP5CR1_QCDbased_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DY3JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 111.5 elif fileName.find('DY2JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 304.4 elif fileName.find('TTToHadrons_mtop178p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 584.6 elif fileName.find('DYJetsToQQ_HT180_13TeV_TuneCP5-madgraphMLM-pythia8') != -1: return 1728.0 elif fileName.find('DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 5343.0 elif fileName.find('QCD_HT2000toInf_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 20.35 elif fileName.find('TTZToLLNuNu_M-10_TuneCP5up_13TeV-amcatnlo-pythia8') != -1: return 0.2432 elif fileName.find('TTTo2L2Nu_widthx1p15_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DYTo2Mu_M1300_CUETP8M1_13TeV_Pythia8_Corrected-v3') != -1: return 0.001656 elif fileName.find('DYJetsToLL_M-50_TuneCH3_13TeV-madgraphMLM-herwig7') != -1: return 9.402 elif fileName.find('TTTo2L2Nu_HT500Njet7_TuneCP5_13TeV-powheg-pythia8') != -1: return 11.28 elif fileName.find('DYJetsToEE_M-50_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 1795.0 elif fileName.find('QCD_HT700to1000_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 6344.0 elif fileName.find('TTToSemiLeptonic_TuneCP5down_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DYJetsToLL_M-50_TuneCP2_13TeV-madgraphMLM-pythia8') != -1: return 4878.0 elif fileName.find('DYJetsToLL_M-50_TuneCP1_13TeV-madgraphMLM-pythia8') != -1: return 4661.0 elif fileName.find('TTToHadronic_hdampUP_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.0 elif fileName.find('TTTo2L2Nu_widthx0p85_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DYTo2E_M1300_CUETP8M1_13TeV_Pythia8_Corrected-v3') != -1: return 0.001661 elif fileName.find('DYTo2Mu_M800_CUETP8M1_13TeV_Pythia8_Corrected-v3') != -1: return 0.01419 elif fileName.find('TTTo2L2Nu_TuneCP5_PSweights_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DYTo2Mu_M300_CUETP8M1_13TeV_Pythia8_Corrected-v3') != -1: return 0.5658 elif fileName.find('TTTo2L2Nu_mtop175p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 633.4 elif fileName.find('TTTo2L2Nu_mtop169p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 746.2 elif fileName.find('DYJetsToLL_1J_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 955.8 elif fileName.find('QCD_HT300to500_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 323400.0 elif fileName.find('DYToEE_M-50_NNPDF31_TuneCP5_13TeV-powheg-pythia8') != -1: return 2137.0 elif fileName.find('TTTo2L2Nu_mtop173p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 668.6 elif fileName.find('TTTo2L2Nu_hdampDOWN_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DYJetsToLL_0J_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 5313.0 elif fileName.find('DYJetsToLL_2J_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 360.4 elif fileName.find('TTTo2L2Nu_mtop178p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 584.6 elif fileName.find('TTTo2L2Nu_mtop171p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 706.1 elif fileName.find('QCD_HT200to300_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 1551000.0 elif fileName.find('TTTo2L2Nu_widthx0p7_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('QCD_HT500to700_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 30140.0 elif fileName.find('TTTo2L2Nu_mtop166p5_TuneCP5_13TeV-powheg-pythia8') != -1: return 811.4 elif fileName.find('ST_t-channel_top_5f_TuneCP5_13TeV-powheg-pythia8') != -1: return 119.7 elif fileName.find('TTTo2L2Nu_widthx1p3_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('QCD_HT100to200_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 23590000.0 elif fileName.find('QCD_HT50to100_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 185300000.0 elif fileName.find('TTZToLLNuNu_M-10_TuneCP5_13TeV-amcatnlo-pythia8') != -1: return 0.2432 elif fileName.find('TTToSemiLeptonic_TuneCP5up_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTJets_DiLept_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 54.23 elif fileName.find('QCD_HT1000to1500_TuneCP5_13TeV-madgraph-pythia8') != -1: return 1088.0 elif fileName.find('TTToHadronic_TuneCP5_erdON_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToLL_MLL_500To800_41to65_NNPDF31_13TeV-powheg') != -1: return 687.1 elif fileName.find('QCD_HT1500to2000_TuneCP5_13TeV-madgraph-pythia8') != -1: return 99.11 elif fileName.find('TTZToLL_M-1to10_TuneCP5_13TeV-amcatnlo-pythia8') != -1: return 0.05324 elif fileName.find('TTTo2L2Nu_hdampUP_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.0 elif fileName.find('QCD_HT700to1000_TuneCP5_13TeV-madgraph-pythia8') != -1: return 6334.0 elif fileName.find('QCD_HT2000toInf_TuneCP5_13TeV-madgraph-pythia8') != -1: return 20.23 elif fileName.find('ST_tWlnuZ_5f_LO_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.001267 elif fileName.find('TTToLL_MLL_500To800_0to20_NNPDF31_13TeV-powheg') != -1: return 687.1 elif fileName.find('W4JetsToLNu_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 544.3 elif fileName.find('QCD_HT300to500_TuneCP5_13TeV-madgraph-pythia8') != -1: return 322600.0 elif fileName.find('W2JetsToLNu_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 2793.0 elif fileName.find('TTZZTo4b_5f_LO_TuneCP5_13TeV_madgraph_pythia8') != -1: return 0.001385 elif fileName.find('TTToSemiLeptonic_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('W3JetsToLNu_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 992.5 elif fileName.find('QCD_HT500to700_TuneCP5_13TeV-madgraph-pythia8') != -1: return 29980.0 elif fileName.find('QCD_HT200to300_TuneCP5_13TeV-madgraph-pythia8') != -1: return 1547000.0 elif fileName.find('W1JetsToLNu_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 8873.0 elif fileName.find('TTToHadronic_TuneCP5down_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('QCD_HT100to200_TuneCP5_13TeV-madgraph-pythia8') != -1: return 23700000.0 elif fileName.find('ST_tWqqZ_5f_LO_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.001122 elif fileName.find('DYToMuMu_pomflux_Pt-30_TuneCP5_13TeV-pythia8') != -1: return 4.219 elif fileName.find('WJetsToLNu_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 52940.0 elif fileName.find('TTTo2L2Nu_TuneCP5_erdON_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTToHadronic_TuneCP5up_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTTo2L2Nu_TuneCUETP8M1_14TeV-powheg-pythia8') != -1: return 90.75 elif fileName.find('TTToLL_MLL_1200To1800_NNPDF31_13TeV-powheg') != -1: return 687.1 elif fileName.find('TTTo2L2Nu_TuneCP5down_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DYJetsToQQ_HT180_13TeV-madgraphMLM-pythia8') != -1: return 1208.0 elif fileName.find('tZq_ll_4f_scaledown_13TeV-amcatnlo-pythia8') != -1: return 0.0758 elif fileName.find('TTToLL_MLL_1800ToInf_NNPDF31_13TeV-powheg') != -1: return 687.1 elif fileName.find('TTJets_TuneCP5_13TeV-amcatnloFXFX-pythia8') != -1: return 722.8 elif fileName.find('ttZJets_TuneCP5_13TeV_madgraphMLM_pythia8') != -1: return 0.5407 elif fileName.find('TTToHadronic_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('tZq_ll_4f_ckm_NLO_13TeV-amcatnlo-herwigpp') != -1: return 0.07579 elif fileName.find('ttWJets_TuneCP5_13TeV_madgraphMLM_pythia8') != -1: return 0.4611 elif fileName.find('TTToLL_MLL_800To1200_NNPDF31_13TeV-powheg') != -1: return 687.1 elif fileName.find('tZq_ll_4f_scaleup_13TeV-amcatnlo-pythia8') != -1: return 0.0758 elif fileName.find('DYToEE_M-50_NNPDF31_13TeV-powheg-pythia8') != -1: return 2137.0 elif fileName.find('TTJets_TuneCP5_13TeV-madgraphMLM-pythia8') != -1: return 496.1 elif fileName.find('DYToLL-M-50_3J_14TeV-madgraphMLM-pythia8') != -1: return 191.7 elif fileName.find('DYToLL-M-50_0J_14TeV-madgraphMLM-pythia8') != -1: return 3676.0 elif fileName.find('TTTo2L2Nu_TuneCP5up_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('DYToLL-M-50_1J_14TeV-madgraphMLM-pythia8') != -1: return 1090.0 elif fileName.find('DYToLL-M-50_2J_14TeV-madgraphMLM-pythia8') != -1: return 358.7 elif fileName.find('TTZToQQ_TuneCP5_13TeV-amcatnlo-pythia8') != -1: return 0.5104 elif fileName.find('TTTo2L2Nu_TuneCP5_13TeV-powheg-pythia8') != -1: return 687.1 elif fileName.find('TTZToBB_TuneCP5_13TeV-amcatnlo-pythia8') != -1: return 0.1118 elif fileName.find('DYToLL_M_1_TuneCUETP8M1_13TeV_pythia8') != -1: return 19670.0 elif fileName.find('DYToLL_2J_13TeV-amcatnloFXFX-pythia8') != -1: return 340.5 elif fileName.find('DYToLL_0J_13TeV-amcatnloFXFX-pythia8') != -1: return 4757.0 elif fileName.find('DYTo2Mu_M1300_CUETP8M1_13TeV-pythia8') != -1: return 78420000000.0 elif fileName.find('TTWZ_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.002441 elif fileName.find('TTWW_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.006979 elif fileName.find('TTZZ_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.001386 elif fileName.find('DYTo2Mu_M300_CUETP8M1_13TeV-pythia8') != -1: return 78390000000.0 elif fileName.find('TTZH_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.00113 elif fileName.find('TTTW_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.0007314 elif fileName.find('DYTo2E_M1300_CUETP8M1_13TeV-pythia8') != -1: return 78390000000.0 elif fileName.find('DYTo2Mu_M800_CUETP8M1_13TeV-pythia8') != -1: return 78420000000.0 elif fileName.find('TTWH_TuneCP5_13TeV-madgraph-pythia8') != -1: return 0.001141 elif fileName.find('WZ_TuneCP5_PSweights_13TeV-pythia8') != -1: return 27.52 elif fileName.find('WWZ_TuneCP5_13TeV-amcatnlo-pythia8') != -1: return 0.1676 elif fileName.find('DYTo2E_M800_CUETP8M1_13TeV-pythia8') != -1: return 78420000000.0 elif fileName.find('WW_TuneCP5_PSweights_13TeV-pythia8') != -1: return 76.15 elif fileName.find('ZZZ_TuneCP5_13TeV-amcatnlo-pythia8') != -1: return 0.01398 elif fileName.find('DYTo2E_M300_CUETP8M1_13TeV-pythia8') != -1: return 78420000000.0 elif fileName.find('WZZ_TuneCP5_13TeV-amcatnlo-pythia8') != -1: return 0.05565 elif fileName.find('tZq_ll_4f_13TeV-amcatnlo-herwigpp') != -1: return 0.0758 elif fileName.find('tZq_ll_4f_13TeV-amcatnlo-pythia8') != -1: return 0.0758 elif fileName.find('DYToLL_M-50_14TeV_pythia8_pilot1') != -1: return 4927.0 elif fileName.find('DYToLL_M-50_14TeV_pythia8') != -1: return 4963.0 elif fileName.find('WZ_TuneCP5_13TeV-pythia8') != -1: return 27.6 elif fileName.find('ZZ_TuneCP5_13TeV-pythia8') != -1: return 12.14 elif fileName.find('WW_TuneCP5_13TeV-pythia8') != -1: return 75.8 elif fileName.find('DYJetsToLL_Pt-100To250') != -1: return 84.014804 elif fileName.find('DYJetsToLL_Pt-400To650') != -1: return 0.436041144 elif fileName.find('DYJetsToLL_Pt-650ToInf') != -1: return 0.040981055 elif fileName.find('DYJetsToLL_Pt-250To400') != -1: return 3.228256512 elif fileName.find('DYJetsToLL_Pt-50To100') != -1: return 363.81428 elif fileName.find('DYJetsToLL_Zpt-0To50') != -1: return 5352.57924 elif fileName.find('TTToSemiLeptonic') != -1: return 365.34 elif fileName.find('TTToHadronic') != -1: return 377.96 elif fileName.find('TTJetsFXFX') != -1: return 831.76 elif fileName.find('TTTo2L2Nu') != -1: return 88.29 elif fileName.find('DYToLL_0J') != -1: return 4620.519036 elif fileName.find('DYToLL_2J') != -1: return 338.258531 elif fileName.find('DYToLL_1J') != -1: return 859.589402 elif fileName.find('SingleMuon') != -1 or fileName.find('SingleElectron') != -1 or fileName.find('JetHT') != -1 or (fileName.find('MET') != -1) or (fileName.find('MTHT') != -1): return 1.0 else: print('Cross section not defined! Returning 0 and skipping sample:\n{}\n'.format(fileName)) return 0
variant = ["_clear", "_scratched", "_crystal", "_dim", "_dark", "_bright", "_ghostly", "_ethereal", "_foreboding", "_strong"] colors = ["white", "orange", "magenta", "light_blue", "yellow", "lime", "pink", "gray", "silver", "cyan", "purple", "blue", "brown", "green", "red", "black"] for prefix in variant: with open("./glass" + prefix + ".json", "w") as f: f.write(''' { "forge_marker": 1, "defaults": { "model": "planarartifice:cube_ctm_cutout", "textures": { "all": "planarartifice:blocks/glass/glass''' + prefix + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''", "connected_tex": "planarartifice:blocks/glass/glass''' + prefix + '''_ctm" } }, "variants": { "normal": [{}], "inventory": [{}] } } ''') with open("./glass" + prefix + "_rainbow.json", "w") as f: f.write(''' { "forge_marker": 1, "defaults": { "model": "planarartifice:cube_ctm_translucent", "textures": { "all": "planarartifice:blocks/glass/glass''' + prefix + '''_rainbow", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_rainbow", "connected_tex": "planarartifice:blocks/glass/glass''' + prefix + '''_rainbow_ctm" } }, "variants": { "normal": [{}], "inventory": [{}] } } ''') with open("./glass_panel" + prefix + ".json", "w") as f: f.write(''' { "forge_marker": 1, "defaults": { "model": "planarartifice:panel_ctm_cutout", "textures": { "all": "planarartifice:blocks/glass/glass''' + prefix + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''", "connected_tex": "planarartifice:blocks/glass/glass''' + prefix + '''_ctm" } }, "variants": { "normal": [{}], "inventory": [{}] } } ''') with open("./glass_panel" + prefix + "_rainbow.json", "w") as f: f.write(''' { "forge_marker": 1, "defaults": { "model": "planarartifice:panel_ctm_translucent", "textures": { "all": "planarartifice:blocks/glass/glass''' + prefix + '''_rainbow", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_rainbow", "connected_tex": "planarartifice:blocks/glass/glass''' + prefix + '''_rainbow_ctm" } }, "variants": { "normal": [{}], "inventory": [{}] } } ''') ##################### STAINED GLASS ######### with open("./stained_glass" + prefix + ".json", "w") as f: q = '' for color in colors: q += '''"color=''' + color + '''": [{ "textures": { "all": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "connected_tex": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" } }],''' f.write(''' { "forge_marker": 1, "defaults": { "model": "planarartifice:cube_ctm_translucent" }, "variants": { ''' + q[:-1] + ''' } } ''') with open("./stained_glass_panel" + prefix + ".json", "w") as f: q = '' for color in colors: q += '''"color=''' + color + '''": [{ "textures": { "all": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "connected_tex": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" } }],''' f.write(''' { "forge_marker": 1, "defaults": { "model": "planarartifice:panel_ctm_translucent" }, "variants": { ''' + q[:-1] + ''' } } ''') ################# GLASS PANE ########### with open("./glass_pane" + prefix + ".json", "w") as f: f.write(''' { "forge_marker": 1, "defaults": { "transform": "forge:default-item", "textures": { "edge" : "blocks/glass_pane_top", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_ctm" } }, "variants": { "inventory": [{ "model": "planarartifice:pane/ctm_ew" }], "east=false,north=false,south=false,west=false": [{ "model": "planarartifice:pane/post" }], "east=false,north=true,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_n" }], "east=true,north=false,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_e" }], "east=false,north=false,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_s" }], "east=false,north=false,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_w" }], "east=true,north=true,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_ne" }], "east=true,north=false,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_se" }], "east=false,north=false,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_sw" }], "east=false,north=true,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_nw" }], "east=false,north=true,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_ns" }], "east=true,north=false,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_ew" }], "east=true,north=true,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_nse" }], "east=true,north=false,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_sew" }], "east=false,north=true,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_nsw" }], "east=true,north=true,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_new" }], "east=true,north=true,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_nsew" }] } } ''') with open("./glass_pane" + prefix + "_rainbow.json", "w") as f: f.write(''' { "forge_marker": 1, "defaults": { "transform": "forge:default-item", "textures": { "edge" : "planarartifice:blocks/glass/glass_pane_top_rainbow", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_rainbow", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_rainbow", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_rainbow_ctm" } }, "variants": { "inventory": [{ "model": "planarartifice:pane/ctm_ew_translucent" }], "east=false,north=false,south=false,west=false": [{ "model": "planarartifice:pane/post_translucent" }], "east=false,north=true,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_n_translucent" }], "east=true,north=false,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_e_translucent" }], "east=false,north=false,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_s_translucent" }], "east=false,north=false,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_w_translucent" }], "east=true,north=true,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_ne_translucent" }], "east=true,north=false,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_se_translucent" }], "east=false,north=false,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_sw_translucent" }], "east=false,north=true,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_nw_translucent" }], "east=false,north=true,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_ns_translucent" }], "east=true,north=false,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_ew_translucent" }], "east=true,north=true,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_nse_translucent" }], "east=true,north=false,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_sew_translucent" }], "east=false,north=true,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_nsw_translucent" }], "east=true,north=true,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_new_translucent" }], "east=true,north=true,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_nsew_translucent" }] } } ''') ############ STAINED GLASS PANE ##### with open("./stained_glass_pane" + prefix + ".json", "w") as f: q = '' for color in colors: q += '''"color=''' + color + ''',east=false,north=false,south=false,west=false": [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/post_translucent" }], "color=''' + color + ''',east=false,north=true,south=false,west=false" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_n_translucent" }], "color=''' + color + ''',east=true,north=false,south=false,west=false" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_e_translucent" }], "color=''' + color + ''',east=false,north=false,south=true,west=false" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_s_translucent" }], "color=''' + color + ''',east=false,north=false,south=false,west=true" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_w_translucent" }], "color=''' + color + ''',east=true,north=true,south=false,west=false" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_ne_translucent" }], "color=''' + color + ''',east=true,north=false,south=true,west=false" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_se_translucent" }], "color=''' + color + ''',east=false,north=false,south=true,west=true" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_sw_translucent" }], "color=''' + color + ''',east=false,north=true,south=false,west=true" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_nw_translucent" }],''' q += '''"color=''' + color + ''',east=false,north=true,south=true,west=false" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_ns_translucent" }], "color=''' + color + ''',east=true,north=false,south=false,west=true" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_ew_translucent" }], "color=''' + color + ''',east=true,north=true,south=true,west=false" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_nse_translucent" }], "color=''' + color + ''',east=true,north=false,south=true,west=true" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_sew_translucent" }], "color=''' + color + ''',east=false,north=true,south=true,west=true" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_nsw_translucent" }], "color=''' + color + ''',east=true,north=true,south=false,west=true" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_new_translucent" }], "color=''' + color + ''',east=true,north=true,south=true,west=true" : [{ "textures": { "edge" : "blocks/glass_pane_top_''' + color + '''", "pane" : "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "particle": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''", "pane_ct": "planarartifice:blocks/glass/glass''' + prefix + '''_''' + color + '''_ctm" }, "model": "planarartifice:pane/ctm_nsew_translucent" }],''' f.write(''' { "forge_marker": 1, "defaults": { "transform": "forge:default-item" }, "variants": { ''' + q[:-1] + ''' } } ''') with open("./glass_rainbow.json", "w") as f: f.write(''' { "forge_marker": 1, "defaults": { "model": "planarartifice:cube_ctm_translucent", "textures": { "all": "planarartifice:blocks/glass/glass_rainbow", "particle": "planarartifice:blocks/glass/glass_rainbow", "connected_tex": "planarartifice:blocks/glass/glass_rainbow_ctm" } }, "variants": { "normal": [{}], "inventory": [{}] } } ''') with open("./glass_pane_rainbow.json", "w") as f: f.write(''' { "forge_marker": 1, "defaults": { "transform": "forge:default-item", "textures": { "edge" : "planarartifice:blocks/glass/glass_pane_top_rainbow", "pane" : "planarartifice:blocks/glass/glass_rainbow", "particle": "planarartifice:blocks/glass/glass_rainbow", "pane_ct": "planarartifice:blocks/glass/glass_rainbow_ctm" } }, "variants": { "inventory": [{ "model": "planarartifice:pane/ctm_ew_translucent" }], "east=false,north=false,south=false,west=false": [{ "model": "planarartifice:pane/post_translucent" }], "east=false,north=true,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_n_translucent" }], "east=true,north=false,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_e_translucent" }], "east=false,north=false,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_s_translucent" }], "east=false,north=false,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_w_translucent" }], "east=true,north=true,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_ne_translucent" }], "east=true,north=false,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_se_translucent" }], "east=false,north=false,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_sw_translucent" }], "east=false,north=true,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_nw_translucent" }], "east=false,north=true,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_ns_translucent" }], "east=true,north=false,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_ew_translucent" }], "east=true,north=true,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_nse_translucent" }], "east=true,north=false,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_sew_translucent" }], "east=false,north=true,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_nsw_translucent" }], "east=true,north=true,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_new_translucent" }], "east=true,north=true,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_nsew_translucent" }] } } ''') with open("./glass_panel.json", "w") as f: f.write(''' { "forge_marker": 1, "defaults": { "model": "planarartifice:panel_ctm_cutout", "textures": { "all": "blocks/glass", "particle": "blocks/glass", "connected_tex": "blocks/glass_ctm" } }, "variants": { "normal": [{}], "inventory": [{}] } } ''') with open("./glass_panel_rainbow.json", "w") as f: f.write(''' { "forge_marker": 1, "defaults": { "model": "planarartifice:panel_ctm_translucent", "textures": { "all": "planarartifice:blocks/glass/glass_rainbow", "particle": "planarartifice:blocks/glass/glass_rainbow", "connected_tex": "planarartifice:blocks/glass/glass_rainbow_ctm" } }, "variants": { "normal": [{}], "inventory": [{}] } } ''') with open("./stained_glass_panel.json", "w") as f: q = '' for color in colors: q += '''"color=''' + color + '''": [{ "textures": { "all": "blocks/glass_''' + color + '''", "particle": "blocks/glass_''' + color + '''", "connected_tex": "blocks/glass_''' + color + '''_ctm" } }],''' f.write(''' { "forge_marker": 1, "defaults": { "model": "planarartifice:panel_ctm_translucent" }, "variants": { ''' + q[:-1] + ''' } } ''')
variant = ['_clear', '_scratched', '_crystal', '_dim', '_dark', '_bright', '_ghostly', '_ethereal', '_foreboding', '_strong'] colors = ['white', 'orange', 'magenta', 'light_blue', 'yellow', 'lime', 'pink', 'gray', 'silver', 'cyan', 'purple', 'blue', 'brown', 'green', 'red', 'black'] for prefix in variant: with open('./glass' + prefix + '.json', 'w') as f: f.write('\n {\n "forge_marker": 1,\n "defaults": {\n "model": "planarartifice:cube_ctm_cutout",\n "textures": {\n "all": "planarartifice:blocks/glass/glass' + prefix + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '",\n "connected_tex": "planarartifice:blocks/glass/glass' + prefix + '_ctm"\n }\n },\n "variants": {\n "normal": [{}],\n "inventory": [{}]\n }\n }\n ') with open('./glass' + prefix + '_rainbow.json', 'w') as f: f.write('\n {\n "forge_marker": 1,\n "defaults": {\n "model": "planarartifice:cube_ctm_translucent",\n "textures": {\n "all": "planarartifice:blocks/glass/glass' + prefix + '_rainbow",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_rainbow",\n "connected_tex": "planarartifice:blocks/glass/glass' + prefix + '_rainbow_ctm"\n }\n },\n "variants": {\n "normal": [{}],\n "inventory": [{}]\n }\n }\n ') with open('./glass_panel' + prefix + '.json', 'w') as f: f.write('\n {\n "forge_marker": 1,\n "defaults": {\n "model": "planarartifice:panel_ctm_cutout",\n "textures": {\n "all": "planarartifice:blocks/glass/glass' + prefix + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '",\n "connected_tex": "planarartifice:blocks/glass/glass' + prefix + '_ctm"\n }\n },\n "variants": {\n "normal": [{}],\n "inventory": [{}]\n }\n }\n ') with open('./glass_panel' + prefix + '_rainbow.json', 'w') as f: f.write('\n {\n "forge_marker": 1,\n "defaults": {\n "model": "planarartifice:panel_ctm_translucent",\n "textures": {\n "all": "planarartifice:blocks/glass/glass' + prefix + '_rainbow",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_rainbow",\n "connected_tex": "planarartifice:blocks/glass/glass' + prefix + '_rainbow_ctm"\n }\n },\n "variants": {\n "normal": [{}],\n "inventory": [{}]\n }\n }\n ') with open('./stained_glass' + prefix + '.json', 'w') as f: q = '' for color in colors: q += '"color=' + color + '": [{\n "textures": {\n "all": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "connected_tex": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }\n }],' f.write('\n {\n "forge_marker": 1,\n "defaults": {\n "model": "planarartifice:cube_ctm_translucent"\n },\n "variants": {\n ' + q[:-1] + '\n }\n }\n ') with open('./stained_glass_panel' + prefix + '.json', 'w') as f: q = '' for color in colors: q += '"color=' + color + '": [{\n "textures": {\n "all": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "connected_tex": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }\n }],' f.write('\n {\n "forge_marker": 1,\n "defaults": {\n "model": "planarartifice:panel_ctm_translucent"\n },\n "variants": {\n ' + q[:-1] + '\n }\n }\n ') with open('./glass_pane' + prefix + '.json', 'w') as f: f.write(' \n {\n "forge_marker": 1,\n "defaults": {\n "transform": "forge:default-item",\n "textures": {\n "edge" : "blocks/glass_pane_top",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_ctm"\n }\n },\n "variants": {\n "inventory": [{ "model": "planarartifice:pane/ctm_ew" }],\n "east=false,north=false,south=false,west=false": [{ "model": "planarartifice:pane/post" }],\n\n "east=false,north=true,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_n" }],\n "east=true,north=false,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_e" }],\n "east=false,north=false,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_s" }],\n "east=false,north=false,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_w" }],\n\n "east=true,north=true,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_ne" }],\n "east=true,north=false,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_se" }],\n "east=false,north=false,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_sw" }],\n "east=false,north=true,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_nw" }],\n\n "east=false,north=true,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_ns" }],\n "east=true,north=false,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_ew" }],\n\n "east=true,north=true,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_nse" }],\n "east=true,north=false,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_sew" }],\n "east=false,north=true,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_nsw" }],\n "east=true,north=true,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_new" }],\n\n "east=true,north=true,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_nsew" }]\n }\n }\n ') with open('./glass_pane' + prefix + '_rainbow.json', 'w') as f: f.write(' \n {\n "forge_marker": 1,\n "defaults": {\n "transform": "forge:default-item",\n "textures": {\n "edge" : "planarartifice:blocks/glass/glass_pane_top_rainbow",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_rainbow",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_rainbow",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_rainbow_ctm"\n }\n },\n "variants": {\n "inventory": [{ "model": "planarartifice:pane/ctm_ew_translucent" }],\n "east=false,north=false,south=false,west=false": [{ "model": "planarartifice:pane/post_translucent" }],\n\n "east=false,north=true,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_n_translucent" }],\n "east=true,north=false,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_e_translucent" }],\n "east=false,north=false,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_s_translucent" }],\n "east=false,north=false,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_w_translucent" }],\n\n "east=true,north=true,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_ne_translucent" }],\n "east=true,north=false,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_se_translucent" }],\n "east=false,north=false,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_sw_translucent" }],\n "east=false,north=true,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_nw_translucent" }],\n\n "east=false,north=true,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_ns_translucent" }],\n "east=true,north=false,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_ew_translucent" }],\n\n "east=true,north=true,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_nse_translucent" }],\n "east=true,north=false,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_sew_translucent" }],\n "east=false,north=true,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_nsw_translucent" }],\n "east=true,north=true,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_new_translucent" }],\n\n "east=true,north=true,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_nsew_translucent" }]\n }\n }\n ') with open('./stained_glass_pane' + prefix + '.json', 'w') as f: q = '' for color in colors: q += '"color=' + color + ',east=false,north=false,south=false,west=false": [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/post_translucent" }],\n "color=' + color + ',east=false,north=true,south=false,west=false" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_n_translucent" }],\n "color=' + color + ',east=true,north=false,south=false,west=false" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_e_translucent" }],\n "color=' + color + ',east=false,north=false,south=true,west=false" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_s_translucent" }],\n "color=' + color + ',east=false,north=false,south=false,west=true" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_w_translucent" }],\n "color=' + color + ',east=true,north=true,south=false,west=false" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_ne_translucent" }],\n "color=' + color + ',east=true,north=false,south=true,west=false" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_se_translucent" }],\n "color=' + color + ',east=false,north=false,south=true,west=true" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_sw_translucent" }],\n "color=' + color + ',east=false,north=true,south=false,west=true" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_nw_translucent" }],' q += '"color=' + color + ',east=false,north=true,south=true,west=false" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_ns_translucent" }],\n "color=' + color + ',east=true,north=false,south=false,west=true" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_ew_translucent" }],\n "color=' + color + ',east=true,north=true,south=true,west=false" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_nse_translucent" }],\n "color=' + color + ',east=true,north=false,south=true,west=true" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_sew_translucent" }],\n "color=' + color + ',east=false,north=true,south=true,west=true" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_nsw_translucent" }],\n "color=' + color + ',east=true,north=true,south=false,west=true" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_new_translucent" }],\n "color=' + color + ',east=true,north=true,south=true,west=true" : [{ "textures": {\n "edge" : "blocks/glass_pane_top_' + color + '",\n "pane" : "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "particle": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '",\n "pane_ct": "planarartifice:blocks/glass/glass' + prefix + '_' + color + '_ctm"\n }, "model": "planarartifice:pane/ctm_nsew_translucent" }],' f.write(' \n {\n "forge_marker": 1,\n "defaults": {\n "transform": "forge:default-item"\n },\n "variants": {\n ' + q[:-1] + '\n }\n }\n ') with open('./glass_rainbow.json', 'w') as f: f.write('\n {\n "forge_marker": 1,\n "defaults": {\n "model": "planarartifice:cube_ctm_translucent",\n "textures": {\n "all": "planarartifice:blocks/glass/glass_rainbow",\n "particle": "planarartifice:blocks/glass/glass_rainbow",\n "connected_tex": "planarartifice:blocks/glass/glass_rainbow_ctm"\n }\n },\n "variants": {\n "normal": [{}],\n "inventory": [{}]\n }\n }\n ') with open('./glass_pane_rainbow.json', 'w') as f: f.write(' \n {\n "forge_marker": 1,\n "defaults": {\n "transform": "forge:default-item",\n "textures": {\n "edge" : "planarartifice:blocks/glass/glass_pane_top_rainbow",\n "pane" : "planarartifice:blocks/glass/glass_rainbow",\n "particle": "planarartifice:blocks/glass/glass_rainbow",\n "pane_ct": "planarartifice:blocks/glass/glass_rainbow_ctm"\n }\n },\n "variants": {\n "inventory": [{ "model": "planarartifice:pane/ctm_ew_translucent" }],\n "east=false,north=false,south=false,west=false": [{ "model": "planarartifice:pane/post_translucent" }],\n\n "east=false,north=true,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_n_translucent" }],\n "east=true,north=false,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_e_translucent" }],\n "east=false,north=false,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_s_translucent" }],\n "east=false,north=false,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_w_translucent" }],\n\n "east=true,north=true,south=false,west=false" : [{ "model": "planarartifice:pane/ctm_ne_translucent" }],\n "east=true,north=false,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_se_translucent" }],\n "east=false,north=false,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_sw_translucent" }],\n "east=false,north=true,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_nw_translucent" }],\n\n "east=false,north=true,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_ns_translucent" }],\n "east=true,north=false,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_ew_translucent" }],\n\n "east=true,north=true,south=true,west=false" : [{ "model": "planarartifice:pane/ctm_nse_translucent" }],\n "east=true,north=false,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_sew_translucent" }],\n "east=false,north=true,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_nsw_translucent" }],\n "east=true,north=true,south=false,west=true" : [{ "model": "planarartifice:pane/ctm_new_translucent" }],\n\n "east=true,north=true,south=true,west=true" : [{ "model": "planarartifice:pane/ctm_nsew_translucent" }]\n }\n }\n ') with open('./glass_panel.json', 'w') as f: f.write('\n {\n "forge_marker": 1,\n "defaults": {\n "model": "planarartifice:panel_ctm_cutout",\n "textures": {\n "all": "blocks/glass",\n "particle": "blocks/glass",\n "connected_tex": "blocks/glass_ctm"\n }\n },\n "variants": {\n "normal": [{}],\n "inventory": [{}]\n }\n }\n ') with open('./glass_panel_rainbow.json', 'w') as f: f.write('\n {\n "forge_marker": 1,\n "defaults": {\n "model": "planarartifice:panel_ctm_translucent",\n "textures": {\n "all": "planarartifice:blocks/glass/glass_rainbow",\n "particle": "planarartifice:blocks/glass/glass_rainbow",\n "connected_tex": "planarartifice:blocks/glass/glass_rainbow_ctm"\n }\n },\n "variants": {\n "normal": [{}],\n "inventory": [{}]\n }\n }\n ') with open('./stained_glass_panel.json', 'w') as f: q = '' for color in colors: q += '"color=' + color + '": [{\n "textures": {\n "all": "blocks/glass_' + color + '",\n "particle": "blocks/glass_' + color + '",\n "connected_tex": "blocks/glass_' + color + '_ctm"\n }\n }],' f.write('\n {\n "forge_marker": 1,\n "defaults": {\n "model": "planarartifice:panel_ctm_translucent"\n },\n "variants": {\n ' + q[:-1] + '\n }\n }\n ')
[ { 'date': '2011-01-01', 'description': 'Nieuwjaarsdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NF' }, { 'date': '2011-04-22', 'description': 'Goede Vrijdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRV' }, { 'date': '2011-04-24', 'description': 'Eerste Paasdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRV' }, { 'date': '2011-04-25', 'description': 'Tweede Paasdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRV' }, { 'date': '2011-04-30', 'description': 'Koninginnedag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NV' }, { 'date': '2011-05-04', 'description': 'Dodenherdenking', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'F' }, { 'date': '2011-05-05', 'description': 'Bevrijdingsdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NF' }, { 'date': '2011-06-02', 'description': 'Hemelvaartsdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRV' }, { 'date': '2011-06-12', 'description': 'Eerste Pinksterdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRV' }, { 'date': '2011-06-13', 'description': 'Tweede Pinksterdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRV' }, { 'date': '2011-12-05', 'description': 'Sinterklaas', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'RF' }, { 'date': '2011-12-15', 'description': 'Koninkrijksdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NV' }, { 'date': '2011-12-25', 'description': 'Eerste Kerstdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRF' }, { 'date': '2011-12-26', 'description': 'Tweede Kerstdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRF' } ]
[{'date': '2011-01-01', 'description': 'Nieuwjaarsdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NF'}, {'date': '2011-04-22', 'description': 'Goede Vrijdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRV'}, {'date': '2011-04-24', 'description': 'Eerste Paasdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRV'}, {'date': '2011-04-25', 'description': 'Tweede Paasdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRV'}, {'date': '2011-04-30', 'description': 'Koninginnedag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NV'}, {'date': '2011-05-04', 'description': 'Dodenherdenking', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'F'}, {'date': '2011-05-05', 'description': 'Bevrijdingsdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NF'}, {'date': '2011-06-02', 'description': 'Hemelvaartsdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRV'}, {'date': '2011-06-12', 'description': 'Eerste Pinksterdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRV'}, {'date': '2011-06-13', 'description': 'Tweede Pinksterdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRV'}, {'date': '2011-12-05', 'description': 'Sinterklaas', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'RF'}, {'date': '2011-12-15', 'description': 'Koninkrijksdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NV'}, {'date': '2011-12-25', 'description': 'Eerste Kerstdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRF'}, {'date': '2011-12-26', 'description': 'Tweede Kerstdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NRF'}]
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = 'liying' class Latest(object): def __init__(self): self.package = None self.latest_version = None
__author__ = 'liying' class Latest(object): def __init__(self): self.package = None self.latest_version = None
ES_HOST = 'localhost:9200' ES_INDEX = 'pending-dgidb' ES_DOC_TYPE = 'association' API_PREFIX = 'dgidb' API_VERSION = ''
es_host = 'localhost:9200' es_index = 'pending-dgidb' es_doc_type = 'association' api_prefix = 'dgidb' api_version = ''
class CSVUpperTriangularPlugin: def input(self, filename): infile = open(filename, 'r') self.colnames = infile.readline().strip().split(',') # Assume rownames=colnames self.ADJ = [] for line in infile: self.ADJ.append(line.strip().split(',')[1:]) def run(self): pass def output(self, filename): outfile = open(filename, 'w') outfile.write("X1,X2,Value\n") for i in range(0, len(self.ADJ)): for j in range(0, len(self.ADJ[i])): if (i < j): outfile.write(self.colnames[i]+","+self.colnames[j]+","+self.ADJ[i][j]+"\n")
class Csvuppertriangularplugin: def input(self, filename): infile = open(filename, 'r') self.colnames = infile.readline().strip().split(',') self.ADJ = [] for line in infile: self.ADJ.append(line.strip().split(',')[1:]) def run(self): pass def output(self, filename): outfile = open(filename, 'w') outfile.write('X1,X2,Value\n') for i in range(0, len(self.ADJ)): for j in range(0, len(self.ADJ[i])): if i < j: outfile.write(self.colnames[i] + ',' + self.colnames[j] + ',' + self.ADJ[i][j] + '\n')
class GithubError(Exception): pass class GithubAPIError(GithubError): pass
class Githuberror(Exception): pass class Githubapierror(GithubError): pass
# Write a function to find the longest common prefix string amongst an array of strings. class Solution(object): def longestCommonPrefix(self, strs): if len(strs) == 0: return "" standard = strs[0] longest_length = len(standard) for string in strs[1:]: index = 0 while index < len(string) and index < len(standard) and string[index] == standard[index]: index += 1 longest_length = min(index, longest_length) return strs[0][:longest_length]
class Solution(object): def longest_common_prefix(self, strs): if len(strs) == 0: return '' standard = strs[0] longest_length = len(standard) for string in strs[1:]: index = 0 while index < len(string) and index < len(standard) and (string[index] == standard[index]): index += 1 longest_length = min(index, longest_length) return strs[0][:longest_length]
# Copyright Notice: # Copyright 2016-2019 DMTF. All rights reserved. # License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-Interface-Emulator/blob/master/LICENSE.md # Redfish template REDFISH_TEMPLATE = { "@odata.context": "{rest_base}$metadata#Systems/cs_puid", "@odata.id": "{rest_base}Systems/{cs_puid}", "@odata.type": '#ComputerSystem.1.0.0.ComputerSystem', "Id": None, "Name": "WebFrontEnd483", "SystemType": "Virtual", "AssetTag": "Chicago-45Z-2381", "Manufacturer": "Redfish Computers", "Model": "3500RX", "SKU": "8675309", "SerialNumber": None, "PartNumber": "224071-J23", "Description": "Web Front End node", "UUID": None, "HostName":"web483", "Status": { "State": "Enabled", "Health": "OK", "HealthRollUp": "OK" }, "IndicatorLED": "Off", "PowerState": "On", "Boot": { "BootSourceOverrideEnabled": "Once", "BootSourceOverrideTarget": "Pxe", "BootSourceOverrideTarget@DMTF.AllowableValues": [ "None", "Pxe", "Floppy", "Cd", "Usb", "Hdd", "BiosSetup", "Utilities", "Diags", "UefiTarget" ], "UefiTargetBootSourceOverride": "/0x31/0x33/0x01/0x01" }, "Oem":{}, "BiosVersion": "P79 v1.00 (09/20/2013)", "Processors": { "Count": 8, "Model": "Multi-Core Intel(R) Xeon(R) processor 7xxx Series", "Status": { "State": "Enabled", "Health": "OK", "HealthRollUp": "OK" } }, "Memory": { "TotalSystemMemoryGB": 16, "Status": { "State": "Enabled", "Health": "OK", "HealthRollUp": "OK" } }, "Links": { "Chassis": [ { "@odata.id": "/redfish/v1/Chassis/1" } ], "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/1" } ], "Processors": { "@odata.id": "/redfish/v1/Systems/{cs_puid}/Processors" }, "EthernetInterfaces": { "@odata.id": "/redfish/v1/Systems/{cs_puid}/EthernetInterfaces" }, "SimpleStorage": { "@odata.id": "/redfish/v1/Systems/{cs_puid}/SimpleStorage" }, "LogService": { "@odata.id": "/redfish/v1/Systems/1/Logs" } }, "Actions": { "#ComputerSystem.Reset": { "target": "/redfish/v1/Systems/{cs_puid}/Actions/ComputerSystem.Reset", "ResetType@DMTF.AllowableValues": [ "On", "ForceOff", "GracefulRestart", "ForceRestart", "Nmi", "GracefulRestart", "ForceOn", "PushPowerButton" ] }, "Oem": { "http://Contoso.com/Schema/CustomTypes#Contoso.Reset": { "target": "/redfish/v1/Systems/1/OEM/Contoso/Actions/Contoso.Reset" } } }, "Oem": { "Contoso": { "@odata.type": "http://Contoso.com/Schema#Contoso.ComputerSystem", "ProductionLocation": { "FacilityName": "PacWest Production Facility", "Country": "USA" } }, "Chipwise": { "@odata.type": "http://Chipwise.com/Schema#Chipwise.ComputerSystem", "Style": "Executive" } } }
redfish_template = {'@odata.context': '{rest_base}$metadata#Systems/cs_puid', '@odata.id': '{rest_base}Systems/{cs_puid}', '@odata.type': '#ComputerSystem.1.0.0.ComputerSystem', 'Id': None, 'Name': 'WebFrontEnd483', 'SystemType': 'Virtual', 'AssetTag': 'Chicago-45Z-2381', 'Manufacturer': 'Redfish Computers', 'Model': '3500RX', 'SKU': '8675309', 'SerialNumber': None, 'PartNumber': '224071-J23', 'Description': 'Web Front End node', 'UUID': None, 'HostName': 'web483', 'Status': {'State': 'Enabled', 'Health': 'OK', 'HealthRollUp': 'OK'}, 'IndicatorLED': 'Off', 'PowerState': 'On', 'Boot': {'BootSourceOverrideEnabled': 'Once', 'BootSourceOverrideTarget': 'Pxe', 'BootSourceOverrideTarget@DMTF.AllowableValues': ['None', 'Pxe', 'Floppy', 'Cd', 'Usb', 'Hdd', 'BiosSetup', 'Utilities', 'Diags', 'UefiTarget'], 'UefiTargetBootSourceOverride': '/0x31/0x33/0x01/0x01'}, 'Oem': {}, 'BiosVersion': 'P79 v1.00 (09/20/2013)', 'Processors': {'Count': 8, 'Model': 'Multi-Core Intel(R) Xeon(R) processor 7xxx Series', 'Status': {'State': 'Enabled', 'Health': 'OK', 'HealthRollUp': 'OK'}}, 'Memory': {'TotalSystemMemoryGB': 16, 'Status': {'State': 'Enabled', 'Health': 'OK', 'HealthRollUp': 'OK'}}, 'Links': {'Chassis': [{'@odata.id': '/redfish/v1/Chassis/1'}], 'ManagedBy': [{'@odata.id': '/redfish/v1/Managers/1'}], 'Processors': {'@odata.id': '/redfish/v1/Systems/{cs_puid}/Processors'}, 'EthernetInterfaces': {'@odata.id': '/redfish/v1/Systems/{cs_puid}/EthernetInterfaces'}, 'SimpleStorage': {'@odata.id': '/redfish/v1/Systems/{cs_puid}/SimpleStorage'}, 'LogService': {'@odata.id': '/redfish/v1/Systems/1/Logs'}}, 'Actions': {'#ComputerSystem.Reset': {'target': '/redfish/v1/Systems/{cs_puid}/Actions/ComputerSystem.Reset', 'ResetType@DMTF.AllowableValues': ['On', 'ForceOff', 'GracefulRestart', 'ForceRestart', 'Nmi', 'GracefulRestart', 'ForceOn', 'PushPowerButton']}, 'Oem': {'http://Contoso.com/Schema/CustomTypes#Contoso.Reset': {'target': '/redfish/v1/Systems/1/OEM/Contoso/Actions/Contoso.Reset'}}}, 'Oem': {'Contoso': {'@odata.type': 'http://Contoso.com/Schema#Contoso.ComputerSystem', 'ProductionLocation': {'FacilityName': 'PacWest Production Facility', 'Country': 'USA'}}, 'Chipwise': {'@odata.type': 'http://Chipwise.com/Schema#Chipwise.ComputerSystem', 'Style': 'Executive'}}}
class Solution: def findMaxConsecutiveOnes(self, nums: List[int]) -> int: consecutive = 0 ret = 0 for i in range(len(nums) + 1): if i == len(nums) or nums[i] == 0: ret = max(ret, consecutive) consecutive = 0 else: consecutive += 1 return ret
class Solution: def find_max_consecutive_ones(self, nums: List[int]) -> int: consecutive = 0 ret = 0 for i in range(len(nums) + 1): if i == len(nums) or nums[i] == 0: ret = max(ret, consecutive) consecutive = 0 else: consecutive += 1 return ret
def get_max_increasing_sub_sequence(arr): i = 1 n = len(arr) j = 0 dp = arr[:] while i < n: while j < i: if dp[j] < dp[i] < dp[i] + dp[j]: dp[i] = dp[j] + dp[i] j += 1 i += 1 return max(dp) if __name__ == '__main__': # arr = [1, 101, 2, 3, 100, 4, 5] # print(get_max_increasing_sub_sequence(arr)) test_cases = int(input()) for t_case in range(test_cases): n = map(int, input().split()) array = list(map(int, input().split())) print(get_max_increasing_sub_sequence(array))
def get_max_increasing_sub_sequence(arr): i = 1 n = len(arr) j = 0 dp = arr[:] while i < n: while j < i: if dp[j] < dp[i] < dp[i] + dp[j]: dp[i] = dp[j] + dp[i] j += 1 i += 1 return max(dp) if __name__ == '__main__': test_cases = int(input()) for t_case in range(test_cases): n = map(int, input().split()) array = list(map(int, input().split())) print(get_max_increasing_sub_sequence(array))
# this file defines available actions # reference: https://github.com/TeamFightingICE/FightingICE/blob/master/python/Feature%20Extractor%20in%20Python/action.py class Actions: def __init__(self): # map digits to actions self.actions = [ "NEUTRAL", "STAND", "FORWARD_WALK", "DASH", "BACK_STEP", "CROUCH", "JUMP", "FOR_JUMP", "BACK_JUMP", "AIR", "STAND_GUARD", "CROUCH_GUARD", "AIR_GUARD", "STAND_GUARD_RECOV", "CROUCH_GUARD_RECOV", "AIR_GUARD_RECOV", "STAND_RECOV", "CROUCH_RECOV", "AIR_RECOV", "CHANGE_DOWN", "DOWN", "RISE", "LANDING", "THROW_A", "THROW_B", "THROW_HIT", "THROW_SUFFER", "STAND_A", "STAND_B", "CROUCH_A", "CROUCH_B", "AIR_A", "AIR_B", "AIR_DA", "AIR_DB", "STAND_FA", "STAND_FB", "CROUCH_FA", "CROUCH_FB", "AIR_FA", "AIR_FB", "AIR_UA", "AIR_UB", "STAND_D_DF_FA", "STAND_D_DF_FB", "STAND_F_D_DFA", "STAND_F_D_DFB", "STAND_D_DB_BA", "STAND_D_DB_BB", "AIR_D_DF_FA", "AIR_D_DF_FB", "AIR_F_D_DFA", "AIR_F_D_DFB", "AIR_D_DB_BA", "AIR_D_DB_BB", "STAND_D_DF_FC" ] # map action to digits self.actions_map = { m:i for i, m in enumerate(self.actions) } # set number of actions self.count = 56 assert len(self.actions) == self.count # set other types of actions self.actions_digits_useless = [ self.actions_map[m] for m in [ "STAND", "AIR", "STAND_GUARD_RECOV", "CROUCH_GUARD_RECOV", "AIR_GUARD_RECOV", "STAND_RECOV", "CROUCH_RECOV", "AIR_RECOV", "CHANGE_DOWN", "DOWN", "RISE", "LANDING", "THROW_HIT", "THROW_SUFFER" ] ] self.actions_digits_useful = [ i for i in range(self.count) if i not in self.actions_digits_useless ] self.count_useful = len(self.actions_digits_useful) self.actions_map_useful = { i:self.actions[n] for i,n in enumerate(self.actions_digits_useful) } self.actions_digits_air = [ self.actions_map[m] for m in [ "AIR_GUARD", "AIR_A", "AIR_B", "AIR_DA", "AIR_DB", "AIR_FA", "AIR_FB", "AIR_UA", "AIR_UB", "AIR_D_DF_FA", "AIR_D_DF_FB", "AIR_F_D_DFA", "AIR_F_D_DFB", "AIR_D_DB_BA", "AIR_D_DB_BB" ] ] self.actions_digits_ground = [ self.actions_map[m] for m in [ "STAND_D_DB_BA", "BACK_STEP", "FORWARD_WALK", "DASH", "JUMP", "FOR_JUMP", "BACK_JUMP", "STAND_GUARD", "CROUCH_GUARD", "THROW_A", "THROW_B", "STAND_A", "STAND_B", "CROUCH_A", "CROUCH_B", "STAND_FA", "STAND_FB", "CROUCH_FA", "CROUCH_FB", "STAND_D_DF_FA", "STAND_D_DF_FB", "STAND_F_D_DFA", "STAND_F_D_DFB", "STAND_D_DB_BB" ] ]
class Actions: def __init__(self): self.actions = ['NEUTRAL', 'STAND', 'FORWARD_WALK', 'DASH', 'BACK_STEP', 'CROUCH', 'JUMP', 'FOR_JUMP', 'BACK_JUMP', 'AIR', 'STAND_GUARD', 'CROUCH_GUARD', 'AIR_GUARD', 'STAND_GUARD_RECOV', 'CROUCH_GUARD_RECOV', 'AIR_GUARD_RECOV', 'STAND_RECOV', 'CROUCH_RECOV', 'AIR_RECOV', 'CHANGE_DOWN', 'DOWN', 'RISE', 'LANDING', 'THROW_A', 'THROW_B', 'THROW_HIT', 'THROW_SUFFER', 'STAND_A', 'STAND_B', 'CROUCH_A', 'CROUCH_B', 'AIR_A', 'AIR_B', 'AIR_DA', 'AIR_DB', 'STAND_FA', 'STAND_FB', 'CROUCH_FA', 'CROUCH_FB', 'AIR_FA', 'AIR_FB', 'AIR_UA', 'AIR_UB', 'STAND_D_DF_FA', 'STAND_D_DF_FB', 'STAND_F_D_DFA', 'STAND_F_D_DFB', 'STAND_D_DB_BA', 'STAND_D_DB_BB', 'AIR_D_DF_FA', 'AIR_D_DF_FB', 'AIR_F_D_DFA', 'AIR_F_D_DFB', 'AIR_D_DB_BA', 'AIR_D_DB_BB', 'STAND_D_DF_FC'] self.actions_map = {m: i for (i, m) in enumerate(self.actions)} self.count = 56 assert len(self.actions) == self.count self.actions_digits_useless = [self.actions_map[m] for m in ['STAND', 'AIR', 'STAND_GUARD_RECOV', 'CROUCH_GUARD_RECOV', 'AIR_GUARD_RECOV', 'STAND_RECOV', 'CROUCH_RECOV', 'AIR_RECOV', 'CHANGE_DOWN', 'DOWN', 'RISE', 'LANDING', 'THROW_HIT', 'THROW_SUFFER']] self.actions_digits_useful = [i for i in range(self.count) if i not in self.actions_digits_useless] self.count_useful = len(self.actions_digits_useful) self.actions_map_useful = {i: self.actions[n] for (i, n) in enumerate(self.actions_digits_useful)} self.actions_digits_air = [self.actions_map[m] for m in ['AIR_GUARD', 'AIR_A', 'AIR_B', 'AIR_DA', 'AIR_DB', 'AIR_FA', 'AIR_FB', 'AIR_UA', 'AIR_UB', 'AIR_D_DF_FA', 'AIR_D_DF_FB', 'AIR_F_D_DFA', 'AIR_F_D_DFB', 'AIR_D_DB_BA', 'AIR_D_DB_BB']] self.actions_digits_ground = [self.actions_map[m] for m in ['STAND_D_DB_BA', 'BACK_STEP', 'FORWARD_WALK', 'DASH', 'JUMP', 'FOR_JUMP', 'BACK_JUMP', 'STAND_GUARD', 'CROUCH_GUARD', 'THROW_A', 'THROW_B', 'STAND_A', 'STAND_B', 'CROUCH_A', 'CROUCH_B', 'STAND_FA', 'STAND_FB', 'CROUCH_FA', 'CROUCH_FB', 'STAND_D_DF_FA', 'STAND_D_DF_FB', 'STAND_F_D_DFA', 'STAND_F_D_DFB', 'STAND_D_DB_BB']]
''' Created on 16-10-2012 @author: Jacek Przemieniecki ''' class Mixture(object): def _calc_groups(self): self._groups = {} groups = self._groups tot_grps = 0 for mol in self.moles: m_groups = self.moles[mol].get_groups() for m_grp in m_groups: groups[m_grp] = groups.get(m_grp, 0) + m_groups[m_grp]*self.quantities[mol] tot_grps += m_groups[m_grp]*self.quantities[mol] for grp in groups: groups[grp] = groups[grp]/tot_grps def _calc_ordered(self): total_moles = sum(self.quantities.values()) for mol in self.moles: self._ordered_moles.append(self.moles[mol]) self._ordered_mol_fractions.append(self.quantities[mol]/total_moles) def _finalize(self): self._calc_groups() self._calc_ordered() self._finalized = True def __init__(self): self.moles = {} self.quantities = {} self._finalized = False self._groups = None # Those two lists must be ordered so that moles[i] # corresponds to quantities[i] self._ordered_moles = [] self._ordered_mol_fractions = [] def add(self, iden, mol, amount): if self._finalized: raise Exception() # TODO: Exception handling if iden in self.moles: self.quantities[iden] += amount else: self.moles[iden] = mol self.quantities[iden] = amount def get_moles(self): if not self._finalized: self._finalize() return self._ordered_moles def get_groups(self): if not self._finalized: self._finalize() return self._groups def get_mole_fractions(self): if not self._finalized: self._finalize() return self._ordered_mol_fractions
""" Created on 16-10-2012 @author: Jacek Przemieniecki """ class Mixture(object): def _calc_groups(self): self._groups = {} groups = self._groups tot_grps = 0 for mol in self.moles: m_groups = self.moles[mol].get_groups() for m_grp in m_groups: groups[m_grp] = groups.get(m_grp, 0) + m_groups[m_grp] * self.quantities[mol] tot_grps += m_groups[m_grp] * self.quantities[mol] for grp in groups: groups[grp] = groups[grp] / tot_grps def _calc_ordered(self): total_moles = sum(self.quantities.values()) for mol in self.moles: self._ordered_moles.append(self.moles[mol]) self._ordered_mol_fractions.append(self.quantities[mol] / total_moles) def _finalize(self): self._calc_groups() self._calc_ordered() self._finalized = True def __init__(self): self.moles = {} self.quantities = {} self._finalized = False self._groups = None self._ordered_moles = [] self._ordered_mol_fractions = [] def add(self, iden, mol, amount): if self._finalized: raise exception() if iden in self.moles: self.quantities[iden] += amount else: self.moles[iden] = mol self.quantities[iden] = amount def get_moles(self): if not self._finalized: self._finalize() return self._ordered_moles def get_groups(self): if not self._finalized: self._finalize() return self._groups def get_mole_fractions(self): if not self._finalized: self._finalize() return self._ordered_mol_fractions
extractable_regions = ["TextRegion", "ImageRegion", "LineDrawingRegion", "GraphicRegion", "TableRegion", "ChartRegion", "MapRegion", "SeparatorRegion", "MathsRegion", "ChemRegion", "MusicRegion", "AdvertRegion", "NoiseRegion", "NoiseRegion", "UnknownRegion", "CustomRegion", "TextLine"] TEXT_COUNT_SUPPORTED_ELEMS = ["TextRegion", "TextLine", "Word"]
extractable_regions = ['TextRegion', 'ImageRegion', 'LineDrawingRegion', 'GraphicRegion', 'TableRegion', 'ChartRegion', 'MapRegion', 'SeparatorRegion', 'MathsRegion', 'ChemRegion', 'MusicRegion', 'AdvertRegion', 'NoiseRegion', 'NoiseRegion', 'UnknownRegion', 'CustomRegion', 'TextLine'] text_count_supported_elems = ['TextRegion', 'TextLine', 'Word']
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. def cram_test(name, srcs, deps=[]): for s in srcs: testname = name + '_' + s script = testname + '_script.sh' gr = "_gen_" + script # This genrule is a kludge, and at some point we should move # to a real rule # (http://bazel.io/docs/skylark/rules.html). What this does is # it builds a "bash script" whose first line execs cram on the # script. Conveniently, that first line is a comment as far as # cram is concerned (it's not indented at all), so everything # just works. native.genrule(name=gr, srcs=[s], outs=[script], cmd=("echo 'exec $${TEST_SRCDIR}/copybara/integration/cram " + "--xunit-file=$$XML_OUTPUT_FILE $$0' > \"$@\" ; " + "cat $(SRCS) >> \"$@\""), ) native.sh_test(name=testname, srcs=[script], data=["//copybara/integration:cram"] + deps, )
def cram_test(name, srcs, deps=[]): for s in srcs: testname = name + '_' + s script = testname + '_script.sh' gr = '_gen_' + script native.genrule(name=gr, srcs=[s], outs=[script], cmd="echo 'exec $${TEST_SRCDIR}/copybara/integration/cram " + '--xunit-file=$$XML_OUTPUT_FILE $$0\' > "$@" ; ' + 'cat $(SRCS) >> "$@"') native.sh_test(name=testname, srcs=[script], data=['//copybara/integration:cram'] + deps)
# # PySNMP MIB module RADLAN-DHCP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RADLAN-DHCP-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:01:12 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint") rnd, = mibBuilder.importSymbols("RADLAN-MIB", "rnd") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") IpAddress, Counter64, ObjectIdentity, Counter32, Gauge32, MibIdentifier, Unsigned32, ModuleIdentity, iso, TimeTicks, NotificationType, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "Counter64", "ObjectIdentity", "Counter32", "Gauge32", "MibIdentifier", "Unsigned32", "ModuleIdentity", "iso", "TimeTicks", "NotificationType", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits") DisplayString, RowStatus, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TruthValue", "TextualConvention") rsDHCP = ModuleIdentity((1, 3, 6, 1, 4, 1, 89, 38)) rsDHCP.setRevisions(('2003-10-18 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rsDHCP.setRevisionsDescriptions(('Initial version of this MIB.',)) if mibBuilder.loadTexts: rsDHCP.setLastUpdated('200310180000Z') if mibBuilder.loadTexts: rsDHCP.setOrganization('') if mibBuilder.loadTexts: rsDHCP.setContactInfo('') if mibBuilder.loadTexts: rsDHCP.setDescription('The private MIB module definition for DHCP server support.') rsDhcpMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 89, 38, 14), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rsDhcpMibVersion.setStatus('current') if mibBuilder.loadTexts: rsDhcpMibVersion.setDescription("DHCP MIB's version, the current version is 4.") rlDhcpRelayEnable = MibScalar((1, 3, 6, 1, 4, 1, 89, 38, 25), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayEnable.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayEnable.setDescription('Enable or disable the use of the DHCP relay.') rlDhcpRelayExists = MibScalar((1, 3, 6, 1, 4, 1, 89, 38, 26), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpRelayExists.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayExists.setDescription('This variable shows whether the device can function as a DHCP Relay Agent.') rlDhcpRelayNextServerTable = MibTable((1, 3, 6, 1, 4, 1, 89, 38, 27), ) if mibBuilder.loadTexts: rlDhcpRelayNextServerTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerTable.setDescription('The DHCP Relay Next Servers configuration Table') rlDhcpRelayNextServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 38, 27, 1), ).setIndexNames((0, "RADLAN-DHCP-MIB", "rlDhcpRelayNextServerIpAddr")) if mibBuilder.loadTexts: rlDhcpRelayNextServerEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerEntry.setDescription('The row definition for this table. DHCP requests are relayed to the specified next server according to their threshold values.') rlDhcpRelayNextServerIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 27, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpRelayNextServerIpAddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerIpAddr.setDescription('The IPAddress of the next configuration server. DHCP Server may act as a DHCP relay if this parameter is not equal to 0.0.0.0.') rlDhcpRelayNextServerSecThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 27, 1, 2), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayNextServerSecThreshold.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerSecThreshold.setDescription('DHCP requests are relayed only if their SEC field is greater or equal to the threshold value in order to allow local DHCP Servers to answer first.') rlDhcpRelayNextServerRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 27, 1, 3), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayNextServerRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerRowStatus.setDescription("This variable displays the validity or invalidity of the entry. Setting it to 'destroy' has the effect of rendering it inoperative. The internal effect (row removal) is implementation dependent.") rlDhcpSrvEnable = MibScalar((1, 3, 6, 1, 4, 1, 89, 38, 30), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvEnable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvEnable.setDescription('Enable or Disable the use of the DHCP Server.') rlDhcpSrvExists = MibScalar((1, 3, 6, 1, 4, 1, 89, 38, 31), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvExists.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvExists.setDescription('This variable shows whether the device can function as a DHCP Server.') rlDhcpSrvDbLocation = MibScalar((1, 3, 6, 1, 4, 1, 89, 38, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("nvram", 1), ("flash", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvDbLocation.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDbLocation.setDescription('Describes where DHCP Server database is stored.') rlDhcpSrvMaxNumOfClients = MibScalar((1, 3, 6, 1, 4, 1, 89, 38, 33), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvMaxNumOfClients.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvMaxNumOfClients.setDescription('This variable shows maximum number of clients that can be supported by DHCP Server dynamic allocation.') rlDhcpSrvDbNumOfActiveEntries = MibScalar((1, 3, 6, 1, 4, 1, 89, 38, 34), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvDbNumOfActiveEntries.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDbNumOfActiveEntries.setDescription('This variable shows number of active entries stored in database.') rlDhcpSrvDbErase = MibScalar((1, 3, 6, 1, 4, 1, 89, 38, 35), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDbErase.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDbErase.setDescription('The value is always false. Setting this variable to true causes erasing all entries in DHCP database.') rlDhcpSrvProbeEnable = MibScalar((1, 3, 6, 1, 4, 1, 89, 38, 36), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvProbeEnable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvProbeEnable.setDescription('Enable or Disable the use of the DHCP probe before allocating an IP address.') rlDhcpSrvProbeTimeout = MibScalar((1, 3, 6, 1, 4, 1, 89, 38, 37), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(300, 10000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvProbeTimeout.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvProbeTimeout.setDescription('Indicates the peiod of time in milliseconds the DHCP probe will wait before issuing a new trial or deciding that no other device on the network has the IP address which DHCP considers allocating.') rlDhcpSrvProbeRetries = MibScalar((1, 3, 6, 1, 4, 1, 89, 38, 38), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 10))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvProbeRetries.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvProbeRetries.setDescription('Indicates how many times DHCP will probe before deciding that no other device on the network has the IP address which DHCP considers allocating.') rlDhcpSrvIpAddrTable = MibTable((1, 3, 6, 1, 4, 1, 89, 38, 45), ) if mibBuilder.loadTexts: rlDhcpSrvIpAddrTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrTable.setDescription('Table of IP Addresses allocated by DHCP Server by static and dynamic allocations.') rlDhcpSrvIpAddrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 38, 45, 1), ).setIndexNames((0, "RADLAN-DHCP-MIB", "rlDhcpSrvIpAddrIpAddr")) if mibBuilder.loadTexts: rlDhcpSrvIpAddrEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrEntry.setDescription('The row definition for this table. Parameters of DHCP allocated IP Addresses table.') rlDhcpSrvIpAddrIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrIpAddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIpAddr.setDescription('The IP address that was allocated by DHCP Server.') rlDhcpSrvIpAddrIpNetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrIpNetMask.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIpNetMask.setDescription('The subnet mask associated with the IP address of this entry. The value of the mask is an IP address with all the network bits set to 1 and all the hosts bits set to 0.') rlDhcpSrvIpAddrIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrIdentifier.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIdentifier.setDescription('Unique Identifier for client. Either physical address or DHCP Client Identifier.') rlDhcpSrvIpAddrIdentifierType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("physAddr", 1), ("clientId", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrIdentifierType.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIdentifierType.setDescription('Identifier Type. Either physical address or DHCP Client Identifier.') rlDhcpSrvIpAddrClnHostName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 5), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrClnHostName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrClnHostName.setDescription('Client Host Name. DHCP Server will use it to update DNS Server. Must be unique per client.') rlDhcpSrvIpAddrMechanism = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("manual", 1), ("automatic", 2), ("dynamic", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrMechanism.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrMechanism.setDescription('Mechanism of allocation IP Address by DHCP Server. The only value that can be set by user is manual.') rlDhcpSrvIpAddrAgeTime = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvIpAddrAgeTime.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrAgeTime.setDescription('Age time of the IP Address.') rlDhcpSrvIpAddrPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrPoolName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrPoolName.setDescription('Ip address pool name. A unique name for host pool static allocation, or network pool name in case of dynamic allocation.') rlDhcpSrvIpAddrConfParamsName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrConfParamsName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrConfParamsName.setDescription('This variable points (serves as key) to appropriate set of parameters in the DHCP Server configuration parameters table.') rlDhcpSrvIpAddrRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 10), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrRowStatus.setDescription('The row status variable, used according to row installation and removal conventions.') rlDhcpSrvDynamicTable = MibTable((1, 3, 6, 1, 4, 1, 89, 38, 46), ) if mibBuilder.loadTexts: rlDhcpSrvDynamicTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicTable.setDescription("The DHCP Dynamic Server's configuration Table") rlDhcpSrvDynamicEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 38, 46, 1), ).setIndexNames((0, "RADLAN-DHCP-MIB", "rlDhcpSrvDynamicPoolName")) if mibBuilder.loadTexts: rlDhcpSrvDynamicEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicEntry.setDescription('The row definition for this table. Parameters sent in as a DHCP Reply to DHCP Request with specified indices') rlDhcpSrvDynamicPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicPoolName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicPoolName.setDescription('The name of DHCP dynamic addresses pool.') rlDhcpSrvDynamicIpAddrFrom = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicIpAddrFrom.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicIpAddrFrom.setDescription('The first IP address allocated in this row.') rlDhcpSrvDynamicIpAddrTo = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicIpAddrTo.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicIpAddrTo.setDescription('The last IP address allocated in this row.') rlDhcpSrvDynamicIpNetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 4), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicIpNetMask.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicIpNetMask.setDescription('The subnet mask associated with the IP addresses of this entry. The value of the mask is an IP address with all the network bits set to 1 and all the hosts bits set to 0.') rlDhcpSrvDynamicLeaseTime = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 5), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicLeaseTime.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicLeaseTime.setDescription('Maximum lease-time in seconds granted to a requesting DHCP client. For automatic allocation use 0xFFFFFFFF. To exclude addresses from allocation mechanism, set this value to 0.') rlDhcpSrvDynamicProbeEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 6), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicProbeEnable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicProbeEnable.setDescription('Enable or Disable the use of the DHCP probe before allocating the address.') rlDhcpSrvDynamicTotalNumOfAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvDynamicTotalNumOfAddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicTotalNumOfAddr.setDescription('Total number of addresses in space.') rlDhcpSrvDynamicFreeNumOfAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 8), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvDynamicFreeNumOfAddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicFreeNumOfAddr.setDescription('Free number of addresses in space.') rlDhcpSrvDynamicConfParamsName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicConfParamsName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicConfParamsName.setDescription('This variable points (serves as key) to appropriate set of parameters in the DHCP Server configuration parameters table.') rlDhcpSrvDynamicRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 10), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicRowStatus.setDescription('The row status variable, used according to row installation and removal conventions.') rlDhcpSrvConfParamsTable = MibTable((1, 3, 6, 1, 4, 1, 89, 38, 47), ) if mibBuilder.loadTexts: rlDhcpSrvConfParamsTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsTable.setDescription('The DHCP Configuration Parameters Table') rlDhcpSrvConfParamsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 38, 47, 1), ).setIndexNames((0, "RADLAN-DHCP-MIB", "rlDhcpSrvConfParamsName")) if mibBuilder.loadTexts: rlDhcpSrvConfParamsEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsEntry.setDescription('The row definition for this table. Each entry corresponds to one specific parameters set.') rlDhcpSrvConfParamsName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsName.setDescription('This value is a unique index for the entry in the rlDhcpSrvConfParamsTable.') rlDhcpSrvConfParamsNextServerIp = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsNextServerIp.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNextServerIp.setDescription('The IP of next server for client to use in configuration process.') rlDhcpSrvConfParamsNextServerName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsNextServerName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNextServerName.setDescription('The mame of next server for client to use in configuration process.') rlDhcpSrvConfParamsBootfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsBootfileName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsBootfileName.setDescription('Name of file for client to request from next server.') rlDhcpSrvConfParamsRoutersList = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsRoutersList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsRoutersList.setDescription("The value of option code 3, which defines default routers list. Each IP address is represented in dotted decimal notation format with ';' between them.") rlDhcpSrvConfParamsTimeSrvList = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsTimeSrvList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsTimeSrvList.setDescription("The value of option code 4, which defines time servers list. Each IP address is represented in dotted decimal notation format with ';' between them.") rlDhcpSrvConfParamsDnsList = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsDnsList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsDnsList.setDescription("The value of option code 6, which defines the list of DNSs. Each IP address is represented in dotted decimal notation format with ';' between them.") rlDhcpSrvConfParamsDomainName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 8), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsDomainName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsDomainName.setDescription('The value option code 15, which defines the domain name..') rlDhcpSrvConfParamsNetbiosNameList = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 9), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsNetbiosNameList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNetbiosNameList.setDescription("The value option code 44, which defines the list of NETBios Name Servers. Each IP address is represented in dotted decimal notation format with ';' between them.") rlDhcpSrvConfParamsNetbiosNodeType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 4, 8))).clone(namedValues=NamedValues(("b-node", 1), ("p-node", 2), ("m-node", 4), ("h-node", 8)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsNetbiosNodeType.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNetbiosNodeType.setDescription('The value option code 46, which defines the NETBios node type. The option will be added only if rlDhcpSrvConfParamsNetbiosNameList is not empty.') rlDhcpSrvConfParamsCommunity = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsCommunity.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsCommunity.setDescription('The value of site-specific option 128, which defines Community. The option will be added only if rlDhcpSrvConfParamsNmsIp is set.') rlDhcpSrvConfParamsNmsIp = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 12), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsNmsIp.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNmsIp.setDescription('The value of site-specific option 129, which defines IP of Network Manager.') rlDhcpSrvConfParamsOptionsList = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 13), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsOptionsList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsOptionsList.setDescription("The sequence of option segments. Each option segment is represented by a triplet <code/length/value>. The code defines the code of each supported option. The length defines the length of each supported option. The value defines the value of the supported option. If there is a number of elements in the value field, they are divided by ','. Each element of type IP address in value field is represented in dotted decimal notation format.") rlDhcpSrvConfParamsRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 14), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsRowStatus.setDescription('The row status variable, used according to row installation and removal conventions.') mibBuilder.exportSymbols("RADLAN-DHCP-MIB", rlDhcpSrvDynamicRowStatus=rlDhcpSrvDynamicRowStatus, rlDhcpRelayEnable=rlDhcpRelayEnable, rlDhcpSrvConfParamsNetbiosNameList=rlDhcpSrvConfParamsNetbiosNameList, rlDhcpSrvDbErase=rlDhcpSrvDbErase, rlDhcpSrvConfParamsOptionsList=rlDhcpSrvConfParamsOptionsList, rlDhcpSrvIpAddrIdentifier=rlDhcpSrvIpAddrIdentifier, rlDhcpSrvConfParamsRoutersList=rlDhcpSrvConfParamsRoutersList, rlDhcpSrvDynamicLeaseTime=rlDhcpSrvDynamicLeaseTime, rlDhcpSrvDynamicTotalNumOfAddr=rlDhcpSrvDynamicTotalNumOfAddr, rlDhcpSrvDynamicIpAddrTo=rlDhcpSrvDynamicIpAddrTo, rlDhcpSrvIpAddrPoolName=rlDhcpSrvIpAddrPoolName, rlDhcpSrvConfParamsDomainName=rlDhcpSrvConfParamsDomainName, rlDhcpSrvIpAddrAgeTime=rlDhcpSrvIpAddrAgeTime, rlDhcpRelayNextServerSecThreshold=rlDhcpRelayNextServerSecThreshold, rlDhcpSrvConfParamsNextServerName=rlDhcpSrvConfParamsNextServerName, rlDhcpSrvDynamicConfParamsName=rlDhcpSrvDynamicConfParamsName, rlDhcpSrvConfParamsBootfileName=rlDhcpSrvConfParamsBootfileName, rlDhcpSrvDbLocation=rlDhcpSrvDbLocation, rlDhcpRelayNextServerTable=rlDhcpRelayNextServerTable, rlDhcpSrvIpAddrEntry=rlDhcpSrvIpAddrEntry, rlDhcpSrvIpAddrIpNetMask=rlDhcpSrvIpAddrIpNetMask, rlDhcpSrvIpAddrIdentifierType=rlDhcpSrvIpAddrIdentifierType, rlDhcpSrvConfParamsCommunity=rlDhcpSrvConfParamsCommunity, rlDhcpSrvDynamicEntry=rlDhcpSrvDynamicEntry, PYSNMP_MODULE_ID=rsDHCP, rsDHCP=rsDHCP, rlDhcpSrvIpAddrRowStatus=rlDhcpSrvIpAddrRowStatus, rlDhcpSrvConfParamsTimeSrvList=rlDhcpSrvConfParamsTimeSrvList, rlDhcpSrvConfParamsName=rlDhcpSrvConfParamsName, rlDhcpSrvConfParamsNextServerIp=rlDhcpSrvConfParamsNextServerIp, rlDhcpSrvMaxNumOfClients=rlDhcpSrvMaxNumOfClients, rlDhcpSrvEnable=rlDhcpSrvEnable, rsDhcpMibVersion=rsDhcpMibVersion, rlDhcpSrvConfParamsEntry=rlDhcpSrvConfParamsEntry, rlDhcpSrvDynamicFreeNumOfAddr=rlDhcpSrvDynamicFreeNumOfAddr, rlDhcpRelayNextServerEntry=rlDhcpRelayNextServerEntry, rlDhcpSrvIpAddrMechanism=rlDhcpSrvIpAddrMechanism, rlDhcpRelayNextServerIpAddr=rlDhcpRelayNextServerIpAddr, rlDhcpRelayNextServerRowStatus=rlDhcpRelayNextServerRowStatus, rlDhcpSrvDynamicIpAddrFrom=rlDhcpSrvDynamicIpAddrFrom, rlDhcpSrvProbeRetries=rlDhcpSrvProbeRetries, rlDhcpSrvDynamicPoolName=rlDhcpSrvDynamicPoolName, rlDhcpSrvDbNumOfActiveEntries=rlDhcpSrvDbNumOfActiveEntries, rlDhcpSrvIpAddrClnHostName=rlDhcpSrvIpAddrClnHostName, rlDhcpSrvDynamicTable=rlDhcpSrvDynamicTable, rlDhcpSrvConfParamsTable=rlDhcpSrvConfParamsTable, rlDhcpSrvDynamicProbeEnable=rlDhcpSrvDynamicProbeEnable, rlDhcpSrvProbeTimeout=rlDhcpSrvProbeTimeout, rlDhcpSrvDynamicIpNetMask=rlDhcpSrvDynamicIpNetMask, rlDhcpSrvConfParamsNetbiosNodeType=rlDhcpSrvConfParamsNetbiosNodeType, rlDhcpSrvIpAddrIpAddr=rlDhcpSrvIpAddrIpAddr, rlDhcpRelayExists=rlDhcpRelayExists, rlDhcpSrvExists=rlDhcpSrvExists, rlDhcpSrvIpAddrTable=rlDhcpSrvIpAddrTable, rlDhcpSrvConfParamsRowStatus=rlDhcpSrvConfParamsRowStatus, rlDhcpSrvConfParamsNmsIp=rlDhcpSrvConfParamsNmsIp, rlDhcpSrvIpAddrConfParamsName=rlDhcpSrvIpAddrConfParamsName, rlDhcpSrvConfParamsDnsList=rlDhcpSrvConfParamsDnsList, rlDhcpSrvProbeEnable=rlDhcpSrvProbeEnable)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, constraints_intersection, constraints_union, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint') (rnd,) = mibBuilder.importSymbols('RADLAN-MIB', 'rnd') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (ip_address, counter64, object_identity, counter32, gauge32, mib_identifier, unsigned32, module_identity, iso, time_ticks, notification_type, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'Counter64', 'ObjectIdentity', 'Counter32', 'Gauge32', 'MibIdentifier', 'Unsigned32', 'ModuleIdentity', 'iso', 'TimeTicks', 'NotificationType', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits') (display_string, row_status, truth_value, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'RowStatus', 'TruthValue', 'TextualConvention') rs_dhcp = module_identity((1, 3, 6, 1, 4, 1, 89, 38)) rsDHCP.setRevisions(('2003-10-18 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rsDHCP.setRevisionsDescriptions(('Initial version of this MIB.',)) if mibBuilder.loadTexts: rsDHCP.setLastUpdated('200310180000Z') if mibBuilder.loadTexts: rsDHCP.setOrganization('') if mibBuilder.loadTexts: rsDHCP.setContactInfo('') if mibBuilder.loadTexts: rsDHCP.setDescription('The private MIB module definition for DHCP server support.') rs_dhcp_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 89, 38, 14), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rsDhcpMibVersion.setStatus('current') if mibBuilder.loadTexts: rsDhcpMibVersion.setDescription("DHCP MIB's version, the current version is 4.") rl_dhcp_relay_enable = mib_scalar((1, 3, 6, 1, 4, 1, 89, 38, 25), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpRelayEnable.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayEnable.setDescription('Enable or disable the use of the DHCP relay.') rl_dhcp_relay_exists = mib_scalar((1, 3, 6, 1, 4, 1, 89, 38, 26), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlDhcpRelayExists.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayExists.setDescription('This variable shows whether the device can function as a DHCP Relay Agent.') rl_dhcp_relay_next_server_table = mib_table((1, 3, 6, 1, 4, 1, 89, 38, 27)) if mibBuilder.loadTexts: rlDhcpRelayNextServerTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerTable.setDescription('The DHCP Relay Next Servers configuration Table') rl_dhcp_relay_next_server_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 38, 27, 1)).setIndexNames((0, 'RADLAN-DHCP-MIB', 'rlDhcpRelayNextServerIpAddr')) if mibBuilder.loadTexts: rlDhcpRelayNextServerEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerEntry.setDescription('The row definition for this table. DHCP requests are relayed to the specified next server according to their threshold values.') rl_dhcp_relay_next_server_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 27, 1, 1), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlDhcpRelayNextServerIpAddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerIpAddr.setDescription('The IPAddress of the next configuration server. DHCP Server may act as a DHCP relay if this parameter is not equal to 0.0.0.0.') rl_dhcp_relay_next_server_sec_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 27, 1, 2), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpRelayNextServerSecThreshold.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerSecThreshold.setDescription('DHCP requests are relayed only if their SEC field is greater or equal to the threshold value in order to allow local DHCP Servers to answer first.') rl_dhcp_relay_next_server_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 27, 1, 3), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpRelayNextServerRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerRowStatus.setDescription("This variable displays the validity or invalidity of the entry. Setting it to 'destroy' has the effect of rendering it inoperative. The internal effect (row removal) is implementation dependent.") rl_dhcp_srv_enable = mib_scalar((1, 3, 6, 1, 4, 1, 89, 38, 30), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvEnable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvEnable.setDescription('Enable or Disable the use of the DHCP Server.') rl_dhcp_srv_exists = mib_scalar((1, 3, 6, 1, 4, 1, 89, 38, 31), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlDhcpSrvExists.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvExists.setDescription('This variable shows whether the device can function as a DHCP Server.') rl_dhcp_srv_db_location = mib_scalar((1, 3, 6, 1, 4, 1, 89, 38, 32), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('nvram', 1), ('flash', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlDhcpSrvDbLocation.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDbLocation.setDescription('Describes where DHCP Server database is stored.') rl_dhcp_srv_max_num_of_clients = mib_scalar((1, 3, 6, 1, 4, 1, 89, 38, 33), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlDhcpSrvMaxNumOfClients.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvMaxNumOfClients.setDescription('This variable shows maximum number of clients that can be supported by DHCP Server dynamic allocation.') rl_dhcp_srv_db_num_of_active_entries = mib_scalar((1, 3, 6, 1, 4, 1, 89, 38, 34), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlDhcpSrvDbNumOfActiveEntries.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDbNumOfActiveEntries.setDescription('This variable shows number of active entries stored in database.') rl_dhcp_srv_db_erase = mib_scalar((1, 3, 6, 1, 4, 1, 89, 38, 35), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvDbErase.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDbErase.setDescription('The value is always false. Setting this variable to true causes erasing all entries in DHCP database.') rl_dhcp_srv_probe_enable = mib_scalar((1, 3, 6, 1, 4, 1, 89, 38, 36), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvProbeEnable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvProbeEnable.setDescription('Enable or Disable the use of the DHCP probe before allocating an IP address.') rl_dhcp_srv_probe_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 89, 38, 37), unsigned32().subtype(subtypeSpec=value_range_constraint(300, 10000))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvProbeTimeout.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvProbeTimeout.setDescription('Indicates the peiod of time in milliseconds the DHCP probe will wait before issuing a new trial or deciding that no other device on the network has the IP address which DHCP considers allocating.') rl_dhcp_srv_probe_retries = mib_scalar((1, 3, 6, 1, 4, 1, 89, 38, 38), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 10))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvProbeRetries.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvProbeRetries.setDescription('Indicates how many times DHCP will probe before deciding that no other device on the network has the IP address which DHCP considers allocating.') rl_dhcp_srv_ip_addr_table = mib_table((1, 3, 6, 1, 4, 1, 89, 38, 45)) if mibBuilder.loadTexts: rlDhcpSrvIpAddrTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrTable.setDescription('Table of IP Addresses allocated by DHCP Server by static and dynamic allocations.') rl_dhcp_srv_ip_addr_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 38, 45, 1)).setIndexNames((0, 'RADLAN-DHCP-MIB', 'rlDhcpSrvIpAddrIpAddr')) if mibBuilder.loadTexts: rlDhcpSrvIpAddrEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrEntry.setDescription('The row definition for this table. Parameters of DHCP allocated IP Addresses table.') rl_dhcp_srv_ip_addr_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 1), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIpAddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIpAddr.setDescription('The IP address that was allocated by DHCP Server.') rl_dhcp_srv_ip_addr_ip_net_mask = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 2), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIpNetMask.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIpNetMask.setDescription('The subnet mask associated with the IP address of this entry. The value of the mask is an IP address with all the network bits set to 1 and all the hosts bits set to 0.') rl_dhcp_srv_ip_addr_identifier = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIdentifier.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIdentifier.setDescription('Unique Identifier for client. Either physical address or DHCP Client Identifier.') rl_dhcp_srv_ip_addr_identifier_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('physAddr', 1), ('clientId', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIdentifierType.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIdentifierType.setDescription('Identifier Type. Either physical address or DHCP Client Identifier.') rl_dhcp_srv_ip_addr_cln_host_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 5), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvIpAddrClnHostName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrClnHostName.setDescription('Client Host Name. DHCP Server will use it to update DNS Server. Must be unique per client.') rl_dhcp_srv_ip_addr_mechanism = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('manual', 1), ('automatic', 2), ('dynamic', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvIpAddrMechanism.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrMechanism.setDescription('Mechanism of allocation IP Address by DHCP Server. The only value that can be set by user is manual.') rl_dhcp_srv_ip_addr_age_time = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 7), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlDhcpSrvIpAddrAgeTime.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrAgeTime.setDescription('Age time of the IP Address.') rl_dhcp_srv_ip_addr_pool_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvIpAddrPoolName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrPoolName.setDescription('Ip address pool name. A unique name for host pool static allocation, or network pool name in case of dynamic allocation.') rl_dhcp_srv_ip_addr_conf_params_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvIpAddrConfParamsName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrConfParamsName.setDescription('This variable points (serves as key) to appropriate set of parameters in the DHCP Server configuration parameters table.') rl_dhcp_srv_ip_addr_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 45, 1, 10), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvIpAddrRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrRowStatus.setDescription('The row status variable, used according to row installation and removal conventions.') rl_dhcp_srv_dynamic_table = mib_table((1, 3, 6, 1, 4, 1, 89, 38, 46)) if mibBuilder.loadTexts: rlDhcpSrvDynamicTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicTable.setDescription("The DHCP Dynamic Server's configuration Table") rl_dhcp_srv_dynamic_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 38, 46, 1)).setIndexNames((0, 'RADLAN-DHCP-MIB', 'rlDhcpSrvDynamicPoolName')) if mibBuilder.loadTexts: rlDhcpSrvDynamicEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicEntry.setDescription('The row definition for this table. Parameters sent in as a DHCP Reply to DHCP Request with specified indices') rl_dhcp_srv_dynamic_pool_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvDynamicPoolName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicPoolName.setDescription('The name of DHCP dynamic addresses pool.') rl_dhcp_srv_dynamic_ip_addr_from = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 2), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvDynamicIpAddrFrom.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicIpAddrFrom.setDescription('The first IP address allocated in this row.') rl_dhcp_srv_dynamic_ip_addr_to = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 3), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvDynamicIpAddrTo.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicIpAddrTo.setDescription('The last IP address allocated in this row.') rl_dhcp_srv_dynamic_ip_net_mask = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 4), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvDynamicIpNetMask.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicIpNetMask.setDescription('The subnet mask associated with the IP addresses of this entry. The value of the mask is an IP address with all the network bits set to 1 and all the hosts bits set to 0.') rl_dhcp_srv_dynamic_lease_time = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 5), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvDynamicLeaseTime.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicLeaseTime.setDescription('Maximum lease-time in seconds granted to a requesting DHCP client. For automatic allocation use 0xFFFFFFFF. To exclude addresses from allocation mechanism, set this value to 0.') rl_dhcp_srv_dynamic_probe_enable = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 6), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvDynamicProbeEnable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicProbeEnable.setDescription('Enable or Disable the use of the DHCP probe before allocating the address.') rl_dhcp_srv_dynamic_total_num_of_addr = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 7), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlDhcpSrvDynamicTotalNumOfAddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicTotalNumOfAddr.setDescription('Total number of addresses in space.') rl_dhcp_srv_dynamic_free_num_of_addr = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 8), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlDhcpSrvDynamicFreeNumOfAddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicFreeNumOfAddr.setDescription('Free number of addresses in space.') rl_dhcp_srv_dynamic_conf_params_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvDynamicConfParamsName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicConfParamsName.setDescription('This variable points (serves as key) to appropriate set of parameters in the DHCP Server configuration parameters table.') rl_dhcp_srv_dynamic_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 46, 1, 10), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvDynamicRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicRowStatus.setDescription('The row status variable, used according to row installation and removal conventions.') rl_dhcp_srv_conf_params_table = mib_table((1, 3, 6, 1, 4, 1, 89, 38, 47)) if mibBuilder.loadTexts: rlDhcpSrvConfParamsTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsTable.setDescription('The DHCP Configuration Parameters Table') rl_dhcp_srv_conf_params_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 38, 47, 1)).setIndexNames((0, 'RADLAN-DHCP-MIB', 'rlDhcpSrvConfParamsName')) if mibBuilder.loadTexts: rlDhcpSrvConfParamsEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsEntry.setDescription('The row definition for this table. Each entry corresponds to one specific parameters set.') rl_dhcp_srv_conf_params_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsName.setDescription('This value is a unique index for the entry in the rlDhcpSrvConfParamsTable.') rl_dhcp_srv_conf_params_next_server_ip = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 2), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNextServerIp.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNextServerIp.setDescription('The IP of next server for client to use in configuration process.') rl_dhcp_srv_conf_params_next_server_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNextServerName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNextServerName.setDescription('The mame of next server for client to use in configuration process.') rl_dhcp_srv_conf_params_bootfile_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsBootfileName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsBootfileName.setDescription('Name of file for client to request from next server.') rl_dhcp_srv_conf_params_routers_list = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 5), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsRoutersList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsRoutersList.setDescription("The value of option code 3, which defines default routers list. Each IP address is represented in dotted decimal notation format with ';' between them.") rl_dhcp_srv_conf_params_time_srv_list = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 6), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsTimeSrvList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsTimeSrvList.setDescription("The value of option code 4, which defines time servers list. Each IP address is represented in dotted decimal notation format with ';' between them.") rl_dhcp_srv_conf_params_dns_list = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 7), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsDnsList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsDnsList.setDescription("The value of option code 6, which defines the list of DNSs. Each IP address is represented in dotted decimal notation format with ';' between them.") rl_dhcp_srv_conf_params_domain_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 8), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsDomainName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsDomainName.setDescription('The value option code 15, which defines the domain name..') rl_dhcp_srv_conf_params_netbios_name_list = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 9), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNetbiosNameList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNetbiosNameList.setDescription("The value option code 44, which defines the list of NETBios Name Servers. Each IP address is represented in dotted decimal notation format with ';' between them.") rl_dhcp_srv_conf_params_netbios_node_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 4, 8))).clone(namedValues=named_values(('b-node', 1), ('p-node', 2), ('m-node', 4), ('h-node', 8)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNetbiosNodeType.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNetbiosNodeType.setDescription('The value option code 46, which defines the NETBios node type. The option will be added only if rlDhcpSrvConfParamsNetbiosNameList is not empty.') rl_dhcp_srv_conf_params_community = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 11), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsCommunity.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsCommunity.setDescription('The value of site-specific option 128, which defines Community. The option will be added only if rlDhcpSrvConfParamsNmsIp is set.') rl_dhcp_srv_conf_params_nms_ip = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 12), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNmsIp.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNmsIp.setDescription('The value of site-specific option 129, which defines IP of Network Manager.') rl_dhcp_srv_conf_params_options_list = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 13), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsOptionsList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsOptionsList.setDescription("The sequence of option segments. Each option segment is represented by a triplet <code/length/value>. The code defines the code of each supported option. The length defines the length of each supported option. The value defines the value of the supported option. If there is a number of elements in the value field, they are divided by ','. Each element of type IP address in value field is represented in dotted decimal notation format.") rl_dhcp_srv_conf_params_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 89, 38, 47, 1, 14), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlDhcpSrvConfParamsRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsRowStatus.setDescription('The row status variable, used according to row installation and removal conventions.') mibBuilder.exportSymbols('RADLAN-DHCP-MIB', rlDhcpSrvDynamicRowStatus=rlDhcpSrvDynamicRowStatus, rlDhcpRelayEnable=rlDhcpRelayEnable, rlDhcpSrvConfParamsNetbiosNameList=rlDhcpSrvConfParamsNetbiosNameList, rlDhcpSrvDbErase=rlDhcpSrvDbErase, rlDhcpSrvConfParamsOptionsList=rlDhcpSrvConfParamsOptionsList, rlDhcpSrvIpAddrIdentifier=rlDhcpSrvIpAddrIdentifier, rlDhcpSrvConfParamsRoutersList=rlDhcpSrvConfParamsRoutersList, rlDhcpSrvDynamicLeaseTime=rlDhcpSrvDynamicLeaseTime, rlDhcpSrvDynamicTotalNumOfAddr=rlDhcpSrvDynamicTotalNumOfAddr, rlDhcpSrvDynamicIpAddrTo=rlDhcpSrvDynamicIpAddrTo, rlDhcpSrvIpAddrPoolName=rlDhcpSrvIpAddrPoolName, rlDhcpSrvConfParamsDomainName=rlDhcpSrvConfParamsDomainName, rlDhcpSrvIpAddrAgeTime=rlDhcpSrvIpAddrAgeTime, rlDhcpRelayNextServerSecThreshold=rlDhcpRelayNextServerSecThreshold, rlDhcpSrvConfParamsNextServerName=rlDhcpSrvConfParamsNextServerName, rlDhcpSrvDynamicConfParamsName=rlDhcpSrvDynamicConfParamsName, rlDhcpSrvConfParamsBootfileName=rlDhcpSrvConfParamsBootfileName, rlDhcpSrvDbLocation=rlDhcpSrvDbLocation, rlDhcpRelayNextServerTable=rlDhcpRelayNextServerTable, rlDhcpSrvIpAddrEntry=rlDhcpSrvIpAddrEntry, rlDhcpSrvIpAddrIpNetMask=rlDhcpSrvIpAddrIpNetMask, rlDhcpSrvIpAddrIdentifierType=rlDhcpSrvIpAddrIdentifierType, rlDhcpSrvConfParamsCommunity=rlDhcpSrvConfParamsCommunity, rlDhcpSrvDynamicEntry=rlDhcpSrvDynamicEntry, PYSNMP_MODULE_ID=rsDHCP, rsDHCP=rsDHCP, rlDhcpSrvIpAddrRowStatus=rlDhcpSrvIpAddrRowStatus, rlDhcpSrvConfParamsTimeSrvList=rlDhcpSrvConfParamsTimeSrvList, rlDhcpSrvConfParamsName=rlDhcpSrvConfParamsName, rlDhcpSrvConfParamsNextServerIp=rlDhcpSrvConfParamsNextServerIp, rlDhcpSrvMaxNumOfClients=rlDhcpSrvMaxNumOfClients, rlDhcpSrvEnable=rlDhcpSrvEnable, rsDhcpMibVersion=rsDhcpMibVersion, rlDhcpSrvConfParamsEntry=rlDhcpSrvConfParamsEntry, rlDhcpSrvDynamicFreeNumOfAddr=rlDhcpSrvDynamicFreeNumOfAddr, rlDhcpRelayNextServerEntry=rlDhcpRelayNextServerEntry, rlDhcpSrvIpAddrMechanism=rlDhcpSrvIpAddrMechanism, rlDhcpRelayNextServerIpAddr=rlDhcpRelayNextServerIpAddr, rlDhcpRelayNextServerRowStatus=rlDhcpRelayNextServerRowStatus, rlDhcpSrvDynamicIpAddrFrom=rlDhcpSrvDynamicIpAddrFrom, rlDhcpSrvProbeRetries=rlDhcpSrvProbeRetries, rlDhcpSrvDynamicPoolName=rlDhcpSrvDynamicPoolName, rlDhcpSrvDbNumOfActiveEntries=rlDhcpSrvDbNumOfActiveEntries, rlDhcpSrvIpAddrClnHostName=rlDhcpSrvIpAddrClnHostName, rlDhcpSrvDynamicTable=rlDhcpSrvDynamicTable, rlDhcpSrvConfParamsTable=rlDhcpSrvConfParamsTable, rlDhcpSrvDynamicProbeEnable=rlDhcpSrvDynamicProbeEnable, rlDhcpSrvProbeTimeout=rlDhcpSrvProbeTimeout, rlDhcpSrvDynamicIpNetMask=rlDhcpSrvDynamicIpNetMask, rlDhcpSrvConfParamsNetbiosNodeType=rlDhcpSrvConfParamsNetbiosNodeType, rlDhcpSrvIpAddrIpAddr=rlDhcpSrvIpAddrIpAddr, rlDhcpRelayExists=rlDhcpRelayExists, rlDhcpSrvExists=rlDhcpSrvExists, rlDhcpSrvIpAddrTable=rlDhcpSrvIpAddrTable, rlDhcpSrvConfParamsRowStatus=rlDhcpSrvConfParamsRowStatus, rlDhcpSrvConfParamsNmsIp=rlDhcpSrvConfParamsNmsIp, rlDhcpSrvIpAddrConfParamsName=rlDhcpSrvIpAddrConfParamsName, rlDhcpSrvConfParamsDnsList=rlDhcpSrvConfParamsDnsList, rlDhcpSrvProbeEnable=rlDhcpSrvProbeEnable)
def lerp(a, b, amount): return (amount * a) + ((1 - amount) * b) def smoothstep(edge0, edge1, amount): x = clamp((amount - edge0) / (edge1 - edge0), 0.0, 1.0) return x * x * (3 - 2 * x) def smootherstep(edge0, edge1, amount): x = clamp((amount - edge0) / (edge1 - edge0), 0.0, 1.0) return x * x * x * (x * (x * 6 - 15) + 10) def smoothererstep(edge0, edge1, amount): x = clamp(amount, 0.0, 1.0) return x^5 def clamp(x, lower_limit, upper_limit): if (x < lower_limit): x = lower_limit if (x > upper_limit): x = upper_limit return x def manhattan_dist(x0, y0, x1, y1): return abs(x0 - x1) + abs(y0 - y1) def create_hit_box(width, height): w2 = width / 2 h2 = height / 2 return [ [-w2, -h2], [-w2, h2], [w2, h2], [w2, -h2] ]
def lerp(a, b, amount): return amount * a + (1 - amount) * b def smoothstep(edge0, edge1, amount): x = clamp((amount - edge0) / (edge1 - edge0), 0.0, 1.0) return x * x * (3 - 2 * x) def smootherstep(edge0, edge1, amount): x = clamp((amount - edge0) / (edge1 - edge0), 0.0, 1.0) return x * x * x * (x * (x * 6 - 15) + 10) def smoothererstep(edge0, edge1, amount): x = clamp(amount, 0.0, 1.0) return x ^ 5 def clamp(x, lower_limit, upper_limit): if x < lower_limit: x = lower_limit if x > upper_limit: x = upper_limit return x def manhattan_dist(x0, y0, x1, y1): return abs(x0 - x1) + abs(y0 - y1) def create_hit_box(width, height): w2 = width / 2 h2 = height / 2 return [[-w2, -h2], [-w2, h2], [w2, h2], [w2, -h2]]
# Time: O(n); Space: O(n) def next_greater_element(nums1, nums2): stack = [] d = {} i = len(nums2) - 1 while i >= 0: num = nums2[i] if not stack: d[num] = -1 stack.append(num) i -= 1 elif stack[-1] > num: d[num] = stack[-1] stack.append(num) i -= 1 else: stack.pop() ans = [] for num in nums1: ans.append(d[num]) return ans # Better implementation def next_greater_element2(nums1, nums2): d = {} stack = [] for i in range(len(nums2) - 1, -1, -1): num = nums2[i] while stack and stack[-1] <= num: stack.pop() if stack: d[num] = stack[-1] else: d[num] = -1 stack.append(num) return [d[num] for num in nums1] # Test cases: print(next_greater_element(nums1=[4, 1, 2], nums2=[1, 3, 4, 2])) print(next_greater_element(nums1=[2, 4], nums2=[1, 2, 3, 4]))
def next_greater_element(nums1, nums2): stack = [] d = {} i = len(nums2) - 1 while i >= 0: num = nums2[i] if not stack: d[num] = -1 stack.append(num) i -= 1 elif stack[-1] > num: d[num] = stack[-1] stack.append(num) i -= 1 else: stack.pop() ans = [] for num in nums1: ans.append(d[num]) return ans def next_greater_element2(nums1, nums2): d = {} stack = [] for i in range(len(nums2) - 1, -1, -1): num = nums2[i] while stack and stack[-1] <= num: stack.pop() if stack: d[num] = stack[-1] else: d[num] = -1 stack.append(num) return [d[num] for num in nums1] print(next_greater_element(nums1=[4, 1, 2], nums2=[1, 3, 4, 2])) print(next_greater_element(nums1=[2, 4], nums2=[1, 2, 3, 4]))
#!/usr/bin/python # -*- coding: utf-8 -*- DEFAULT_HOST = '127.0.01' DEFAULT_PORT = 3306 DEFAULT_USER_NAME = 'root' DEFAULT_USER_PASS = 'root123' DEFAULT_USER_LIST = 'accounts/user.list' DEFAULT_WORD_LIST = 'accounts/word.list' # text color in console
default_host = '127.0.01' default_port = 3306 default_user_name = 'root' default_user_pass = 'root123' default_user_list = 'accounts/user.list' default_word_list = 'accounts/word.list'
# mock resource classes from peeringdb-py client class Organization: pass class Facility: pass class Network: pass class InternetExchange: pass class InternetExchangeFacility: pass class InternetExchangeLan: pass class InternetExchangeLanPrefix: pass class NetworkFacility: pass class NetworkIXLan: pass class NetworkContact: pass
class Organization: pass class Facility: pass class Network: pass class Internetexchange: pass class Internetexchangefacility: pass class Internetexchangelan: pass class Internetexchangelanprefix: pass class Networkfacility: pass class Networkixlan: pass class Networkcontact: pass
class Player(): def __init__(self, name, start=False, ai_switch=False): self.ai = ai_switch self.values = {0:.5} self.name = name self.turn = start self.epsilon = 1
class Player: def __init__(self, name, start=False, ai_switch=False): self.ai = ai_switch self.values = {0: 0.5} self.name = name self.turn = start self.epsilon = 1
CONFIG_FILE_PATH = 'TypeRacerStats/src/config.json' ACCOUNTS_FILE_PATH = 'TypeRacerStats/src/accounts.json' ALIASES_FILE_PATH = 'TypeRacerStats/src/commands.json' PREFIXES_FILE_PATH = 'TypeRacerStats/src/prefixes.json' SUPPORTERS_FILE_PATH = 'TypeRacerStats/src/supporter_colors.json' UNIVERSES_FILE_PATH = 'TypeRacerStats/src/universes.txt' ART_JSON = 'TypeRacerStats/src/art.json' CLIPS_JSON = 'TypeRacerStats/src/clips.json' DATABASE_PATH = 'TypeRacerStats/src/data/typeracer.db' TEMPORARY_DATABASE_PATH = 'TypeRacerStats/src/data/temp.db' TEXTS_FILE_PATH = 'TypeRacerStats/src/data/texts' TOPTENS_JSON_FILE_PATH = 'TypeRacerStats/src/data/texts/top_ten.json' TOPTENS_FILE_PATH = 'TypeRacerStats/src/data/texts/player_top_tens.json' TEXTS_FILE_PATH_CSV = 'TypeRacerStats/src/data/texts/texts.csv' MAINTAIN_PLAYERS_TXT = 'TypeRacerStats/src/data/maintain_players.txt' CSS_COLORS = 'TypeRacerStats/src/css_colors.json' CMAPS = 'TypeRacerStats/src/cmaps.json' TYPERACER_RECORDS_JSON = 'TypeRacerStats/src/data/typeracer_records.json' COUNTRY_CODES = 'TypeRacerStats/src/country_codes.json' TEXTS_LENGTHS = 'TypeRacerStats/src/data/texts/texts.json' TEXTS_LARGE = 'TypeRacerStats/src/data/texts/texts_large.json' CHANGELOG = 'TypeRacerStats/src/changelog.json' KEYMAPS_SVG = 'TypeRacerStats/src/keymap_svg.txt' BLANK_KEYMAP = 'TypeRacerStats/src/keymap_template.json'
config_file_path = 'TypeRacerStats/src/config.json' accounts_file_path = 'TypeRacerStats/src/accounts.json' aliases_file_path = 'TypeRacerStats/src/commands.json' prefixes_file_path = 'TypeRacerStats/src/prefixes.json' supporters_file_path = 'TypeRacerStats/src/supporter_colors.json' universes_file_path = 'TypeRacerStats/src/universes.txt' art_json = 'TypeRacerStats/src/art.json' clips_json = 'TypeRacerStats/src/clips.json' database_path = 'TypeRacerStats/src/data/typeracer.db' temporary_database_path = 'TypeRacerStats/src/data/temp.db' texts_file_path = 'TypeRacerStats/src/data/texts' toptens_json_file_path = 'TypeRacerStats/src/data/texts/top_ten.json' toptens_file_path = 'TypeRacerStats/src/data/texts/player_top_tens.json' texts_file_path_csv = 'TypeRacerStats/src/data/texts/texts.csv' maintain_players_txt = 'TypeRacerStats/src/data/maintain_players.txt' css_colors = 'TypeRacerStats/src/css_colors.json' cmaps = 'TypeRacerStats/src/cmaps.json' typeracer_records_json = 'TypeRacerStats/src/data/typeracer_records.json' country_codes = 'TypeRacerStats/src/country_codes.json' texts_lengths = 'TypeRacerStats/src/data/texts/texts.json' texts_large = 'TypeRacerStats/src/data/texts/texts_large.json' changelog = 'TypeRacerStats/src/changelog.json' keymaps_svg = 'TypeRacerStats/src/keymap_svg.txt' blank_keymap = 'TypeRacerStats/src/keymap_template.json'
# # PySNMP MIB module HP-ICF-VRRP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-ICF-VRRP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:23:26 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, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection") hpSwitch, = mibBuilder.importSymbols("HP-ICF-OID", "hpSwitch") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") ModuleIdentity, iso, Integer32, NotificationType, Counter64, Counter32, TimeTicks, Gauge32, Unsigned32, ObjectIdentity, Bits, IpAddress, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "iso", "Integer32", "NotificationType", "Counter64", "Counter32", "TimeTicks", "Gauge32", "Unsigned32", "ObjectIdentity", "Bits", "IpAddress", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") TruthValue, RowStatus, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "RowStatus", "TextualConvention", "DisplayString") vrrpOperVrId, vrrpAssoIpAddrEntry, vrrpOperEntry = mibBuilder.importSymbols("VRRP-MIB", "vrrpOperVrId", "vrrpAssoIpAddrEntry", "vrrpOperEntry") hpicfVrrpMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31)) hpicfVrrpMIB.setRevisions(('2012-11-15 00:00', '2013-06-12 00:00', '2012-02-22 00:00', '2010-10-20 00:00', '2010-07-28 00:00', '2009-05-19 00:00', '2008-02-20 00:00', '2007-12-12 00:00', '2007-08-22 00:00', '2005-07-14 00:00',)) if mibBuilder.loadTexts: hpicfVrrpMIB.setLastUpdated('201211150000Z') if mibBuilder.loadTexts: hpicfVrrpMIB.setOrganization('HP Networking') hpicfVrrpOperations = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1)) hpicfVrrpConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2)) hpicfVrrpAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 1), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfVrrpAdminStatus.setStatus('deprecated') hpicfVrrpOperTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2), ) if mibBuilder.loadTexts: hpicfVrrpOperTable.setStatus('current') hpicfVrrpOperEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1), ) vrrpOperEntry.registerAugmentions(("HP-ICF-VRRP-MIB", "hpicfVrrpOperEntry")) hpicfVrrpOperEntry.setIndexNames(*vrrpOperEntry.getIndexNames()) if mibBuilder.loadTexts: hpicfVrrpOperEntry.setStatus('current') hpicfVrrpVrMode = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("owner", 1), ("backup", 2), ("uninitialized", 3))).clone('uninitialized')).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpicfVrrpVrMode.setStatus('current') hpicfVrrpVrMasterPreempt = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1, 2), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpicfVrrpVrMasterPreempt.setStatus('current') hpicfVrrpVrTransferControl = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1, 3), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpicfVrrpVrTransferControl.setStatus('current') hpicfVrrpVrPreemptDelayTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 600))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpicfVrrpVrPreemptDelayTime.setStatus('current') hpicfVrrpVrControl = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("failback", 1), ("failover", 2), ("failoverWithMonitoring", 3), ("invalid", 4))).clone('invalid')).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpicfVrrpVrControl.setStatus('current') hpicfVrrpVrRespondToPing = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1, 6), TruthValue().clone('true')).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpicfVrrpVrRespondToPing.setStatus('current') hpicfVrrpAssoIpAddrTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 3), ) if mibBuilder.loadTexts: hpicfVrrpAssoIpAddrTable.setStatus('current') hpicfVrrpAssoIpAddrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 3, 1), ) vrrpAssoIpAddrEntry.registerAugmentions(("HP-ICF-VRRP-MIB", "hpicfVrrpAssoIpAddrEntry")) hpicfVrrpAssoIpAddrEntry.setIndexNames(*vrrpAssoIpAddrEntry.getIndexNames()) if mibBuilder.loadTexts: hpicfVrrpAssoIpAddrEntry.setStatus('current') hpicfVrrpAssoIpMask = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 3, 1, 1), IpAddress().clone(hexValue="00000000")).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpicfVrrpAssoIpMask.setStatus('current') hpicfVrrpTrackTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 5), ) if mibBuilder.loadTexts: hpicfVrrpTrackTable.setStatus('current') hpicfVrrpTrackEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 5, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "VRRP-MIB", "vrrpOperVrId"), (0, "HP-ICF-VRRP-MIB", "hpicfVrrpVrTrackType"), (0, "HP-ICF-VRRP-MIB", "hpicfVrrpVrTrackEntity")) if mibBuilder.loadTexts: hpicfVrrpTrackEntry.setStatus('current') hpicfVrrpVrTrackType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("port", 1), ("trunk", 2), ("vlan", 3)))) if mibBuilder.loadTexts: hpicfVrrpVrTrackType.setStatus('current') hpicfVrrpVrTrackEntity = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 5, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))) if mibBuilder.loadTexts: hpicfVrrpVrTrackEntity.setStatus('current') hpicfVrrpTrackRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 5, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpicfVrrpTrackRowStatus.setStatus('current') hpicfVrrpTrackState = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("down", 0), ("up", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfVrrpTrackState.setStatus('current') hpicfVrrpStatsTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 6), ) if mibBuilder.loadTexts: hpicfVrrpStatsTable.setStatus('current') hpicfVrrpRespondToPing = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 7), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfVrrpRespondToPing.setStatus('deprecated') hpicfVrrpRemoveConfig = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 8), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfVrrpRemoveConfig.setStatus('deprecated') hpicfVrrpNonstop = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 9), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfVrrpNonstop.setStatus('deprecated') hpicfVrrpStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 6, 1), ) vrrpOperEntry.registerAugmentions(("HP-ICF-VRRP-MIB", "hpicfVrrpStatsEntry")) hpicfVrrpStatsEntry.setIndexNames(*vrrpOperEntry.getIndexNames()) if mibBuilder.loadTexts: hpicfVrrpStatsEntry.setStatus('current') hpicfVrrpStatsNearFailovers = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 6, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfVrrpStatsNearFailovers.setStatus('current') hpicfVrrpMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1)) hpicfVrrpMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2)) hpicfVrrpMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 1)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpOperGroup"), ("HP-ICF-VRRP-MIB", "hpicfVrrpOperGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpMIBCompliance = hpicfVrrpMIBCompliance.setStatus('deprecated') hpicfVrrpMIBCompliance1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 2)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpOperGroup"), ("HP-ICF-VRRP-MIB", "hpicfVrrpTrackGroup"), ("HP-ICF-VRRP-MIB", "hpicfVrrpOperGroup"), ("HP-ICF-VRRP-MIB", "hpicfVrrpTrackGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpMIBCompliance1 = hpicfVrrpMIBCompliance1.setStatus('deprecated') hpicfVrrpMIBCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 3)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpVrPingGroup"), ("HP-ICF-VRRP-MIB", "hpicfVrrpVrPingGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpMIBCompliance2 = hpicfVrrpMIBCompliance2.setStatus('current') hpicfVrrpMIBCompliance3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 4)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpNonstopGroup"), ("HP-ICF-VRRP-MIB", "hpicfVrrpNonstopGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpMIBCompliance3 = hpicfVrrpMIBCompliance3.setStatus('deprecated') hpicfVrrpMIBCompliance4 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 5)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpOperationsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpMIBCompliance4 = hpicfVrrpMIBCompliance4.setStatus('deprecated') hpicfVrrpMIBCompliance5 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 6)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpOperGroup"), ("HP-ICF-VRRP-MIB", "hpicfVrrpTrackGroup1"), ("HP-ICF-VRRP-MIB", "hpicfVrrpOperGroup"), ("HP-ICF-VRRP-MIB", "hpicfVrrpTrackGroup1")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpMIBCompliance5 = hpicfVrrpMIBCompliance5.setStatus('deprecated') hpicfVrrpMIBCompliance6 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 7)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpOperGroup1"), ("HP-ICF-VRRP-MIB", "hpicfVrrpTrackGroup1"), ("HP-ICF-VRRP-MIB", "hpicfVrrpOperGroup1"), ("HP-ICF-VRRP-MIB", "hpicfVrrpTrackGroup1")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpMIBCompliance6 = hpicfVrrpMIBCompliance6.setStatus('current') hpicfVrrpMIBCompliance7 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 8)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpOperationsGroup1")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpMIBCompliance7 = hpicfVrrpMIBCompliance7.setStatus('current') hpicfVrrpOperGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 1)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpAdminStatus"), ("HP-ICF-VRRP-MIB", "hpicfVrrpVrMode"), ("HP-ICF-VRRP-MIB", "hpicfVrrpVrMasterPreempt"), ("HP-ICF-VRRP-MIB", "hpicfVrrpVrTransferControl"), ("HP-ICF-VRRP-MIB", "hpicfVrrpVrPreemptDelayTime"), ("HP-ICF-VRRP-MIB", "hpicfVrrpAssoIpMask")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpOperGroup = hpicfVrrpOperGroup.setStatus('deprecated') hpicfVrrpTrackGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 2)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpTrackRowStatus"), ("HP-ICF-VRRP-MIB", "hpicfVrrpVrControl")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpTrackGroup = hpicfVrrpTrackGroup.setStatus('deprecated') hpicfVrrpVrPingGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 3)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpVrRespondToPing")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpVrPingGroup = hpicfVrrpVrPingGroup.setStatus('current') hpicfVrrpNonstopGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 4)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpNonstop")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpNonstopGroup = hpicfVrrpNonstopGroup.setStatus('deprecated') hpicfVrrpOperationsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 5)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpRespondToPing"), ("HP-ICF-VRRP-MIB", "hpicfVrrpRemoveConfig"), ("HP-ICF-VRRP-MIB", "hpicfVrrpStatsNearFailovers")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpOperationsGroup = hpicfVrrpOperationsGroup.setStatus('deprecated') hpicfVrrpTrackGroup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 6)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpTrackRowStatus"), ("HP-ICF-VRRP-MIB", "hpicfVrrpVrControl"), ("HP-ICF-VRRP-MIB", "hpicfVrrpTrackState")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpTrackGroup1 = hpicfVrrpTrackGroup1.setStatus('current') hpicfVrrpOperGroup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 7)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpVrMode"), ("HP-ICF-VRRP-MIB", "hpicfVrrpVrMasterPreempt"), ("HP-ICF-VRRP-MIB", "hpicfVrrpVrTransferControl"), ("HP-ICF-VRRP-MIB", "hpicfVrrpVrPreemptDelayTime"), ("HP-ICF-VRRP-MIB", "hpicfVrrpAssoIpMask")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpOperGroup1 = hpicfVrrpOperGroup1.setStatus('current') hpicfVrrpOperationsGroup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 8)).setObjects(("HP-ICF-VRRP-MIB", "hpicfVrrpStatsNearFailovers")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfVrrpOperationsGroup1 = hpicfVrrpOperationsGroup1.setStatus('current') mibBuilder.exportSymbols("HP-ICF-VRRP-MIB", hpicfVrrpVrControl=hpicfVrrpVrControl, hpicfVrrpTrackEntry=hpicfVrrpTrackEntry, hpicfVrrpVrPreemptDelayTime=hpicfVrrpVrPreemptDelayTime, hpicfVrrpTrackTable=hpicfVrrpTrackTable, hpicfVrrpVrTrackEntity=hpicfVrrpVrTrackEntity, hpicfVrrpVrTrackType=hpicfVrrpVrTrackType, hpicfVrrpAssoIpAddrTable=hpicfVrrpAssoIpAddrTable, hpicfVrrpAdminStatus=hpicfVrrpAdminStatus, hpicfVrrpAssoIpAddrEntry=hpicfVrrpAssoIpAddrEntry, hpicfVrrpVrRespondToPing=hpicfVrrpVrRespondToPing, hpicfVrrpStatsEntry=hpicfVrrpStatsEntry, hpicfVrrpRemoveConfig=hpicfVrrpRemoveConfig, hpicfVrrpOperEntry=hpicfVrrpOperEntry, hpicfVrrpOperations=hpicfVrrpOperations, hpicfVrrpMIBCompliance=hpicfVrrpMIBCompliance, hpicfVrrpTrackGroup=hpicfVrrpTrackGroup, hpicfVrrpNonstop=hpicfVrrpNonstop, PYSNMP_MODULE_ID=hpicfVrrpMIB, hpicfVrrpMIBCompliance1=hpicfVrrpMIBCompliance1, hpicfVrrpVrMasterPreempt=hpicfVrrpVrMasterPreempt, hpicfVrrpMIBCompliance5=hpicfVrrpMIBCompliance5, hpicfVrrpNonstopGroup=hpicfVrrpNonstopGroup, hpicfVrrpMIBCompliance3=hpicfVrrpMIBCompliance3, hpicfVrrpTrackGroup1=hpicfVrrpTrackGroup1, hpicfVrrpVrPingGroup=hpicfVrrpVrPingGroup, hpicfVrrpVrMode=hpicfVrrpVrMode, hpicfVrrpOperationsGroup=hpicfVrrpOperationsGroup, hpicfVrrpTrackRowStatus=hpicfVrrpTrackRowStatus, hpicfVrrpConformance=hpicfVrrpConformance, hpicfVrrpMIB=hpicfVrrpMIB, hpicfVrrpMIBCompliance6=hpicfVrrpMIBCompliance6, hpicfVrrpOperGroup1=hpicfVrrpOperGroup1, hpicfVrrpVrTransferControl=hpicfVrrpVrTransferControl, hpicfVrrpMIBCompliances=hpicfVrrpMIBCompliances, hpicfVrrpRespondToPing=hpicfVrrpRespondToPing, hpicfVrrpAssoIpMask=hpicfVrrpAssoIpMask, hpicfVrrpMIBCompliance7=hpicfVrrpMIBCompliance7, hpicfVrrpOperationsGroup1=hpicfVrrpOperationsGroup1, hpicfVrrpStatsNearFailovers=hpicfVrrpStatsNearFailovers, hpicfVrrpStatsTable=hpicfVrrpStatsTable, hpicfVrrpOperGroup=hpicfVrrpOperGroup, hpicfVrrpMIBCompliance4=hpicfVrrpMIBCompliance4, hpicfVrrpMIBGroups=hpicfVrrpMIBGroups, hpicfVrrpMIBCompliance2=hpicfVrrpMIBCompliance2, hpicfVrrpOperTable=hpicfVrrpOperTable, hpicfVrrpTrackState=hpicfVrrpTrackState)
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, value_size_constraint, constraints_union, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ConstraintsIntersection') (hp_switch,) = mibBuilder.importSymbols('HP-ICF-OID', 'hpSwitch') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup') (module_identity, iso, integer32, notification_type, counter64, counter32, time_ticks, gauge32, unsigned32, object_identity, bits, ip_address, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'iso', 'Integer32', 'NotificationType', 'Counter64', 'Counter32', 'TimeTicks', 'Gauge32', 'Unsigned32', 'ObjectIdentity', 'Bits', 'IpAddress', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn') (truth_value, row_status, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'RowStatus', 'TextualConvention', 'DisplayString') (vrrp_oper_vr_id, vrrp_asso_ip_addr_entry, vrrp_oper_entry) = mibBuilder.importSymbols('VRRP-MIB', 'vrrpOperVrId', 'vrrpAssoIpAddrEntry', 'vrrpOperEntry') hpicf_vrrp_mib = module_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31)) hpicfVrrpMIB.setRevisions(('2012-11-15 00:00', '2013-06-12 00:00', '2012-02-22 00:00', '2010-10-20 00:00', '2010-07-28 00:00', '2009-05-19 00:00', '2008-02-20 00:00', '2007-12-12 00:00', '2007-08-22 00:00', '2005-07-14 00:00')) if mibBuilder.loadTexts: hpicfVrrpMIB.setLastUpdated('201211150000Z') if mibBuilder.loadTexts: hpicfVrrpMIB.setOrganization('HP Networking') hpicf_vrrp_operations = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1)) hpicf_vrrp_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2)) hpicf_vrrp_admin_status = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 1), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfVrrpAdminStatus.setStatus('deprecated') hpicf_vrrp_oper_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2)) if mibBuilder.loadTexts: hpicfVrrpOperTable.setStatus('current') hpicf_vrrp_oper_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1)) vrrpOperEntry.registerAugmentions(('HP-ICF-VRRP-MIB', 'hpicfVrrpOperEntry')) hpicfVrrpOperEntry.setIndexNames(*vrrpOperEntry.getIndexNames()) if mibBuilder.loadTexts: hpicfVrrpOperEntry.setStatus('current') hpicf_vrrp_vr_mode = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('owner', 1), ('backup', 2), ('uninitialized', 3))).clone('uninitialized')).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpicfVrrpVrMode.setStatus('current') hpicf_vrrp_vr_master_preempt = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1, 2), truth_value().clone('false')).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpicfVrrpVrMasterPreempt.setStatus('current') hpicf_vrrp_vr_transfer_control = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1, 3), truth_value().clone('false')).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpicfVrrpVrTransferControl.setStatus('current') hpicf_vrrp_vr_preempt_delay_time = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 600))).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpicfVrrpVrPreemptDelayTime.setStatus('current') hpicf_vrrp_vr_control = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('failback', 1), ('failover', 2), ('failoverWithMonitoring', 3), ('invalid', 4))).clone('invalid')).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpicfVrrpVrControl.setStatus('current') hpicf_vrrp_vr_respond_to_ping = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 2, 1, 6), truth_value().clone('true')).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpicfVrrpVrRespondToPing.setStatus('current') hpicf_vrrp_asso_ip_addr_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 3)) if mibBuilder.loadTexts: hpicfVrrpAssoIpAddrTable.setStatus('current') hpicf_vrrp_asso_ip_addr_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 3, 1)) vrrpAssoIpAddrEntry.registerAugmentions(('HP-ICF-VRRP-MIB', 'hpicfVrrpAssoIpAddrEntry')) hpicfVrrpAssoIpAddrEntry.setIndexNames(*vrrpAssoIpAddrEntry.getIndexNames()) if mibBuilder.loadTexts: hpicfVrrpAssoIpAddrEntry.setStatus('current') hpicf_vrrp_asso_ip_mask = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 3, 1, 1), ip_address().clone(hexValue='00000000')).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpicfVrrpAssoIpMask.setStatus('current') hpicf_vrrp_track_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 5)) if mibBuilder.loadTexts: hpicfVrrpTrackTable.setStatus('current') hpicf_vrrp_track_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 5, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'VRRP-MIB', 'vrrpOperVrId'), (0, 'HP-ICF-VRRP-MIB', 'hpicfVrrpVrTrackType'), (0, 'HP-ICF-VRRP-MIB', 'hpicfVrrpVrTrackEntity')) if mibBuilder.loadTexts: hpicfVrrpTrackEntry.setStatus('current') hpicf_vrrp_vr_track_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 5, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('port', 1), ('trunk', 2), ('vlan', 3)))) if mibBuilder.loadTexts: hpicfVrrpVrTrackType.setStatus('current') hpicf_vrrp_vr_track_entity = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 5, 1, 2), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 255))) if mibBuilder.loadTexts: hpicfVrrpVrTrackEntity.setStatus('current') hpicf_vrrp_track_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 5, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpicfVrrpTrackRowStatus.setStatus('current') hpicf_vrrp_track_state = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 5, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('down', 0), ('up', 1)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfVrrpTrackState.setStatus('current') hpicf_vrrp_stats_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 6)) if mibBuilder.loadTexts: hpicfVrrpStatsTable.setStatus('current') hpicf_vrrp_respond_to_ping = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 7), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfVrrpRespondToPing.setStatus('deprecated') hpicf_vrrp_remove_config = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 8), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfVrrpRemoveConfig.setStatus('deprecated') hpicf_vrrp_nonstop = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 9), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfVrrpNonstop.setStatus('deprecated') hpicf_vrrp_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 6, 1)) vrrpOperEntry.registerAugmentions(('HP-ICF-VRRP-MIB', 'hpicfVrrpStatsEntry')) hpicfVrrpStatsEntry.setIndexNames(*vrrpOperEntry.getIndexNames()) if mibBuilder.loadTexts: hpicfVrrpStatsEntry.setStatus('current') hpicf_vrrp_stats_near_failovers = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 1, 6, 1, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfVrrpStatsNearFailovers.setStatus('current') hpicf_vrrp_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1)) hpicf_vrrp_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2)) hpicf_vrrp_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 1)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpOperGroup'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpOperGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_mib_compliance = hpicfVrrpMIBCompliance.setStatus('deprecated') hpicf_vrrp_mib_compliance1 = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 2)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpOperGroup'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpTrackGroup'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpOperGroup'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpTrackGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_mib_compliance1 = hpicfVrrpMIBCompliance1.setStatus('deprecated') hpicf_vrrp_mib_compliance2 = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 3)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpVrPingGroup'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpVrPingGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_mib_compliance2 = hpicfVrrpMIBCompliance2.setStatus('current') hpicf_vrrp_mib_compliance3 = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 4)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpNonstopGroup'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpNonstopGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_mib_compliance3 = hpicfVrrpMIBCompliance3.setStatus('deprecated') hpicf_vrrp_mib_compliance4 = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 5)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpOperationsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_mib_compliance4 = hpicfVrrpMIBCompliance4.setStatus('deprecated') hpicf_vrrp_mib_compliance5 = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 6)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpOperGroup'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpTrackGroup1'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpOperGroup'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpTrackGroup1')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_mib_compliance5 = hpicfVrrpMIBCompliance5.setStatus('deprecated') hpicf_vrrp_mib_compliance6 = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 7)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpOperGroup1'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpTrackGroup1'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpOperGroup1'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpTrackGroup1')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_mib_compliance6 = hpicfVrrpMIBCompliance6.setStatus('current') hpicf_vrrp_mib_compliance7 = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 1, 8)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpOperationsGroup1')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_mib_compliance7 = hpicfVrrpMIBCompliance7.setStatus('current') hpicf_vrrp_oper_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 1)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpAdminStatus'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpVrMode'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpVrMasterPreempt'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpVrTransferControl'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpVrPreemptDelayTime'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpAssoIpMask')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_oper_group = hpicfVrrpOperGroup.setStatus('deprecated') hpicf_vrrp_track_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 2)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpTrackRowStatus'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpVrControl')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_track_group = hpicfVrrpTrackGroup.setStatus('deprecated') hpicf_vrrp_vr_ping_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 3)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpVrRespondToPing')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_vr_ping_group = hpicfVrrpVrPingGroup.setStatus('current') hpicf_vrrp_nonstop_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 4)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpNonstop')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_nonstop_group = hpicfVrrpNonstopGroup.setStatus('deprecated') hpicf_vrrp_operations_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 5)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpRespondToPing'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpRemoveConfig'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpStatsNearFailovers')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_operations_group = hpicfVrrpOperationsGroup.setStatus('deprecated') hpicf_vrrp_track_group1 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 6)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpTrackRowStatus'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpVrControl'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpTrackState')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_track_group1 = hpicfVrrpTrackGroup1.setStatus('current') hpicf_vrrp_oper_group1 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 7)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpVrMode'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpVrMasterPreempt'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpVrTransferControl'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpVrPreemptDelayTime'), ('HP-ICF-VRRP-MIB', 'hpicfVrrpAssoIpMask')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_oper_group1 = hpicfVrrpOperGroup1.setStatus('current') hpicf_vrrp_operations_group1 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 31, 2, 2, 8)).setObjects(('HP-ICF-VRRP-MIB', 'hpicfVrrpStatsNearFailovers')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_vrrp_operations_group1 = hpicfVrrpOperationsGroup1.setStatus('current') mibBuilder.exportSymbols('HP-ICF-VRRP-MIB', hpicfVrrpVrControl=hpicfVrrpVrControl, hpicfVrrpTrackEntry=hpicfVrrpTrackEntry, hpicfVrrpVrPreemptDelayTime=hpicfVrrpVrPreemptDelayTime, hpicfVrrpTrackTable=hpicfVrrpTrackTable, hpicfVrrpVrTrackEntity=hpicfVrrpVrTrackEntity, hpicfVrrpVrTrackType=hpicfVrrpVrTrackType, hpicfVrrpAssoIpAddrTable=hpicfVrrpAssoIpAddrTable, hpicfVrrpAdminStatus=hpicfVrrpAdminStatus, hpicfVrrpAssoIpAddrEntry=hpicfVrrpAssoIpAddrEntry, hpicfVrrpVrRespondToPing=hpicfVrrpVrRespondToPing, hpicfVrrpStatsEntry=hpicfVrrpStatsEntry, hpicfVrrpRemoveConfig=hpicfVrrpRemoveConfig, hpicfVrrpOperEntry=hpicfVrrpOperEntry, hpicfVrrpOperations=hpicfVrrpOperations, hpicfVrrpMIBCompliance=hpicfVrrpMIBCompliance, hpicfVrrpTrackGroup=hpicfVrrpTrackGroup, hpicfVrrpNonstop=hpicfVrrpNonstop, PYSNMP_MODULE_ID=hpicfVrrpMIB, hpicfVrrpMIBCompliance1=hpicfVrrpMIBCompliance1, hpicfVrrpVrMasterPreempt=hpicfVrrpVrMasterPreempt, hpicfVrrpMIBCompliance5=hpicfVrrpMIBCompliance5, hpicfVrrpNonstopGroup=hpicfVrrpNonstopGroup, hpicfVrrpMIBCompliance3=hpicfVrrpMIBCompliance3, hpicfVrrpTrackGroup1=hpicfVrrpTrackGroup1, hpicfVrrpVrPingGroup=hpicfVrrpVrPingGroup, hpicfVrrpVrMode=hpicfVrrpVrMode, hpicfVrrpOperationsGroup=hpicfVrrpOperationsGroup, hpicfVrrpTrackRowStatus=hpicfVrrpTrackRowStatus, hpicfVrrpConformance=hpicfVrrpConformance, hpicfVrrpMIB=hpicfVrrpMIB, hpicfVrrpMIBCompliance6=hpicfVrrpMIBCompliance6, hpicfVrrpOperGroup1=hpicfVrrpOperGroup1, hpicfVrrpVrTransferControl=hpicfVrrpVrTransferControl, hpicfVrrpMIBCompliances=hpicfVrrpMIBCompliances, hpicfVrrpRespondToPing=hpicfVrrpRespondToPing, hpicfVrrpAssoIpMask=hpicfVrrpAssoIpMask, hpicfVrrpMIBCompliance7=hpicfVrrpMIBCompliance7, hpicfVrrpOperationsGroup1=hpicfVrrpOperationsGroup1, hpicfVrrpStatsNearFailovers=hpicfVrrpStatsNearFailovers, hpicfVrrpStatsTable=hpicfVrrpStatsTable, hpicfVrrpOperGroup=hpicfVrrpOperGroup, hpicfVrrpMIBCompliance4=hpicfVrrpMIBCompliance4, hpicfVrrpMIBGroups=hpicfVrrpMIBGroups, hpicfVrrpMIBCompliance2=hpicfVrrpMIBCompliance2, hpicfVrrpOperTable=hpicfVrrpOperTable, hpicfVrrpTrackState=hpicfVrrpTrackState)
def pytest_addoption(parser): parser.addoption('--integration_tests', action='store_true', dest="integration_tests", default=False, help="enable integration tests") def pytest_configure(config): if not config.option.integration_tests: setattr(config.option, 'markexpr', 'not integration_tests')
def pytest_addoption(parser): parser.addoption('--integration_tests', action='store_true', dest='integration_tests', default=False, help='enable integration tests') def pytest_configure(config): if not config.option.integration_tests: setattr(config.option, 'markexpr', 'not integration_tests')
class CountdownCancelAll: def __init__(self): self.symbol = "" self.countdownTime = 0 @staticmethod def json_parse(json_data): result = CountdownCancelAll() result.symbol = json_data.get_string("symbol") result.countdownTime = json_data.get_int("countdownTime") return result
class Countdowncancelall: def __init__(self): self.symbol = '' self.countdownTime = 0 @staticmethod def json_parse(json_data): result = countdown_cancel_all() result.symbol = json_data.get_string('symbol') result.countdownTime = json_data.get_int('countdownTime') return result
def fn1(a,b): print("Subtraction=",a-b) def fn2(c): print(c)
def fn1(a, b): print('Subtraction=', a - b) def fn2(c): print(c)
#taking values through keyboard a,b=[int(i) for i in input('enter two numbers:').split(',')] if(a>b): print(a,'is big') elif(a<b): print(b,'is big') else: print('both are equal') #taking values directly a=5 b=3 if(a>b): print(a,'is big') elif(b>a): print(b,'is big') else: print('both are equal')
(a, b) = [int(i) for i in input('enter two numbers:').split(',')] if a > b: print(a, 'is big') elif a < b: print(b, 'is big') else: print('both are equal') a = 5 b = 3 if a > b: print(a, 'is big') elif b > a: print(b, 'is big') else: print('both are equal')
def flatten(lst): if lst: car,*cdr=lst if isinstance(car,(list,tuple)): if cdr: return flatten(car) + flatten(cdr) return flatten(car) if cdr: return [car] + flatten(cdr) return [car]
def flatten(lst): if lst: (car, *cdr) = lst if isinstance(car, (list, tuple)): if cdr: return flatten(car) + flatten(cdr) return flatten(car) if cdr: return [car] + flatten(cdr) return [car]
class Solution: def threeSum(self, nums: List[int]) -> List[List[int]]: res = [] nums.sort() n = len(nums) for i in range(n-2): if i > 0 and nums[i] == nums[i-1]: continue j, k = i + 1, n - 1 while j < k: _sum = nums[i] + nums[j] + nums[k] if _sum == 0: res.append([nums[i], nums[j], nums[k]]) j += 1 k -= 1 while j < k and nums[j] == nums[j-1]: j += 1 while j < k and nums[k] == nums[k+1]: k -= 1 elif _sum < 0: j += 1 else: k -= 1 return res
class Solution: def three_sum(self, nums: List[int]) -> List[List[int]]: res = [] nums.sort() n = len(nums) for i in range(n - 2): if i > 0 and nums[i] == nums[i - 1]: continue (j, k) = (i + 1, n - 1) while j < k: _sum = nums[i] + nums[j] + nums[k] if _sum == 0: res.append([nums[i], nums[j], nums[k]]) j += 1 k -= 1 while j < k and nums[j] == nums[j - 1]: j += 1 while j < k and nums[k] == nums[k + 1]: k -= 1 elif _sum < 0: j += 1 else: k -= 1 return res
def min_rooms_required(intervals): '''Returns the minimum amount of rooms necessary. Input consists of a list of time-intervals (start, stop): >>> min_rooms_required([(10, 20), (15, 25)]) 2 >>> min_rooms_required([(10, 20), (20, 30)]) 1 ''' # transform intervals # [(10, 20), (15, 25)] # to # [(10, 1), (15, 1), (20, -1), (25, -1)] times = [] for interval in intervals: start, stop = interval assert start < stop times.append((start, 1)) times.append((stop, -1)) times.sort() rooms_required = 0 current_rooms_taken = 0 for _, status in times: current_rooms_taken += status rooms_required = max(current_rooms_taken, rooms_required) return rooms_required
def min_rooms_required(intervals): """Returns the minimum amount of rooms necessary. Input consists of a list of time-intervals (start, stop): >>> min_rooms_required([(10, 20), (15, 25)]) 2 >>> min_rooms_required([(10, 20), (20, 30)]) 1 """ times = [] for interval in intervals: (start, stop) = interval assert start < stop times.append((start, 1)) times.append((stop, -1)) times.sort() rooms_required = 0 current_rooms_taken = 0 for (_, status) in times: current_rooms_taken += status rooms_required = max(current_rooms_taken, rooms_required) return rooms_required
class Solution: def removeCoveredIntervals(self, intervals: List[List[int]]) -> int: intervals.sort(reverse=True,key=lambda x:(x[1],-x[0])) # print(intervals) slen = len(intervals) count = slen for i in range(slen-1): # print(intervals[i],intervals[i+1]) if intervals[i][0]<=intervals[i+1][0] and intervals[i][1]>=intervals[i+1][1]: # print("wh") intervals[i+1] = intervals[i] count-=1 return count
class Solution: def remove_covered_intervals(self, intervals: List[List[int]]) -> int: intervals.sort(reverse=True, key=lambda x: (x[1], -x[0])) slen = len(intervals) count = slen for i in range(slen - 1): if intervals[i][0] <= intervals[i + 1][0] and intervals[i][1] >= intervals[i + 1][1]: intervals[i + 1] = intervals[i] count -= 1 return count
# 312. Burst Balloons # Runtime: 8448 ms, faster than 44.62% of Python3 online submissions for Burst Balloons. # Memory Usage: 19.9 MB, less than 38.33% of Python3 online submissions for Burst Balloons. class Solution: def maxCoins(self, nums: list[int]) -> int: n = len(nums) # Edge case nums = [1] + nums + [1] scores = [[0 for _ in range(len(nums))] for _ in range(len(nums))] for i in range(n, -1, -1): for j in range(i + 1, n + 2): # The last burst. for k in range(i + 1, j): scores[i][j] = max(scores[i][j], scores[i][k] + scores[k][j] + nums[i] * nums[k] * nums[j]) return scores[0][n + 1]
class Solution: def max_coins(self, nums: list[int]) -> int: n = len(nums) nums = [1] + nums + [1] scores = [[0 for _ in range(len(nums))] for _ in range(len(nums))] for i in range(n, -1, -1): for j in range(i + 1, n + 2): for k in range(i + 1, j): scores[i][j] = max(scores[i][j], scores[i][k] + scores[k][j] + nums[i] * nums[k] * nums[j]) return scores[0][n + 1]
## Implementation of a recursive fibonacci series. Extremely inefficient though. ## Author: AJ class fibonacci: def __init__(self): self.number = 0 self.series = [] def fib_series(self, num): if num <=2: if 1 not in self.series: self.series.append(1) #self.series = list(set(self.series)) return 1 next = self.fib_series(num-1) + self.fib_series(num-2) if next not in self.series: self.series.append(next) #self.series = list(set(self.series)) return next def print_fib_series(self): for ele in self.series: print(ele, end=' ') fib = fibonacci() num = int(input()) fib.fib_series(num) fib.series.insert(0, 0) fib.series.insert(1, 1) fib.print_fib_series()
class Fibonacci: def __init__(self): self.number = 0 self.series = [] def fib_series(self, num): if num <= 2: if 1 not in self.series: self.series.append(1) return 1 next = self.fib_series(num - 1) + self.fib_series(num - 2) if next not in self.series: self.series.append(next) return next def print_fib_series(self): for ele in self.series: print(ele, end=' ') fib = fibonacci() num = int(input()) fib.fib_series(num) fib.series.insert(0, 0) fib.series.insert(1, 1) fib.print_fib_series()
#inherits , extend , override class Employee: def __init__(self , name , age , salary): self.name = name self.age = age self.salary = salary def work(self): print( f"{self.name} is working..." ) class SoftwareEngineer(Employee): def __init__(self , name , age , salary , level): # super().__init__(name , age , salary) super(SoftwareEngineer , self).__init__(name , age , salary) self.level = level def debug(self): print( f"{self.name} is debugging..." ) def work(self): print( f"{self.name} is coding..." ) class Designer(Employee): def work(self): print( f"{self.name} is designing..." ) def draw(self): print( f"{self.name} is drawing..." ) # se = SoftwareEngineer('Hussein' , 22 , 5000 , 'Junior') # print( se.name , se.age) # print(se.level) # se.work() # se.debug() # # d = Designer('Lisa' , 22 , 4000) # print( d.name , d.age) # d.work() # d.draw() #polymorphism employees = [ SoftwareEngineer('Sara' , 22 , 4445 , 'Junior'), SoftwareEngineer('Moataz' , 22 , 9000 , 'Senior'), Designer('Asmaa' , 20 , 9000) ] def motivate_employees(employees): for employee in employees: employee.work() motivate_employees(employees) #Recap #inheritance: ChildClass(BaseClass) #inherits , extends , overrides #super().__init__() or super(class , self).__init__() #polymorphism
class Employee: def __init__(self, name, age, salary): self.name = name self.age = age self.salary = salary def work(self): print(f'{self.name} is working...') class Softwareengineer(Employee): def __init__(self, name, age, salary, level): super(SoftwareEngineer, self).__init__(name, age, salary) self.level = level def debug(self): print(f'{self.name} is debugging...') def work(self): print(f'{self.name} is coding...') class Designer(Employee): def work(self): print(f'{self.name} is designing...') def draw(self): print(f'{self.name} is drawing...') employees = [software_engineer('Sara', 22, 4445, 'Junior'), software_engineer('Moataz', 22, 9000, 'Senior'), designer('Asmaa', 20, 9000)] def motivate_employees(employees): for employee in employees: employee.work() motivate_employees(employees)
MODULE_CONTEXT = {'metadata':{'module':'ANUVAAD-NMT-MODELS'}} def init(): global app_context app_context = { 'application_context' : None }
module_context = {'metadata': {'module': 'ANUVAAD-NMT-MODELS'}} def init(): global app_context app_context = {'application_context': None}
class TestStackiBoxInfo: def test_no_name(self, run_ansible_module): result = run_ansible_module("stacki_box_info") assert result.status == "SUCCESS" assert result.data["changed"] == False assert len(result.data["boxes"]) == 2 def test_with_name(self, run_ansible_module): result = run_ansible_module("stacki_box_info", name="default") assert result.status == "SUCCESS" assert result.data["changed"] == False assert len(result.data["boxes"]) == 1 assert result.data["boxes"][0]["name"] == "default" def test_bad_name(self, run_ansible_module): result = run_ansible_module("stacki_box_info", name="foo") assert result.status == "FAILED!" assert result.data["changed"] == False assert "error" in result.data["msg"] assert "not a valid box" in result.data["msg"]
class Teststackiboxinfo: def test_no_name(self, run_ansible_module): result = run_ansible_module('stacki_box_info') assert result.status == 'SUCCESS' assert result.data['changed'] == False assert len(result.data['boxes']) == 2 def test_with_name(self, run_ansible_module): result = run_ansible_module('stacki_box_info', name='default') assert result.status == 'SUCCESS' assert result.data['changed'] == False assert len(result.data['boxes']) == 1 assert result.data['boxes'][0]['name'] == 'default' def test_bad_name(self, run_ansible_module): result = run_ansible_module('stacki_box_info', name='foo') assert result.status == 'FAILED!' assert result.data['changed'] == False assert 'error' in result.data['msg'] assert 'not a valid box' in result.data['msg']
# Dictionaries # https://www.freecodecamp.org/learn/scientific-computing-with-python/python-for-everybody/python-dictionaries # A collection of values each with their own key identifiers - like a java hashmap ddd = dict() ddd['age'] = 21 ddd['course'] = 182 print(ddd) ddd['age'] = 27 print(ddd) # Literals jjj = {'name': 'bob', 'age': 21} print(jjj) # Counting occurrences ccc = dict() ccc['count1'] = 1 ccc['count2'] = 1 print(ccc) ccc['count1'] = ccc['count1'] + 1 print(ccc) # Counting names ex. counts = dict() names = ['bob', 'bob6', 'bob4', 'bob2', 'bob', 'bob6'] for name in names: if name not in counts: counts[name] = 1 else: counts[name] += 1 print(counts) # The get method if name in counts: x = counts[name] else: x = 0 # get returns the value for a specified key in the dictionary x = counts.get(name, 0) # 0 is the default value # Counting w/ get counts = dict() for name in names: counts[name] = counts.get(name, 0) + 1 print(counts)
ddd = dict() ddd['age'] = 21 ddd['course'] = 182 print(ddd) ddd['age'] = 27 print(ddd) jjj = {'name': 'bob', 'age': 21} print(jjj) ccc = dict() ccc['count1'] = 1 ccc['count2'] = 1 print(ccc) ccc['count1'] = ccc['count1'] + 1 print(ccc) counts = dict() names = ['bob', 'bob6', 'bob4', 'bob2', 'bob', 'bob6'] for name in names: if name not in counts: counts[name] = 1 else: counts[name] += 1 print(counts) if name in counts: x = counts[name] else: x = 0 x = counts.get(name, 0) counts = dict() for name in names: counts[name] = counts.get(name, 0) + 1 print(counts)
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub, actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: win_wait_for_process version_added: '2.7' short_description: Waits for a process to exist or not exist before continuing. description: - Waiting for a process to start or stop. - This is useful when Windows services behave poorly and do not enumerate external dependencies in their manifest. options: process_name_exact: description: - The name of the process(es) for which to wait. type: str process_name_pattern: description: - RegEx pattern matching desired process(es). type: str sleep: description: - Number of seconds to sleep between checks. - Only applies when waiting for a process to start. Waiting for a process to start does not have a native non-polling mechanism. Waiting for a stop uses native PowerShell and does not require polling. type: int default: 1 process_min_count: description: - Minimum number of process matching the supplied pattern to satisfy C(present) condition. - Only applies to C(present). type: int default: 1 pid: description: - The PID of the process. type: int owner: description: - The owner of the process. - Requires PowerShell version 4.0 or newer. type: str pre_wait_delay: description: - Seconds to wait before checking processes. type: int default: 0 post_wait_delay: description: - Seconds to wait after checking for processes. type: int default: 0 state: description: - When checking for a running process C(present) will block execution until the process exists, or until the timeout has been reached. C(absent) will block execution untile the processs no longer exists, or until the timeout has been reached. - When waiting for C(present), the module will return changed only if the process was not present on the initial check but became present on subsequent checks. - If, while waiting for C(absent), new processes matching the supplied pattern are started, these new processes will not be included in the action. type: str default: present choices: [ absent, present ] timeout: description: - The maximum number of seconds to wait for a for a process to start or stop before erroring out. type: int default: 300 author: - Charles Crossan (@crossan007) ''' EXAMPLES = r''' - name: Wait 300 seconds for all Oracle VirtualBox processes to stop. (VBoxHeadless, VirtualBox, VBoxSVC) win_wait_for_process: process_name: 'v(irtual)?box(headless|svc)?' state: absent timeout: 500 - name: Wait 300 seconds for 3 instances of cmd to start, waiting 5 seconds between each check win_wait_for_process: process_name_exact: cmd state: present timeout: 500 sleep: 5 process_min_count: 3 ''' RETURN = r''' elapsed: description: The elapsed seconds between the start of poll and the end of the module. returned: always type: float sample: 3.14159265 matched_processes: description: List of matched processes (either stopped or started) returned: always type: complex contains: name: description: The name of the matched process returned: always type: str sample: svchost owner: description: The owner of the matched process returned: when supported by PowerShell type: str sample: NT AUTHORITY\SYSTEM pid: description: The PID of the matched process returned: always type: int sample: 7908 '''
ansible_metadata = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} documentation = "\n---\nmodule: win_wait_for_process\nversion_added: '2.7'\nshort_description: Waits for a process to exist or not exist before continuing.\ndescription:\n- Waiting for a process to start or stop.\n- This is useful when Windows services behave poorly and do not enumerate external dependencies in their manifest.\noptions:\n process_name_exact:\n description:\n - The name of the process(es) for which to wait.\n type: str\n process_name_pattern:\n description:\n - RegEx pattern matching desired process(es).\n type: str\n sleep:\n description:\n - Number of seconds to sleep between checks.\n - Only applies when waiting for a process to start. Waiting for a process to start\n does not have a native non-polling mechanism. Waiting for a stop uses native PowerShell\n and does not require polling.\n type: int\n default: 1\n process_min_count:\n description:\n - Minimum number of process matching the supplied pattern to satisfy C(present) condition.\n - Only applies to C(present).\n type: int\n default: 1\n pid:\n description:\n - The PID of the process.\n type: int\n owner:\n description:\n - The owner of the process.\n - Requires PowerShell version 4.0 or newer.\n type: str\n pre_wait_delay:\n description:\n - Seconds to wait before checking processes.\n type: int\n default: 0\n post_wait_delay:\n description:\n - Seconds to wait after checking for processes.\n type: int\n default: 0\n state:\n description:\n - When checking for a running process C(present) will block execution\n until the process exists, or until the timeout has been reached.\n C(absent) will block execution untile the processs no longer exists,\n or until the timeout has been reached.\n - When waiting for C(present), the module will return changed only if\n the process was not present on the initial check but became present on\n subsequent checks.\n - If, while waiting for C(absent), new processes matching the supplied\n pattern are started, these new processes will not be included in the\n action.\n type: str\n default: present\n choices: [ absent, present ]\n timeout:\n description:\n - The maximum number of seconds to wait for a for a process to start or stop\n before erroring out.\n type: int\n default: 300\nauthor:\n- Charles Crossan (@crossan007)\n" examples = "\n- name: Wait 300 seconds for all Oracle VirtualBox processes to stop. (VBoxHeadless, VirtualBox, VBoxSVC)\n win_wait_for_process:\n process_name: 'v(irtual)?box(headless|svc)?'\n state: absent\n timeout: 500\n\n- name: Wait 300 seconds for 3 instances of cmd to start, waiting 5 seconds between each check\n win_wait_for_process:\n process_name_exact: cmd\n state: present\n timeout: 500\n sleep: 5\n process_min_count: 3\n" return = '\nelapsed:\n description: The elapsed seconds between the start of poll and the end of the module.\n returned: always\n type: float\n sample: 3.14159265\nmatched_processes:\n description: List of matched processes (either stopped or started)\n returned: always\n type: complex\n contains:\n name:\n description: The name of the matched process\n returned: always\n type: str\n sample: svchost\n owner:\n description: The owner of the matched process\n returned: when supported by PowerShell\n type: str\n sample: NT AUTHORITY\\SYSTEM\n pid:\n description: The PID of the matched process\n returned: always\n type: int\n sample: 7908\n'
file = 'fer2018surprise.csv' file_path = '../data/original/'+file new_file_path = '../data/converted/'+file num = 0 with open(file_path, 'r') as fp: with open(new_file_path, 'w') as fp2: num = num + 1 line = fp.readline() while line: lineWithCommas = line.replace(' ', ',') fp2.write(lineWithCommas) line = fp.readline() num = num+1 if num % 100 == 0: print("Working on line", num) print("DONE!")
file = 'fer2018surprise.csv' file_path = '../data/original/' + file new_file_path = '../data/converted/' + file num = 0 with open(file_path, 'r') as fp: with open(new_file_path, 'w') as fp2: num = num + 1 line = fp.readline() while line: line_with_commas = line.replace(' ', ',') fp2.write(lineWithCommas) line = fp.readline() num = num + 1 if num % 100 == 0: print('Working on line', num) print('DONE!')
__author__ = 'BeyondSky' class Solution: def climbStairs_dp(self, n): if n < 2: return 1 steps = [] steps.append(1) steps.append(2) for i in range(2,n): steps.append(steps[i-1] + steps[i-2]) return steps[n-1] def main(): outer = Solution(); print(outer.climbStairs_dp(4)) if __name__ == "__main__": main()
__author__ = 'BeyondSky' class Solution: def climb_stairs_dp(self, n): if n < 2: return 1 steps = [] steps.append(1) steps.append(2) for i in range(2, n): steps.append(steps[i - 1] + steps[i - 2]) return steps[n - 1] def main(): outer = solution() print(outer.climbStairs_dp(4)) if __name__ == '__main__': main()