content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# Write your solution here def double_items(numbers): double_numbers = [] for item in numbers: double_numbers.append(item*2) return double_numbers if __name__ == "__main__": numbers = [2, 4, 5, 3, 11, -4] numbers_doubled = double_items(numbers) print("original:", numbers) print("doubled:", numbers_doubled)
def double_items(numbers): double_numbers = [] for item in numbers: double_numbers.append(item * 2) return double_numbers if __name__ == '__main__': numbers = [2, 4, 5, 3, 11, -4] numbers_doubled = double_items(numbers) print('original:', numbers) print('doubled:', numbers_doubled)
# -*- coding: utf-8 -*- TOILET_CHOICES = ( ('F', 'Flush'), ('PT', 'Pit toilet'), ('TPT', 'Traditional Pit toilet'), ('L', 'Latrine'), ('BF', 'Bush /Field'), ('R', 'River'), ('O', 'Others'), ) COOKING_FACILITIES = ( ('Electricity', 'Electricity'), ('Gas', 'Gas'), ('Biomass', 'Biomass'), ('Kerosene', 'Kerosene'), ('Coal', 'Coal'), ('Charcoal', 'Charcoal'), ('Firewood', 'Firewood'), ('Others', 'Others'), ) SEX_CHOICES = ( ("M","Male"), ("F","Female"), ("O","Others"), ) MARITAL_CHOICES = ( ('SG', 'Single'), ('MR', 'Married'), ('DV', 'Divorced'), ('WD', 'Widowed'), ) FREQUENCY_CHOICES = ( ('AL', 'Always'), ('US', 'Usually'), ('OF', 'Often'), ('SO', 'Sometimes'), ('SE', 'Seldom'), ('RA', 'Rarely'), ('NV', 'Never'), ) LITERATE_CHOICES = ( ('LT', 'Literate'), ('SL', 'Semiliterate'), ('IL', 'Iliterate'), ) LEVEL_CHOICES = ( ('No', 'No'), ('Mi', 'Mild'), ('Mo', 'Moderate'), ('S', 'Severe'), ) EDUCATIONAL_LEVEL_CHOICES = ( ('KD', 'Kindergarden'), ('PR', 'Primary'), ('SC', 'Secondary'), ('UN', 'University'), ('NV', 'Never'), ) RELATIONSHIP_CHOICES = ( ('HS', 'Husband'), ('FA', 'Father'), ('MO', 'Mother'), ('GF', 'Grandfather'), ('GM', 'Grandmother'), ('UN', 'Uncle'), ('AU', 'Aunt'), ('FR', 'Friend'), ) MENSTRUAL_CYCLE_CHOICES = ( ('28', '28days'), ('30', '30days'), ('OT', 'Others'), ) HAVE_BEEN_PREGNANT_CHOICES = ( (0, '0'), (1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9'), (10, '10'), (11, '11'), (12, '12'), (13, '13'), (14, '14'), (15, '15'), (16, '16'), (17, '17'), (18, '18'), (19, '19'), (20, '20'), ) TYPES_OF_DELIVERY_CHOICES = ( ('LB', 'Live Birth'), ('SB', 'Still Birth'), ('AB', 'Abortion'), ('EC', 'Ectopic'), ('HM', 'Hydatidiform Model'), ('OT', 'Others'), ) PROBLEMS_CHOICES = ( ('NO', 'None'), ('PL','PretermLabor'), ('DB','Diabetes'), ('HB','High Blood Pressure'), ('TH','Thrombosis'), ('EM','Embolus'), ('HT','Hypertension'), ('PE','Pre-Eclampsia'), ('EC','Eclampsia'), ('OT','Others'), ) OBSTETRICALOPERATION_CHOICES = ( ('NO', 'None'), ('CS', 'Caesarian Section'), ('FO','Forceps'), ('VE','Vacuum Extraction'), ('MI','Manual instrumental help in vaginal breech delivery'), ('MR','Manual Removal Of The Placenta'), ('OT','Others'), ) METHOD_OF_BIRTH_CONTROL_CHOICES = ( ('CO', 'Condoms'), ('PI', 'Pills'), ('PA', 'Patch'), ('VR', 'Vaginal Ring'), ('TU', 'Tubal/Essure'), ('IU', 'IUD'), ('PV', 'Partner with vasectomy'), ('NA', 'Natural Family Planning'), ('IM', 'Implanon'), ('NO', 'None'), ('OT', 'Other'), ) NORMAL_CHOICES = ( ('NR', 'Normal'), ('AB', 'Abnormal'), ) VACCINATION_CHOICES= ( ('RU', 'Rubella'), ('TT', 'Tetanus Toxoid'), ('OT', 'Other'), ) VISIT_CHOICES = ( ('FT', 'First trimester'), ('ST', 'Second Trimester'), ('TT', 'Third Trimester'), ('OT', 'Other visit'), ) BLOOD_PRESSURE_CHOICES = ( ('BE','140/90'), ('AB','>= 140/90'), ) URINALYSIS_CHOICES = ( ('BE', '<0.3g/24h'), ('AB', '>0.3g/24h'), ) HEMOGLOBIN_CHOICES = ( ('A', '9-10'), ('B', '7-8'), ('C', '<7'), ('D', '>=11'), ) MATERNAL_COMPLICATIONS_CHOICES = ( ('NO','No complication'), ('RA', 'Recurrent early abortion'), ('IA','Induced abortion and any associated complications'), ('TH','Thrombosis'), ('EM','Embolus'), ('HY','Hypertension'), ('PE','Pre-Eclampsia'), ('EC','Eclampsia'), ('PA','Placental abruption'), ('OT','Others'), ) PERINATAL_COMPLICATIONS_CHOICES = ( ('NO','No complication'), ('TW', 'Twins or higher order multiples'), ('LO', 'Low birth weight (<2500g)'), ('IG','Intrauterine growth retardation'), ('RA','Rhesus antibody(erytroblastosis,hydrops)'), ('MC','Malformed or chromosomally abnormal child'), ('MA','macrosomic(>4500g) newborn'), ('RE','Resuscitation or other treatment of newborn'), ('PE','Perinatal,neonatal or infant death'), ('OT','Others'), )
toilet_choices = (('F', 'Flush'), ('PT', 'Pit toilet'), ('TPT', 'Traditional Pit toilet'), ('L', 'Latrine'), ('BF', 'Bush /Field'), ('R', 'River'), ('O', 'Others')) cooking_facilities = (('Electricity', 'Electricity'), ('Gas', 'Gas'), ('Biomass', 'Biomass'), ('Kerosene', 'Kerosene'), ('Coal', 'Coal'), ('Charcoal', 'Charcoal'), ('Firewood', 'Firewood'), ('Others', 'Others')) sex_choices = (('M', 'Male'), ('F', 'Female'), ('O', 'Others')) marital_choices = (('SG', 'Single'), ('MR', 'Married'), ('DV', 'Divorced'), ('WD', 'Widowed')) frequency_choices = (('AL', 'Always'), ('US', 'Usually'), ('OF', 'Often'), ('SO', 'Sometimes'), ('SE', 'Seldom'), ('RA', 'Rarely'), ('NV', 'Never')) literate_choices = (('LT', 'Literate'), ('SL', 'Semiliterate'), ('IL', 'Iliterate')) level_choices = (('No', 'No'), ('Mi', 'Mild'), ('Mo', 'Moderate'), ('S', 'Severe')) educational_level_choices = (('KD', 'Kindergarden'), ('PR', 'Primary'), ('SC', 'Secondary'), ('UN', 'University'), ('NV', 'Never')) relationship_choices = (('HS', 'Husband'), ('FA', 'Father'), ('MO', 'Mother'), ('GF', 'Grandfather'), ('GM', 'Grandmother'), ('UN', 'Uncle'), ('AU', 'Aunt'), ('FR', 'Friend')) menstrual_cycle_choices = (('28', '28days'), ('30', '30days'), ('OT', 'Others')) have_been_pregnant_choices = ((0, '0'), (1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9'), (10, '10'), (11, '11'), (12, '12'), (13, '13'), (14, '14'), (15, '15'), (16, '16'), (17, '17'), (18, '18'), (19, '19'), (20, '20')) types_of_delivery_choices = (('LB', 'Live Birth'), ('SB', 'Still Birth'), ('AB', 'Abortion'), ('EC', 'Ectopic'), ('HM', 'Hydatidiform Model'), ('OT', 'Others')) problems_choices = (('NO', 'None'), ('PL', 'PretermLabor'), ('DB', 'Diabetes'), ('HB', 'High Blood Pressure'), ('TH', 'Thrombosis'), ('EM', 'Embolus'), ('HT', 'Hypertension'), ('PE', 'Pre-Eclampsia'), ('EC', 'Eclampsia'), ('OT', 'Others')) obstetricaloperation_choices = (('NO', 'None'), ('CS', 'Caesarian Section'), ('FO', 'Forceps'), ('VE', 'Vacuum Extraction'), ('MI', 'Manual instrumental help in vaginal breech delivery'), ('MR', 'Manual Removal Of The Placenta'), ('OT', 'Others')) method_of_birth_control_choices = (('CO', 'Condoms'), ('PI', 'Pills'), ('PA', 'Patch'), ('VR', 'Vaginal Ring'), ('TU', 'Tubal/Essure'), ('IU', 'IUD'), ('PV', 'Partner with vasectomy'), ('NA', 'Natural Family Planning'), ('IM', 'Implanon'), ('NO', 'None'), ('OT', 'Other')) normal_choices = (('NR', 'Normal'), ('AB', 'Abnormal')) vaccination_choices = (('RU', 'Rubella'), ('TT', 'Tetanus Toxoid'), ('OT', 'Other')) visit_choices = (('FT', 'First trimester'), ('ST', 'Second Trimester'), ('TT', 'Third Trimester'), ('OT', 'Other visit')) blood_pressure_choices = (('BE', '140/90'), ('AB', '>= 140/90')) urinalysis_choices = (('BE', '<0.3g/24h'), ('AB', '>0.3g/24h')) hemoglobin_choices = (('A', '9-10'), ('B', '7-8'), ('C', '<7'), ('D', '>=11')) maternal_complications_choices = (('NO', 'No complication'), ('RA', 'Recurrent early abortion'), ('IA', 'Induced abortion and any associated complications'), ('TH', 'Thrombosis'), ('EM', 'Embolus'), ('HY', 'Hypertension'), ('PE', 'Pre-Eclampsia'), ('EC', 'Eclampsia'), ('PA', 'Placental abruption'), ('OT', 'Others')) perinatal_complications_choices = (('NO', 'No complication'), ('TW', 'Twins or higher order multiples'), ('LO', 'Low birth weight (<2500g)'), ('IG', 'Intrauterine growth retardation'), ('RA', 'Rhesus antibody(erytroblastosis,hydrops)'), ('MC', 'Malformed or chromosomally abnormal child'), ('MA', 'macrosomic(>4500g) newborn'), ('RE', 'Resuscitation or other treatment of newborn'), ('PE', 'Perinatal,neonatal or infant death'), ('OT', 'Others'))
# # PySNMP MIB module ZHONE-COM-IP-ZEDGE-NAT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ZHONE-COM-IP-ZEDGE-NAT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:41:01 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") NotificationType, Gauge32, iso, Counter32, IpAddress, Bits, Unsigned32, ObjectIdentity, ModuleIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Counter64, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Gauge32", "iso", "Counter32", "IpAddress", "Bits", "Unsigned32", "ObjectIdentity", "ModuleIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Counter64", "TimeTicks") TruthValue, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "DisplayString", "TextualConvention") zhoneModules, zhoneIp = mibBuilder.importSymbols("Zhone", "zhoneModules", "zhoneIp") ZhoneRowStatus, = mibBuilder.importSymbols("Zhone-TC", "ZhoneRowStatus") comIpZEdgeNat = ModuleIdentity((1, 3, 6, 1, 4, 1, 5504, 6, 66)) comIpZEdgeNat.setRevisions(('2010-10-20 05:52', '2008-07-22 07:28', '2003-12-11 02:58', '2003-03-19 09:02', '2000-10-04 15:30',)) if mibBuilder.loadTexts: comIpZEdgeNat.setLastUpdated('201010200727Z') if mibBuilder.loadTexts: comIpZEdgeNat.setOrganization('Zhone Technologies, Inc.') zedgeNat = ObjectIdentity((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16)) if mibBuilder.loadTexts: zedgeNat.setStatus('current') natConfigGroup = ObjectIdentity((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 1)) if mibBuilder.loadTexts: natConfigGroup.setStatus('current') natTcpTimeout = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 604800))).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: natTcpTimeout.setStatus('current') natUdpTimeout = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 604800))).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: natUdpTimeout.setStatus('current') natClearBindings = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 1, 3), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: natClearBindings.setStatus('current') natStatsGroup = ObjectIdentity((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 2)) if mibBuilder.loadTexts: natStatsGroup.setStatus('current') natNumCurrentBindings = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 2, 1), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: natNumCurrentBindings.setStatus('current') natNumExpiredBindings = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 2, 2), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: natNumExpiredBindings.setStatus('current') natTotalPkts = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 2, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: natTotalPkts.setStatus('current') natDroppedPkts = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 2, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: natDroppedPkts.setStatus('current') natBindingsTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3), ) if mibBuilder.loadTexts: natBindingsTable.setStatus('current') natBindingsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3, 1), ).setIndexNames((0, "ZHONE-COM-IP-ZEDGE-NAT-MIB", "natBindingsIfIndex"), (0, "ZHONE-COM-IP-ZEDGE-NAT-MIB", "natBindingLocalAddr"), (0, "ZHONE-COM-IP-ZEDGE-NAT-MIB", "natBindingLocalPort"), (0, "ZHONE-COM-IP-ZEDGE-NAT-MIB", "natBindingPublicAddr"), (0, "ZHONE-COM-IP-ZEDGE-NAT-MIB", "natBindingPublicPort")) if mibBuilder.loadTexts: natBindingsEntry.setStatus('current') natBindingsIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: natBindingsIfIndex.setStatus('current') natBindingLocalAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3, 1, 2), IpAddress()) if mibBuilder.loadTexts: natBindingLocalAddr.setStatus('current') natBindingLocalPort = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3, 1, 3), Unsigned32()) if mibBuilder.loadTexts: natBindingLocalPort.setStatus('current') natBindingPublicAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3, 1, 4), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: natBindingPublicAddr.setStatus('current') natBindingPublicPort = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: natBindingPublicPort.setStatus('current') zhonePATBindings = MibIdentifier((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4)) patBindNextIndex = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: patBindNextIndex.setStatus('current') patTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2), ) if mibBuilder.loadTexts: patTable.setStatus('current') patEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1), ).setIndexNames((0, "ZHONE-COM-IP-ZEDGE-NAT-MIB", "zhonePATBindIndex")) if mibBuilder.loadTexts: patEntry.setStatus('current') zhonePATBindIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4320))) if mibBuilder.loadTexts: zhonePATBindIndex.setStatus('current') zhonePATBindRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 2), ZhoneRowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhonePATBindRowStatus.setStatus('current') publicAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 3), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: publicAddr.setStatus('current') publicPort = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(51921, 56250))).setMaxAccess("readcreate") if mibBuilder.loadTexts: publicPort.setStatus('current') localAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 5), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: localAddr.setStatus('current') localPort = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 49151))).setMaxAccess("readcreate") if mibBuilder.loadTexts: localPort.setStatus('current') portType = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("tcp", 1), ("udp", 2), ("cpemgr", 3), ("cpemgrsecure", 4))).clone('tcp')).setMaxAccess("readcreate") if mibBuilder.loadTexts: portType.setStatus('current') zhoneNATExclusion = MibIdentifier((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5)) natExcludeNextIndex = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: natExcludeNextIndex.setStatus('current') natExcludeTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 2), ) if mibBuilder.loadTexts: natExcludeTable.setStatus('current') natExcludeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 2, 1), ).setIndexNames((0, "ZHONE-COM-IP-ZEDGE-NAT-MIB", "zhoneNATExcludeIndex")) if mibBuilder.loadTexts: natExcludeEntry.setStatus('current') zhoneNATExcludeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20))) if mibBuilder.loadTexts: zhoneNATExcludeIndex.setStatus('current') zhoneNATExcludeRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 2, 1, 2), ZhoneRowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneNATExcludeRowStatus.setStatus('current') ipStartAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 2, 1, 3), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipStartAddr.setStatus('current') ipEndAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 2, 1, 4), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: ipEndAddr.setStatus('current') mibBuilder.exportSymbols("ZHONE-COM-IP-ZEDGE-NAT-MIB", portType=portType, natBindingLocalAddr=natBindingLocalAddr, zedgeNat=zedgeNat, natBindingsIfIndex=natBindingsIfIndex, patEntry=patEntry, publicPort=publicPort, natClearBindings=natClearBindings, natNumExpiredBindings=natNumExpiredBindings, natBindingPublicPort=natBindingPublicPort, natTcpTimeout=natTcpTimeout, natBindingLocalPort=natBindingLocalPort, natStatsGroup=natStatsGroup, natExcludeTable=natExcludeTable, natBindingsTable=natBindingsTable, natExcludeNextIndex=natExcludeNextIndex, natBindingPublicAddr=natBindingPublicAddr, zhonePATBindings=zhonePATBindings, natDroppedPkts=natDroppedPkts, localPort=localPort, comIpZEdgeNat=comIpZEdgeNat, natExcludeEntry=natExcludeEntry, patTable=patTable, zhoneNATExclusion=zhoneNATExclusion, natConfigGroup=natConfigGroup, natUdpTimeout=natUdpTimeout, natBindingsEntry=natBindingsEntry, PYSNMP_MODULE_ID=comIpZEdgeNat, zhonePATBindRowStatus=zhonePATBindRowStatus, patBindNextIndex=patBindNextIndex, zhonePATBindIndex=zhonePATBindIndex, zhoneNATExcludeRowStatus=zhoneNATExcludeRowStatus, zhoneNATExcludeIndex=zhoneNATExcludeIndex, natNumCurrentBindings=natNumCurrentBindings, ipStartAddr=ipStartAddr, natTotalPkts=natTotalPkts, ipEndAddr=ipEndAddr, localAddr=localAddr, publicAddr=publicAddr)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, constraints_intersection, value_range_constraint, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint') (interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (notification_type, gauge32, iso, counter32, ip_address, bits, unsigned32, object_identity, module_identity, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, counter64, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'Gauge32', 'iso', 'Counter32', 'IpAddress', 'Bits', 'Unsigned32', 'ObjectIdentity', 'ModuleIdentity', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'Counter64', 'TimeTicks') (truth_value, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'DisplayString', 'TextualConvention') (zhone_modules, zhone_ip) = mibBuilder.importSymbols('Zhone', 'zhoneModules', 'zhoneIp') (zhone_row_status,) = mibBuilder.importSymbols('Zhone-TC', 'ZhoneRowStatus') com_ip_z_edge_nat = module_identity((1, 3, 6, 1, 4, 1, 5504, 6, 66)) comIpZEdgeNat.setRevisions(('2010-10-20 05:52', '2008-07-22 07:28', '2003-12-11 02:58', '2003-03-19 09:02', '2000-10-04 15:30')) if mibBuilder.loadTexts: comIpZEdgeNat.setLastUpdated('201010200727Z') if mibBuilder.loadTexts: comIpZEdgeNat.setOrganization('Zhone Technologies, Inc.') zedge_nat = object_identity((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16)) if mibBuilder.loadTexts: zedgeNat.setStatus('current') nat_config_group = object_identity((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 1)) if mibBuilder.loadTexts: natConfigGroup.setStatus('current') nat_tcp_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 604800))).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: natTcpTimeout.setStatus('current') nat_udp_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 604800))).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: natUdpTimeout.setStatus('current') nat_clear_bindings = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 1, 3), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: natClearBindings.setStatus('current') nat_stats_group = object_identity((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 2)) if mibBuilder.loadTexts: natStatsGroup.setStatus('current') nat_num_current_bindings = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 2, 1), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: natNumCurrentBindings.setStatus('current') nat_num_expired_bindings = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 2, 2), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: natNumExpiredBindings.setStatus('current') nat_total_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 2, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: natTotalPkts.setStatus('current') nat_dropped_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 2, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: natDroppedPkts.setStatus('current') nat_bindings_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3)) if mibBuilder.loadTexts: natBindingsTable.setStatus('current') nat_bindings_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3, 1)).setIndexNames((0, 'ZHONE-COM-IP-ZEDGE-NAT-MIB', 'natBindingsIfIndex'), (0, 'ZHONE-COM-IP-ZEDGE-NAT-MIB', 'natBindingLocalAddr'), (0, 'ZHONE-COM-IP-ZEDGE-NAT-MIB', 'natBindingLocalPort'), (0, 'ZHONE-COM-IP-ZEDGE-NAT-MIB', 'natBindingPublicAddr'), (0, 'ZHONE-COM-IP-ZEDGE-NAT-MIB', 'natBindingPublicPort')) if mibBuilder.loadTexts: natBindingsEntry.setStatus('current') nat_bindings_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3, 1, 1), interface_index()) if mibBuilder.loadTexts: natBindingsIfIndex.setStatus('current') nat_binding_local_addr = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3, 1, 2), ip_address()) if mibBuilder.loadTexts: natBindingLocalAddr.setStatus('current') nat_binding_local_port = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3, 1, 3), unsigned32()) if mibBuilder.loadTexts: natBindingLocalPort.setStatus('current') nat_binding_public_addr = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3, 1, 4), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: natBindingPublicAddr.setStatus('current') nat_binding_public_port = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 3, 1, 5), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: natBindingPublicPort.setStatus('current') zhone_pat_bindings = mib_identifier((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4)) pat_bind_next_index = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: patBindNextIndex.setStatus('current') pat_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2)) if mibBuilder.loadTexts: patTable.setStatus('current') pat_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1)).setIndexNames((0, 'ZHONE-COM-IP-ZEDGE-NAT-MIB', 'zhonePATBindIndex')) if mibBuilder.loadTexts: patEntry.setStatus('current') zhone_pat_bind_index = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4320))) if mibBuilder.loadTexts: zhonePATBindIndex.setStatus('current') zhone_pat_bind_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 2), zhone_row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhonePATBindRowStatus.setStatus('current') public_addr = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 3), ip_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: publicAddr.setStatus('current') public_port = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(51921, 56250))).setMaxAccess('readcreate') if mibBuilder.loadTexts: publicPort.setStatus('current') local_addr = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 5), ip_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: localAddr.setStatus('current') local_port = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 49151))).setMaxAccess('readcreate') if mibBuilder.loadTexts: localPort.setStatus('current') port_type = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 4, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('tcp', 1), ('udp', 2), ('cpemgr', 3), ('cpemgrsecure', 4))).clone('tcp')).setMaxAccess('readcreate') if mibBuilder.loadTexts: portType.setStatus('current') zhone_nat_exclusion = mib_identifier((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5)) nat_exclude_next_index = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: natExcludeNextIndex.setStatus('current') nat_exclude_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 2)) if mibBuilder.loadTexts: natExcludeTable.setStatus('current') nat_exclude_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 2, 1)).setIndexNames((0, 'ZHONE-COM-IP-ZEDGE-NAT-MIB', 'zhoneNATExcludeIndex')) if mibBuilder.loadTexts: natExcludeEntry.setStatus('current') zhone_nat_exclude_index = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 20))) if mibBuilder.loadTexts: zhoneNATExcludeIndex.setStatus('current') zhone_nat_exclude_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 2, 1, 2), zhone_row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneNATExcludeRowStatus.setStatus('current') ip_start_addr = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 2, 1, 3), ip_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: ipStartAddr.setStatus('current') ip_end_addr = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 1, 16, 5, 2, 1, 4), ip_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: ipEndAddr.setStatus('current') mibBuilder.exportSymbols('ZHONE-COM-IP-ZEDGE-NAT-MIB', portType=portType, natBindingLocalAddr=natBindingLocalAddr, zedgeNat=zedgeNat, natBindingsIfIndex=natBindingsIfIndex, patEntry=patEntry, publicPort=publicPort, natClearBindings=natClearBindings, natNumExpiredBindings=natNumExpiredBindings, natBindingPublicPort=natBindingPublicPort, natTcpTimeout=natTcpTimeout, natBindingLocalPort=natBindingLocalPort, natStatsGroup=natStatsGroup, natExcludeTable=natExcludeTable, natBindingsTable=natBindingsTable, natExcludeNextIndex=natExcludeNextIndex, natBindingPublicAddr=natBindingPublicAddr, zhonePATBindings=zhonePATBindings, natDroppedPkts=natDroppedPkts, localPort=localPort, comIpZEdgeNat=comIpZEdgeNat, natExcludeEntry=natExcludeEntry, patTable=patTable, zhoneNATExclusion=zhoneNATExclusion, natConfigGroup=natConfigGroup, natUdpTimeout=natUdpTimeout, natBindingsEntry=natBindingsEntry, PYSNMP_MODULE_ID=comIpZEdgeNat, zhonePATBindRowStatus=zhonePATBindRowStatus, patBindNextIndex=patBindNextIndex, zhonePATBindIndex=zhonePATBindIndex, zhoneNATExcludeRowStatus=zhoneNATExcludeRowStatus, zhoneNATExcludeIndex=zhoneNATExcludeIndex, natNumCurrentBindings=natNumCurrentBindings, ipStartAddr=ipStartAddr, natTotalPkts=natTotalPkts, ipEndAddr=ipEndAddr, localAddr=localAddr, publicAddr=publicAddr)
# Data paths DATA_BACKGROUND_FOLDER = "../data/background/" DATA_GENERATED_FOLDER = "../data/generated_data/" # General settings IMAGES_TO_GENERATE = 500 COIN_RESIZE_RATIO_MIN = 0.4 COIN_RESIZE_RATIO_MAX = 0.6 # Background settings BACKGROUND_RESIZE_RATIO = 400 BACKGROUND_MAX_N_COINS = 25 # Coin crop settings MAX_COIN_OVERLAP_PERCENTAGE = 0.33 INDIVIDUAL_COIN_CROP_NOISE = 0.05
data_background_folder = '../data/background/' data_generated_folder = '../data/generated_data/' images_to_generate = 500 coin_resize_ratio_min = 0.4 coin_resize_ratio_max = 0.6 background_resize_ratio = 400 background_max_n_coins = 25 max_coin_overlap_percentage = 0.33 individual_coin_crop_noise = 0.05
# Test values must be in the form [(text_input, expected_output), (text_input, expected_output), ...] test_values = [ ( "president", { "n": { "president", "presidentship", "presidencies", "presidency", "presidentships", "presidents", }, "r": {"presidentially"}, "a": {"presidential"}, "v": {"presiding", "presides", "preside", "presided"}, }, ), ( "elect", { "n": { "elector", "elects", "electors", "elective", "electorates", "elect", "electives", "elections", "electorate", "eligibility", "election", "eligibilities", }, "r": set(), "a": {"elect", "electoral", "elective", "eligible"}, "v": {"elect", "elects", "electing", "elected"}, }, ), ( "running", { "n": { "runninesses", "runnings", "runs", "running", "runniness", "runners", "runner", "run", }, "a": {"running", "runny"}, "v": {"running", "ran", "runs", "run"}, "r": set(), }, ), ( "run", { "n": { "runninesses", "runnings", "runs", "running", "runniness", "runners", "runner", "run", }, "a": {"running", "runny"}, "v": {"running", "ran", "runs", "run"}, "r": set(), }, ), ( "operations", { "n": { "operators", "operations", "operation", "operative", "operator", "operatives", }, "a": {"operant", "operative"}, "v": {"operated", "operating", "operate", "operates"}, "r": {"operatively"}, }, ), ( "operate", { "n": { "operators", "operations", "operation", "operative", "operator", "operatives", }, "a": {"operant", "operative"}, "v": {"operated", "operating", "operate", "operates"}, "r": {"operatively"}, }, ), ( "invest", { "n": { "investitures", "investors", "investiture", "investor", "investments", "investings", "investment", "investing", }, "a": set(), "v": {"invested", "invests", "invest", "investing"}, "r": set(), }, ), ( "investments", { "n": { "investitures", "investors", "investiture", "investor", "investments", "investings", "investment", "investing", }, "a": set(), "v": {"invested", "invests", "invest", "investing"}, "r": set(), }, ), ( "conjugation", { "n": {"conjugate", "conjugation", "conjugates", "conjugations"}, "a": {"conjugate"}, "v": {"conjugating", "conjugated", "conjugate", "conjugates"}, "r": set(), }, ), ( "do", { "n": {"does", "doer", "doers", "do"}, "a": set(), "v": { "doing", "don't", "does", "didn't", "do", "doesn't", "done", "did", }, "r": set(), }, ), ( "word", { "n": {"words", "word", "wordings", "wording"}, "a": set(), "v": {"words", "word", "worded", "wording"}, "r": set(), }, ), ( "love", { "a": {"lovable", "loveable"}, "n": {"love", "lover", "lovers", "loves"}, "r": set(), "v": {"love", "loved", "loves", "loving"}, }, ), ( "word", { "n": {"words", "word", "wordings", "wording"}, "a": set(), "v": {"words", "word", "worded", "wording"}, "r": set(), }, ), ( "verb", { "n": {"verbs", "verb"}, "a": {"verbal"}, "v": {"verbifying", "verbified", "verbify", "verbifies"}, "r": {"verbally"}, }, ), ( "genetic", { "n": {"geneticist", "genetics", "geneticists", "genes", "gene"}, "a": {"genic", "genetic", "genetical"}, "v": set(), "r": {"genetically"}, }, ), ( "politician", { "r": {"politically"}, "a": {"political"}, "n": {"politician", "politicians", "politics"}, "v": set(), }, ), ( "death", { "n": {"death", "dying", "deaths", "die", "dyings", "dice"}, "a": {"dying", "deathly"}, "v": {"died", "die", "dying", "dies"}, "r": {"deathly"}, }, ), ( "attitude", { "n": {"attitudes", "attitude"}, "a": set(), "v": { "attitudinise", "attitudinized", "attitudinize", "attitudinizes", "attitudinizing", }, "r": set(), }, ), ( "cheek", { "n": {"cheek", "cheekinesses", "cheeks", "cheekiness"}, "a": {"cheeky"}, "v": {"cheek", "cheeks", "cheeked", "cheeking"}, "r": {"cheekily"}, }, ), ( "world", { "n": {"worldliness", "world", "worldlinesses", "worlds"}, "a": {"worldly", "world"}, "v": set(), "r": set(), }, ), ("lake", {"n": {"lake", "lakes"}, "a": set(), "v": set(), "r": set()}), ( "guitar", { "n": {"guitarist", "guitarists", "guitar", "guitars"}, "a": set(), "v": set(), "r": set(), }, ), ( "presence", { "n": { "presenter", "present", "presents", "presentness", "presenters", "presentnesses", "presentments", "presentations", "presences", "presence", "presentment", "presentation", }, "a": {"present"}, "v": {"present", "presents", "presenting", "presented"}, "r": {"presently"}, }, ), ( "enthusiasm", { "n": {"enthusiasm", "enthusiasms"}, "a": {"enthusiastic"}, "v": set(), "r": {"enthusiastically"}, }, ), ( "organization", { "n": {"organizers", "organization", "organizations", "organizer"}, "a": set(), "v": {"organize", "organized", "organizing", "organizes"}, "r": set(), }, ), ( "player", { "n": { "plays", "playlet", "playings", "players", "playing", "playlets", "play", "player", }, "a": set(), "v": {"plays", "play", "playing", "played"}, "r": set(), }, ), ( "transportation", { "n": { "transporters", "transportation", "transportations", "transporter", "transport", "transports", }, "a": set(), "v": {"transport", "transporting", "transports", "transported"}, "r": set(), }, ), ( "television", { "n": {"televisions", "television"}, "a": set(), "v": {"televising", "televise", "televises", "televised"}, "r": set(), }, ), ( "cousin", {"n": {"cousins", "cousin"}, "a": {"cousinly"}, "v": set(), "r": set()}, ), ( "ability", {"n": {"abilities", "ability"}, "a": {"able"}, "v": set(), "r": {"ably"}}, ), ("chapter", {"n": {"chapters", "chapter"}, "a": set(), "v": set(), "r": set()}), ( "appearance", { "n": { "appearances", "apparitions", "appearance", "apparencies", "apparentness", "apparentnesses", "apparition", "apparency", }, "a": {"apparent"}, "v": {"appears", "appeared", "appear", "appearing"}, "r": {"apparently"}, }, ), ( "drawing", { "n": { "drawings", "drawers", "draws", "drawer", "drawees", "drawee", "draw", "drawing", }, "a": set(), "v": {"draws", "drew", "drawn", "draw", "drawing"}, "r": set(), }, ), ( "university", {"n": {"university", "universities"}, "a": set(), "v": set(), "r": set()}, ), ( "performance", { "n": { "performings", "performing", "performances", "performance", "performer", "performers", }, "a": set(), "v": {"performs", "performing", "performed", "perform"}, "r": set(), }, ), ("revenue", {"n": {"revenue", "revenues"}, "a": set(), "v": set(), "r": set()}), # Some Verbs ( "cling", { "n": {"cling", "clings"}, "a": set(), "v": {"clung", "cling", "clinging", "clings"}, "r": set(), }, ), ( "decrease", { "n": {"decrease", "decreases"}, "a": set(), "v": {"decrease", "decreases", "decreased", "decreasing"}, "r": set(), }, ), ( "wonder", { "n": { "wonder", "wonderment", "wonderments", "wonders", "wonderers", "wonderer", }, "a": {"wondrous"}, "v": {"wondering", "wonder", "wonders", "wondered"}, "r": {"wondrous", "wondrously"}, }, ), ( "rest", { "n": {"rest", "rests", "resters", "rester"}, "a": set(), "v": {"rest", "rests", "resting", "rested"}, "r": set(), }, ), ( "mutter", { "n": { "mutterer", "mutterers", "muttering", "mutter", "mutterings", "mutters", }, "a": set(), "v": {"muttering", "muttered", "mutters", "mutter"}, "r": set(), }, ), ( "implement", { "n": {"implementations", "implement", "implements", "implementation"}, "a": {"implemental"}, "v": {"implemented", "implement", "implements", "implementing"}, "r": set(), }, ), ( "evolve", { "n": {"evolution", "evolutions"}, "a": {"evolutionary"}, "v": {"evolved", "evolve", "evolves", "evolving"}, "r": {"evolutionarily"}, }, ), ( "allocate", { "n": {"allocations", "allocators", "allocation", "allocator"}, "a": {"allocable", "allocatable"}, "v": {"allocating", "allocates", "allocated", "allocate"}, "r": set(), }, ), ( "flood", { "n": {"flood", "flooding", "floodings", "floods"}, "a": set(), "v": {"flooding", "flooded", "flood", "floods"}, "r": set(), }, ), # Should there be `flooded` in 'a' here? ( "bow", { "n": {"bows", "bow"}, "a": set(), "v": {"bows", "bowing", "bowed", "bow"}, "r": set(), }, ), ( "advocate", { "n": { "advocates", "advocator", "advocacy", "advocacies", "advocators", "advocate", }, "a": set(), "v": {"advocates", "advocating", "advocated", "advocate"}, "r": set(), }, ), ( "divert", { "n": {"diversions", "diversionists", "diversionist", "diversion"}, "a": {"diversionary"}, "v": {"diverted", "diverts", "divert", "diverting"}, "r": set(), }, ), # Some adjectives ( "sweet", { "n": {"sweetnesses", "sweets", "sweetness", "sweet"}, "a": {"sweet"}, "v": set(), "r": {"sweet", "sweetly"}, }, ), ( "glossy", { "n": {"glossiness", "glossy", "glossies", "glossinesses"}, "a": {"glossy"}, "v": set(), "r": {"glossily"}, }, ), ( "relevant", { "n": {"relevancies", "relevance", "relevancy", "relevances"}, "a": {"relevant"}, "v": set(), "r": {"relevantly"}, }, ), ( "aloof", {"n": {"aloofnesses", "aloofness"}, "a": {"aloof"}, "v": set(), "r": {"aloof"}}, ), ( "therapeutic", { "n": { "therapists", "therapies", "therapy", "therapist", "therapeutic", "therapeutics", }, "a": {"therapeutical", "therapeutic"}, "v": set(), "r": {"therapeutically"}, }, ), ( "obviously", { "n": {"obviousnesses", "obviousness"}, "a": {"obvious"}, "v": set(), "r": {"obviously"}, }, ), ( "jumpy", { "n": {"jumpings", "jumpiness", "jumpinesses", "jump", "jumping", "jumps"}, "a": {"jumpy"}, "v": {"jump", "jumping", "jumped", "jumps"}, "r": set(), }, ), ( "venomous", {"n": {"venom", "venoms"}, "a": {"venomous"}, "v": set(), "r": {"venomously"}}, ), ( "laughable", { "n": {"laugher", "laughs", "laughers", "laugh"}, "a": {"laughable"}, "v": {"laughing", "laughs", "laughed", "laugh"}, "r": {"laughably"}, }, ), ( "demonic", { "n": {"demons", "demon", "demonizations", "demonization"}, "a": {"demonic"}, "v": {"demonized", "demonizing", "demonizes", "demonize"}, "r": set(), }, ), ( "knotty", { "n": {"knot", "knottiness", "knots", "knottinesses"}, "a": {"knotty"}, "v": {"knotted", "knotting", "knots", "knot"}, "r": set(), }, ), # Is `knottinesses` a valid plural? ( "little", { "n": {"little", "littlenesses", "littles", "littleness"}, "a": {"little"}, "v": set(), "r": {"little"}, }, ), # Is `littlenesses` a valid plural? ( "puzzling", { "n": { "puzzle", "puzzlers", "puzzler", "puzzlement", "puzzlements", "puzzles", }, "a": {"puzzling"}, "v": {"puzzle", "puzzled", "puzzles", "puzzling"}, "r": set(), }, ), ( "overrated", { "n": {"overratings", "overrating"}, "a": set(), "v": {"overrated", "overrating", "overrate", "overrates"}, "r": set(), }, ), ( "walk", { "n": {"walking", "walks", "walkings", "walker", "walk", "walkers"}, "a": {"walking"}, "v": {"walked", "walking", "walk", "walks"}, "r": set(), }, ), ( "walking", { "n": {"walking", "walks", "walkings", "walker", "walk", "walkers"}, "a": {"walking"}, "v": {"walked", "walking", "walk", "walks"}, "r": set(), }, ), ( "be", { "n": {"beings", "being"}, "a": set(), "v": { "wasn't", "being", "be", "are", "was", "am", "isn't", "is", "aren't", "been", "weren't", "were", "am not", }, "r": set(), }, ), ( "am", { "n": {"beings", "being"}, "a": set(), "v": { "wasn't", "being", "be", "are", "was", "am", "isn't", "is", "aren't", "been", "weren't", "were", "am not", }, "r": set(), }, ), ( "run", { "n": { "runnings", "run", "runninesses", "runner", "runniness", "running", "runs", "runners", }, "a": {"running", "runny"}, "v": {"running", "ran", "run", "runs"}, "r": set(), }, ), ( "ran", { "n": { "runnings", "run", "runninesses", "runner", "runniness", "running", "runs", "runners", }, "a": {"running", "runny"}, "v": {"running", "ran", "run", "runs"}, "r": set(), }, ), ( "blanket", { "n": {"blanket", "blankets"}, "a": {"blanket"}, "v": {"blankets", "blanketed", "blanketing", "blanket"}, "r": set(), }, ), ]
test_values = [('president', {'n': {'president', 'presidentship', 'presidencies', 'presidency', 'presidentships', 'presidents'}, 'r': {'presidentially'}, 'a': {'presidential'}, 'v': {'presiding', 'presides', 'preside', 'presided'}}), ('elect', {'n': {'elector', 'elects', 'electors', 'elective', 'electorates', 'elect', 'electives', 'elections', 'electorate', 'eligibility', 'election', 'eligibilities'}, 'r': set(), 'a': {'elect', 'electoral', 'elective', 'eligible'}, 'v': {'elect', 'elects', 'electing', 'elected'}}), ('running', {'n': {'runninesses', 'runnings', 'runs', 'running', 'runniness', 'runners', 'runner', 'run'}, 'a': {'running', 'runny'}, 'v': {'running', 'ran', 'runs', 'run'}, 'r': set()}), ('run', {'n': {'runninesses', 'runnings', 'runs', 'running', 'runniness', 'runners', 'runner', 'run'}, 'a': {'running', 'runny'}, 'v': {'running', 'ran', 'runs', 'run'}, 'r': set()}), ('operations', {'n': {'operators', 'operations', 'operation', 'operative', 'operator', 'operatives'}, 'a': {'operant', 'operative'}, 'v': {'operated', 'operating', 'operate', 'operates'}, 'r': {'operatively'}}), ('operate', {'n': {'operators', 'operations', 'operation', 'operative', 'operator', 'operatives'}, 'a': {'operant', 'operative'}, 'v': {'operated', 'operating', 'operate', 'operates'}, 'r': {'operatively'}}), ('invest', {'n': {'investitures', 'investors', 'investiture', 'investor', 'investments', 'investings', 'investment', 'investing'}, 'a': set(), 'v': {'invested', 'invests', 'invest', 'investing'}, 'r': set()}), ('investments', {'n': {'investitures', 'investors', 'investiture', 'investor', 'investments', 'investings', 'investment', 'investing'}, 'a': set(), 'v': {'invested', 'invests', 'invest', 'investing'}, 'r': set()}), ('conjugation', {'n': {'conjugate', 'conjugation', 'conjugates', 'conjugations'}, 'a': {'conjugate'}, 'v': {'conjugating', 'conjugated', 'conjugate', 'conjugates'}, 'r': set()}), ('do', {'n': {'does', 'doer', 'doers', 'do'}, 'a': set(), 'v': {'doing', "don't", 'does', "didn't", 'do', "doesn't", 'done', 'did'}, 'r': set()}), ('word', {'n': {'words', 'word', 'wordings', 'wording'}, 'a': set(), 'v': {'words', 'word', 'worded', 'wording'}, 'r': set()}), ('love', {'a': {'lovable', 'loveable'}, 'n': {'love', 'lover', 'lovers', 'loves'}, 'r': set(), 'v': {'love', 'loved', 'loves', 'loving'}}), ('word', {'n': {'words', 'word', 'wordings', 'wording'}, 'a': set(), 'v': {'words', 'word', 'worded', 'wording'}, 'r': set()}), ('verb', {'n': {'verbs', 'verb'}, 'a': {'verbal'}, 'v': {'verbifying', 'verbified', 'verbify', 'verbifies'}, 'r': {'verbally'}}), ('genetic', {'n': {'geneticist', 'genetics', 'geneticists', 'genes', 'gene'}, 'a': {'genic', 'genetic', 'genetical'}, 'v': set(), 'r': {'genetically'}}), ('politician', {'r': {'politically'}, 'a': {'political'}, 'n': {'politician', 'politicians', 'politics'}, 'v': set()}), ('death', {'n': {'death', 'dying', 'deaths', 'die', 'dyings', 'dice'}, 'a': {'dying', 'deathly'}, 'v': {'died', 'die', 'dying', 'dies'}, 'r': {'deathly'}}), ('attitude', {'n': {'attitudes', 'attitude'}, 'a': set(), 'v': {'attitudinise', 'attitudinized', 'attitudinize', 'attitudinizes', 'attitudinizing'}, 'r': set()}), ('cheek', {'n': {'cheek', 'cheekinesses', 'cheeks', 'cheekiness'}, 'a': {'cheeky'}, 'v': {'cheek', 'cheeks', 'cheeked', 'cheeking'}, 'r': {'cheekily'}}), ('world', {'n': {'worldliness', 'world', 'worldlinesses', 'worlds'}, 'a': {'worldly', 'world'}, 'v': set(), 'r': set()}), ('lake', {'n': {'lake', 'lakes'}, 'a': set(), 'v': set(), 'r': set()}), ('guitar', {'n': {'guitarist', 'guitarists', 'guitar', 'guitars'}, 'a': set(), 'v': set(), 'r': set()}), ('presence', {'n': {'presenter', 'present', 'presents', 'presentness', 'presenters', 'presentnesses', 'presentments', 'presentations', 'presences', 'presence', 'presentment', 'presentation'}, 'a': {'present'}, 'v': {'present', 'presents', 'presenting', 'presented'}, 'r': {'presently'}}), ('enthusiasm', {'n': {'enthusiasm', 'enthusiasms'}, 'a': {'enthusiastic'}, 'v': set(), 'r': {'enthusiastically'}}), ('organization', {'n': {'organizers', 'organization', 'organizations', 'organizer'}, 'a': set(), 'v': {'organize', 'organized', 'organizing', 'organizes'}, 'r': set()}), ('player', {'n': {'plays', 'playlet', 'playings', 'players', 'playing', 'playlets', 'play', 'player'}, 'a': set(), 'v': {'plays', 'play', 'playing', 'played'}, 'r': set()}), ('transportation', {'n': {'transporters', 'transportation', 'transportations', 'transporter', 'transport', 'transports'}, 'a': set(), 'v': {'transport', 'transporting', 'transports', 'transported'}, 'r': set()}), ('television', {'n': {'televisions', 'television'}, 'a': set(), 'v': {'televising', 'televise', 'televises', 'televised'}, 'r': set()}), ('cousin', {'n': {'cousins', 'cousin'}, 'a': {'cousinly'}, 'v': set(), 'r': set()}), ('ability', {'n': {'abilities', 'ability'}, 'a': {'able'}, 'v': set(), 'r': {'ably'}}), ('chapter', {'n': {'chapters', 'chapter'}, 'a': set(), 'v': set(), 'r': set()}), ('appearance', {'n': {'appearances', 'apparitions', 'appearance', 'apparencies', 'apparentness', 'apparentnesses', 'apparition', 'apparency'}, 'a': {'apparent'}, 'v': {'appears', 'appeared', 'appear', 'appearing'}, 'r': {'apparently'}}), ('drawing', {'n': {'drawings', 'drawers', 'draws', 'drawer', 'drawees', 'drawee', 'draw', 'drawing'}, 'a': set(), 'v': {'draws', 'drew', 'drawn', 'draw', 'drawing'}, 'r': set()}), ('university', {'n': {'university', 'universities'}, 'a': set(), 'v': set(), 'r': set()}), ('performance', {'n': {'performings', 'performing', 'performances', 'performance', 'performer', 'performers'}, 'a': set(), 'v': {'performs', 'performing', 'performed', 'perform'}, 'r': set()}), ('revenue', {'n': {'revenue', 'revenues'}, 'a': set(), 'v': set(), 'r': set()}), ('cling', {'n': {'cling', 'clings'}, 'a': set(), 'v': {'clung', 'cling', 'clinging', 'clings'}, 'r': set()}), ('decrease', {'n': {'decrease', 'decreases'}, 'a': set(), 'v': {'decrease', 'decreases', 'decreased', 'decreasing'}, 'r': set()}), ('wonder', {'n': {'wonder', 'wonderment', 'wonderments', 'wonders', 'wonderers', 'wonderer'}, 'a': {'wondrous'}, 'v': {'wondering', 'wonder', 'wonders', 'wondered'}, 'r': {'wondrous', 'wondrously'}}), ('rest', {'n': {'rest', 'rests', 'resters', 'rester'}, 'a': set(), 'v': {'rest', 'rests', 'resting', 'rested'}, 'r': set()}), ('mutter', {'n': {'mutterer', 'mutterers', 'muttering', 'mutter', 'mutterings', 'mutters'}, 'a': set(), 'v': {'muttering', 'muttered', 'mutters', 'mutter'}, 'r': set()}), ('implement', {'n': {'implementations', 'implement', 'implements', 'implementation'}, 'a': {'implemental'}, 'v': {'implemented', 'implement', 'implements', 'implementing'}, 'r': set()}), ('evolve', {'n': {'evolution', 'evolutions'}, 'a': {'evolutionary'}, 'v': {'evolved', 'evolve', 'evolves', 'evolving'}, 'r': {'evolutionarily'}}), ('allocate', {'n': {'allocations', 'allocators', 'allocation', 'allocator'}, 'a': {'allocable', 'allocatable'}, 'v': {'allocating', 'allocates', 'allocated', 'allocate'}, 'r': set()}), ('flood', {'n': {'flood', 'flooding', 'floodings', 'floods'}, 'a': set(), 'v': {'flooding', 'flooded', 'flood', 'floods'}, 'r': set()}), ('bow', {'n': {'bows', 'bow'}, 'a': set(), 'v': {'bows', 'bowing', 'bowed', 'bow'}, 'r': set()}), ('advocate', {'n': {'advocates', 'advocator', 'advocacy', 'advocacies', 'advocators', 'advocate'}, 'a': set(), 'v': {'advocates', 'advocating', 'advocated', 'advocate'}, 'r': set()}), ('divert', {'n': {'diversions', 'diversionists', 'diversionist', 'diversion'}, 'a': {'diversionary'}, 'v': {'diverted', 'diverts', 'divert', 'diverting'}, 'r': set()}), ('sweet', {'n': {'sweetnesses', 'sweets', 'sweetness', 'sweet'}, 'a': {'sweet'}, 'v': set(), 'r': {'sweet', 'sweetly'}}), ('glossy', {'n': {'glossiness', 'glossy', 'glossies', 'glossinesses'}, 'a': {'glossy'}, 'v': set(), 'r': {'glossily'}}), ('relevant', {'n': {'relevancies', 'relevance', 'relevancy', 'relevances'}, 'a': {'relevant'}, 'v': set(), 'r': {'relevantly'}}), ('aloof', {'n': {'aloofnesses', 'aloofness'}, 'a': {'aloof'}, 'v': set(), 'r': {'aloof'}}), ('therapeutic', {'n': {'therapists', 'therapies', 'therapy', 'therapist', 'therapeutic', 'therapeutics'}, 'a': {'therapeutical', 'therapeutic'}, 'v': set(), 'r': {'therapeutically'}}), ('obviously', {'n': {'obviousnesses', 'obviousness'}, 'a': {'obvious'}, 'v': set(), 'r': {'obviously'}}), ('jumpy', {'n': {'jumpings', 'jumpiness', 'jumpinesses', 'jump', 'jumping', 'jumps'}, 'a': {'jumpy'}, 'v': {'jump', 'jumping', 'jumped', 'jumps'}, 'r': set()}), ('venomous', {'n': {'venom', 'venoms'}, 'a': {'venomous'}, 'v': set(), 'r': {'venomously'}}), ('laughable', {'n': {'laugher', 'laughs', 'laughers', 'laugh'}, 'a': {'laughable'}, 'v': {'laughing', 'laughs', 'laughed', 'laugh'}, 'r': {'laughably'}}), ('demonic', {'n': {'demons', 'demon', 'demonizations', 'demonization'}, 'a': {'demonic'}, 'v': {'demonized', 'demonizing', 'demonizes', 'demonize'}, 'r': set()}), ('knotty', {'n': {'knot', 'knottiness', 'knots', 'knottinesses'}, 'a': {'knotty'}, 'v': {'knotted', 'knotting', 'knots', 'knot'}, 'r': set()}), ('little', {'n': {'little', 'littlenesses', 'littles', 'littleness'}, 'a': {'little'}, 'v': set(), 'r': {'little'}}), ('puzzling', {'n': {'puzzle', 'puzzlers', 'puzzler', 'puzzlement', 'puzzlements', 'puzzles'}, 'a': {'puzzling'}, 'v': {'puzzle', 'puzzled', 'puzzles', 'puzzling'}, 'r': set()}), ('overrated', {'n': {'overratings', 'overrating'}, 'a': set(), 'v': {'overrated', 'overrating', 'overrate', 'overrates'}, 'r': set()}), ('walk', {'n': {'walking', 'walks', 'walkings', 'walker', 'walk', 'walkers'}, 'a': {'walking'}, 'v': {'walked', 'walking', 'walk', 'walks'}, 'r': set()}), ('walking', {'n': {'walking', 'walks', 'walkings', 'walker', 'walk', 'walkers'}, 'a': {'walking'}, 'v': {'walked', 'walking', 'walk', 'walks'}, 'r': set()}), ('be', {'n': {'beings', 'being'}, 'a': set(), 'v': {"wasn't", 'being', 'be', 'are', 'was', 'am', "isn't", 'is', "aren't", 'been', "weren't", 'were', 'am not'}, 'r': set()}), ('am', {'n': {'beings', 'being'}, 'a': set(), 'v': {"wasn't", 'being', 'be', 'are', 'was', 'am', "isn't", 'is', "aren't", 'been', "weren't", 'were', 'am not'}, 'r': set()}), ('run', {'n': {'runnings', 'run', 'runninesses', 'runner', 'runniness', 'running', 'runs', 'runners'}, 'a': {'running', 'runny'}, 'v': {'running', 'ran', 'run', 'runs'}, 'r': set()}), ('ran', {'n': {'runnings', 'run', 'runninesses', 'runner', 'runniness', 'running', 'runs', 'runners'}, 'a': {'running', 'runny'}, 'v': {'running', 'ran', 'run', 'runs'}, 'r': set()}), ('blanket', {'n': {'blanket', 'blankets'}, 'a': {'blanket'}, 'v': {'blankets', 'blanketed', 'blanketing', 'blanket'}, 'r': set()})]
def myfunc(str): print(str) nstr = str.lower() for i in range(len(str)): nstr[i+1].upper() return nstr print(myfunc("SlseJbKWdOEuhB"))
def myfunc(str): print(str) nstr = str.lower() for i in range(len(str)): nstr[i + 1].upper() return nstr print(myfunc('SlseJbKWdOEuhB'))
''' @Coded by TSG, 2021 Problem: FizzBuzz is a well known programming assignment, asked during interviews. The given code solves the FizzBuzz problem and uses the words "Solo" and "Learn" instead of "Fizz" and "Buzz". It takes an input n and outputs the numbers from 1 to n. For each multiple of 3, print "Solo" instead of the number. For each multiple of 5, prints "Learn" instead of the number. For numbers which are multiples of both 3 and 5, output "SoloLearn". You need to change the code to skip the even numbers, so that the logic only applies to odd numbers in the range. ''' # your code goes here for x in range(1, int(input())): if x % 2 == 0: continue if x % 3 == 0 and x % 5 == 0: print("SoloLearn") elif x % 3 == 0: print("Solo") elif x % 5 == 0: print("Learn") else: print(x)
""" @Coded by TSG, 2021 Problem: FizzBuzz is a well known programming assignment, asked during interviews. The given code solves the FizzBuzz problem and uses the words "Solo" and "Learn" instead of "Fizz" and "Buzz". It takes an input n and outputs the numbers from 1 to n. For each multiple of 3, print "Solo" instead of the number. For each multiple of 5, prints "Learn" instead of the number. For numbers which are multiples of both 3 and 5, output "SoloLearn". You need to change the code to skip the even numbers, so that the logic only applies to odd numbers in the range. """ for x in range(1, int(input())): if x % 2 == 0: continue if x % 3 == 0 and x % 5 == 0: print('SoloLearn') elif x % 3 == 0: print('Solo') elif x % 5 == 0: print('Learn') else: print(x)
# # PySNMP MIB module HP-ICF-MLD-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-ICF-MLD-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:22:09 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") ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint") hpSwitch, = mibBuilder.importSymbols("HP-ICF-OID", "hpSwitch") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") InetAddressIPv6, = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressIPv6") mldInterfaceEntry, = mibBuilder.importSymbols("IPV6-MLD-MIB", "mldInterfaceEntry") PortList, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "PortList") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") Counter64, Integer32, Gauge32, Counter32, ModuleIdentity, Unsigned32, ObjectIdentity, NotificationType, IpAddress, TimeTicks, MibIdentifier, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Integer32", "Gauge32", "Counter32", "ModuleIdentity", "Unsigned32", "ObjectIdentity", "NotificationType", "IpAddress", "TimeTicks", "MibIdentifier", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits") RowStatus, TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "TextualConvention", "DisplayString", "TruthValue") hpicfMldMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48)) hpicfMldMIB.setRevisions(('2015-09-11 00:00', '2013-02-10 00:00', '2011-03-10 00:00', '2011-01-11 00:00', '2010-09-09 00:00', '2007-07-02 00:00',)) if mibBuilder.loadTexts: hpicfMldMIB.setLastUpdated('201509110000Z') if mibBuilder.loadTexts: hpicfMldMIB.setOrganization('HP Networking') class HpicfMcastGroupTypeDefinition(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("standard", 1), ("filtered", 2), ("mini", 3)) class HpicfMldIfEntryState(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("initialWait", 1), ("querierElection", 2), ("querier", 3), ("nonQuerier", 4)) hpicfMldObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1)) hpicfMld = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1)) hpicfMldConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2)) hpicfMldGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1)) hpicfMldCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 2)) hpicfMldControlUnknownMulticast = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 1), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfMldControlUnknownMulticast.setStatus('current') hpicfMldConfigForcedLeaveInterval = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfMldConfigForcedLeaveInterval.setStatus('current') hpicfMldEnabledCount = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldEnabledCount.setStatus('current') hpicfMldMcastGroupJoinsCount = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldMcastGroupJoinsCount.setStatus('current') hpicfMldIfTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5), ) if mibBuilder.loadTexts: hpicfMldIfTable.setStatus('current') hpicfMldIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1), ) mldInterfaceEntry.registerAugmentions(("HP-ICF-MLD-MIB", "hpicfMldIfEntry")) hpicfMldIfEntry.setIndexNames(*mldInterfaceEntry.getIndexNames()) if mibBuilder.loadTexts: hpicfMldIfEntry.setStatus('current') hpicfMldIfEntryQuerierFeature = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 1), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfMldIfEntryQuerierFeature.setStatus('current') hpicfMldIfEntrySnoopingFeature = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 2), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfMldIfEntrySnoopingFeature.setStatus('current') hpicfMldIfEntryQuerierPort = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryQuerierPort.setStatus('current') hpicfMldIfEntryFilteredJoins = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryFilteredJoins.setStatus('current') hpicfMldIfEntryStandardJoins = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStandardJoins.setStatus('current') hpicfMldIfEntryPortsWithMcastRouter = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 6), PortList()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryPortsWithMcastRouter.setStatus('current') hpicfMldIfEntryStatGeneralQueryRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatGeneralQueryRx.setStatus('current') hpicfMldIfEntryStatQueryTx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatQueryTx.setStatus('current') hpicfMldIfEntryStatGSQRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatGSQRx.setStatus('current') hpicfMldIfEntryStatGSQTx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatGSQTx.setStatus('current') hpicfMldIfEntryStatMldV1ReportRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatMldV1ReportRx.setStatus('current') hpicfMldIfEntryStatMldV2ReportRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatMldV2ReportRx.setStatus('current') hpicfMldIfEntryStatMldV1LeaveRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatMldV1LeaveRx.setStatus('current') hpicfMldIfEntryStatUnknownMldTypeRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatUnknownMldTypeRx.setStatus('current') hpicfMldIfEntryStatUnknownPktRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatUnknownPktRx.setStatus('current') hpicfMldIfEntryStatForwardToRoutersTx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatForwardToRoutersTx.setStatus('current') hpicfMldIfEntryStatForwardToAllPortsTx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatForwardToAllPortsTx.setStatus('current') hpicfMldIfEntryStatFastLeaves = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatFastLeaves.setStatus('current') hpicfMldIfEntryStatForcedFastLeaves = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatForcedFastLeaves.setStatus('current') hpicfMldIfEntryStatJoinTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatJoinTimeouts.setStatus('current') hpicfMldIfEntryStatWrongVersionQueries = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatWrongVersionQueries.setStatus('current') hpicfMldIfEntryLastMemberQueryCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryLastMemberQueryCount.setStatus('current') hpicfMldIfEntryStartupQueryCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStartupQueryCount.setStatus('current') hpicfMldIfEntryStartupQueryInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 24), Unsigned32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStartupQueryInterval.setStatus('current') hpicfMldIfEntryStatExcludeGroupJoinsCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatExcludeGroupJoinsCount.setStatus('current') hpicfMldIfEntryStatIncludeGroupJoinsCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatIncludeGroupJoinsCount.setStatus('current') hpicfMldIfEntryStatFilteredExcludeGroupJoinsCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatFilteredExcludeGroupJoinsCount.setStatus('current') hpicfMldIfEntryStatFilteredIncludeGroupJoinsCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatFilteredIncludeGroupJoinsCount.setStatus('current') hpicfMldIfEntryStatStandardExcludeGroupJoinsCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatStandardExcludeGroupJoinsCount.setStatus('current') hpicfMldIfEntryStatStandardIncludeGroupJoinsCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatStandardIncludeGroupJoinsCount.setStatus('current') hpicfMldIfEntryStatV1QueryTx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 31), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatV1QueryTx.setStatus('current') hpicfMldIfEntryStatV1QueryRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatV1QueryRx.setStatus('current') hpicfMldIfEntryStatV2QueryTx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 33), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatV2QueryTx.setStatus('current') hpicfMldIfEntryStatV2QueryRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatV2QueryRx.setStatus('current') hpicfMldIfEntryStatGSSQTx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 35), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatGSSQTx.setStatus('current') hpicfMldIfEntryStatGSSQRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 36), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatGSSQRx.setStatus('current') hpicfMldIfEntryStatMalformedPktRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 37), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatMalformedPktRx.setStatus('current') hpicfMldIfEntryStatBadCheckSumRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 38), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatBadCheckSumRx.setStatus('current') hpicfMldIfEntryStatMartianSourceRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 39), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatMartianSourceRx.setStatus('current') hpicfMldIfEntryStatPacketsRxOnDisabled = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 40), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatPacketsRxOnDisabled.setStatus('current') hpicfMldIfEntryStrictVersionMode = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 41), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfMldIfEntryStrictVersionMode.setStatus('current') hpicfMldIfEntryStatMldV1ReportTx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 42), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatMldV1ReportTx.setStatus('current') hpicfMldIfEntryStatMldV2ReportTx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 43), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatMldV2ReportTx.setStatus('current') hpicfMldIfEntryState = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 44), HpicfMldIfEntryState()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryState.setStatus('current') hpicfMldIfEntryStatV1GSQRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 45), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatV1GSQRx.setStatus('current') hpicfMldIfEntryStatV1GSQTx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 46), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatV1GSQTx.setStatus('current') hpicfMldIfEntryStatV2GSQRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 47), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatV2GSQRx.setStatus('current') hpicfMldIfEntryStatV2GSQTx = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 48), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStatV2GSQTx.setStatus('current') hpicfMldIfEntryStartupQueryExpiryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 49), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryStartupQueryExpiryTime.setStatus('current') hpicfMldIfEntryOtherQuerierInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 50), Unsigned32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryOtherQuerierInterval.setStatus('current') hpicfMldIfEntryOtherQuerierExpiryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 51), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldIfEntryOtherQuerierExpiryTime.setStatus('current') hpicfMldCacheTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6), ) if mibBuilder.loadTexts: hpicfMldCacheTable.setStatus('current') hpicfMldCacheEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1), ).setIndexNames((0, "HP-ICF-MLD-MIB", "hpicfMldCacheIfIndex"), (0, "HP-ICF-MLD-MIB", "hpicfMldCacheAddress")) if mibBuilder.loadTexts: hpicfMldCacheEntry.setStatus('current') hpicfMldCacheIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: hpicfMldCacheIfIndex.setStatus('current') hpicfMldCacheAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 2), InetAddressIPv6().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16)) if mibBuilder.loadTexts: hpicfMldCacheAddress.setStatus('current') hpicfMldCacheSelf = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 3), TruthValue().clone('true')).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpicfMldCacheSelf.setStatus('current') hpicfMldCacheLastReporter = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 4), InetAddressIPv6().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16)).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldCacheLastReporter.setStatus('current') hpicfMldCacheUpTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 5), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldCacheUpTime.setStatus('current') hpicfMldCacheExpiryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 6), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldCacheExpiryTime.setStatus('current') hpicfMldGroupType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 7), HpicfMcastGroupTypeDefinition()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldGroupType.setStatus('current') hpicfJoinedPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 8), PortList()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfJoinedPorts.setStatus('current') hpicfMldCacheStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 9), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpicfMldCacheStatus.setStatus('current') hpicfMldCacheFilterMode = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("include", 1), ("exclude", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldCacheFilterMode.setStatus('current') hpicfMldCacheExcludeModeExpiryTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 11), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldCacheExcludeModeExpiryTimer.setStatus('current') hpicfMldCacheVersion1HostTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 12), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldCacheVersion1HostTimer.setStatus('current') hpicfMldCacheSrcCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldCacheSrcCount.setStatus('current') class HpicfMldConfigPortModeType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("auto", 1), ("blocked", 2), ("forward", 3)) hpicfMldPortConfigTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7), ) if mibBuilder.loadTexts: hpicfMldPortConfigTable.setStatus('current') hpicfMldPortConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7, 1), ).setIndexNames((0, "HP-ICF-MLD-MIB", "hpicfMldPortConfigEntryInterfaceIfIndex"), (0, "HP-ICF-MLD-MIB", "hpicfMldPortConfigEntryIndex")) if mibBuilder.loadTexts: hpicfMldPortConfigEntry.setStatus('current') hpicfMldPortConfigEntryInterfaceIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: hpicfMldPortConfigEntryInterfaceIfIndex.setStatus('current') hpicfMldPortConfigEntryIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: hpicfMldPortConfigEntryIndex.setStatus('current') hpicfMldPortConfigEntryPortModeFeature = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7, 1, 3), HpicfMldConfigPortModeType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfMldPortConfigEntryPortModeFeature.setStatus('current') hpicfMldPortConfigEntryForcedLeaveFeature = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7, 1, 4), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfMldPortConfigEntryForcedLeaveFeature.setStatus('current') hpicfMldPortConfigEntryFastLeaveFeature = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7, 1, 5), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfMldPortConfigEntryFastLeaveFeature.setStatus('current') hpicfMldFilteredGroupPortCacheTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 8), ) if mibBuilder.loadTexts: hpicfMldFilteredGroupPortCacheTable.setStatus('current') hpicfMldFilteredGroupPortCacheEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 8, 1), ).setIndexNames((0, "HP-ICF-MLD-MIB", "hpicfMldFilteredGroupPortCacheIfIndex"), (0, "HP-ICF-MLD-MIB", "hpicfMldFilteredGroupPortCacheGroupAddress"), (0, "HP-ICF-MLD-MIB", "hpicfMldFilteredGroupPortCachePortIndex")) if mibBuilder.loadTexts: hpicfMldFilteredGroupPortCacheEntry.setStatus('current') hpicfMldFilteredGroupPortCacheIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 8, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: hpicfMldFilteredGroupPortCacheIfIndex.setStatus('current') hpicfMldFilteredGroupPortCacheGroupAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 8, 1, 2), InetAddressIPv6()) if mibBuilder.loadTexts: hpicfMldFilteredGroupPortCacheGroupAddress.setStatus('current') hpicfMldFilteredGroupPortCachePortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 8, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: hpicfMldFilteredGroupPortCachePortIndex.setStatus('current') hpicfMldFilteredGroupPortCacheExpiryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 8, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldFilteredGroupPortCacheExpiryTime.setStatus('current') hpicfMldSrcListTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9), ) if mibBuilder.loadTexts: hpicfMldSrcListTable.setStatus('current') hpicfMldSrcListEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1), ).setIndexNames((0, "HP-ICF-MLD-MIB", "hpicfMldSrcListIfIndex"), (0, "HP-ICF-MLD-MIB", "hpicfMldSrcListAddress"), (0, "HP-ICF-MLD-MIB", "hpicfMldSrcListHostAddress")) if mibBuilder.loadTexts: hpicfMldSrcListEntry.setStatus('current') hpicfMldSrcListIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: hpicfMldSrcListIfIndex.setStatus('current') hpicfMldSrcListAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 2), InetAddressIPv6().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16)) if mibBuilder.loadTexts: hpicfMldSrcListAddress.setStatus('current') hpicfMldSrcListHostAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 3), InetAddressIPv6().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16)) if mibBuilder.loadTexts: hpicfMldSrcListHostAddress.setStatus('current') hpicfMldSrcListPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 4), PortList()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldSrcListPorts.setStatus('current') hpicfMldSrcListExpiry = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 5), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldSrcListExpiry.setStatus('current') hpicfMldSrcListUpTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 6), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldSrcListUpTime.setStatus('current') hpicfMldSrcListType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 7), HpicfMcastGroupTypeDefinition()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldSrcListType.setStatus('current') hpicfMldPortSrcTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10), ) if mibBuilder.loadTexts: hpicfMldPortSrcTable.setStatus('current') hpicfMldPortSrcEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1), ).setIndexNames((0, "HP-ICF-MLD-MIB", "hpicfMldPortSrcIfIndex"), (0, "HP-ICF-MLD-MIB", "hpicfMldPortSrcAddress"), (0, "HP-ICF-MLD-MIB", "hpicfMldPortSrcHostAddress"), (0, "HP-ICF-MLD-MIB", "hpicfMldPortSrcPortIndex")) if mibBuilder.loadTexts: hpicfMldPortSrcEntry.setStatus('current') hpicfMldPortSrcIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: hpicfMldPortSrcIfIndex.setStatus('current') hpicfMldPortSrcAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 2), InetAddressIPv6().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16)) if mibBuilder.loadTexts: hpicfMldPortSrcAddress.setStatus('current') hpicfMldPortSrcHostAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 3), InetAddressIPv6().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16)) if mibBuilder.loadTexts: hpicfMldPortSrcHostAddress.setStatus('current') hpicfMldPortSrcPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: hpicfMldPortSrcPortIndex.setStatus('current') hpicfMldPortSrcExpiry = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 5), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldPortSrcExpiry.setStatus('current') hpicfMldPortSrcUpTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 6), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldPortSrcUpTime.setStatus('current') hpicfMldPortSrcFilterMode = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("include", 1), ("exclude", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldPortSrcFilterMode.setStatus('current') hpicfMldMcastExcludeGroupJoinsCount = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldMcastExcludeGroupJoinsCount.setStatus('current') hpicfMldMcastIncludeGroupJoinsCount = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldMcastIncludeGroupJoinsCount.setStatus('current') hpicfMldMcastPortFastLearn = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 13), PortList()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfMldMcastPortFastLearn.setStatus('current') hpicfMldGroupPortCacheTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14), ) if mibBuilder.loadTexts: hpicfMldGroupPortCacheTable.setStatus('current') hpicfMldGroupPortCacheEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1), ).setIndexNames((0, "HP-ICF-MLD-MIB", "hpicfMldGroupPortCacheIfIndex"), (0, "HP-ICF-MLD-MIB", "hpicfMldGroupPortCacheGroupAddress"), (0, "HP-ICF-MLD-MIB", "hpicfMldGroupPortCachePortIndex")) if mibBuilder.loadTexts: hpicfMldGroupPortCacheEntry.setStatus('current') hpicfMldGroupPortCacheIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: hpicfMldGroupPortCacheIfIndex.setStatus('current') hpicfMldGroupPortCacheGroupAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 2), InetAddressIPv6()) if mibBuilder.loadTexts: hpicfMldGroupPortCacheGroupAddress.setStatus('current') hpicfMldGroupPortCachePortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: hpicfMldGroupPortCachePortIndex.setStatus('current') hpicfMldGroupPortCacheExpiryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldGroupPortCacheExpiryTime.setStatus('current') hpicfMldGroupPortCacheUpTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 5), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldGroupPortCacheUpTime.setStatus('current') hpicfMldGroupPortCacheVersion1Timer = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 6), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldGroupPortCacheVersion1Timer.setStatus('current') hpicfMldGroupPortCacheFilterTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 7), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldGroupPortCacheFilterTimer.setStatus('current') hpicfMldGroupPortCacheFilterMode = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("include", 1), ("exclude", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldGroupPortCacheFilterMode.setStatus('current') hpicfMldGroupPortCacheExcludeSrcCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldGroupPortCacheExcludeSrcCount.setStatus('current') hpicfMldGroupPortCacheRequestedSrcCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpicfMldGroupPortCacheRequestedSrcCount.setStatus('current') hpicfMldReload = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 15), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpicfMldReload.setStatus('current') hpicfMldBaseGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 1)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldControlUnknownMulticast"), ("HP-ICF-MLD-MIB", "hpicfMldConfigForcedLeaveInterval"), ("HP-ICF-MLD-MIB", "hpicfMldEnabledCount"), ("HP-ICF-MLD-MIB", "hpicfMldMcastGroupJoinsCount")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldBaseGroup = hpicfMldBaseGroup.setStatus('current') hpicfMldIfGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 2)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldIfEntryQuerierFeature"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntrySnoopingFeature"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryQuerierPort"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryFilteredJoins"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStandardJoins"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryPortsWithMcastRouter"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGeneralQueryRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatQueryTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGSQRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGSQTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV1ReportRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV2ReportRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV1LeaveRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatUnknownMldTypeRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatUnknownPktRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatForwardToRoutersTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatForwardToAllPortsTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatFastLeaves"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatForcedFastLeaves"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatJoinTimeouts")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldIfGroup = hpicfMldIfGroup.setStatus('current') hpicfMldCacheGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 3)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldCacheSelf"), ("HP-ICF-MLD-MIB", "hpicfMldCacheLastReporter"), ("HP-ICF-MLD-MIB", "hpicfMldCacheUpTime"), ("HP-ICF-MLD-MIB", "hpicfMldCacheExpiryTime"), ("HP-ICF-MLD-MIB", "hpicfMldGroupType"), ("HP-ICF-MLD-MIB", "hpicfJoinedPorts"), ("HP-ICF-MLD-MIB", "hpicfMldCacheStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldCacheGroup = hpicfMldCacheGroup.setStatus('current') hpicfMldPortGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 4)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldPortConfigEntryPortModeFeature"), ("HP-ICF-MLD-MIB", "hpicfMldPortConfigEntryForcedLeaveFeature"), ("HP-ICF-MLD-MIB", "hpicfMldPortConfigEntryFastLeaveFeature")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldPortGroup = hpicfMldPortGroup.setStatus('current') hpicfMldFilteredGroupPortCacheGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 5)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldFilteredGroupPortCacheExpiryTime")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldFilteredGroupPortCacheGroup = hpicfMldFilteredGroupPortCacheGroup.setStatus('current') hpicfMldBaseGroupV2 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 6)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldControlUnknownMulticast"), ("HP-ICF-MLD-MIB", "hpicfMldConfigForcedLeaveInterval"), ("HP-ICF-MLD-MIB", "hpicfMldEnabledCount"), ("HP-ICF-MLD-MIB", "hpicfMldMcastGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldMcastExcludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldMcastIncludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldMcastPortFastLearn")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldBaseGroupV2 = hpicfMldBaseGroupV2.setStatus('current') hpicfMldIfGroupV2 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 7)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldIfEntryQuerierFeature"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntrySnoopingFeature"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryQuerierPort"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryFilteredJoins"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStandardJoins"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryPortsWithMcastRouter"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGeneralQueryRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatQueryTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGSQRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGSQTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV1ReportRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV2ReportRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV1LeaveRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatUnknownMldTypeRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatUnknownPktRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatForwardToRoutersTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatForwardToAllPortsTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatFastLeaves"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatForcedFastLeaves"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatJoinTimeouts"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatWrongVersionQueries"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryLastMemberQueryCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStartupQueryCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStartupQueryInterval"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatExcludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatIncludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatFilteredExcludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatFilteredIncludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatStandardExcludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatStandardIncludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV1QueryTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV1QueryRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV2QueryTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV2QueryRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGSSQTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGSSQRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMalformedPktRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatBadCheckSumRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMartianSourceRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatPacketsRxOnDisabled"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStrictVersionMode"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV1ReportTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV2ReportTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryState"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV1GSQRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV1GSQTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV2GSQRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV2GSQTx")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldIfGroupV2 = hpicfMldIfGroupV2.setStatus('current') hpicfMldCacheGroupV2 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 8)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldCacheSelf"), ("HP-ICF-MLD-MIB", "hpicfMldCacheLastReporter"), ("HP-ICF-MLD-MIB", "hpicfMldCacheUpTime"), ("HP-ICF-MLD-MIB", "hpicfMldCacheExpiryTime"), ("HP-ICF-MLD-MIB", "hpicfMldGroupType"), ("HP-ICF-MLD-MIB", "hpicfJoinedPorts"), ("HP-ICF-MLD-MIB", "hpicfMldCacheStatus"), ("HP-ICF-MLD-MIB", "hpicfMldCacheFilterMode"), ("HP-ICF-MLD-MIB", "hpicfMldCacheExcludeModeExpiryTimer"), ("HP-ICF-MLD-MIB", "hpicfMldCacheVersion1HostTimer"), ("HP-ICF-MLD-MIB", "hpicfMldCacheSrcCount")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldCacheGroupV2 = hpicfMldCacheGroupV2.setStatus('current') hpicfMldSrcListGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 9)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldSrcListPorts"), ("HP-ICF-MLD-MIB", "hpicfMldSrcListExpiry"), ("HP-ICF-MLD-MIB", "hpicfMldSrcListUpTime"), ("HP-ICF-MLD-MIB", "hpicfMldSrcListType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldSrcListGroup = hpicfMldSrcListGroup.setStatus('current') hpicfMldPortSrcGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 10)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldPortSrcExpiry"), ("HP-ICF-MLD-MIB", "hpicfMldPortSrcUpTime"), ("HP-ICF-MLD-MIB", "hpicfMldPortSrcFilterMode")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldPortSrcGroup = hpicfMldPortSrcGroup.setStatus('current') hpicfMldGroupPortCacheGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 11)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldGroupPortCacheExpiryTime"), ("HP-ICF-MLD-MIB", "hpicfMldGroupPortCacheUpTime"), ("HP-ICF-MLD-MIB", "hpicfMldGroupPortCacheVersion1Timer"), ("HP-ICF-MLD-MIB", "hpicfMldGroupPortCacheFilterTimer"), ("HP-ICF-MLD-MIB", "hpicfMldGroupPortCacheFilterMode"), ("HP-ICF-MLD-MIB", "hpicfMldGroupPortCacheExcludeSrcCount"), ("HP-ICF-MLD-MIB", "hpicfMldGroupPortCacheRequestedSrcCount")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldGroupPortCacheGroup = hpicfMldGroupPortCacheGroup.setStatus('current') hpicfMldIfGroupV3 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 12)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldIfEntryQuerierFeature"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntrySnoopingFeature"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryQuerierPort"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryFilteredJoins"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStandardJoins"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryPortsWithMcastRouter"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGeneralQueryRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatQueryTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGSQRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGSQTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV1ReportRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV2ReportRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV1LeaveRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatUnknownMldTypeRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatUnknownPktRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatForwardToRoutersTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatForwardToAllPortsTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatFastLeaves"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatForcedFastLeaves"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatJoinTimeouts"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatWrongVersionQueries"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryLastMemberQueryCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStartupQueryCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStartupQueryInterval"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatExcludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatIncludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatFilteredExcludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatFilteredIncludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatStandardExcludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatStandardIncludeGroupJoinsCount"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV1QueryTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV1QueryRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV2QueryTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV2QueryRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGSSQTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatGSSQRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMalformedPktRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatBadCheckSumRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMartianSourceRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatPacketsRxOnDisabled"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStrictVersionMode"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV1ReportTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatMldV2ReportTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryState"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV1GSQRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV1GSQTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV2GSQRx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStatV2GSQTx"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryStartupQueryExpiryTime"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryOtherQuerierInterval"), ("HP-ICF-MLD-MIB", "hpicfMldIfEntryOtherQuerierExpiryTime")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldIfGroupV3 = hpicfMldIfGroupV3.setStatus('current') hpicfMldReloadModeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 13)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldReload")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldReloadModeGroup = hpicfMldReloadModeGroup.setStatus('current') hpicfMldMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 2, 1)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldBaseGroup"), ("HP-ICF-MLD-MIB", "hpicfMldIfGroup"), ("HP-ICF-MLD-MIB", "hpicfMldCacheGroup"), ("HP-ICF-MLD-MIB", "hpicfMldPortGroup"), ("HP-ICF-MLD-MIB", "hpicfMldFilteredGroupPortCacheGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldMIBCompliance = hpicfMldMIBCompliance.setStatus('current') hpicfMldMIBComplianceV2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 2, 2)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldBaseGroupV2"), ("HP-ICF-MLD-MIB", "hpicfMldIfGroupV2"), ("HP-ICF-MLD-MIB", "hpicfMldCacheGroupV2"), ("HP-ICF-MLD-MIB", "hpicfMldPortGroup"), ("HP-ICF-MLD-MIB", "hpicfMldFilteredGroupPortCacheGroup"), ("HP-ICF-MLD-MIB", "hpicfMldSrcListGroup"), ("HP-ICF-MLD-MIB", "hpicfMldPortSrcGroup"), ("HP-ICF-MLD-MIB", "hpicfMldGroupPortCacheGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldMIBComplianceV2 = hpicfMldMIBComplianceV2.setStatus('current') hpicfMldMIBComplianceV3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 2, 3)).setObjects(("HP-ICF-MLD-MIB", "hpicfMldBaseGroupV2"), ("HP-ICF-MLD-MIB", "hpicfMldIfGroupV3"), ("HP-ICF-MLD-MIB", "hpicfMldCacheGroupV2"), ("HP-ICF-MLD-MIB", "hpicfMldPortGroup"), ("HP-ICF-MLD-MIB", "hpicfMldFilteredGroupPortCacheGroup"), ("HP-ICF-MLD-MIB", "hpicfMldSrcListGroup"), ("HP-ICF-MLD-MIB", "hpicfMldPortSrcGroup"), ("HP-ICF-MLD-MIB", "hpicfMldGroupPortCacheGroup"), ("HP-ICF-MLD-MIB", "hpicfMldReloadModeGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicfMldMIBComplianceV3 = hpicfMldMIBComplianceV3.setStatus('current') mibBuilder.exportSymbols("HP-ICF-MLD-MIB", hpicfMldPortSrcExpiry=hpicfMldPortSrcExpiry, hpicfMldPortSrcAddress=hpicfMldPortSrcAddress, hpicfMldCacheAddress=hpicfMldCacheAddress, hpicfMldSrcListEntry=hpicfMldSrcListEntry, hpicfMldPortConfigTable=hpicfMldPortConfigTable, hpicfMldIfEntryPortsWithMcastRouter=hpicfMldIfEntryPortsWithMcastRouter, hpicfMldFilteredGroupPortCacheGroup=hpicfMldFilteredGroupPortCacheGroup, hpicfMldBaseGroupV2=hpicfMldBaseGroupV2, hpicfMldIfEntryStatGSSQRx=hpicfMldIfEntryStatGSSQRx, hpicfMldCacheTable=hpicfMldCacheTable, hpicfJoinedPorts=hpicfJoinedPorts, hpicfMldCacheSelf=hpicfMldCacheSelf, hpicfMldMIBComplianceV3=hpicfMldMIBComplianceV3, hpicfMldIfEntryStandardJoins=hpicfMldIfEntryStandardJoins, hpicfMldIfEntryStatV1GSQRx=hpicfMldIfEntryStatV1GSQRx, hpicfMldIfEntryStartupQueryExpiryTime=hpicfMldIfEntryStartupQueryExpiryTime, hpicfMldIfEntryStatUnknownMldTypeRx=hpicfMldIfEntryStatUnknownMldTypeRx, hpicfMldIfEntryQuerierPort=hpicfMldIfEntryQuerierPort, hpicfMldMcastExcludeGroupJoinsCount=hpicfMldMcastExcludeGroupJoinsCount, hpicfMldIfGroupV3=hpicfMldIfGroupV3, hpicfMldPortConfigEntryInterfaceIfIndex=hpicfMldPortConfigEntryInterfaceIfIndex, hpicfMldSrcListAddress=hpicfMldSrcListAddress, hpicfMldFilteredGroupPortCachePortIndex=hpicfMldFilteredGroupPortCachePortIndex, hpicfMldGroupPortCacheFilterTimer=hpicfMldGroupPortCacheFilterTimer, hpicfMldIfEntryStatFilteredIncludeGroupJoinsCount=hpicfMldIfEntryStatFilteredIncludeGroupJoinsCount, hpicfMldConformance=hpicfMldConformance, hpicfMldIfEntryStatGSSQTx=hpicfMldIfEntryStatGSSQTx, hpicfMldIfEntryStatExcludeGroupJoinsCount=hpicfMldIfEntryStatExcludeGroupJoinsCount, hpicfMldIfEntryLastMemberQueryCount=hpicfMldIfEntryLastMemberQueryCount, hpicfMldIfEntryStatForwardToAllPortsTx=hpicfMldIfEntryStatForwardToAllPortsTx, hpicfMldCacheSrcCount=hpicfMldCacheSrcCount, hpicfMldFilteredGroupPortCacheExpiryTime=hpicfMldFilteredGroupPortCacheExpiryTime, hpicfMldCacheFilterMode=hpicfMldCacheFilterMode, hpicfMldSrcListExpiry=hpicfMldSrcListExpiry, hpicfMldCacheGroupV2=hpicfMldCacheGroupV2, hpicfMldCacheExcludeModeExpiryTimer=hpicfMldCacheExcludeModeExpiryTimer, hpicfMldPortConfigEntryIndex=hpicfMldPortConfigEntryIndex, hpicfMldGroupPortCacheUpTime=hpicfMldGroupPortCacheUpTime, hpicfMldCacheGroup=hpicfMldCacheGroup, PYSNMP_MODULE_ID=hpicfMldMIB, hpicfMldIfEntryStatV2GSQTx=hpicfMldIfEntryStatV2GSQTx, hpicfMldCacheIfIndex=hpicfMldCacheIfIndex, hpicfMldGroupPortCacheEntry=hpicfMldGroupPortCacheEntry, hpicfMldIfEntryState=hpicfMldIfEntryState, hpicfMldGroupPortCacheRequestedSrcCount=hpicfMldGroupPortCacheRequestedSrcCount, hpicfMldIfTable=hpicfMldIfTable, hpicfMldMcastPortFastLearn=hpicfMldMcastPortFastLearn, hpicfMldIfEntryStatV2GSQRx=hpicfMldIfEntryStatV2GSQRx, hpicfMldReloadModeGroup=hpicfMldReloadModeGroup, hpicfMldIfEntryStatFilteredExcludeGroupJoinsCount=hpicfMldIfEntryStatFilteredExcludeGroupJoinsCount, hpicfMldIfEntryStatFastLeaves=hpicfMldIfEntryStatFastLeaves, hpicfMldIfEntrySnoopingFeature=hpicfMldIfEntrySnoopingFeature, HpicfMcastGroupTypeDefinition=HpicfMcastGroupTypeDefinition, hpicfMldSrcListType=hpicfMldSrcListType, hpicfMldPortConfigEntryFastLeaveFeature=hpicfMldPortConfigEntryFastLeaveFeature, hpicfMldIfEntryStatMldV1ReportTx=hpicfMldIfEntryStatMldV1ReportTx, hpicfMldCacheUpTime=hpicfMldCacheUpTime, hpicfMldMIBCompliance=hpicfMldMIBCompliance, hpicfMldPortGroup=hpicfMldPortGroup, hpicfMldIfEntryStatBadCheckSumRx=hpicfMldIfEntryStatBadCheckSumRx, hpicfMldIfEntryStatForcedFastLeaves=hpicfMldIfEntryStatForcedFastLeaves, hpicfMldGroups=hpicfMldGroups, hpicfMldPortSrcFilterMode=hpicfMldPortSrcFilterMode, hpicfMldEnabledCount=hpicfMldEnabledCount, hpicfMldIfEntryStatMldV1ReportRx=hpicfMldIfEntryStatMldV1ReportRx, hpicfMldCacheExpiryTime=hpicfMldCacheExpiryTime, hpicfMldMIBComplianceV2=hpicfMldMIBComplianceV2, hpicfMldCacheVersion1HostTimer=hpicfMldCacheVersion1HostTimer, hpicfMldCompliances=hpicfMldCompliances, hpicfMldSrcListHostAddress=hpicfMldSrcListHostAddress, hpicfMldFilteredGroupPortCacheIfIndex=hpicfMldFilteredGroupPortCacheIfIndex, hpicfMldCacheLastReporter=hpicfMldCacheLastReporter, hpicfMldGroupPortCacheTable=hpicfMldGroupPortCacheTable, hpicfMldCacheStatus=hpicfMldCacheStatus, hpicfMldGroupPortCacheGroup=hpicfMldGroupPortCacheGroup, hpicfMldControlUnknownMulticast=hpicfMldControlUnknownMulticast, hpicfMldIfEntryStatPacketsRxOnDisabled=hpicfMldIfEntryStatPacketsRxOnDisabled, hpicfMldPortSrcIfIndex=hpicfMldPortSrcIfIndex, hpicfMldIfEntryStatGSQRx=hpicfMldIfEntryStatGSQRx, hpicfMldMcastGroupJoinsCount=hpicfMldMcastGroupJoinsCount, hpicfMldSrcListIfIndex=hpicfMldSrcListIfIndex, hpicfMldGroupPortCachePortIndex=hpicfMldGroupPortCachePortIndex, hpicfMldPortSrcHostAddress=hpicfMldPortSrcHostAddress, hpicfMldPortSrcGroup=hpicfMldPortSrcGroup, hpicfMldIfEntryStatForwardToRoutersTx=hpicfMldIfEntryStatForwardToRoutersTx, hpicfMldGroupPortCacheFilterMode=hpicfMldGroupPortCacheFilterMode, hpicfMldIfEntryStatStandardExcludeGroupJoinsCount=hpicfMldIfEntryStatStandardExcludeGroupJoinsCount, hpicfMldIfEntryOtherQuerierInterval=hpicfMldIfEntryOtherQuerierInterval, hpicfMldFilteredGroupPortCacheGroupAddress=hpicfMldFilteredGroupPortCacheGroupAddress, hpicfMldMIB=hpicfMldMIB, hpicfMldSrcListUpTime=hpicfMldSrcListUpTime, hpicfMldConfigForcedLeaveInterval=hpicfMldConfigForcedLeaveInterval, hpicfMldGroupPortCacheExcludeSrcCount=hpicfMldGroupPortCacheExcludeSrcCount, hpicfMldIfEntryStatMldV2ReportTx=hpicfMldIfEntryStatMldV2ReportTx, hpicfMldIfEntryStatUnknownPktRx=hpicfMldIfEntryStatUnknownPktRx, hpicfMldIfEntryStatStandardIncludeGroupJoinsCount=hpicfMldIfEntryStatStandardIncludeGroupJoinsCount, hpicfMldIfGroupV2=hpicfMldIfGroupV2, hpicfMldIfEntryStatMldV1LeaveRx=hpicfMldIfEntryStatMldV1LeaveRx, hpicfMldIfEntryStartupQueryInterval=hpicfMldIfEntryStartupQueryInterval, hpicfMldIfEntryStatMalformedPktRx=hpicfMldIfEntryStatMalformedPktRx, hpicfMldReload=hpicfMldReload, HpicfMldIfEntryState=HpicfMldIfEntryState, hpicfMldIfEntryStatWrongVersionQueries=hpicfMldIfEntryStatWrongVersionQueries, hpicfMldMcastIncludeGroupJoinsCount=hpicfMldMcastIncludeGroupJoinsCount, hpicfMldIfEntryStatV1QueryRx=hpicfMldIfEntryStatV1QueryRx, hpicfMldIfEntryQuerierFeature=hpicfMldIfEntryQuerierFeature, hpicfMldIfEntryStrictVersionMode=hpicfMldIfEntryStrictVersionMode, hpicfMldGroupPortCacheExpiryTime=hpicfMldGroupPortCacheExpiryTime, hpicfMldIfEntryStatQueryTx=hpicfMldIfEntryStatQueryTx, hpicfMldIfEntryStatIncludeGroupJoinsCount=hpicfMldIfEntryStatIncludeGroupJoinsCount, hpicfMldPortConfigEntryPortModeFeature=hpicfMldPortConfigEntryPortModeFeature, hpicfMldIfEntry=hpicfMldIfEntry, hpicfMldSrcListGroup=hpicfMldSrcListGroup, hpicfMldIfEntryStatV1GSQTx=hpicfMldIfEntryStatV1GSQTx, hpicfMldCacheEntry=hpicfMldCacheEntry, hpicfMldIfEntryStatGeneralQueryRx=hpicfMldIfEntryStatGeneralQueryRx, hpicfMldIfEntryStatV2QueryTx=hpicfMldIfEntryStatV2QueryTx, hpicfMldSrcListTable=hpicfMldSrcListTable, hpicfMldPortSrcEntry=hpicfMldPortSrcEntry, hpicfMldPortSrcUpTime=hpicfMldPortSrcUpTime, hpicfMldPortSrcPortIndex=hpicfMldPortSrcPortIndex, hpicfMldIfEntryStatV2QueryRx=hpicfMldIfEntryStatV2QueryRx, hpicfMldGroupType=hpicfMldGroupType, hpicfMldIfEntryFilteredJoins=hpicfMldIfEntryFilteredJoins, hpicfMldFilteredGroupPortCacheEntry=hpicfMldFilteredGroupPortCacheEntry, hpicfMldIfEntryStatMartianSourceRx=hpicfMldIfEntryStatMartianSourceRx, hpicfMldIfEntryStatJoinTimeouts=hpicfMldIfEntryStatJoinTimeouts, hpicfMldIfEntryStatGSQTx=hpicfMldIfEntryStatGSQTx, hpicfMldIfEntryStatV1QueryTx=hpicfMldIfEntryStatV1QueryTx, hpicfMldGroupPortCacheIfIndex=hpicfMldGroupPortCacheIfIndex, hpicfMldGroupPortCacheGroupAddress=hpicfMldGroupPortCacheGroupAddress, hpicfMldPortConfigEntry=hpicfMldPortConfigEntry, HpicfMldConfigPortModeType=HpicfMldConfigPortModeType, hpicfMldObjects=hpicfMldObjects, hpicfMld=hpicfMld, hpicfMldIfEntryStartupQueryCount=hpicfMldIfEntryStartupQueryCount, hpicfMldPortConfigEntryForcedLeaveFeature=hpicfMldPortConfigEntryForcedLeaveFeature, hpicfMldPortSrcTable=hpicfMldPortSrcTable, hpicfMldBaseGroup=hpicfMldBaseGroup, hpicfMldIfGroup=hpicfMldIfGroup, hpicfMldFilteredGroupPortCacheTable=hpicfMldFilteredGroupPortCacheTable, hpicfMldGroupPortCacheVersion1Timer=hpicfMldGroupPortCacheVersion1Timer, hpicfMldIfEntryOtherQuerierExpiryTime=hpicfMldIfEntryOtherQuerierExpiryTime, hpicfMldSrcListPorts=hpicfMldSrcListPorts, hpicfMldIfEntryStatMldV2ReportRx=hpicfMldIfEntryStatMldV2ReportRx)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, constraints_intersection, single_value_constraint, value_size_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint', 'ValueRangeConstraint') (hp_switch,) = mibBuilder.importSymbols('HP-ICF-OID', 'hpSwitch') (interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex') (inet_address_i_pv6,) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressIPv6') (mld_interface_entry,) = mibBuilder.importSymbols('IPV6-MLD-MIB', 'mldInterfaceEntry') (port_list,) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'PortList') (module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup') (counter64, integer32, gauge32, counter32, module_identity, unsigned32, object_identity, notification_type, ip_address, time_ticks, mib_identifier, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'Integer32', 'Gauge32', 'Counter32', 'ModuleIdentity', 'Unsigned32', 'ObjectIdentity', 'NotificationType', 'IpAddress', 'TimeTicks', 'MibIdentifier', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits') (row_status, textual_convention, display_string, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'TextualConvention', 'DisplayString', 'TruthValue') hpicf_mld_mib = module_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48)) hpicfMldMIB.setRevisions(('2015-09-11 00:00', '2013-02-10 00:00', '2011-03-10 00:00', '2011-01-11 00:00', '2010-09-09 00:00', '2007-07-02 00:00')) if mibBuilder.loadTexts: hpicfMldMIB.setLastUpdated('201509110000Z') if mibBuilder.loadTexts: hpicfMldMIB.setOrganization('HP Networking') class Hpicfmcastgrouptypedefinition(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('standard', 1), ('filtered', 2), ('mini', 3)) class Hpicfmldifentrystate(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4)) named_values = named_values(('initialWait', 1), ('querierElection', 2), ('querier', 3), ('nonQuerier', 4)) hpicf_mld_objects = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1)) hpicf_mld = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1)) hpicf_mld_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2)) hpicf_mld_groups = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1)) hpicf_mld_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 2)) hpicf_mld_control_unknown_multicast = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 1), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfMldControlUnknownMulticast.setStatus('current') hpicf_mld_config_forced_leave_interval = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfMldConfigForcedLeaveInterval.setStatus('current') hpicf_mld_enabled_count = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldEnabledCount.setStatus('current') hpicf_mld_mcast_group_joins_count = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldMcastGroupJoinsCount.setStatus('current') hpicf_mld_if_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5)) if mibBuilder.loadTexts: hpicfMldIfTable.setStatus('current') hpicf_mld_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1)) mldInterfaceEntry.registerAugmentions(('HP-ICF-MLD-MIB', 'hpicfMldIfEntry')) hpicfMldIfEntry.setIndexNames(*mldInterfaceEntry.getIndexNames()) if mibBuilder.loadTexts: hpicfMldIfEntry.setStatus('current') hpicf_mld_if_entry_querier_feature = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 1), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfMldIfEntryQuerierFeature.setStatus('current') hpicf_mld_if_entry_snooping_feature = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 2), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfMldIfEntrySnoopingFeature.setStatus('current') hpicf_mld_if_entry_querier_port = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryQuerierPort.setStatus('current') hpicf_mld_if_entry_filtered_joins = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryFilteredJoins.setStatus('current') hpicf_mld_if_entry_standard_joins = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStandardJoins.setStatus('current') hpicf_mld_if_entry_ports_with_mcast_router = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 6), port_list()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryPortsWithMcastRouter.setStatus('current') hpicf_mld_if_entry_stat_general_query_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatGeneralQueryRx.setStatus('current') hpicf_mld_if_entry_stat_query_tx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatQueryTx.setStatus('current') hpicf_mld_if_entry_stat_gsq_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatGSQRx.setStatus('current') hpicf_mld_if_entry_stat_gsq_tx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatGSQTx.setStatus('current') hpicf_mld_if_entry_stat_mld_v1_report_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatMldV1ReportRx.setStatus('current') hpicf_mld_if_entry_stat_mld_v2_report_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatMldV2ReportRx.setStatus('current') hpicf_mld_if_entry_stat_mld_v1_leave_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatMldV1LeaveRx.setStatus('current') hpicf_mld_if_entry_stat_unknown_mld_type_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatUnknownMldTypeRx.setStatus('current') hpicf_mld_if_entry_stat_unknown_pkt_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatUnknownPktRx.setStatus('current') hpicf_mld_if_entry_stat_forward_to_routers_tx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatForwardToRoutersTx.setStatus('current') hpicf_mld_if_entry_stat_forward_to_all_ports_tx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatForwardToAllPortsTx.setStatus('current') hpicf_mld_if_entry_stat_fast_leaves = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatFastLeaves.setStatus('current') hpicf_mld_if_entry_stat_forced_fast_leaves = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatForcedFastLeaves.setStatus('current') hpicf_mld_if_entry_stat_join_timeouts = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatJoinTimeouts.setStatus('current') hpicf_mld_if_entry_stat_wrong_version_queries = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 21), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatWrongVersionQueries.setStatus('current') hpicf_mld_if_entry_last_member_query_count = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 22), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryLastMemberQueryCount.setStatus('current') hpicf_mld_if_entry_startup_query_count = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 23), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStartupQueryCount.setStatus('current') hpicf_mld_if_entry_startup_query_interval = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 24), unsigned32()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStartupQueryInterval.setStatus('current') hpicf_mld_if_entry_stat_exclude_group_joins_count = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 25), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatExcludeGroupJoinsCount.setStatus('current') hpicf_mld_if_entry_stat_include_group_joins_count = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 26), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatIncludeGroupJoinsCount.setStatus('current') hpicf_mld_if_entry_stat_filtered_exclude_group_joins_count = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 27), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatFilteredExcludeGroupJoinsCount.setStatus('current') hpicf_mld_if_entry_stat_filtered_include_group_joins_count = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 28), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatFilteredIncludeGroupJoinsCount.setStatus('current') hpicf_mld_if_entry_stat_standard_exclude_group_joins_count = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 29), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatStandardExcludeGroupJoinsCount.setStatus('current') hpicf_mld_if_entry_stat_standard_include_group_joins_count = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 30), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatStandardIncludeGroupJoinsCount.setStatus('current') hpicf_mld_if_entry_stat_v1_query_tx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 31), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatV1QueryTx.setStatus('current') hpicf_mld_if_entry_stat_v1_query_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 32), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatV1QueryRx.setStatus('current') hpicf_mld_if_entry_stat_v2_query_tx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 33), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatV2QueryTx.setStatus('current') hpicf_mld_if_entry_stat_v2_query_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 34), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatV2QueryRx.setStatus('current') hpicf_mld_if_entry_stat_gssq_tx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 35), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatGSSQTx.setStatus('current') hpicf_mld_if_entry_stat_gssq_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 36), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatGSSQRx.setStatus('current') hpicf_mld_if_entry_stat_malformed_pkt_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 37), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatMalformedPktRx.setStatus('current') hpicf_mld_if_entry_stat_bad_check_sum_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 38), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatBadCheckSumRx.setStatus('current') hpicf_mld_if_entry_stat_martian_source_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 39), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatMartianSourceRx.setStatus('current') hpicf_mld_if_entry_stat_packets_rx_on_disabled = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 40), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatPacketsRxOnDisabled.setStatus('current') hpicf_mld_if_entry_strict_version_mode = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 41), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfMldIfEntryStrictVersionMode.setStatus('current') hpicf_mld_if_entry_stat_mld_v1_report_tx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 42), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatMldV1ReportTx.setStatus('current') hpicf_mld_if_entry_stat_mld_v2_report_tx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 43), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatMldV2ReportTx.setStatus('current') hpicf_mld_if_entry_state = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 44), hpicf_mld_if_entry_state()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryState.setStatus('current') hpicf_mld_if_entry_stat_v1_gsq_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 45), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatV1GSQRx.setStatus('current') hpicf_mld_if_entry_stat_v1_gsq_tx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 46), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatV1GSQTx.setStatus('current') hpicf_mld_if_entry_stat_v2_gsq_rx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 47), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatV2GSQRx.setStatus('current') hpicf_mld_if_entry_stat_v2_gsq_tx = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 48), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStatV2GSQTx.setStatus('current') hpicf_mld_if_entry_startup_query_expiry_time = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 49), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryStartupQueryExpiryTime.setStatus('current') hpicf_mld_if_entry_other_querier_interval = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 50), unsigned32()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryOtherQuerierInterval.setStatus('current') hpicf_mld_if_entry_other_querier_expiry_time = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 5, 1, 51), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldIfEntryOtherQuerierExpiryTime.setStatus('current') hpicf_mld_cache_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6)) if mibBuilder.loadTexts: hpicfMldCacheTable.setStatus('current') hpicf_mld_cache_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1)).setIndexNames((0, 'HP-ICF-MLD-MIB', 'hpicfMldCacheIfIndex'), (0, 'HP-ICF-MLD-MIB', 'hpicfMldCacheAddress')) if mibBuilder.loadTexts: hpicfMldCacheEntry.setStatus('current') hpicf_mld_cache_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 1), interface_index()) if mibBuilder.loadTexts: hpicfMldCacheIfIndex.setStatus('current') hpicf_mld_cache_address = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 2), inet_address_i_pv6().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16)) if mibBuilder.loadTexts: hpicfMldCacheAddress.setStatus('current') hpicf_mld_cache_self = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 3), truth_value().clone('true')).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpicfMldCacheSelf.setStatus('current') hpicf_mld_cache_last_reporter = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 4), inet_address_i_pv6().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16)).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldCacheLastReporter.setStatus('current') hpicf_mld_cache_up_time = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 5), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldCacheUpTime.setStatus('current') hpicf_mld_cache_expiry_time = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 6), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldCacheExpiryTime.setStatus('current') hpicf_mld_group_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 7), hpicf_mcast_group_type_definition()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldGroupType.setStatus('current') hpicf_joined_ports = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 8), port_list()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfJoinedPorts.setStatus('current') hpicf_mld_cache_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 9), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpicfMldCacheStatus.setStatus('current') hpicf_mld_cache_filter_mode = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('include', 1), ('exclude', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldCacheFilterMode.setStatus('current') hpicf_mld_cache_exclude_mode_expiry_timer = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 11), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldCacheExcludeModeExpiryTimer.setStatus('current') hpicf_mld_cache_version1_host_timer = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 12), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldCacheVersion1HostTimer.setStatus('current') hpicf_mld_cache_src_count = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 6, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldCacheSrcCount.setStatus('current') class Hpicfmldconfigportmodetype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('auto', 1), ('blocked', 2), ('forward', 3)) hpicf_mld_port_config_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7)) if mibBuilder.loadTexts: hpicfMldPortConfigTable.setStatus('current') hpicf_mld_port_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7, 1)).setIndexNames((0, 'HP-ICF-MLD-MIB', 'hpicfMldPortConfigEntryInterfaceIfIndex'), (0, 'HP-ICF-MLD-MIB', 'hpicfMldPortConfigEntryIndex')) if mibBuilder.loadTexts: hpicfMldPortConfigEntry.setStatus('current') hpicf_mld_port_config_entry_interface_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7, 1, 1), interface_index()) if mibBuilder.loadTexts: hpicfMldPortConfigEntryInterfaceIfIndex.setStatus('current') hpicf_mld_port_config_entry_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))) if mibBuilder.loadTexts: hpicfMldPortConfigEntryIndex.setStatus('current') hpicf_mld_port_config_entry_port_mode_feature = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7, 1, 3), hpicf_mld_config_port_mode_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfMldPortConfigEntryPortModeFeature.setStatus('current') hpicf_mld_port_config_entry_forced_leave_feature = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7, 1, 4), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfMldPortConfigEntryForcedLeaveFeature.setStatus('current') hpicf_mld_port_config_entry_fast_leave_feature = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 7, 1, 5), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfMldPortConfigEntryFastLeaveFeature.setStatus('current') hpicf_mld_filtered_group_port_cache_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 8)) if mibBuilder.loadTexts: hpicfMldFilteredGroupPortCacheTable.setStatus('current') hpicf_mld_filtered_group_port_cache_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 8, 1)).setIndexNames((0, 'HP-ICF-MLD-MIB', 'hpicfMldFilteredGroupPortCacheIfIndex'), (0, 'HP-ICF-MLD-MIB', 'hpicfMldFilteredGroupPortCacheGroupAddress'), (0, 'HP-ICF-MLD-MIB', 'hpicfMldFilteredGroupPortCachePortIndex')) if mibBuilder.loadTexts: hpicfMldFilteredGroupPortCacheEntry.setStatus('current') hpicf_mld_filtered_group_port_cache_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 8, 1, 1), interface_index()) if mibBuilder.loadTexts: hpicfMldFilteredGroupPortCacheIfIndex.setStatus('current') hpicf_mld_filtered_group_port_cache_group_address = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 8, 1, 2), inet_address_i_pv6()) if mibBuilder.loadTexts: hpicfMldFilteredGroupPortCacheGroupAddress.setStatus('current') hpicf_mld_filtered_group_port_cache_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 8, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))) if mibBuilder.loadTexts: hpicfMldFilteredGroupPortCachePortIndex.setStatus('current') hpicf_mld_filtered_group_port_cache_expiry_time = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 8, 1, 4), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldFilteredGroupPortCacheExpiryTime.setStatus('current') hpicf_mld_src_list_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9)) if mibBuilder.loadTexts: hpicfMldSrcListTable.setStatus('current') hpicf_mld_src_list_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1)).setIndexNames((0, 'HP-ICF-MLD-MIB', 'hpicfMldSrcListIfIndex'), (0, 'HP-ICF-MLD-MIB', 'hpicfMldSrcListAddress'), (0, 'HP-ICF-MLD-MIB', 'hpicfMldSrcListHostAddress')) if mibBuilder.loadTexts: hpicfMldSrcListEntry.setStatus('current') hpicf_mld_src_list_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 1), interface_index()) if mibBuilder.loadTexts: hpicfMldSrcListIfIndex.setStatus('current') hpicf_mld_src_list_address = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 2), inet_address_i_pv6().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16)) if mibBuilder.loadTexts: hpicfMldSrcListAddress.setStatus('current') hpicf_mld_src_list_host_address = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 3), inet_address_i_pv6().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16)) if mibBuilder.loadTexts: hpicfMldSrcListHostAddress.setStatus('current') hpicf_mld_src_list_ports = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 4), port_list()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldSrcListPorts.setStatus('current') hpicf_mld_src_list_expiry = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 5), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldSrcListExpiry.setStatus('current') hpicf_mld_src_list_up_time = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 6), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldSrcListUpTime.setStatus('current') hpicf_mld_src_list_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 9, 1, 7), hpicf_mcast_group_type_definition()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldSrcListType.setStatus('current') hpicf_mld_port_src_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10)) if mibBuilder.loadTexts: hpicfMldPortSrcTable.setStatus('current') hpicf_mld_port_src_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1)).setIndexNames((0, 'HP-ICF-MLD-MIB', 'hpicfMldPortSrcIfIndex'), (0, 'HP-ICF-MLD-MIB', 'hpicfMldPortSrcAddress'), (0, 'HP-ICF-MLD-MIB', 'hpicfMldPortSrcHostAddress'), (0, 'HP-ICF-MLD-MIB', 'hpicfMldPortSrcPortIndex')) if mibBuilder.loadTexts: hpicfMldPortSrcEntry.setStatus('current') hpicf_mld_port_src_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 1), interface_index()) if mibBuilder.loadTexts: hpicfMldPortSrcIfIndex.setStatus('current') hpicf_mld_port_src_address = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 2), inet_address_i_pv6().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16)) if mibBuilder.loadTexts: hpicfMldPortSrcAddress.setStatus('current') hpicf_mld_port_src_host_address = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 3), inet_address_i_pv6().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16)) if mibBuilder.loadTexts: hpicfMldPortSrcHostAddress.setStatus('current') hpicf_mld_port_src_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))) if mibBuilder.loadTexts: hpicfMldPortSrcPortIndex.setStatus('current') hpicf_mld_port_src_expiry = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 5), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldPortSrcExpiry.setStatus('current') hpicf_mld_port_src_up_time = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 6), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldPortSrcUpTime.setStatus('current') hpicf_mld_port_src_filter_mode = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 10, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('include', 1), ('exclude', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldPortSrcFilterMode.setStatus('current') hpicf_mld_mcast_exclude_group_joins_count = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldMcastExcludeGroupJoinsCount.setStatus('current') hpicf_mld_mcast_include_group_joins_count = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldMcastIncludeGroupJoinsCount.setStatus('current') hpicf_mld_mcast_port_fast_learn = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 13), port_list()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfMldMcastPortFastLearn.setStatus('current') hpicf_mld_group_port_cache_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14)) if mibBuilder.loadTexts: hpicfMldGroupPortCacheTable.setStatus('current') hpicf_mld_group_port_cache_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1)).setIndexNames((0, 'HP-ICF-MLD-MIB', 'hpicfMldGroupPortCacheIfIndex'), (0, 'HP-ICF-MLD-MIB', 'hpicfMldGroupPortCacheGroupAddress'), (0, 'HP-ICF-MLD-MIB', 'hpicfMldGroupPortCachePortIndex')) if mibBuilder.loadTexts: hpicfMldGroupPortCacheEntry.setStatus('current') hpicf_mld_group_port_cache_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 1), interface_index()) if mibBuilder.loadTexts: hpicfMldGroupPortCacheIfIndex.setStatus('current') hpicf_mld_group_port_cache_group_address = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 2), inet_address_i_pv6()) if mibBuilder.loadTexts: hpicfMldGroupPortCacheGroupAddress.setStatus('current') hpicf_mld_group_port_cache_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))) if mibBuilder.loadTexts: hpicfMldGroupPortCachePortIndex.setStatus('current') hpicf_mld_group_port_cache_expiry_time = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 4), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldGroupPortCacheExpiryTime.setStatus('current') hpicf_mld_group_port_cache_up_time = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 5), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldGroupPortCacheUpTime.setStatus('current') hpicf_mld_group_port_cache_version1_timer = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 6), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldGroupPortCacheVersion1Timer.setStatus('current') hpicf_mld_group_port_cache_filter_timer = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 7), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldGroupPortCacheFilterTimer.setStatus('current') hpicf_mld_group_port_cache_filter_mode = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('include', 1), ('exclude', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldGroupPortCacheFilterMode.setStatus('current') hpicf_mld_group_port_cache_exclude_src_count = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldGroupPortCacheExcludeSrcCount.setStatus('current') hpicf_mld_group_port_cache_requested_src_count = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 14, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpicfMldGroupPortCacheRequestedSrcCount.setStatus('current') hpicf_mld_reload = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 1, 1, 15), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpicfMldReload.setStatus('current') hpicf_mld_base_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 1)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldControlUnknownMulticast'), ('HP-ICF-MLD-MIB', 'hpicfMldConfigForcedLeaveInterval'), ('HP-ICF-MLD-MIB', 'hpicfMldEnabledCount'), ('HP-ICF-MLD-MIB', 'hpicfMldMcastGroupJoinsCount')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_base_group = hpicfMldBaseGroup.setStatus('current') hpicf_mld_if_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 2)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldIfEntryQuerierFeature'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntrySnoopingFeature'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryQuerierPort'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryFilteredJoins'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStandardJoins'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryPortsWithMcastRouter'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGeneralQueryRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatQueryTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGSQRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGSQTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV1ReportRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV2ReportRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV1LeaveRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatUnknownMldTypeRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatUnknownPktRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatForwardToRoutersTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatForwardToAllPortsTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatFastLeaves'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatForcedFastLeaves'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatJoinTimeouts')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_if_group = hpicfMldIfGroup.setStatus('current') hpicf_mld_cache_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 3)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldCacheSelf'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheLastReporter'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheUpTime'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheExpiryTime'), ('HP-ICF-MLD-MIB', 'hpicfMldGroupType'), ('HP-ICF-MLD-MIB', 'hpicfJoinedPorts'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_cache_group = hpicfMldCacheGroup.setStatus('current') hpicf_mld_port_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 4)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldPortConfigEntryPortModeFeature'), ('HP-ICF-MLD-MIB', 'hpicfMldPortConfigEntryForcedLeaveFeature'), ('HP-ICF-MLD-MIB', 'hpicfMldPortConfigEntryFastLeaveFeature')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_port_group = hpicfMldPortGroup.setStatus('current') hpicf_mld_filtered_group_port_cache_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 5)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldFilteredGroupPortCacheExpiryTime')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_filtered_group_port_cache_group = hpicfMldFilteredGroupPortCacheGroup.setStatus('current') hpicf_mld_base_group_v2 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 6)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldControlUnknownMulticast'), ('HP-ICF-MLD-MIB', 'hpicfMldConfigForcedLeaveInterval'), ('HP-ICF-MLD-MIB', 'hpicfMldEnabledCount'), ('HP-ICF-MLD-MIB', 'hpicfMldMcastGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldMcastExcludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldMcastIncludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldMcastPortFastLearn')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_base_group_v2 = hpicfMldBaseGroupV2.setStatus('current') hpicf_mld_if_group_v2 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 7)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldIfEntryQuerierFeature'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntrySnoopingFeature'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryQuerierPort'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryFilteredJoins'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStandardJoins'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryPortsWithMcastRouter'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGeneralQueryRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatQueryTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGSQRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGSQTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV1ReportRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV2ReportRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV1LeaveRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatUnknownMldTypeRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatUnknownPktRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatForwardToRoutersTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatForwardToAllPortsTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatFastLeaves'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatForcedFastLeaves'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatJoinTimeouts'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatWrongVersionQueries'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryLastMemberQueryCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStartupQueryCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStartupQueryInterval'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatExcludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatIncludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatFilteredExcludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatFilteredIncludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatStandardExcludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatStandardIncludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV1QueryTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV1QueryRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV2QueryTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV2QueryRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGSSQTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGSSQRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMalformedPktRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatBadCheckSumRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMartianSourceRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatPacketsRxOnDisabled'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStrictVersionMode'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV1ReportTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV2ReportTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryState'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV1GSQRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV1GSQTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV2GSQRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV2GSQTx')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_if_group_v2 = hpicfMldIfGroupV2.setStatus('current') hpicf_mld_cache_group_v2 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 8)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldCacheSelf'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheLastReporter'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheUpTime'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheExpiryTime'), ('HP-ICF-MLD-MIB', 'hpicfMldGroupType'), ('HP-ICF-MLD-MIB', 'hpicfJoinedPorts'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheStatus'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheFilterMode'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheExcludeModeExpiryTimer'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheVersion1HostTimer'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheSrcCount')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_cache_group_v2 = hpicfMldCacheGroupV2.setStatus('current') hpicf_mld_src_list_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 9)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldSrcListPorts'), ('HP-ICF-MLD-MIB', 'hpicfMldSrcListExpiry'), ('HP-ICF-MLD-MIB', 'hpicfMldSrcListUpTime'), ('HP-ICF-MLD-MIB', 'hpicfMldSrcListType')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_src_list_group = hpicfMldSrcListGroup.setStatus('current') hpicf_mld_port_src_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 10)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldPortSrcExpiry'), ('HP-ICF-MLD-MIB', 'hpicfMldPortSrcUpTime'), ('HP-ICF-MLD-MIB', 'hpicfMldPortSrcFilterMode')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_port_src_group = hpicfMldPortSrcGroup.setStatus('current') hpicf_mld_group_port_cache_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 11)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldGroupPortCacheExpiryTime'), ('HP-ICF-MLD-MIB', 'hpicfMldGroupPortCacheUpTime'), ('HP-ICF-MLD-MIB', 'hpicfMldGroupPortCacheVersion1Timer'), ('HP-ICF-MLD-MIB', 'hpicfMldGroupPortCacheFilterTimer'), ('HP-ICF-MLD-MIB', 'hpicfMldGroupPortCacheFilterMode'), ('HP-ICF-MLD-MIB', 'hpicfMldGroupPortCacheExcludeSrcCount'), ('HP-ICF-MLD-MIB', 'hpicfMldGroupPortCacheRequestedSrcCount')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_group_port_cache_group = hpicfMldGroupPortCacheGroup.setStatus('current') hpicf_mld_if_group_v3 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 12)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldIfEntryQuerierFeature'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntrySnoopingFeature'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryQuerierPort'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryFilteredJoins'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStandardJoins'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryPortsWithMcastRouter'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGeneralQueryRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatQueryTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGSQRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGSQTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV1ReportRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV2ReportRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV1LeaveRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatUnknownMldTypeRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatUnknownPktRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatForwardToRoutersTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatForwardToAllPortsTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatFastLeaves'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatForcedFastLeaves'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatJoinTimeouts'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatWrongVersionQueries'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryLastMemberQueryCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStartupQueryCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStartupQueryInterval'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatExcludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatIncludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatFilteredExcludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatFilteredIncludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatStandardExcludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatStandardIncludeGroupJoinsCount'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV1QueryTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV1QueryRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV2QueryTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV2QueryRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGSSQTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatGSSQRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMalformedPktRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatBadCheckSumRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMartianSourceRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatPacketsRxOnDisabled'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStrictVersionMode'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV1ReportTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatMldV2ReportTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryState'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV1GSQRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV1GSQTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV2GSQRx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStatV2GSQTx'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryStartupQueryExpiryTime'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryOtherQuerierInterval'), ('HP-ICF-MLD-MIB', 'hpicfMldIfEntryOtherQuerierExpiryTime')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_if_group_v3 = hpicfMldIfGroupV3.setStatus('current') hpicf_mld_reload_mode_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 1, 13)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldReload')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_reload_mode_group = hpicfMldReloadModeGroup.setStatus('current') hpicf_mld_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 2, 1)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldBaseGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldIfGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldPortGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldFilteredGroupPortCacheGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_mib_compliance = hpicfMldMIBCompliance.setStatus('current') hpicf_mld_mib_compliance_v2 = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 2, 2)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldBaseGroupV2'), ('HP-ICF-MLD-MIB', 'hpicfMldIfGroupV2'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheGroupV2'), ('HP-ICF-MLD-MIB', 'hpicfMldPortGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldFilteredGroupPortCacheGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldSrcListGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldPortSrcGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldGroupPortCacheGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_mib_compliance_v2 = hpicfMldMIBComplianceV2.setStatus('current') hpicf_mld_mib_compliance_v3 = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 48, 2, 2, 3)).setObjects(('HP-ICF-MLD-MIB', 'hpicfMldBaseGroupV2'), ('HP-ICF-MLD-MIB', 'hpicfMldIfGroupV3'), ('HP-ICF-MLD-MIB', 'hpicfMldCacheGroupV2'), ('HP-ICF-MLD-MIB', 'hpicfMldPortGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldFilteredGroupPortCacheGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldSrcListGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldPortSrcGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldGroupPortCacheGroup'), ('HP-ICF-MLD-MIB', 'hpicfMldReloadModeGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpicf_mld_mib_compliance_v3 = hpicfMldMIBComplianceV3.setStatus('current') mibBuilder.exportSymbols('HP-ICF-MLD-MIB', hpicfMldPortSrcExpiry=hpicfMldPortSrcExpiry, hpicfMldPortSrcAddress=hpicfMldPortSrcAddress, hpicfMldCacheAddress=hpicfMldCacheAddress, hpicfMldSrcListEntry=hpicfMldSrcListEntry, hpicfMldPortConfigTable=hpicfMldPortConfigTable, hpicfMldIfEntryPortsWithMcastRouter=hpicfMldIfEntryPortsWithMcastRouter, hpicfMldFilteredGroupPortCacheGroup=hpicfMldFilteredGroupPortCacheGroup, hpicfMldBaseGroupV2=hpicfMldBaseGroupV2, hpicfMldIfEntryStatGSSQRx=hpicfMldIfEntryStatGSSQRx, hpicfMldCacheTable=hpicfMldCacheTable, hpicfJoinedPorts=hpicfJoinedPorts, hpicfMldCacheSelf=hpicfMldCacheSelf, hpicfMldMIBComplianceV3=hpicfMldMIBComplianceV3, hpicfMldIfEntryStandardJoins=hpicfMldIfEntryStandardJoins, hpicfMldIfEntryStatV1GSQRx=hpicfMldIfEntryStatV1GSQRx, hpicfMldIfEntryStartupQueryExpiryTime=hpicfMldIfEntryStartupQueryExpiryTime, hpicfMldIfEntryStatUnknownMldTypeRx=hpicfMldIfEntryStatUnknownMldTypeRx, hpicfMldIfEntryQuerierPort=hpicfMldIfEntryQuerierPort, hpicfMldMcastExcludeGroupJoinsCount=hpicfMldMcastExcludeGroupJoinsCount, hpicfMldIfGroupV3=hpicfMldIfGroupV3, hpicfMldPortConfigEntryInterfaceIfIndex=hpicfMldPortConfigEntryInterfaceIfIndex, hpicfMldSrcListAddress=hpicfMldSrcListAddress, hpicfMldFilteredGroupPortCachePortIndex=hpicfMldFilteredGroupPortCachePortIndex, hpicfMldGroupPortCacheFilterTimer=hpicfMldGroupPortCacheFilterTimer, hpicfMldIfEntryStatFilteredIncludeGroupJoinsCount=hpicfMldIfEntryStatFilteredIncludeGroupJoinsCount, hpicfMldConformance=hpicfMldConformance, hpicfMldIfEntryStatGSSQTx=hpicfMldIfEntryStatGSSQTx, hpicfMldIfEntryStatExcludeGroupJoinsCount=hpicfMldIfEntryStatExcludeGroupJoinsCount, hpicfMldIfEntryLastMemberQueryCount=hpicfMldIfEntryLastMemberQueryCount, hpicfMldIfEntryStatForwardToAllPortsTx=hpicfMldIfEntryStatForwardToAllPortsTx, hpicfMldCacheSrcCount=hpicfMldCacheSrcCount, hpicfMldFilteredGroupPortCacheExpiryTime=hpicfMldFilteredGroupPortCacheExpiryTime, hpicfMldCacheFilterMode=hpicfMldCacheFilterMode, hpicfMldSrcListExpiry=hpicfMldSrcListExpiry, hpicfMldCacheGroupV2=hpicfMldCacheGroupV2, hpicfMldCacheExcludeModeExpiryTimer=hpicfMldCacheExcludeModeExpiryTimer, hpicfMldPortConfigEntryIndex=hpicfMldPortConfigEntryIndex, hpicfMldGroupPortCacheUpTime=hpicfMldGroupPortCacheUpTime, hpicfMldCacheGroup=hpicfMldCacheGroup, PYSNMP_MODULE_ID=hpicfMldMIB, hpicfMldIfEntryStatV2GSQTx=hpicfMldIfEntryStatV2GSQTx, hpicfMldCacheIfIndex=hpicfMldCacheIfIndex, hpicfMldGroupPortCacheEntry=hpicfMldGroupPortCacheEntry, hpicfMldIfEntryState=hpicfMldIfEntryState, hpicfMldGroupPortCacheRequestedSrcCount=hpicfMldGroupPortCacheRequestedSrcCount, hpicfMldIfTable=hpicfMldIfTable, hpicfMldMcastPortFastLearn=hpicfMldMcastPortFastLearn, hpicfMldIfEntryStatV2GSQRx=hpicfMldIfEntryStatV2GSQRx, hpicfMldReloadModeGroup=hpicfMldReloadModeGroup, hpicfMldIfEntryStatFilteredExcludeGroupJoinsCount=hpicfMldIfEntryStatFilteredExcludeGroupJoinsCount, hpicfMldIfEntryStatFastLeaves=hpicfMldIfEntryStatFastLeaves, hpicfMldIfEntrySnoopingFeature=hpicfMldIfEntrySnoopingFeature, HpicfMcastGroupTypeDefinition=HpicfMcastGroupTypeDefinition, hpicfMldSrcListType=hpicfMldSrcListType, hpicfMldPortConfigEntryFastLeaveFeature=hpicfMldPortConfigEntryFastLeaveFeature, hpicfMldIfEntryStatMldV1ReportTx=hpicfMldIfEntryStatMldV1ReportTx, hpicfMldCacheUpTime=hpicfMldCacheUpTime, hpicfMldMIBCompliance=hpicfMldMIBCompliance, hpicfMldPortGroup=hpicfMldPortGroup, hpicfMldIfEntryStatBadCheckSumRx=hpicfMldIfEntryStatBadCheckSumRx, hpicfMldIfEntryStatForcedFastLeaves=hpicfMldIfEntryStatForcedFastLeaves, hpicfMldGroups=hpicfMldGroups, hpicfMldPortSrcFilterMode=hpicfMldPortSrcFilterMode, hpicfMldEnabledCount=hpicfMldEnabledCount, hpicfMldIfEntryStatMldV1ReportRx=hpicfMldIfEntryStatMldV1ReportRx, hpicfMldCacheExpiryTime=hpicfMldCacheExpiryTime, hpicfMldMIBComplianceV2=hpicfMldMIBComplianceV2, hpicfMldCacheVersion1HostTimer=hpicfMldCacheVersion1HostTimer, hpicfMldCompliances=hpicfMldCompliances, hpicfMldSrcListHostAddress=hpicfMldSrcListHostAddress, hpicfMldFilteredGroupPortCacheIfIndex=hpicfMldFilteredGroupPortCacheIfIndex, hpicfMldCacheLastReporter=hpicfMldCacheLastReporter, hpicfMldGroupPortCacheTable=hpicfMldGroupPortCacheTable, hpicfMldCacheStatus=hpicfMldCacheStatus, hpicfMldGroupPortCacheGroup=hpicfMldGroupPortCacheGroup, hpicfMldControlUnknownMulticast=hpicfMldControlUnknownMulticast, hpicfMldIfEntryStatPacketsRxOnDisabled=hpicfMldIfEntryStatPacketsRxOnDisabled, hpicfMldPortSrcIfIndex=hpicfMldPortSrcIfIndex, hpicfMldIfEntryStatGSQRx=hpicfMldIfEntryStatGSQRx, hpicfMldMcastGroupJoinsCount=hpicfMldMcastGroupJoinsCount, hpicfMldSrcListIfIndex=hpicfMldSrcListIfIndex, hpicfMldGroupPortCachePortIndex=hpicfMldGroupPortCachePortIndex, hpicfMldPortSrcHostAddress=hpicfMldPortSrcHostAddress, hpicfMldPortSrcGroup=hpicfMldPortSrcGroup, hpicfMldIfEntryStatForwardToRoutersTx=hpicfMldIfEntryStatForwardToRoutersTx, hpicfMldGroupPortCacheFilterMode=hpicfMldGroupPortCacheFilterMode, hpicfMldIfEntryStatStandardExcludeGroupJoinsCount=hpicfMldIfEntryStatStandardExcludeGroupJoinsCount, hpicfMldIfEntryOtherQuerierInterval=hpicfMldIfEntryOtherQuerierInterval, hpicfMldFilteredGroupPortCacheGroupAddress=hpicfMldFilteredGroupPortCacheGroupAddress, hpicfMldMIB=hpicfMldMIB, hpicfMldSrcListUpTime=hpicfMldSrcListUpTime, hpicfMldConfigForcedLeaveInterval=hpicfMldConfigForcedLeaveInterval, hpicfMldGroupPortCacheExcludeSrcCount=hpicfMldGroupPortCacheExcludeSrcCount, hpicfMldIfEntryStatMldV2ReportTx=hpicfMldIfEntryStatMldV2ReportTx, hpicfMldIfEntryStatUnknownPktRx=hpicfMldIfEntryStatUnknownPktRx, hpicfMldIfEntryStatStandardIncludeGroupJoinsCount=hpicfMldIfEntryStatStandardIncludeGroupJoinsCount, hpicfMldIfGroupV2=hpicfMldIfGroupV2, hpicfMldIfEntryStatMldV1LeaveRx=hpicfMldIfEntryStatMldV1LeaveRx, hpicfMldIfEntryStartupQueryInterval=hpicfMldIfEntryStartupQueryInterval, hpicfMldIfEntryStatMalformedPktRx=hpicfMldIfEntryStatMalformedPktRx, hpicfMldReload=hpicfMldReload, HpicfMldIfEntryState=HpicfMldIfEntryState, hpicfMldIfEntryStatWrongVersionQueries=hpicfMldIfEntryStatWrongVersionQueries, hpicfMldMcastIncludeGroupJoinsCount=hpicfMldMcastIncludeGroupJoinsCount, hpicfMldIfEntryStatV1QueryRx=hpicfMldIfEntryStatV1QueryRx, hpicfMldIfEntryQuerierFeature=hpicfMldIfEntryQuerierFeature, hpicfMldIfEntryStrictVersionMode=hpicfMldIfEntryStrictVersionMode, hpicfMldGroupPortCacheExpiryTime=hpicfMldGroupPortCacheExpiryTime, hpicfMldIfEntryStatQueryTx=hpicfMldIfEntryStatQueryTx, hpicfMldIfEntryStatIncludeGroupJoinsCount=hpicfMldIfEntryStatIncludeGroupJoinsCount, hpicfMldPortConfigEntryPortModeFeature=hpicfMldPortConfigEntryPortModeFeature, hpicfMldIfEntry=hpicfMldIfEntry, hpicfMldSrcListGroup=hpicfMldSrcListGroup, hpicfMldIfEntryStatV1GSQTx=hpicfMldIfEntryStatV1GSQTx, hpicfMldCacheEntry=hpicfMldCacheEntry, hpicfMldIfEntryStatGeneralQueryRx=hpicfMldIfEntryStatGeneralQueryRx, hpicfMldIfEntryStatV2QueryTx=hpicfMldIfEntryStatV2QueryTx, hpicfMldSrcListTable=hpicfMldSrcListTable, hpicfMldPortSrcEntry=hpicfMldPortSrcEntry, hpicfMldPortSrcUpTime=hpicfMldPortSrcUpTime, hpicfMldPortSrcPortIndex=hpicfMldPortSrcPortIndex, hpicfMldIfEntryStatV2QueryRx=hpicfMldIfEntryStatV2QueryRx, hpicfMldGroupType=hpicfMldGroupType, hpicfMldIfEntryFilteredJoins=hpicfMldIfEntryFilteredJoins, hpicfMldFilteredGroupPortCacheEntry=hpicfMldFilteredGroupPortCacheEntry, hpicfMldIfEntryStatMartianSourceRx=hpicfMldIfEntryStatMartianSourceRx, hpicfMldIfEntryStatJoinTimeouts=hpicfMldIfEntryStatJoinTimeouts, hpicfMldIfEntryStatGSQTx=hpicfMldIfEntryStatGSQTx, hpicfMldIfEntryStatV1QueryTx=hpicfMldIfEntryStatV1QueryTx, hpicfMldGroupPortCacheIfIndex=hpicfMldGroupPortCacheIfIndex, hpicfMldGroupPortCacheGroupAddress=hpicfMldGroupPortCacheGroupAddress, hpicfMldPortConfigEntry=hpicfMldPortConfigEntry, HpicfMldConfigPortModeType=HpicfMldConfigPortModeType, hpicfMldObjects=hpicfMldObjects, hpicfMld=hpicfMld, hpicfMldIfEntryStartupQueryCount=hpicfMldIfEntryStartupQueryCount, hpicfMldPortConfigEntryForcedLeaveFeature=hpicfMldPortConfigEntryForcedLeaveFeature, hpicfMldPortSrcTable=hpicfMldPortSrcTable, hpicfMldBaseGroup=hpicfMldBaseGroup, hpicfMldIfGroup=hpicfMldIfGroup, hpicfMldFilteredGroupPortCacheTable=hpicfMldFilteredGroupPortCacheTable, hpicfMldGroupPortCacheVersion1Timer=hpicfMldGroupPortCacheVersion1Timer, hpicfMldIfEntryOtherQuerierExpiryTime=hpicfMldIfEntryOtherQuerierExpiryTime, hpicfMldSrcListPorts=hpicfMldSrcListPorts, hpicfMldIfEntryStatMldV2ReportRx=hpicfMldIfEntryStatMldV2ReportRx)
# Author: Nic Wolfe <[email protected]> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Sick Beard is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Sick Beard. If not, see <http://www.gnu.org/licenses/>. __all__ = ["mainDB", "cache"]
__all__ = ['mainDB', 'cache']
def read_passphrases(): with open("day_04/input.txt", "r") as f: return [line.split() for line in f.readlines()] def part1(): return sum(len(phrase) == len(set(phrase)) for phrase in read_passphrases()) print(part1()) def anagram(passphrase): return len(passphrase) == len(set("".join(sorted(phrase)) for phrase in passphrase)) def part2(): return sum(anagram(phrase) for phrase in read_passphrases()) print(part2())
def read_passphrases(): with open('day_04/input.txt', 'r') as f: return [line.split() for line in f.readlines()] def part1(): return sum((len(phrase) == len(set(phrase)) for phrase in read_passphrases())) print(part1()) def anagram(passphrase): return len(passphrase) == len(set((''.join(sorted(phrase)) for phrase in passphrase))) def part2(): return sum((anagram(phrase) for phrase in read_passphrases())) print(part2())
n = int(input()) a = sorted(list(map(int, input().split()))) if n % 2 == 1 and a[0] != 0: print(0) exit() for i in range(n % 2, n, 2): if a[i] != a[i + 1] or a[i] != i + 1: print(0) exit() print(2 ** (n // 2) % (10 ** 9 + 7))
n = int(input()) a = sorted(list(map(int, input().split()))) if n % 2 == 1 and a[0] != 0: print(0) exit() for i in range(n % 2, n, 2): if a[i] != a[i + 1] or a[i] != i + 1: print(0) exit() print(2 ** (n // 2) % (10 ** 9 + 7))
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. #-------------------------------------------------------------------------- # This is a placeholder file. It is deployed with inference only wheel. print("An inference only version of ONNX Runtime is installed. Training functionalities are unavailable.")
print('An inference only version of ONNX Runtime is installed. Training functionalities are unavailable.')
''' Basic Info ''' __version__ = '0.1'
""" Basic Info """ __version__ = '0.1'
def maprange( a, b, s): (a1, a2), (b1, b2) = a, b return b1 + ((s - a1) * (b2 - b1) / (a2 - a1)) for s in range(11): print("%2g maps to %g" % (s, maprange( (0, 10), (-1, 0), s)))
def maprange(a, b, s): ((a1, a2), (b1, b2)) = (a, b) return b1 + (s - a1) * (b2 - b1) / (a2 - a1) for s in range(11): print('%2g maps to %g' % (s, maprange((0, 10), (-1, 0), s)))
strings = { 'str NaN': 'NaN', 'str none': 'None', 'str true': 'True', 'str false': 'False', 'str 0': '0', 'str -1': '-1', 'str -1.5': '-1.5', 'str 0.42': '0.42', 'str .42': '.42', 'str 1.2E+9': '1.2E+9', 'str 1.2e8': '1.2e8', 'str 0xFF': '0xFF', 'str Inf..': 'Infinity', 'str empty': '', 'str space': ' ', 'str [Ob]': '[object Object]', 'str dot': '.', 'str +': '+', 'str -': '-', 'str 99,999': '99,999', 'str date': '2077-09-08', 'str #abcdef': '#abcdef', 'str 1.2.3': '1.2.3', 'str blah': 'blah', }
strings = {'str NaN': 'NaN', 'str none': 'None', 'str true': 'True', 'str false': 'False', 'str 0': '0', 'str -1': '-1', 'str -1.5': '-1.5', 'str 0.42': '0.42', 'str .42': '.42', 'str 1.2E+9': '1.2E+9', 'str 1.2e8': '1.2e8', 'str 0xFF': '0xFF', 'str Inf..': 'Infinity', 'str empty': '', 'str space': ' ', 'str [Ob]': '[object Object]', 'str dot': '.', 'str +': '+', 'str -': '-', 'str 99,999': '99,999', 'str date': '2077-09-08', 'str #abcdef': '#abcdef', 'str 1.2.3': '1.2.3', 'str blah': 'blah'}
# coding: utf8 #!/usr/bin/python2 def directorymaker(): pass
def directorymaker(): pass
ZALORA_URLS = ['https://www.zalora.co.id/women/pakaian/atasan/?from=header'] def get_start_urls(): return ZALORA_URLS
zalora_urls = ['https://www.zalora.co.id/women/pakaian/atasan/?from=header'] def get_start_urls(): return ZALORA_URLS
name0_0_0_1_0_1_0 = None name0_0_0_1_0_1_1 = None name0_0_0_1_0_1_2 = None name0_0_0_1_0_1_3 = None name0_0_0_1_0_1_4 = None
name0_0_0_1_0_1_0 = None name0_0_0_1_0_1_1 = None name0_0_0_1_0_1_2 = None name0_0_0_1_0_1_3 = None name0_0_0_1_0_1_4 = None
email_info = { 'recepient' : '[email protected]', 'messages' : {'TOO_LOW' : 'Hi, the temperature is too low', 'TOO_HIGH' : 'Hi, the temperature is too high' } } def DefineCoolingtype_limits(coolingType): coolingtype_limits = { 'PASSIVE_COOLING' : {"lowerLimit" : 0, "upperLimit" : 35}, 'HI_ACTIVE_COOLING' : {"lowerLimit" : 0, "upperLimit" : 45}, 'MED_ACTIVE_COOLING' : {"lowerLimit" : 0, "upperLimit" : 40} } if coolingType in coolingtype_limits.keys(): return(coolingtype_limits[coolingType]) else: return({"lowerLimit" : 'NA', "upperLimit" : 'NA'}) def infer_breach(value, lowerLimit, upperLimit): if value < lowerLimit: return 'TOO_LOW' if value > upperLimit: return 'TOO_HIGH' return 'NORMAL' def classify_temperature_breach(coolingType, temperatureInC): limits = DefineCoolingtype_limits(coolingType) if 'NA' not in limits.values(): return infer_breach(temperatureInC, limits['lowerLimit'], limits['upperLimit']) else: return "Invalid cooling type" def IsbatteryCharValid(batteryChar): batteryChar_types = ['PASSIVE_COOLING', 'HI_ACTIVE_COOLING', 'MED_ACTIVE_COOLING'] if batteryChar in batteryChar_types: return True return False def GetBreachType(batteryChar, temperatureInC): breachType = classify_temperature_breach(batteryChar, temperatureInC) if IsbatteryCharValid(batteryChar) else False return breachType if breachType!=False else 'Invalid_Param' def check_and_alert(alertTarget, batteryChar, temperatureInC): breachType = GetBreachType(batteryChar, temperatureInC) alert_status = alertTarget(breachType) if breachType!='Invalid_Param' else False return(breachType) def send_to_controller(breachType): header = 0xfeed command_to_controller = (f'{header}, {breachType}') PrintMessageONConsole(command_to_controller) return(command_to_controller) def Generate_email_content(breachtype, email_messages): return email_messages[breachtype] def PrintMessageONConsole(message): print(message) return True def send_to_email(breachType): mail_content = Generate_email_content(breachType, email_info['messages']) sent_email = f"To: {email_info['recepient']} : {mail_content}" PrintMessageONConsole(sent_email) return(sent_email)
email_info = {'recepient': '[email protected]', 'messages': {'TOO_LOW': 'Hi, the temperature is too low', 'TOO_HIGH': 'Hi, the temperature is too high'}} def define_coolingtype_limits(coolingType): coolingtype_limits = {'PASSIVE_COOLING': {'lowerLimit': 0, 'upperLimit': 35}, 'HI_ACTIVE_COOLING': {'lowerLimit': 0, 'upperLimit': 45}, 'MED_ACTIVE_COOLING': {'lowerLimit': 0, 'upperLimit': 40}} if coolingType in coolingtype_limits.keys(): return coolingtype_limits[coolingType] else: return {'lowerLimit': 'NA', 'upperLimit': 'NA'} def infer_breach(value, lowerLimit, upperLimit): if value < lowerLimit: return 'TOO_LOW' if value > upperLimit: return 'TOO_HIGH' return 'NORMAL' def classify_temperature_breach(coolingType, temperatureInC): limits = define_coolingtype_limits(coolingType) if 'NA' not in limits.values(): return infer_breach(temperatureInC, limits['lowerLimit'], limits['upperLimit']) else: return 'Invalid cooling type' def isbattery_char_valid(batteryChar): battery_char_types = ['PASSIVE_COOLING', 'HI_ACTIVE_COOLING', 'MED_ACTIVE_COOLING'] if batteryChar in batteryChar_types: return True return False def get_breach_type(batteryChar, temperatureInC): breach_type = classify_temperature_breach(batteryChar, temperatureInC) if isbattery_char_valid(batteryChar) else False return breachType if breachType != False else 'Invalid_Param' def check_and_alert(alertTarget, batteryChar, temperatureInC): breach_type = get_breach_type(batteryChar, temperatureInC) alert_status = alert_target(breachType) if breachType != 'Invalid_Param' else False return breachType def send_to_controller(breachType): header = 65261 command_to_controller = f'{header}, {breachType}' print_message_on_console(command_to_controller) return command_to_controller def generate_email_content(breachtype, email_messages): return email_messages[breachtype] def print_message_on_console(message): print(message) return True def send_to_email(breachType): mail_content = generate_email_content(breachType, email_info['messages']) sent_email = f"To: {email_info['recepient']} : {mail_content}" print_message_on_console(sent_email) return sent_email
# -*- coding: utf-8 -*- # vim: set sw=4 ts=4 expandtab : class ArgError(Exception): def __init__(self, message): if message == None: self.message = 'node error' else: self.message = message
class Argerror(Exception): def __init__(self, message): if message == None: self.message = 'node error' else: self.message = message
# Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def rotateRight(self, head: ListNode, k: int) -> ListNode: if head is None: return head l = 1 tail = head while tail.next: tail = tail.next l += 1 k %= l p = head for _ in range(l - 1 - k): p = p.next tail.next = head head = p.next p.next = None return head
class Listnode: def __init__(self, x): self.val = x self.next = None class Solution: def rotate_right(self, head: ListNode, k: int) -> ListNode: if head is None: return head l = 1 tail = head while tail.next: tail = tail.next l += 1 k %= l p = head for _ in range(l - 1 - k): p = p.next tail.next = head head = p.next p.next = None return head
class ApiException(Exception): def __init__(self, response): if response.status_code == 404: self._rollbar_ignore = True message = response.text super(ApiException, self).__init__(message)
class Apiexception(Exception): def __init__(self, response): if response.status_code == 404: self._rollbar_ignore = True message = response.text super(ApiException, self).__init__(message)
__author__ = 'Chirag' x = {"Tom", 2.71, 36, 36} # is a set. REPETITION NOT ALLOWED y = ["Tom", 2.71, 36, 36] # is a list. MUTABLE print("x is a SET : ", x) print("y is a LIST : ", y) print() #=========================================== # CREATE sets s = {1,2,3,4,5} # direct declare print(s) s = set() for i in range(1,6): s.add(i) # using .add() method print(s) s = set([x for x in range(1,6)]) print(s) # list comprehension + conversion print() #=========================================== # SETS don't have order. Therefore no # indexing access is available list1 = [1,1,2,2,3,4,5,6,1,1] print(f"list1 = {list1}") s = set(list1) print(f"s = set(list1) = {s}") print() #=========================================== # METHODS for sets include .intersection() # .union() .issubset() etc. print(f"len(s) = {len(s)}") #===========================================
__author__ = 'Chirag' x = {'Tom', 2.71, 36, 36} y = ['Tom', 2.71, 36, 36] print('x is a SET : ', x) print('y is a LIST : ', y) print() s = {1, 2, 3, 4, 5} print(s) s = set() for i in range(1, 6): s.add(i) print(s) s = set([x for x in range(1, 6)]) print(s) print() list1 = [1, 1, 2, 2, 3, 4, 5, 6, 1, 1] print(f'list1 = {list1}') s = set(list1) print(f's = set(list1) = {s}') print() print(f'len(s) = {len(s)}')
# Python3 program to Merge Two Binary Trees # Helper class that allocates a new node # with the given data and None left and # right pointers. class newNode: def __init__(self, data): self.data = data self.left = self.right = None # Given a binary tree, prints nodes # in inorder def inorder(node): if not node: return # first recur on left child inorder(node.left) # then print the data of node print(node.data, end=" ") # now recur on right child inorder(node.right) # Function to merge given two # binary trees def MergeTrees(t1, t2): if not t1: return t2 if not t2: return t1 t1.data += t2.data t1.left = MergeTrees(t1.left, t2.left) t1.right = MergeTrees(t1.right, t2.right) return t1 # Driver code if __name__ == "__main__": # Let us construct the first Binary Tree # 1 # / \ # 2 3 # / \ \ # 4 5 6 root1 = newNode(1) root1.left = newNode(2) root1.right = newNode(3) root1.left.left = newNode(4) root1.left.right = newNode(5) root1.right.right = newNode(6) # Let us construct the second Binary Tree # 4 # / \ # 1 7 # / / \ # 3 2 6 root2 = newNode(4) root2.left = newNode(1) root2.right = newNode(7) root2.left.left = newNode(3) root2.right.left = newNode(2) root2.right.right = newNode(6) root3 = MergeTrees(root1, root2) print("The Merged Binary Tree is:") inorder(root3) # This code is contributed by PranchalK
class Newnode: def __init__(self, data): self.data = data self.left = self.right = None def inorder(node): if not node: return inorder(node.left) print(node.data, end=' ') inorder(node.right) def merge_trees(t1, t2): if not t1: return t2 if not t2: return t1 t1.data += t2.data t1.left = merge_trees(t1.left, t2.left) t1.right = merge_trees(t1.right, t2.right) return t1 if __name__ == '__main__': root1 = new_node(1) root1.left = new_node(2) root1.right = new_node(3) root1.left.left = new_node(4) root1.left.right = new_node(5) root1.right.right = new_node(6) root2 = new_node(4) root2.left = new_node(1) root2.right = new_node(7) root2.left.left = new_node(3) root2.right.left = new_node(2) root2.right.right = new_node(6) root3 = merge_trees(root1, root2) print('The Merged Binary Tree is:') inorder(root3)
def find_lis(a): T = [None]*len(a) prev = [None]*len(a) for i in range(len(a)): T[i] = 1 prev[i] = -1 for j in range(i): if a[j] <= a[i] and T[i]< T[j]+1: T[i] = T[j]+1 prev[i] = j longest =max(T) i = 0 for i in range( len(a)): if T[i] == longest: break store = [] while i > 0: store.append(a[i]) i = prev[i] return store if __name__ =='__main__': a= [7, 2, 1, 3, 8, 4, 9, 1, 2, 6] # a= [1, 7,2, 3, 8, 4, 9 ] print(find_lis(a))
def find_lis(a): t = [None] * len(a) prev = [None] * len(a) for i in range(len(a)): T[i] = 1 prev[i] = -1 for j in range(i): if a[j] <= a[i] and T[i] < T[j] + 1: T[i] = T[j] + 1 prev[i] = j longest = max(T) i = 0 for i in range(len(a)): if T[i] == longest: break store = [] while i > 0: store.append(a[i]) i = prev[i] return store if __name__ == '__main__': a = [7, 2, 1, 3, 8, 4, 9, 1, 2, 6] print(find_lis(a))
# Problem 3 # Largest prime factor # The prime factors of 13195 are 5, 7, 13 and 29. # What is the largest prime factor of the number 600851475143 ? def is_prime(num): if num == 1: return False i = 2 while i*i <= num: if num % i == 0: return False i += 1 return True huge = 600851475143 # 600851475143 / 71 = 8462696833 / 839 = 10086647 / 1471 = 6857 for x in reversed(range(1,10000)): if is_prime(x): if huge % x == 0: print(x) # result is 6857 # 6857 # 1471 # 839 # 71
def is_prime(num): if num == 1: return False i = 2 while i * i <= num: if num % i == 0: return False i += 1 return True huge = 600851475143 for x in reversed(range(1, 10000)): if is_prime(x): if huge % x == 0: print(x)
# defines a mutable class class Mutable(): def __init__(self): self.layers = [] def getGen(self): gen = [] for layer in self.layers: gen += layer.getWeights() return gen def mutateWith(self, lover): genSelf = self.getGen() genLover = lover.getGen() self.setGen(self.mutationFunction(genSelf, genLover)) def setGen(self, gen): for layer in self.layers: layer.setWeights(gen[:layer.size]) del gen[:layer.size] print("Layer added") if len(gen) > 0: print("error, some genes were not used")
class Mutable: def __init__(self): self.layers = [] def get_gen(self): gen = [] for layer in self.layers: gen += layer.getWeights() return gen def mutate_with(self, lover): gen_self = self.getGen() gen_lover = lover.getGen() self.setGen(self.mutationFunction(genSelf, genLover)) def set_gen(self, gen): for layer in self.layers: layer.setWeights(gen[:layer.size]) del gen[:layer.size] print('Layer added') if len(gen) > 0: print('error, some genes were not used')
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- __author__ = 'Florents Tselai' REDIS_URI = '127.0.0.1' REDIS_CAR_KEYSPACE = 'pycargr:car:{}' SEARCH_BASE_URL = 'https://www.car.gr/classifieds/cars/' CACHE_EXPIRE_IN = 24 * 3600
__author__ = 'Florents Tselai' redis_uri = '127.0.0.1' redis_car_keyspace = 'pycargr:car:{}' search_base_url = 'https://www.car.gr/classifieds/cars/' cache_expire_in = 24 * 3600
a = 28 b = 1.5 c = 'hello' d = True e = None print(a,b,c,d,e)
a = 28 b = 1.5 c = 'hello' d = True e = None print(a, b, c, d, e)
# -*- coding: utf-8 -*- class Fila: def __init__(self): self.element = list() def inserir(self,name): self.element.append(name) print(f'Inserindo o elemento {name}: ' + ' '.join(self.element)) def remover(self): self.element.pop(0) print(f'Removendo o primeiro elemento: ' + ' '.join(self.element)) def exibir(self): print('Fila: ' + ' '.join(self.element)) fila = Fila() fila.inserir('apple') fila.inserir('grape') fila.inserir('lemon') fila.remover() fila.exibir()
class Fila: def __init__(self): self.element = list() def inserir(self, name): self.element.append(name) print(f'Inserindo o elemento {name}: ' + ' '.join(self.element)) def remover(self): self.element.pop(0) print(f'Removendo o primeiro elemento: ' + ' '.join(self.element)) def exibir(self): print('Fila: ' + ' '.join(self.element)) fila = fila() fila.inserir('apple') fila.inserir('grape') fila.inserir('lemon') fila.remover() fila.exibir()
load("@bazel_skylib//lib:shell.bzl", "shell") load("@bazel_skylib//lib:paths.bzl", "paths") AsciidocInfo = provider( doc = "Information about the asciidoc-generated files.", fields = { "primary_output_path": "Path of the primary output file beneath {resource_dir}.", "resource_dir": "File for the directory containing all of the generated resources.", }, ) _toolchain_type = "//tools/build_rules/external_tools:external_tools_toolchain_type" def _asciidoc_impl(ctx): resource_dir = ctx.actions.declare_directory(ctx.label.name + ".d") primary_output = "{name}.html".format(name = ctx.label.name) # Declared as an output, but not saved as part of the default output group. # Build with --output_groups=+asciidoc_logfile to retain. logfile = ctx.actions.declare_file(ctx.label.name + ".logfile") # Locate the asciidoc binary from the toolchain and construct its args. asciidoc = ctx.toolchains[_toolchain_type].asciidoc args = ["--backend", "html", "--no-header-footer"] for key, value in ctx.attr.attrs.items(): if value: args.append("--attribute=%s=%s" % (key, value)) else: args.append("--attribute=%s!" % (key,)) if ctx.attr.example_script: args.append("--attribute=example_script=" + ctx.file.example_script.path) args += ["--conf-file=%s" % c.path for c in ctx.files.confs] args += ["-o", paths.join(resource_dir.path, primary_output)] args.append(ctx.file.src.path) # Get the path where all our necessary tools are located so it can be set # to PATH in our run_shell command. tool_path = ctx.toolchains[_toolchain_type].path # Resolve data targets to get input files and runfiles manifests. data, _, manifests = ctx.resolve_command(tools = ctx.attr.data) # Run asciidoc and capture stderr to logfile. If it succeeds, look in the # captured log for error messages and fail if we find any. ctx.actions.run_shell( inputs = ([ctx.file.src] + ctx.files.confs + ([ctx.file.example_script] if ctx.file.example_script else []) + data), input_manifests = manifests, outputs = [resource_dir, logfile], arguments = args, command = "\n".join([ "set -e", "mkdir -p {resource_dir}".format(resource_dir = shell.quote(resource_dir.path)), # Run asciidoc itself, and fail if it returns nonzero. "{asciidoc} \"$@\" 2> >(tee -a {logfile} >&2)".format( logfile = shell.quote(logfile.path), asciidoc = shell.quote(asciidoc), ), # The tool succeeded, but now check for error diagnostics. 'if grep -q -e "filter non-zero exit code" -e "no output from filter" {logfile}; then'.format( logfile = shell.quote(logfile.path), ), "exit 1", "fi", # Move SVGs to the appropriate directory. "find . -name '*.svg' -maxdepth 1 -exec mv '{{}}' {out}/ \\;".format(out = shell.quote(resource_dir.path)), ]), env = {"PATH": tool_path}, mnemonic = "RunAsciidoc", ) return [ DefaultInfo(files = depset([resource_dir])), OutputGroupInfo(asciidoc_logfile = depset([logfile])), AsciidocInfo(primary_output_path = primary_output, resource_dir = resource_dir), ] asciidoc = rule( implementation = _asciidoc_impl, toolchains = ["//tools/build_rules/external_tools:external_tools_toolchain_type"], attrs = { "src": attr.label( doc = "asciidoc file to process", allow_single_file = True, ), "attrs": attr.string_dict( doc = "Dict of attributes to pass to asciidoc as --attribute=KEY=VALUE", ), "confs": attr.label_list( doc = "`conf-file`s to pass to asciidoc", allow_files = True, ), "data": attr.label_list( doc = "Files/targets used during asciidoc generation. Only needed for tools used in example_script.", allow_files = True, ), "example_script": attr.label( doc = "Script to pass to asciidoc as --attribute=example_script=VALUE.", allow_single_file = True, ), }, doc = "Generate asciidoc", )
load('@bazel_skylib//lib:shell.bzl', 'shell') load('@bazel_skylib//lib:paths.bzl', 'paths') asciidoc_info = provider(doc='Information about the asciidoc-generated files.', fields={'primary_output_path': 'Path of the primary output file beneath {resource_dir}.', 'resource_dir': 'File for the directory containing all of the generated resources.'}) _toolchain_type = '//tools/build_rules/external_tools:external_tools_toolchain_type' def _asciidoc_impl(ctx): resource_dir = ctx.actions.declare_directory(ctx.label.name + '.d') primary_output = '{name}.html'.format(name=ctx.label.name) logfile = ctx.actions.declare_file(ctx.label.name + '.logfile') asciidoc = ctx.toolchains[_toolchain_type].asciidoc args = ['--backend', 'html', '--no-header-footer'] for (key, value) in ctx.attr.attrs.items(): if value: args.append('--attribute=%s=%s' % (key, value)) else: args.append('--attribute=%s!' % (key,)) if ctx.attr.example_script: args.append('--attribute=example_script=' + ctx.file.example_script.path) args += ['--conf-file=%s' % c.path for c in ctx.files.confs] args += ['-o', paths.join(resource_dir.path, primary_output)] args.append(ctx.file.src.path) tool_path = ctx.toolchains[_toolchain_type].path (data, _, manifests) = ctx.resolve_command(tools=ctx.attr.data) ctx.actions.run_shell(inputs=[ctx.file.src] + ctx.files.confs + ([ctx.file.example_script] if ctx.file.example_script else []) + data, input_manifests=manifests, outputs=[resource_dir, logfile], arguments=args, command='\n'.join(['set -e', 'mkdir -p {resource_dir}'.format(resource_dir=shell.quote(resource_dir.path)), '{asciidoc} "$@" 2> >(tee -a {logfile} >&2)'.format(logfile=shell.quote(logfile.path), asciidoc=shell.quote(asciidoc)), 'if grep -q -e "filter non-zero exit code" -e "no output from filter" {logfile}; then'.format(logfile=shell.quote(logfile.path)), 'exit 1', 'fi', "find . -name '*.svg' -maxdepth 1 -exec mv '{{}}' {out}/ \\;".format(out=shell.quote(resource_dir.path))]), env={'PATH': tool_path}, mnemonic='RunAsciidoc') return [default_info(files=depset([resource_dir])), output_group_info(asciidoc_logfile=depset([logfile])), asciidoc_info(primary_output_path=primary_output, resource_dir=resource_dir)] asciidoc = rule(implementation=_asciidoc_impl, toolchains=['//tools/build_rules/external_tools:external_tools_toolchain_type'], attrs={'src': attr.label(doc='asciidoc file to process', allow_single_file=True), 'attrs': attr.string_dict(doc='Dict of attributes to pass to asciidoc as --attribute=KEY=VALUE'), 'confs': attr.label_list(doc='`conf-file`s to pass to asciidoc', allow_files=True), 'data': attr.label_list(doc='Files/targets used during asciidoc generation. Only needed for tools used in example_script.', allow_files=True), 'example_script': attr.label(doc='Script to pass to asciidoc as --attribute=example_script=VALUE.', allow_single_file=True)}, doc='Generate asciidoc')
# return the keys of a dictionary def keys(dictionary): return dictionary.keys() # return the values of a dictionary def values(dictionary): return dictionary.values() # return the string representation of a dictionary def dict_to_string(d): return str(d) # merge two dictionaries def merge(d1, d2): for k, v in d2.iteritems(): if k in d1.keys(): if type(v) is dict: if type(d1[k]) is dict: merge(d1[k], v) elif d1[k] == 'none' or d1[k] is None: d1[k] = v else: n = [v, d1[k]] d1[k] = n elif type(v) is list: if type(d1[k]) is list: d1[k].extend(v) elif d1[k] == 'none' or d1[k] is None: d1[k] = v else: n = [v, d1[k]] d1[k] = n elif v == 'none' or v is None: pass else: n = [v, d1[k]] d1[k] = n else: d1.update({ k: v }) return d1
def keys(dictionary): return dictionary.keys() def values(dictionary): return dictionary.values() def dict_to_string(d): return str(d) def merge(d1, d2): for (k, v) in d2.iteritems(): if k in d1.keys(): if type(v) is dict: if type(d1[k]) is dict: merge(d1[k], v) elif d1[k] == 'none' or d1[k] is None: d1[k] = v else: n = [v, d1[k]] d1[k] = n elif type(v) is list: if type(d1[k]) is list: d1[k].extend(v) elif d1[k] == 'none' or d1[k] is None: d1[k] = v else: n = [v, d1[k]] d1[k] = n elif v == 'none' or v is None: pass else: n = [v, d1[k]] d1[k] = n else: d1.update({k: v}) return d1
class Data: def __init__(self): self.__dia = 0 self.__mes = 0 self.__ano = 0 def le_data(self): self.dia = int(input('Digite o dia: ')) self.mes = int(input('Digite o mes: ')) self.ano = int(input('Digite o ano: ')) def formatada(self): print(f'{self.dia}/{self.mes}/{self.ano}')
class Data: def __init__(self): self.__dia = 0 self.__mes = 0 self.__ano = 0 def le_data(self): self.dia = int(input('Digite o dia: ')) self.mes = int(input('Digite o mes: ')) self.ano = int(input('Digite o ano: ')) def formatada(self): print(f'{self.dia}/{self.mes}/{self.ano}')
#este es el ejercicio 3.1 def ejercicio01(): print ("Como saber si puedes votar por tu edad") mensaje="" #Ingreso de datos edadP=int(input("ingrese la edad que tiene:")) #Proceso if edadP>=18: mensaje="Usted tiene la edad necesaria para votar" else: mensaje="Usted no cumple con la edad minima para votar" print(mensaje) ejercicio01()
def ejercicio01(): print('Como saber si puedes votar por tu edad') mensaje = '' edad_p = int(input('ingrese la edad que tiene:')) if edadP >= 18: mensaje = 'Usted tiene la edad necesaria para votar' else: mensaje = 'Usted no cumple con la edad minima para votar' print(mensaje) ejercicio01()
spam = {'name': 'Pooka', 'age': 5} print("Before:") print(spam) #Traditional if 'color' not in spam: spam['color'] = 'black' print("After:") print(spam) #With setDefault() spam.setdefault("color", "white") print(spam) message = 'It was a bright cold day in April, and the clocks were striking thirteen.' count = {} for character in message: count.setdefault(character, 0) count[character] = count[character] + 1 print(count)
spam = {'name': 'Pooka', 'age': 5} print('Before:') print(spam) if 'color' not in spam: spam['color'] = 'black' print('After:') print(spam) spam.setdefault('color', 'white') print(spam) message = 'It was a bright cold day in April, and the clocks were striking thirteen.' count = {} for character in message: count.setdefault(character, 0) count[character] = count[character] + 1 print(count)
# Problem 2. # Write the function subStringMatchExact. This function takes two arguments: a target string, # and a key string. It should return a tuple of the starting points of matches of the key # string in the target string, when indexing starts at 0. Complete the definition for # # def subStringMatchExact(target,key): # # For example, # subStringMatchExact("atgacatgcacaagtatgcat","atgc") # would return the tuple (5, 15). def subStringMatchExact(target, key): position_list = [] begin_point = 0 temp_position = 0 while temp_position >= 0: temp_position = target.find(key, begin_point) if temp_position >= 0: begin_point = temp_position + 1 position_list.append(temp_position) position_tuple = tuple(position_list) return position_tuple target1 = 'atgacatgcacaagtatgcat' key1 = 'atgc' print(subStringMatchExact(target1, key1))
def sub_string_match_exact(target, key): position_list = [] begin_point = 0 temp_position = 0 while temp_position >= 0: temp_position = target.find(key, begin_point) if temp_position >= 0: begin_point = temp_position + 1 position_list.append(temp_position) position_tuple = tuple(position_list) return position_tuple target1 = 'atgacatgcacaagtatgcat' key1 = 'atgc' print(sub_string_match_exact(target1, key1))
''' Palindrome checker by python ''' #Palindrome check for String inputs. def palindrome (s): r=s[::-1] if(r==s): print("Yes It is a palindrome") else: print("No It is not a palindrome") s = input("Enter a String to check whether it is palindrome or not") palindrome(s) #Palindrome check for Number (Integer) inputs. num=int(input("Enter a number:")) temp=num rev=0 while(num>0): dig=num%10 rev=rev*10+dig num=num//10 if(temp==rev): print("The number is Palindrome!") else: print("The number is Not a palindrome!")
""" Palindrome checker by python """ def palindrome(s): r = s[::-1] if r == s: print('Yes It is a palindrome') else: print('No It is not a palindrome') s = input('Enter a String to check whether it is palindrome or not') palindrome(s) num = int(input('Enter a number:')) temp = num rev = 0 while num > 0: dig = num % 10 rev = rev * 10 + dig num = num // 10 if temp == rev: print('The number is Palindrome!') else: print('The number is Not a palindrome!')
class BaseError(Exception): ... class InternalError(BaseError): _default = "An internal error has occurred." def __init__(self): super().__init__(self._default)
class Baseerror(Exception): ... class Internalerror(BaseError): _default = 'An internal error has occurred.' def __init__(self): super().__init__(self._default)
class Solution: def hammingDistance(self, x: int, y: int) -> int: dis = 0 while x != 0 or y !=0: x,resx = x //2, x%2 y,resy = y//2, y%2 if resx!= resy: dis +=1 return dis class Solution: def hammingDistance(self, x: int, y: int) -> int: return bin(x^y).count('1')
class Solution: def hamming_distance(self, x: int, y: int) -> int: dis = 0 while x != 0 or y != 0: (x, resx) = (x // 2, x % 2) (y, resy) = (y // 2, y % 2) if resx != resy: dis += 1 return dis class Solution: def hamming_distance(self, x: int, y: int) -> int: return bin(x ^ y).count('1')
QUERIES = { 'average_movies_per_user': ( 'select avg(movies_watched) ' 'from ( ' 'select count(movie_id) as movies_watched ' 'from views ' 'group by user_id ' ' ) as movies_count;' ), 'average_view_times': 'select avg(viewed_frame) from views;', 'top_20_users_by_total_view_time': ( 'select user_id, sum(viewed_frame) as view_time ' 'from views ' 'group by user_id ' 'order by view_time desc ' 'limit 20;' ), 'top_20_movies_by_view_time': ( 'select movie_id, max(viewed_frame) as view_time ' 'from views ' 'group by movie_id ' 'order by view_time desc ' 'limit 20;' ), 'unique_movies_count': 'select count(distinct movie_id) from views;', 'unique_users_count': 'select count(distinct user_id) from views;' }
queries = {'average_movies_per_user': 'select avg(movies_watched) from ( select count(movie_id) as movies_watched from views group by user_id ) as movies_count;', 'average_view_times': 'select avg(viewed_frame) from views;', 'top_20_users_by_total_view_time': 'select user_id, sum(viewed_frame) as view_time from views group by user_id order by view_time desc limit 20;', 'top_20_movies_by_view_time': 'select movie_id, max(viewed_frame) as view_time from views group by movie_id order by view_time desc limit 20;', 'unique_movies_count': 'select count(distinct movie_id) from views;', 'unique_users_count': 'select count(distinct user_id) from views;'}
# Logic: Write a program that find the maximum positive integer from user input. # Algorithm: append all the numbers to a list and use the built-in method 'max()' to get the highest number in the list. num_int = int(input("Input a number: ")) num_list = [] while num_int >= 0: num_int = int(input("Input a number: ")) num_list.append(num_int) print("The maximum is",max(num_list))
num_int = int(input('Input a number: ')) num_list = [] while num_int >= 0: num_int = int(input('Input a number: ')) num_list.append(num_int) print('The maximum is', max(num_list))
def _print_aspect_impl(target, ctx): # Make sure the rule has a srcs attribute. if hasattr(ctx.rule.attr, 'srcs'): # Iterate through the files that make up the sources and # print their paths. for src in ctx.rule.attr.srcs: for f in src.files.to_list(): print(f.path) return [] print_aspect = aspect( implementation = _print_aspect_impl, attr_aspects = ['deps'], )
def _print_aspect_impl(target, ctx): if hasattr(ctx.rule.attr, 'srcs'): for src in ctx.rule.attr.srcs: for f in src.files.to_list(): print(f.path) return [] print_aspect = aspect(implementation=_print_aspect_impl, attr_aspects=['deps'])
for t in range(int(input())): n=int(input()) k = 3 + 5**(1/2) s = str(int(k**n)) if len(s) <3: s = "0"*(3-len(s)) +s print("Case #{}: {}".format(t+1,s[-3:]))
for t in range(int(input())): n = int(input()) k = 3 + 5 ** (1 / 2) s = str(int(k ** n)) if len(s) < 3: s = '0' * (3 - len(s)) + s print('Case #{}: {}'.format(t + 1, s[-3:]))
load( "@rules_scala3//rules:providers.bzl", _ScalaConfiguration = "ScalaConfiguration", _ScalaRulePhase = "ScalaRulePhase", ) def run_phases(ctx, phases): phase_providers = [ p[_ScalaRulePhase] for p in [ctx.attr.scala] + ctx.attr.plugins + ctx.attr._phase_providers if _ScalaRulePhase in p ] if phase_providers != []: phases = adjust_phases(phases, [p for pp in phase_providers for p in pp.phases]) gd = { "init": struct( scala_configuration = ctx.attr.scala[_ScalaConfiguration], ), "out": struct( output_groups = {}, providers = [], ), } g = struct(**gd) for (name, function) in phases: p = function(ctx, g) if p != None: gd[name] = p g = struct(**gd) return g def adjust_phases(phases, adjustments): if len(adjustments) == 0: return phases phases = phases[:] for (relation, peer_name, name, function) in adjustments: for idx, (needle, _) in enumerate(phases): if needle == peer_name: if relation in ["-", "before"]: phases.insert(idx, (name, function)) elif relation in ["+", "after"]: phases.insert(idx + 1, (name, function)) elif relation in ["=", "replace"]: phases[idx] = (name, function) return phases
load('@rules_scala3//rules:providers.bzl', _ScalaConfiguration='ScalaConfiguration', _ScalaRulePhase='ScalaRulePhase') def run_phases(ctx, phases): phase_providers = [p[_ScalaRulePhase] for p in [ctx.attr.scala] + ctx.attr.plugins + ctx.attr._phase_providers if _ScalaRulePhase in p] if phase_providers != []: phases = adjust_phases(phases, [p for pp in phase_providers for p in pp.phases]) gd = {'init': struct(scala_configuration=ctx.attr.scala[_ScalaConfiguration]), 'out': struct(output_groups={}, providers=[])} g = struct(**gd) for (name, function) in phases: p = function(ctx, g) if p != None: gd[name] = p g = struct(**gd) return g def adjust_phases(phases, adjustments): if len(adjustments) == 0: return phases phases = phases[:] for (relation, peer_name, name, function) in adjustments: for (idx, (needle, _)) in enumerate(phases): if needle == peer_name: if relation in ['-', 'before']: phases.insert(idx, (name, function)) elif relation in ['+', 'after']: phases.insert(idx + 1, (name, function)) elif relation in ['=', 'replace']: phases[idx] = (name, function) return phases
# Copyright 2017-2020 EPAM Systems, Inc. (https://www.epam.com/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. class ShareMountModel(object): def __init__(self): self.identifier = None self.region_id = None self.mount_root = None self.mount_type = None self.mount_options = None @classmethod def load(cls, json): instance = ShareMountModel() if not json: return None instance.identifier = json['id'] instance.region_id = json['regionId'] instance.mount_root = json['mountRoot'] instance.mount_type = json['mountType'] instance.mount_options = json['mountOptions'] if 'mountOptions' in json else None return instance
class Sharemountmodel(object): def __init__(self): self.identifier = None self.region_id = None self.mount_root = None self.mount_type = None self.mount_options = None @classmethod def load(cls, json): instance = share_mount_model() if not json: return None instance.identifier = json['id'] instance.region_id = json['regionId'] instance.mount_root = json['mountRoot'] instance.mount_type = json['mountType'] instance.mount_options = json['mountOptions'] if 'mountOptions' in json else None return instance
X, Y, N = map(int, input().split()) grid = [] win = '' for i in range(X): grid.append([]) for j, val in enumerate(input().split()): grid[i].append({'R':0,'B':0, 'dir':'none'}) if val != 'O': grid[i][j][val] = 1 up, left, upleft, upright = 0, 0, 0, 0 if i > 0: up = grid[i-1][j][val] if grid[i-1][j]['dir']=='up' or grid[i-1][j]['dir']=='none' else 0 if j > 0: left = grid[i][j-1][val] if grid[i][j-1]['dir']=='left' or grid[i][j-1]['dir']=='none' else 0 if i*j > 0: upleft = grid[i-1][j-1][val] if grid[i-1][j-1]['dir']=='upleft' or grid[i-1][j-1]['dir']=='none' else 0 if i > 0 and j < Y-1: upright = grid[i-1][j+1][val] if grid[i-1][j+1]['dir']=='upright' or grid[i-1][j+1]['dir']=='none' else 0 grid[i][j][val] += max(up, left, upleft, upright) if max(up, left, upleft, upright)==up: grid[i][j]['dir']='up' if max(up, left, upleft, upright)==left: grid[i][j]['dir']='left' if max(up, left, upleft, upright)==upleft: grid[i][j]['dir']='upleft' if max(up, left, upleft, upright)==upright: grid[i][j]['dir']='upright' if max(up, left, upleft, upright)==0: grid[i][j]['dir']='none' if grid[i][j][val] == N: win = {'B':'BLUE', 'R':'RED'}[val] break if win: break if win: print(win, 'WINS') else: print('NONE')
(x, y, n) = map(int, input().split()) grid = [] win = '' for i in range(X): grid.append([]) for (j, val) in enumerate(input().split()): grid[i].append({'R': 0, 'B': 0, 'dir': 'none'}) if val != 'O': grid[i][j][val] = 1 (up, left, upleft, upright) = (0, 0, 0, 0) if i > 0: up = grid[i - 1][j][val] if grid[i - 1][j]['dir'] == 'up' or grid[i - 1][j]['dir'] == 'none' else 0 if j > 0: left = grid[i][j - 1][val] if grid[i][j - 1]['dir'] == 'left' or grid[i][j - 1]['dir'] == 'none' else 0 if i * j > 0: upleft = grid[i - 1][j - 1][val] if grid[i - 1][j - 1]['dir'] == 'upleft' or grid[i - 1][j - 1]['dir'] == 'none' else 0 if i > 0 and j < Y - 1: upright = grid[i - 1][j + 1][val] if grid[i - 1][j + 1]['dir'] == 'upright' or grid[i - 1][j + 1]['dir'] == 'none' else 0 grid[i][j][val] += max(up, left, upleft, upright) if max(up, left, upleft, upright) == up: grid[i][j]['dir'] = 'up' if max(up, left, upleft, upright) == left: grid[i][j]['dir'] = 'left' if max(up, left, upleft, upright) == upleft: grid[i][j]['dir'] = 'upleft' if max(up, left, upleft, upright) == upright: grid[i][j]['dir'] = 'upright' if max(up, left, upleft, upright) == 0: grid[i][j]['dir'] = 'none' if grid[i][j][val] == N: win = {'B': 'BLUE', 'R': 'RED'}[val] break if win: break if win: print(win, 'WINS') else: print('NONE')
# Copied from https://rosettacode.org/wiki/Shortest_common_supersequence#Python # Use the Longest Common Subsequence algorithm def shortest_common_supersequence(a, b): lcs = longest_common_subsequence(a, b) scs = "" # Consume lcs while len(lcs) > 0: if a[0]==lcs[0] and b[0]==lcs[0]: # Part of the LCS, so consume from all strings scs += lcs[0] lcs = lcs[1:] a = a[1:] b = b[1:] elif a[0]==lcs[0]: scs += b[0] b = b[1:] else: scs += a[0] a = a[1:] # append remaining characters return scs + a + b
def shortest_common_supersequence(a, b): lcs = longest_common_subsequence(a, b) scs = '' while len(lcs) > 0: if a[0] == lcs[0] and b[0] == lcs[0]: scs += lcs[0] lcs = lcs[1:] a = a[1:] b = b[1:] elif a[0] == lcs[0]: scs += b[0] b = b[1:] else: scs += a[0] a = a[1:] return scs + a + b
def extract_tib_only(csv_dump): lines = csv_dump.strip().split('\n') # cut dump in lines lines = [l.split(',')[1] for l in lines] # only keep the text lines = [lines[i] for i in range(0, len(lines), 2)] # only keep the tibetan return ''.join(lines) def extract_all(csv_dump): lines = csv_dump.strip().split('\n') # cut dump in lines lines = [l.split(',')[1] for l in lines] # only keep the text return ''.join(lines)
def extract_tib_only(csv_dump): lines = csv_dump.strip().split('\n') lines = [l.split(',')[1] for l in lines] lines = [lines[i] for i in range(0, len(lines), 2)] return ''.join(lines) def extract_all(csv_dump): lines = csv_dump.strip().split('\n') lines = [l.split(',')[1] for l in lines] return ''.join(lines)
# 26.05.2019 # Tuples vs Lists # Tuples are read only # Tuples have ( ) brackets # Example with a List: awesomeList= ['hello', 45, 'Marc', 89.4] awesomeList[3] = 6 # List can be updated print(awesomeList) # now a tuple awesomeTuple = ('MarcTuple', 1, 213.2, 'Hello') print(awesomeTuple) print(awesomeTuple[2]) # ERROR awesomeTuple[2] = 3 # Tuple object does not support item assignment # ERROR awesomeTuple[1] +=3 # but slicing is working print(awesomeTuple[0][2:5]) var7 = awesomeTuple[0][2:5] var8 = awesomeTuple[2] print(var7*3) print(var8*3)
awesome_list = ['hello', 45, 'Marc', 89.4] awesomeList[3] = 6 print(awesomeList) awesome_tuple = ('MarcTuple', 1, 213.2, 'Hello') print(awesomeTuple) print(awesomeTuple[2]) print(awesomeTuple[0][2:5]) var7 = awesomeTuple[0][2:5] var8 = awesomeTuple[2] print(var7 * 3) print(var8 * 3)
def dfCheckAvailability(df, baseTrackingMap): ##### # step number -- iStep bIStep = False if not ("iStep" in df.columns) else True print("scan step number (iStep) availability: %s \n--" % str(bIStep)) ##### # Unix time -- epoch bEpoch = False if not ("epoch" in df.columns) else True print("Unix time (epoch) availability: %s \n--" % str(bEpoch)) ##### # goniometer DOF -- xGonioRaw... lsGonio = [s.replace("xGonioRaw", "") for s in df.columns if "xGonioRaw" in s] # list of the full raw goniometer DOF names -- without prefix bXGonio = False if len(lsGonio) == 0 else True printNr = ("(%d)" % len(lsGonio)) if bXGonio else "" print("goniometer DOF availability: %s %s" % (str(bXGonio), printNr)) print("xGonioRaw + %s" % str(lsGonio)) print("--") ##### # input (all 4) & output (both 2) tracking data... print("input modules should be: %s" % str(baseTrackingMap[0])) print("output modules should be: %s" % str(baseTrackingMap[1])) ##### # positions -- xRaw... bXRaw = {"in": True, "out": True} for iLayer in baseTrackingMap[0]: if not ("xRaw"+iLayer in df.columns): bXRaw["in"] = False # input for iLayer in baseTrackingMap[1]: if not ("xRaw"+iLayer in df.columns): bXRaw["out"] = False # output print("input tracking availability (xRaw...): %s" % str(bXRaw["in"])) print("output tracking availability (xRaw...): %s" % str(bXRaw["out"])) ##### # multiplicities -- nHit... bNHit = {"in": True, "out": True} for iLayer in baseTrackingMap[0]: if not ("nHit"+iLayer in df.columns): bNHit["in"] = False # input for iLayer in baseTrackingMap[1]: if not ("nHit"+iLayer in df.columns): bNHit["out"] = False # output print("input multiplicity availability (nHit...): %s" % str(bNHit["in"])) print("output multiplicity availability (nHit...): %s" % str(bNHit["out"])) print("--") ##### # digitizer data -- digiPHRaw... & digiTime... lsDigiRawCh = [s for s in sorted(df.columns) if "digiPHRaw" in s] # list of the full raw digitizer PH names lsDigiCh = [s.replace("digiPHRaw", "") for s in lsDigiRawCh] # list of the digitizer channel names -- without any prefix bDigiPHAny = False if len(lsDigiCh) == 0 else True # global PH availability -- single channels listed in lsDigiRawCh print("digitizer channel availability: %s" % str(bDigiPHAny)) bDigiTime = {} if bDigiPHAny: print("%d channels: digiPHRaw + %s" % (len(lsDigiCh), str(lsDigiCh))) for i, iCh in enumerate(lsDigiRawCh): # digitizer time availability for each of the available PH (listed in lsDigiRawCh) bDigiTime.update({iCh.replace("digiPHRaw", ""): True if iCh.replace("PHRaw", "Time") in df.columns else False}) print("%d with time: digiTime + %s" % (len([s for s in bDigiTime if bDigiTime[s]]), str([s for s in bDigiTime if bDigiTime[s]]))) print("--") ##### # forward calorimeter total PH & energy in GeV -- PHCaloFwd & EFwd bPHCaloFwd = False if not ("PHCaloFwd" in df.columns) else True print("forward calorimeter total signal (PHCaloFwd) availability a priori: %s" % str(bPHCaloFwd)) bEFwd = False if not ("EFwd" in df.columns) else True print("forward calorimeter total in GeV (EFwd) availability a priori: %s" % str(bEFwd)) return df, bIStep, bEpoch, bXGonio, bXRaw, bNHit, bDigiPHAny, lsDigiCh, bDigiTime, bPHCaloFwd, bEFwd ############################################################################### ############################################################################### def zBaseCheckAvailability(z, lsRun, baseTrackingMap): for iRun in lsRun: if iRun in z: bGlobalAvailability = True else: bGlobalAvailability = False z.update({iRun: {}}) # goniometer if not ("gonio" in z[iRun]): bGlobalAvailability = False print("z[%s][\"gonio\"] unavailable --> setting 0" % iRun) z[iRun].update({"gonio": 0}) # forward calorimeter if not ("caloFwd" in z[iRun]): bGlobalAvailability = False print("z[%s][\"caloFwd\"] unavailable --> setting 0" % iRun) z[iRun].update({"caloFwd": 0}) # input/output base tracking layers for iLayer in baseTrackingMap[0]+baseTrackingMap[1]: if not (iLayer in z[iRun]): bGlobalAvailability = False print("z[%s][\"%s\"] unavailable --> setting 0" % (iRun, iLayer)) z[iRun].update({iLayer: 0}) if bGlobalAvailability: print("all mandatory z[%s] available" % iRun) return z
def df_check_availability(df, baseTrackingMap): b_i_step = False if not 'iStep' in df.columns else True print('scan step number (iStep) availability: %s \n--' % str(bIStep)) b_epoch = False if not 'epoch' in df.columns else True print('Unix time (epoch) availability: %s \n--' % str(bEpoch)) ls_gonio = [s.replace('xGonioRaw', '') for s in df.columns if 'xGonioRaw' in s] b_x_gonio = False if len(lsGonio) == 0 else True print_nr = '(%d)' % len(lsGonio) if bXGonio else '' print('goniometer DOF availability: %s %s' % (str(bXGonio), printNr)) print('xGonioRaw + %s' % str(lsGonio)) print('--') print('input modules should be: %s' % str(baseTrackingMap[0])) print('output modules should be: %s' % str(baseTrackingMap[1])) b_x_raw = {'in': True, 'out': True} for i_layer in baseTrackingMap[0]: if not 'xRaw' + iLayer in df.columns: bXRaw['in'] = False for i_layer in baseTrackingMap[1]: if not 'xRaw' + iLayer in df.columns: bXRaw['out'] = False print('input tracking availability (xRaw...): %s' % str(bXRaw['in'])) print('output tracking availability (xRaw...): %s' % str(bXRaw['out'])) b_n_hit = {'in': True, 'out': True} for i_layer in baseTrackingMap[0]: if not 'nHit' + iLayer in df.columns: bNHit['in'] = False for i_layer in baseTrackingMap[1]: if not 'nHit' + iLayer in df.columns: bNHit['out'] = False print('input multiplicity availability (nHit...): %s' % str(bNHit['in'])) print('output multiplicity availability (nHit...): %s' % str(bNHit['out'])) print('--') ls_digi_raw_ch = [s for s in sorted(df.columns) if 'digiPHRaw' in s] ls_digi_ch = [s.replace('digiPHRaw', '') for s in lsDigiRawCh] b_digi_ph_any = False if len(lsDigiCh) == 0 else True print('digitizer channel availability: %s' % str(bDigiPHAny)) b_digi_time = {} if bDigiPHAny: print('%d channels: digiPHRaw + %s' % (len(lsDigiCh), str(lsDigiCh))) for (i, i_ch) in enumerate(lsDigiRawCh): bDigiTime.update({iCh.replace('digiPHRaw', ''): True if iCh.replace('PHRaw', 'Time') in df.columns else False}) print('%d with time: digiTime + %s' % (len([s for s in bDigiTime if bDigiTime[s]]), str([s for s in bDigiTime if bDigiTime[s]]))) print('--') b_ph_calo_fwd = False if not 'PHCaloFwd' in df.columns else True print('forward calorimeter total signal (PHCaloFwd) availability a priori: %s' % str(bPHCaloFwd)) b_e_fwd = False if not 'EFwd' in df.columns else True print('forward calorimeter total in GeV (EFwd) availability a priori: %s' % str(bEFwd)) return (df, bIStep, bEpoch, bXGonio, bXRaw, bNHit, bDigiPHAny, lsDigiCh, bDigiTime, bPHCaloFwd, bEFwd) def z_base_check_availability(z, lsRun, baseTrackingMap): for i_run in lsRun: if iRun in z: b_global_availability = True else: b_global_availability = False z.update({iRun: {}}) if not 'gonio' in z[iRun]: b_global_availability = False print('z[%s]["gonio"] unavailable --> setting 0' % iRun) z[iRun].update({'gonio': 0}) if not 'caloFwd' in z[iRun]: b_global_availability = False print('z[%s]["caloFwd"] unavailable --> setting 0' % iRun) z[iRun].update({'caloFwd': 0}) for i_layer in baseTrackingMap[0] + baseTrackingMap[1]: if not iLayer in z[iRun]: b_global_availability = False print('z[%s]["%s"] unavailable --> setting 0' % (iRun, iLayer)) z[iRun].update({iLayer: 0}) if bGlobalAvailability: print('all mandatory z[%s] available' % iRun) return z
list1 = [1, 7, 16, 11, 14, 19, 20, 18] list2 = [85, 111, 117, 43, 104, 127, 117, 117, 33, 110, 99, 43, 72, 95, 85, 85, 94, 66, 120, 98, 79, 117, 68, 83, 64, 94, 39, 65, 73, 32, 65, 72, 51] ans = '' for i in range(len(list2)): ans += chr(list2[i] ^ list1[i % len(list1)]) print(ans)
list1 = [1, 7, 16, 11, 14, 19, 20, 18] list2 = [85, 111, 117, 43, 104, 127, 117, 117, 33, 110, 99, 43, 72, 95, 85, 85, 94, 66, 120, 98, 79, 117, 68, 83, 64, 94, 39, 65, 73, 32, 65, 72, 51] ans = '' for i in range(len(list2)): ans += chr(list2[i] ^ list1[i % len(list1)]) print(ans)
f = open("Street_Centrelines.csv",'r') def tup(): for v in f: v = v.split(",") t = (v[2], v[4], v[6], v[7]) print(t) def maintenance(): h = dict() for f2 in f: f2 = f2.split(",") if f2[12] not in h: h[f2[12]] = 1 else: h[f[12]] += 1 print(h) def street_owner(): owner_list = f[11] final_list = [] for a in f: a = a.split(",") if a[11] not in final_list: final_list.append(a[11]) print(final_list) tup() maintenance() street_owner()
f = open('Street_Centrelines.csv', 'r') def tup(): for v in f: v = v.split(',') t = (v[2], v[4], v[6], v[7]) print(t) def maintenance(): h = dict() for f2 in f: f2 = f2.split(',') if f2[12] not in h: h[f2[12]] = 1 else: h[f[12]] += 1 print(h) def street_owner(): owner_list = f[11] final_list = [] for a in f: a = a.split(',') if a[11] not in final_list: final_list.append(a[11]) print(final_list) tup() maintenance() street_owner()
words = ['one', 'fish', 'two', 'fish', 'red', 'fish', 'blue', 'fish'] words2 = ['have', 'you', 'seen', 'a', 'blue', 'fish'] # what if we did the first example as a generator? def get_word_lengths(word_list): for word in word_list: yield len(word) for length in get_word_lengths(words): print(length) print('--------------------') for length in (len(word) for word in words): print(length)
words = ['one', 'fish', 'two', 'fish', 'red', 'fish', 'blue', 'fish'] words2 = ['have', 'you', 'seen', 'a', 'blue', 'fish'] def get_word_lengths(word_list): for word in word_list: yield len(word) for length in get_word_lengths(words): print(length) print('--------------------') for length in (len(word) for word in words): print(length)
# Data processing with open('input') as f: in_data = [line.rstrip() for line in f] for i in range(25, len(in_data)): pre_i = in_data[i-25:i] summed_pair_found = False for a in pre_i: for b in pre_i: if a != b: if int(a)+int(b) == int(in_data[i]): summed_pair_found = True if not summed_pair_found: print(in_data[i]) exit()
with open('input') as f: in_data = [line.rstrip() for line in f] for i in range(25, len(in_data)): pre_i = in_data[i - 25:i] summed_pair_found = False for a in pre_i: for b in pre_i: if a != b: if int(a) + int(b) == int(in_data[i]): summed_pair_found = True if not summed_pair_found: print(in_data[i]) exit()
#! python3 pessoas = [ {'nome': 'Pedro', 'idade': 11}, {'nome': 'Mariana', 'idade': 18}, {'nome': 'Arthur', 'idade': 26}, {'nome': 'Rebeca', 'idade': 6}, {'nome': 'Tiago', 'idade': 19}, {'nome': 'Gabriela', 'idade': 17}, ] menores = filter(lambda p: p['idade'] < 18, pessoas) print(list(menores)) nomeMaiorede6caracteres = filter(lambda p: len(p['nome']) > 6, pessoas) print(list(nomeMaiorede6caracteres))
pessoas = [{'nome': 'Pedro', 'idade': 11}, {'nome': 'Mariana', 'idade': 18}, {'nome': 'Arthur', 'idade': 26}, {'nome': 'Rebeca', 'idade': 6}, {'nome': 'Tiago', 'idade': 19}, {'nome': 'Gabriela', 'idade': 17}] menores = filter(lambda p: p['idade'] < 18, pessoas) print(list(menores)) nome_maiorede6caracteres = filter(lambda p: len(p['nome']) > 6, pessoas) print(list(nomeMaiorede6caracteres))
line = input() a, b = line.split() a = int(a) b = int(b) print(a + b)
line = input() (a, b) = line.split() a = int(a) b = int(b) print(a + b)
employees_happiness = [int(happiness) for happiness in input().split()] factor = int(input()) factored_employees_happiness = list(map(lambda h: h * factor, employees_happiness)) find_average_happiness = sum(factored_employees_happiness) / len(factored_employees_happiness) happy_employees = [e for e in factored_employees_happiness if e >= find_average_happiness] unhappy_employees = [e for e in factored_employees_happiness if e < find_average_happiness] if len(happy_employees) >= len(unhappy_employees): print(f'Score: {len(happy_employees)}/{len(employees_happiness)}. Employees are happy!') else: print(f'Score: {len(happy_employees)}/{len(employees_happiness)}. Employees are not happy!')
employees_happiness = [int(happiness) for happiness in input().split()] factor = int(input()) factored_employees_happiness = list(map(lambda h: h * factor, employees_happiness)) find_average_happiness = sum(factored_employees_happiness) / len(factored_employees_happiness) happy_employees = [e for e in factored_employees_happiness if e >= find_average_happiness] unhappy_employees = [e for e in factored_employees_happiness if e < find_average_happiness] if len(happy_employees) >= len(unhappy_employees): print(f'Score: {len(happy_employees)}/{len(employees_happiness)}. Employees are happy!') else: print(f'Score: {len(happy_employees)}/{len(employees_happiness)}. Employees are not happy!')
db_config = { 'user': 'user', 'password': 'password', 'host': 'host.com', 'port': 12345, 'database': 'db-name', "autocommit": True }
db_config = {'user': 'user', 'password': 'password', 'host': 'host.com', 'port': 12345, 'database': 'db-name', 'autocommit': True}
VALUE_TYPES = { 'short', 'int', 'long', 'uchar', 'ushort', 'uint', 'ulong', 'bool', 'float', 'double', 'size_t', 'uint8', 'int8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64', } VALA_TYPES = VALUE_TYPES | { 'char', 'string', 'void*', 'void**', 'time_t', } VALA_ALIASES = { 'unsigned int': 'uint', 'short unsigned int': 'ushort', 'unsigned long': 'ulong', 'int64_t': 'int64', 'uint64_t': 'uint64', 'long long': 'int64', } GLIB_TYPES = { "GData": "GLib.Datalist", }
value_types = {'short', 'int', 'long', 'uchar', 'ushort', 'uint', 'ulong', 'bool', 'float', 'double', 'size_t', 'uint8', 'int8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'} vala_types = VALUE_TYPES | {'char', 'string', 'void*', 'void**', 'time_t'} vala_aliases = {'unsigned int': 'uint', 'short unsigned int': 'ushort', 'unsigned long': 'ulong', 'int64_t': 'int64', 'uint64_t': 'uint64', 'long long': 'int64'} glib_types = {'GData': 'GLib.Datalist'}
num = float(input("Enter a Number: ")) if num > 0: print("This is a Positive Number") elif num == 0: print("Zero") else: print("This is a Negative Number")
num = float(input('Enter a Number: ')) if num > 0: print('This is a Positive Number') elif num == 0: print('Zero') else: print('This is a Negative Number')
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. class ContentType: O365_CONNECTOR_CARD = "application/vnd.microsoft.teams.card.o365connector" FILE_CONSENT_CARD = "application/vnd.microsoft.teams.card.file.consent" FILE_DOWNLOAD_INFO = "application/vnd.microsoft.teams.file.download.info" FILE_INFO_CARD = "application/vnd.microsoft.teams.card.file.info" class Type: O365_CONNECTOR_CARD_VIEWACTION = "ViewAction" O365_CONNECTOR_CARD_OPEN_URI = "OpenUri" O365_CONNECTOR_CARD_HTTP_POST = "HttpPOST" O365_CONNECTOR_CARD_ACTION_CARD = "ActionCard" O365_CONNECTOR_CARD_TEXT_INPUT = "TextInput" O365_CONNECTOR_CARD_DATE_INPUT = "DateInput" O365_CONNECTOR_CARD_MULTICHOICE_INPUT = "MultichoiceInput"
class Contenttype: o365_connector_card = 'application/vnd.microsoft.teams.card.o365connector' file_consent_card = 'application/vnd.microsoft.teams.card.file.consent' file_download_info = 'application/vnd.microsoft.teams.file.download.info' file_info_card = 'application/vnd.microsoft.teams.card.file.info' class Type: o365_connector_card_viewaction = 'ViewAction' o365_connector_card_open_uri = 'OpenUri' o365_connector_card_http_post = 'HttpPOST' o365_connector_card_action_card = 'ActionCard' o365_connector_card_text_input = 'TextInput' o365_connector_card_date_input = 'DateInput' o365_connector_card_multichoice_input = 'MultichoiceInput'
class Log: lines = [] def __init__(self): self.lines = [] def add(self, line): self.lines.append(line) def flush(self): for line in self.lines: print(line) self.lines = [] battle_log = Log() general_log = Log()
class Log: lines = [] def __init__(self): self.lines = [] def add(self, line): self.lines.append(line) def flush(self): for line in self.lines: print(line) self.lines = [] battle_log = log() general_log = log()
num1 = 111 num2 = 222 num3 = 333333 num3 = 333 num4 = 4444
num1 = 111 num2 = 222 num3 = 333333 num3 = 333 num4 = 4444
class MaterialPropertyMap: def __init__(self): self._lowCutoffs = [] self._highCutoffs = [] self._properties = [] def error_check(self, cutoff, conductivity): if not isinstance(cutoff, tuple) or len(cutoff) != 2: raise Exception("Cutoff has to be a tuple(int,int) specifying the low and high cutoffs") for i in range(len(self._lowCutoffs)): if (self._highCutoffs[i] >= cutoff[0] >= self._lowCutoffs[i]) \ or (self._highCutoffs[i] >= cutoff[1] >= self._lowCutoffs[i]): raise Exception("Invalid material range. The range overlaps an existing material range") check = False if isinstance(conductivity, tuple): if any(i < 0 for i in conductivity): check = True else: if conductivity < 0: check = True if check: raise Exception("Invalid conductivity. Must be positive") return conductivity def _append_inputs(self, cutoff, conductivity): self._lowCutoffs.append(cutoff[0]) self._highCutoffs.append(cutoff[1]) self._properties.append(conductivity) def get_size(self): return len(self._lowCutoffs) def get_material(self, i): if i >= len(self._lowCutoffs): raise Exception("Invalid index. Maximum size: " + str(self.get_size())) if i < 0: raise Exception("Invalid index. Must be >= 0") return self._lowCutoffs[i], self._highCutoffs[i], self._properties[i] def show(self): print("Material conductivity as [low-high cutoffs] = conductivity:") for i in range(len(self._lowCutoffs)): print('[{} - {}] = {}'.format(self._lowCutoffs[i], self._highCutoffs[i], self._properties[i])) class IsotropicConductivityMap(MaterialPropertyMap): def __init__(self): super().__init__() def add_material(self, cutoff, conductivity): conductivity = self.error_check(cutoff, conductivity) if isinstance(conductivity, bool): return self._append_inputs(cutoff, conductivity) class AnisotropicConductivityMap(MaterialPropertyMap): def __init__(self): super().__init__() def add_material(self, cutoff, kxx, kyy, kzz, kxy, kxz, kyz): conductivity = (kxx, kyy, kzz, kxy, kxz, kyz) conductivity = self.error_check(cutoff, conductivity) if isinstance(conductivity, bool): return self._append_inputs(cutoff, conductivity) def add_isotropic_material(self, cutoff, k): conductivity = (k, k, k, 0., 0., 0.) conductivity = self.error_check(cutoff, conductivity) if isinstance(conductivity, bool): return self._append_inputs(cutoff, conductivity) def add_orthotropic_material(self, cutoff, kxx, kyy, kzz): conductivity = (kxx, kyy, kzz, 0., 0., 0.) conductivity = self.error_check(cutoff, conductivity) if isinstance(conductivity, bool): return self._append_inputs(cutoff, conductivity) def add_material_to_orient(self, cutoff, k_axial, k_radial): conductivity = (k_axial, k_radial) conductivity = self.error_check(cutoff, conductivity) if isinstance(conductivity, bool): return self._append_inputs(cutoff, conductivity) class ElasticityMap(MaterialPropertyMap): def __init__(self): super().__init__() def add_material(self, cutoff, C11, C12, C13, C14, C15, C16, C22, C23, C24, C25, C26, C33, C34, C35, C36, C44, C45, C46, C55, C56, C66): elasticity = (C11, C12, C13, C14, C15, C16, C22, C23, C24, C25, C26, C33, C34, C35, C36, C44, C45, C46, C55, C56, C66) elasticity = self.error_check(cutoff, elasticity) if isinstance(elasticity, bool): return self._append_inputs(cutoff, elasticity) def add_isotropic_material(self, cutoff, E_youngmod, nu_poissrat): Lambda = (nu_poissrat * E_youngmod) / ((1 + nu_poissrat) * (1 - 2 * nu_poissrat)) mu = E_youngmod / (2 * (1 + nu_poissrat)) elasticity = (Lambda + 2 * mu, Lambda, Lambda, 0., 0., 0., Lambda + 2 * mu, Lambda, 0., 0., 0., Lambda + 2 * mu, 0., 0., 0., 2 * mu, 0., 0., 2 * mu, 0., 2 * mu) elasticity = self.error_check(cutoff, elasticity) if isinstance(elasticity, bool): return self._append_inputs(cutoff, elasticity) def add_material_to_orient(self, cutoff, E_axial, E_radial, nu_poissrat_12, nu_poissrat_23, G12): elasticity = (E_axial, E_radial, nu_poissrat_12, nu_poissrat_23, G12) elasticity = self.error_check(cutoff, elasticity) if isinstance(elasticity, bool): return self._append_inputs(cutoff, elasticity) def show(self): print("Material elasticity as [low-high cutoffs] = elasticity:") for i in range(len(self._lowCutoffs)): print('[{} - {}] = '.format(self._lowCutoffs[i], self._highCutoffs[i], self._properties[i])) if len(self._properties[i]) == 5: print('{}'.format(self._properties[i])) else: first_elast, last_elast = (0, 6) for i2 in range(6): print('{}'.format(self._properties[i][first_elast:last_elast])) first_elast = last_elast last_elast += 5 - i2
class Materialpropertymap: def __init__(self): self._lowCutoffs = [] self._highCutoffs = [] self._properties = [] def error_check(self, cutoff, conductivity): if not isinstance(cutoff, tuple) or len(cutoff) != 2: raise exception('Cutoff has to be a tuple(int,int) specifying the low and high cutoffs') for i in range(len(self._lowCutoffs)): if self._highCutoffs[i] >= cutoff[0] >= self._lowCutoffs[i] or self._highCutoffs[i] >= cutoff[1] >= self._lowCutoffs[i]: raise exception('Invalid material range. The range overlaps an existing material range') check = False if isinstance(conductivity, tuple): if any((i < 0 for i in conductivity)): check = True elif conductivity < 0: check = True if check: raise exception('Invalid conductivity. Must be positive') return conductivity def _append_inputs(self, cutoff, conductivity): self._lowCutoffs.append(cutoff[0]) self._highCutoffs.append(cutoff[1]) self._properties.append(conductivity) def get_size(self): return len(self._lowCutoffs) def get_material(self, i): if i >= len(self._lowCutoffs): raise exception('Invalid index. Maximum size: ' + str(self.get_size())) if i < 0: raise exception('Invalid index. Must be >= 0') return (self._lowCutoffs[i], self._highCutoffs[i], self._properties[i]) def show(self): print('Material conductivity as [low-high cutoffs] = conductivity:') for i in range(len(self._lowCutoffs)): print('[{} - {}] = {}'.format(self._lowCutoffs[i], self._highCutoffs[i], self._properties[i])) class Isotropicconductivitymap(MaterialPropertyMap): def __init__(self): super().__init__() def add_material(self, cutoff, conductivity): conductivity = self.error_check(cutoff, conductivity) if isinstance(conductivity, bool): return self._append_inputs(cutoff, conductivity) class Anisotropicconductivitymap(MaterialPropertyMap): def __init__(self): super().__init__() def add_material(self, cutoff, kxx, kyy, kzz, kxy, kxz, kyz): conductivity = (kxx, kyy, kzz, kxy, kxz, kyz) conductivity = self.error_check(cutoff, conductivity) if isinstance(conductivity, bool): return self._append_inputs(cutoff, conductivity) def add_isotropic_material(self, cutoff, k): conductivity = (k, k, k, 0.0, 0.0, 0.0) conductivity = self.error_check(cutoff, conductivity) if isinstance(conductivity, bool): return self._append_inputs(cutoff, conductivity) def add_orthotropic_material(self, cutoff, kxx, kyy, kzz): conductivity = (kxx, kyy, kzz, 0.0, 0.0, 0.0) conductivity = self.error_check(cutoff, conductivity) if isinstance(conductivity, bool): return self._append_inputs(cutoff, conductivity) def add_material_to_orient(self, cutoff, k_axial, k_radial): conductivity = (k_axial, k_radial) conductivity = self.error_check(cutoff, conductivity) if isinstance(conductivity, bool): return self._append_inputs(cutoff, conductivity) class Elasticitymap(MaterialPropertyMap): def __init__(self): super().__init__() def add_material(self, cutoff, C11, C12, C13, C14, C15, C16, C22, C23, C24, C25, C26, C33, C34, C35, C36, C44, C45, C46, C55, C56, C66): elasticity = (C11, C12, C13, C14, C15, C16, C22, C23, C24, C25, C26, C33, C34, C35, C36, C44, C45, C46, C55, C56, C66) elasticity = self.error_check(cutoff, elasticity) if isinstance(elasticity, bool): return self._append_inputs(cutoff, elasticity) def add_isotropic_material(self, cutoff, E_youngmod, nu_poissrat): lambda = nu_poissrat * E_youngmod / ((1 + nu_poissrat) * (1 - 2 * nu_poissrat)) mu = E_youngmod / (2 * (1 + nu_poissrat)) elasticity = (Lambda + 2 * mu, Lambda, Lambda, 0.0, 0.0, 0.0, Lambda + 2 * mu, Lambda, 0.0, 0.0, 0.0, Lambda + 2 * mu, 0.0, 0.0, 0.0, 2 * mu, 0.0, 0.0, 2 * mu, 0.0, 2 * mu) elasticity = self.error_check(cutoff, elasticity) if isinstance(elasticity, bool): return self._append_inputs(cutoff, elasticity) def add_material_to_orient(self, cutoff, E_axial, E_radial, nu_poissrat_12, nu_poissrat_23, G12): elasticity = (E_axial, E_radial, nu_poissrat_12, nu_poissrat_23, G12) elasticity = self.error_check(cutoff, elasticity) if isinstance(elasticity, bool): return self._append_inputs(cutoff, elasticity) def show(self): print('Material elasticity as [low-high cutoffs] = elasticity:') for i in range(len(self._lowCutoffs)): print('[{} - {}] = '.format(self._lowCutoffs[i], self._highCutoffs[i], self._properties[i])) if len(self._properties[i]) == 5: print('{}'.format(self._properties[i])) else: (first_elast, last_elast) = (0, 6) for i2 in range(6): print('{}'.format(self._properties[i][first_elast:last_elast])) first_elast = last_elast last_elast += 5 - i2
class EncodingApiCommunicator(object): def __init__(self, inner): self.inner = inner def call(self, path, command, arguments=None, queries=None, additional_queries=()): path = path.encode() command = command.encode() arguments = self.transform_dictionary(arguments or {}) queries = self.transform_dictionary(queries or {}) promise = self.inner.call( path, command, arguments, queries, additional_queries) return self.decorate_promise(promise) def transform_dictionary(self, dictionary): return dict(self.transform_item(item) for item in dictionary.items()) def transform_item(self, item): key, value = item return (key.encode(), value) def decorate_promise(self, promise): return EncodedPromiseDecorator(promise) class EncodedPromiseDecorator(object): def __init__(self, inner): self.inner = inner def get(self): response = self.inner.get() return response.map(self.transform_row) def __iter__(self): return map(self.transform_row, self.inner) def transform_row(self, row): return dict(self.transform_item(item) for item in row.items()) def transform_item(self, item): key, value = item return (key.decode(), value)
class Encodingapicommunicator(object): def __init__(self, inner): self.inner = inner def call(self, path, command, arguments=None, queries=None, additional_queries=()): path = path.encode() command = command.encode() arguments = self.transform_dictionary(arguments or {}) queries = self.transform_dictionary(queries or {}) promise = self.inner.call(path, command, arguments, queries, additional_queries) return self.decorate_promise(promise) def transform_dictionary(self, dictionary): return dict((self.transform_item(item) for item in dictionary.items())) def transform_item(self, item): (key, value) = item return (key.encode(), value) def decorate_promise(self, promise): return encoded_promise_decorator(promise) class Encodedpromisedecorator(object): def __init__(self, inner): self.inner = inner def get(self): response = self.inner.get() return response.map(self.transform_row) def __iter__(self): return map(self.transform_row, self.inner) def transform_row(self, row): return dict((self.transform_item(item) for item in row.items())) def transform_item(self, item): (key, value) = item return (key.decode(), value)
class Person: def __init__(self, first_name, last_name): self.first_name = first_name self.last_name = last_name self.age = 0 def full_name(self): return self.first_name + " " + self.last_name def record_info(self): return self.last_name + ", " + self.first_name person = Person("Bob", "Smith") person2 = Person("Sally", "Smith") Person.record_info = record_info myfn = Person.full_name print(myfn(person2)) # print(Person) # print(person) # print(person.full_name()) # print(person.record_info()) # print(person.first_name) # print(person.age) # person.age = 34 # print(person.age) # del person.first_name # print(person.first_name)
class Person: def __init__(self, first_name, last_name): self.first_name = first_name self.last_name = last_name self.age = 0 def full_name(self): return self.first_name + ' ' + self.last_name def record_info(self): return self.last_name + ', ' + self.first_name person = person('Bob', 'Smith') person2 = person('Sally', 'Smith') Person.record_info = record_info myfn = Person.full_name print(myfn(person2))
class Node: def __init__(self, data) -> None: self.data = data self.nextNode = None class LinkedList: def __init__(self): self.head = None self.numOfNodes = 0 def insert_new(self, data): self.numOfNodes += 1 new_node = Node(data) if not self.head: self.head = new_node else: new_node.nextNode = self.head self.head = new_node def insert_to_end(self, data): self.numOfNodes += 1 new_node = Node(data) actual_node = self.head while actual_node.nextNode is not None: actual_node = actual_node.nextNode actual_node.nextNode = new_node def remove(self, data): if self.head is None: return actual_node = self.head previous = None while actual_node is not None and actual_node.data != data: previous = actual_node actual_node = actual_node.nextNode if actual_node is None: return if previous is None: self.head = actual_node.nextNode else: previous.nextNode = actual_node.nextNode @property def get_size(self): return self.numOfNodes def traverse(self): actual = self.head while actual is not None: print(actual.data) actual = actual.nextNode if __name__ == "__main__": t = LinkedList() t.insert_new(1) t.insert_new(10) print(t.get_size) t.traverse()
class Node: def __init__(self, data) -> None: self.data = data self.nextNode = None class Linkedlist: def __init__(self): self.head = None self.numOfNodes = 0 def insert_new(self, data): self.numOfNodes += 1 new_node = node(data) if not self.head: self.head = new_node else: new_node.nextNode = self.head self.head = new_node def insert_to_end(self, data): self.numOfNodes += 1 new_node = node(data) actual_node = self.head while actual_node.nextNode is not None: actual_node = actual_node.nextNode actual_node.nextNode = new_node def remove(self, data): if self.head is None: return actual_node = self.head previous = None while actual_node is not None and actual_node.data != data: previous = actual_node actual_node = actual_node.nextNode if actual_node is None: return if previous is None: self.head = actual_node.nextNode else: previous.nextNode = actual_node.nextNode @property def get_size(self): return self.numOfNodes def traverse(self): actual = self.head while actual is not None: print(actual.data) actual = actual.nextNode if __name__ == '__main__': t = linked_list() t.insert_new(1) t.insert_new(10) print(t.get_size) t.traverse()
adventures = [ {"id": 1, "name": "Test Location"}, {"id": 12, "name": "The Sewer"}, {"id": 15, "name": "The Spooky Forest"}, {"id": 16, "name": "The Haiku Dungeon"}, {"id": 17, "name": "The Hidden Temple"}, {"id": 18, "name": "Degrassi Knoll"}, {"id": 19, "name": "The Limerick Dungeon"}, {"id": 20, "name": 'The "Fun" House'}, {"id": 21, "name": "The Misspelled Cemetary (Pre-Cyrpt)"}, {"id": 22, "name": "Tower Ruins"}, {"id": 23, "name": "Drunken Stupor"}, {"id": 24, "name": "The Typical Tavern Rats"}, {"id": 25, "name": "The Typical Tavern Booze"}, {"id": 26, "name": "The Hippy Camp"}, {"id": 27, "name": "Orcish Frat House"}, {"id": 29, "name": "Orcish Frat House (In Disguise)"}, {"id": 30, "name": "The Bat Hole Entryway"}, {"id": 31, "name": "Guano Junction"}, {"id": 32, "name": "Batrat and Ratbat Burrow"}, {"id": 33, "name": "Beanbat Chamber"}, {"id": 34, "name": "The Boss Bat's Lair"}, {"id": 37, "name": "The Spectral Pickle Factory"}, {"id": 38, "name": "The Enormous Greater-Then Sign"}, {"id": 39, "name": "The Dungeons of Doom"}, {"id": 40, "name": "Cobb's Knob Kitchens"}, {"id": 41, "name": "Cobb's Knob Treasury"}, {"id": 42, "name": "Cobb's Knob Harem"}, {"id": 43, "name": "Outskirts of Camp Logging Camp"}, {"id": 44, "name": "Camp Logging Camp"}, {"id": 45, "name": "South of the Border"}, {"id": 46, "name": "Thugnderdome"}, {"id": 47, "name": "The Bugbear Pens (Pre-Quest)"}, {"id": 48, "name": "The Spooky Gravy Barrow"}, {"id": 49, "name": "The Bugbear Pens (Post-Quest)"}, {"id": 50, "name": "Knob Goblin Laboratory"}, {"id": 51, "name": "Cobb's Knob Menagerie, Level 1"}, {"id": 52, "name": "Cobb's Knob Menagerie, Level 2"}, {"id": 53, "name": "Cobb's Knob Menagerie, Level 3"}, {"id": 54, "name": "The Defiled Nook"}, {"id": 55, "name": "The Defiled Cranny"}, {"id": 56, "name": "The Defiled Alcove"}, {"id": 57, "name": "The Defiled Niche"}, {"id": 58, "name": "The Misspelled Cemetary (Post-Cyrpt)"}, {"id": 59, "name": "The Icy Peak in The Recent Past"}, {"id": 60, "name": "The Goatlet"}, {"id": 61, "name": "Itznotyerzitz Mine"}, {"id": 62, "name": "Lair of the Ninja Snowmen"}, {"id": 63, "name": "The eXtreme Slope"}, {"id": 65, "name": "The Hippy Camp"}, {"id": 66, "name": "The Obligatory Pirate's Cove"}, {"id": 67, "name": "The Obligatory Pirate's Cove (In Disguise)"}, {"id": 70, "name": "The Roulette Tables"}, {"id": 71, "name": "The Poker Room"}, {"id": 73, "name": "The Inexplicable Door"}, {"id": 75, "name": "The Dark Neck of the Woods"}, {"id": 76, "name": "The Dark Heart of the Woods"}, {"id": 77, "name": "The Dark Elbow of the Woods"}, {"id": 79, "name": "The Deep Fat Friar's Gate"}, {"id": 80, "name": "The Valley Beyond the Orc Chasm"}, {"id": 81, "name": "The Penultimate Fantasy Airship"}, {"id": 82, "name": "The Castle in the Clouds in the Sky"}, {"id": 83, "name": "The Hole in the Sky"}, {"id": 84, "name": "St. Sneaky Pete's Day Stupor"}, {"id": 85, "name": "A Battlefield (No Uniform)"}, {"id": 86, "name": "A BattleField (In Cloaca-Cola Uniform)"}, {"id": 87, "name": "A Battlefield (In Dyspepsi-Cola Uniform)"}, {"id": 88, "name": "Market Square, 28 Days Later"}, {"id": 89, "name": "The Mall of Loathing, 28 Days Later"}, {"id": 90, "name": "Wrong Side of the Tracks, 28 Days Later"}, {"id": 91, "name": "Noob Cave"}, {"id": 92, "name": "The Dire Warren"}, {"id": 93, "name": "Crimbo Town Toy Factory (2005)"}, {"id": 94, "name": "Crimbo Toy Town Factory (2005) (Protesting)"}, {"id": 96, "name": "An Incredibly Strange Place (Bad Trip)"}, {"id": 97, "name": "An Incredibly Strange Place (Great Trip)"}, {"id": 98, "name": "An Incredibly Strange Place (Mediocre Trip)"}, {"id": 99, "name": "The Road to White Citadel"}, {"id": 100, "name": "Whitey's Grove"}, {"id": 101, "name": "The Knob Shaft"}, {"id": 102, "name": "The Haunted Kitchen"}, {"id": 103, "name": "The Haunted Conservatory"}, {"id": 104, "name": "The Haunted Library"}, {"id": 105, "name": "The Haunted Billiards Room"}, {"id": 106, "name": "The Haunted Gallery"}, {"id": 107, "name": "The Haunted Bathroom"}, {"id": 108, "name": "The Haunted Bedroom"}, {"id": 109, "name": "The Haunted Ballroom"}, {"id": 110, "name": "The Icy Peak"}, {"id": 111, "name": "The Black Forest"}, {"id": 112, "name": "The Sleazy Back Alley"}, {"id": 113, "name": "The Haunted Pantry"}, {"id": 114, "name": "Outskirts of Cobb's Knob"}, {"id": 115, "name": "Simple Tool-Making Cave"}, {"id": 116, "name": "The Spooky Fright Factory"}, {"id": 117, "name": "The Crimborg Collective Factory"}, {"id": 118, "name": "The Hidden City"}, {"id": 119, "name": "The Palindome"}, {"id": 121, "name": "The Arid, Extra-Dry Desert (without Ultrahydrated)"}, {"id": 122, "name": "An Oasis"}, {"id": 123, "name": "The Arid, Extra-Dry Desert (with Ultrahydrated)"}, {"id": 124, "name": "The Upper Chamber"}, {"id": 125, "name": "The Middle Chamber"}, {"id": 126, "name": "The Themthar Hills"}, {"id": 127, "name": "The Hatching Chamber"}, {"id": 128, "name": "The Feeding Chamber"}, {"id": 129, "name": "The Guards' Chamber"}, {"id": 130, "name": "The Queen's Chamber"}, {"id": 131, "name": "Wartime Hippy Camp (In Frat Boy Ensemble)"}, {"id": 132, "name": "The Battlefield (In Frat Warrior Fatigues)"}, {"id": 133, "name": "Wartime Hippy Camp"}, {"id": 134, "name": "Wartime Frat House (In Filthy Hippy Disguise)"}, {"id": 135, "name": "Wartime Frat House"}, {"id": 136, "name": "Sonofa Beach"}, {"id": 137, "name": "McMillicancuddy's Barn"}, {"id": 139, "name": "The Junkyard"}, {"id": 140, "name": "The Battlefield (In War Hippy Fatigues)"}, {"id": 141, "name": "The Pond"}, {"id": 142, "name": "The Back 40"}, {"id": 143, "name": "The Other Back 40"}, {"id": 144, "name": "The Granary"}, {"id": 145, "name": "The Bog"}, {"id": 146, "name": "The Family Plot"}, {"id": 147, "name": "The Shady Thicket"}, {"id": 148, "name": "Heartbreaker's Hotel"}, {"id": 149, "name": "The Hippy Camp (Bombed Back to the Stone Age)"}, {"id": 150, "name": "The Orcish Frat House (Bombed Back to the Stone Age)"}, {"id": 151, "name": "The Stately Pleasure Dome"}, {"id": 152, "name": "The Mouldering Mansion"}, {"id": 153, "name": "The Rogue Windmill"}, {"id": 154, "name": "The Junkyard (Post-War)"}, {"id": 155, "name": "McMillicancuddy's Farm (Post-War)"}, {"id": 156, "name": "The Grim Grimacite Site"}, {"id": 157, "name": "Barrrney's Barrr"}, {"id": 158, "name": "The F'c'le"}, {"id": 159, "name": "The Poop Deck"}, {"id": 160, "name": "Belowdecks"}, {"id": 161, "name": "A Sinister Dodecahedron"}, {"id": 162, "name": "Crimbo Town Toy Factory (2007)"}, {"id": 163, "name": "A Yuletide Bonfire"}, {"id": 164, "name": "A Shimmering Portal"}, {"id": 166, "name": "A Maze of Sewer Tunnels"}, {"id": 167, "name": "Hobopolis Town Square"}, {"id": 168, "name": "Burnbarrel Blvd."}, {"id": 169, "name": "Exposure Esplanade"}, {"id": 170, "name": "The Heap"}, {"id": 171, "name": "The Ancient Hobo Burial Ground"}, {"id": 172, "name": "The Purple Light District"}, {"id": 173, "name": "Go for a Swim"}, {"id": 174, "name": "The Arrrboretum"}, {"id": 175, "name": "The Spectral Salad Factory"}, {"id": 177, "name": "Mt. Molehill"}, {"id": 178, "name": "Wine Racks (Northwest)"}, {"id": 179, "name": "Wine Racks (Northeast)"}, {"id": 180, "name": "Wine Racks (Southwest)"}, {"id": 181, "name": "Wine Racks (Southeast)"}, {"id": 182, "name": "Next to that Barrel with Something Burning in it"}, {"id": 183, "name": "Near an Abandoned Refrigerator"}, {"id": 184, "name": "Over Where the Old Tires Are"}, {"id": 185, "name": "Out By that Rusted-Out Car"}, ]
adventures = [{'id': 1, 'name': 'Test Location'}, {'id': 12, 'name': 'The Sewer'}, {'id': 15, 'name': 'The Spooky Forest'}, {'id': 16, 'name': 'The Haiku Dungeon'}, {'id': 17, 'name': 'The Hidden Temple'}, {'id': 18, 'name': 'Degrassi Knoll'}, {'id': 19, 'name': 'The Limerick Dungeon'}, {'id': 20, 'name': 'The "Fun" House'}, {'id': 21, 'name': 'The Misspelled Cemetary (Pre-Cyrpt)'}, {'id': 22, 'name': 'Tower Ruins'}, {'id': 23, 'name': 'Drunken Stupor'}, {'id': 24, 'name': 'The Typical Tavern Rats'}, {'id': 25, 'name': 'The Typical Tavern Booze'}, {'id': 26, 'name': 'The Hippy Camp'}, {'id': 27, 'name': 'Orcish Frat House'}, {'id': 29, 'name': 'Orcish Frat House (In Disguise)'}, {'id': 30, 'name': 'The Bat Hole Entryway'}, {'id': 31, 'name': 'Guano Junction'}, {'id': 32, 'name': 'Batrat and Ratbat Burrow'}, {'id': 33, 'name': 'Beanbat Chamber'}, {'id': 34, 'name': "The Boss Bat's Lair"}, {'id': 37, 'name': 'The Spectral Pickle Factory'}, {'id': 38, 'name': 'The Enormous Greater-Then Sign'}, {'id': 39, 'name': 'The Dungeons of Doom'}, {'id': 40, 'name': "Cobb's Knob Kitchens"}, {'id': 41, 'name': "Cobb's Knob Treasury"}, {'id': 42, 'name': "Cobb's Knob Harem"}, {'id': 43, 'name': 'Outskirts of Camp Logging Camp'}, {'id': 44, 'name': 'Camp Logging Camp'}, {'id': 45, 'name': 'South of the Border'}, {'id': 46, 'name': 'Thugnderdome'}, {'id': 47, 'name': 'The Bugbear Pens (Pre-Quest)'}, {'id': 48, 'name': 'The Spooky Gravy Barrow'}, {'id': 49, 'name': 'The Bugbear Pens (Post-Quest)'}, {'id': 50, 'name': 'Knob Goblin Laboratory'}, {'id': 51, 'name': "Cobb's Knob Menagerie, Level 1"}, {'id': 52, 'name': "Cobb's Knob Menagerie, Level 2"}, {'id': 53, 'name': "Cobb's Knob Menagerie, Level 3"}, {'id': 54, 'name': 'The Defiled Nook'}, {'id': 55, 'name': 'The Defiled Cranny'}, {'id': 56, 'name': 'The Defiled Alcove'}, {'id': 57, 'name': 'The Defiled Niche'}, {'id': 58, 'name': 'The Misspelled Cemetary (Post-Cyrpt)'}, {'id': 59, 'name': 'The Icy Peak in The Recent Past'}, {'id': 60, 'name': 'The Goatlet'}, {'id': 61, 'name': 'Itznotyerzitz Mine'}, {'id': 62, 'name': 'Lair of the Ninja Snowmen'}, {'id': 63, 'name': 'The eXtreme Slope'}, {'id': 65, 'name': 'The Hippy Camp'}, {'id': 66, 'name': "The Obligatory Pirate's Cove"}, {'id': 67, 'name': "The Obligatory Pirate's Cove (In Disguise)"}, {'id': 70, 'name': 'The Roulette Tables'}, {'id': 71, 'name': 'The Poker Room'}, {'id': 73, 'name': 'The Inexplicable Door'}, {'id': 75, 'name': 'The Dark Neck of the Woods'}, {'id': 76, 'name': 'The Dark Heart of the Woods'}, {'id': 77, 'name': 'The Dark Elbow of the Woods'}, {'id': 79, 'name': "The Deep Fat Friar's Gate"}, {'id': 80, 'name': 'The Valley Beyond the Orc Chasm'}, {'id': 81, 'name': 'The Penultimate Fantasy Airship'}, {'id': 82, 'name': 'The Castle in the Clouds in the Sky'}, {'id': 83, 'name': 'The Hole in the Sky'}, {'id': 84, 'name': "St. Sneaky Pete's Day Stupor"}, {'id': 85, 'name': 'A Battlefield (No Uniform)'}, {'id': 86, 'name': 'A BattleField (In Cloaca-Cola Uniform)'}, {'id': 87, 'name': 'A Battlefield (In Dyspepsi-Cola Uniform)'}, {'id': 88, 'name': 'Market Square, 28 Days Later'}, {'id': 89, 'name': 'The Mall of Loathing, 28 Days Later'}, {'id': 90, 'name': 'Wrong Side of the Tracks, 28 Days Later'}, {'id': 91, 'name': 'Noob Cave'}, {'id': 92, 'name': 'The Dire Warren'}, {'id': 93, 'name': 'Crimbo Town Toy Factory (2005)'}, {'id': 94, 'name': 'Crimbo Toy Town Factory (2005) (Protesting)'}, {'id': 96, 'name': 'An Incredibly Strange Place (Bad Trip)'}, {'id': 97, 'name': 'An Incredibly Strange Place (Great Trip)'}, {'id': 98, 'name': 'An Incredibly Strange Place (Mediocre Trip)'}, {'id': 99, 'name': 'The Road to White Citadel'}, {'id': 100, 'name': "Whitey's Grove"}, {'id': 101, 'name': 'The Knob Shaft'}, {'id': 102, 'name': 'The Haunted Kitchen'}, {'id': 103, 'name': 'The Haunted Conservatory'}, {'id': 104, 'name': 'The Haunted Library'}, {'id': 105, 'name': 'The Haunted Billiards Room'}, {'id': 106, 'name': 'The Haunted Gallery'}, {'id': 107, 'name': 'The Haunted Bathroom'}, {'id': 108, 'name': 'The Haunted Bedroom'}, {'id': 109, 'name': 'The Haunted Ballroom'}, {'id': 110, 'name': 'The Icy Peak'}, {'id': 111, 'name': 'The Black Forest'}, {'id': 112, 'name': 'The Sleazy Back Alley'}, {'id': 113, 'name': 'The Haunted Pantry'}, {'id': 114, 'name': "Outskirts of Cobb's Knob"}, {'id': 115, 'name': 'Simple Tool-Making Cave'}, {'id': 116, 'name': 'The Spooky Fright Factory'}, {'id': 117, 'name': 'The Crimborg Collective Factory'}, {'id': 118, 'name': 'The Hidden City'}, {'id': 119, 'name': 'The Palindome'}, {'id': 121, 'name': 'The Arid, Extra-Dry Desert (without Ultrahydrated)'}, {'id': 122, 'name': 'An Oasis'}, {'id': 123, 'name': 'The Arid, Extra-Dry Desert (with Ultrahydrated)'}, {'id': 124, 'name': 'The Upper Chamber'}, {'id': 125, 'name': 'The Middle Chamber'}, {'id': 126, 'name': 'The Themthar Hills'}, {'id': 127, 'name': 'The Hatching Chamber'}, {'id': 128, 'name': 'The Feeding Chamber'}, {'id': 129, 'name': "The Guards' Chamber"}, {'id': 130, 'name': "The Queen's Chamber"}, {'id': 131, 'name': 'Wartime Hippy Camp (In Frat Boy Ensemble)'}, {'id': 132, 'name': 'The Battlefield (In Frat Warrior Fatigues)'}, {'id': 133, 'name': 'Wartime Hippy Camp'}, {'id': 134, 'name': 'Wartime Frat House (In Filthy Hippy Disguise)'}, {'id': 135, 'name': 'Wartime Frat House'}, {'id': 136, 'name': 'Sonofa Beach'}, {'id': 137, 'name': "McMillicancuddy's Barn"}, {'id': 139, 'name': 'The Junkyard'}, {'id': 140, 'name': 'The Battlefield (In War Hippy Fatigues)'}, {'id': 141, 'name': 'The Pond'}, {'id': 142, 'name': 'The Back 40'}, {'id': 143, 'name': 'The Other Back 40'}, {'id': 144, 'name': 'The Granary'}, {'id': 145, 'name': 'The Bog'}, {'id': 146, 'name': 'The Family Plot'}, {'id': 147, 'name': 'The Shady Thicket'}, {'id': 148, 'name': "Heartbreaker's Hotel"}, {'id': 149, 'name': 'The Hippy Camp (Bombed Back to the Stone Age)'}, {'id': 150, 'name': 'The Orcish Frat House (Bombed Back to the Stone Age)'}, {'id': 151, 'name': 'The Stately Pleasure Dome'}, {'id': 152, 'name': 'The Mouldering Mansion'}, {'id': 153, 'name': 'The Rogue Windmill'}, {'id': 154, 'name': 'The Junkyard (Post-War)'}, {'id': 155, 'name': "McMillicancuddy's Farm (Post-War)"}, {'id': 156, 'name': 'The Grim Grimacite Site'}, {'id': 157, 'name': "Barrrney's Barrr"}, {'id': 158, 'name': "The F'c'le"}, {'id': 159, 'name': 'The Poop Deck'}, {'id': 160, 'name': 'Belowdecks'}, {'id': 161, 'name': 'A Sinister Dodecahedron'}, {'id': 162, 'name': 'Crimbo Town Toy Factory (2007)'}, {'id': 163, 'name': 'A Yuletide Bonfire'}, {'id': 164, 'name': 'A Shimmering Portal'}, {'id': 166, 'name': 'A Maze of Sewer Tunnels'}, {'id': 167, 'name': 'Hobopolis Town Square'}, {'id': 168, 'name': 'Burnbarrel Blvd.'}, {'id': 169, 'name': 'Exposure Esplanade'}, {'id': 170, 'name': 'The Heap'}, {'id': 171, 'name': 'The Ancient Hobo Burial Ground'}, {'id': 172, 'name': 'The Purple Light District'}, {'id': 173, 'name': 'Go for a Swim'}, {'id': 174, 'name': 'The Arrrboretum'}, {'id': 175, 'name': 'The Spectral Salad Factory'}, {'id': 177, 'name': 'Mt. Molehill'}, {'id': 178, 'name': 'Wine Racks (Northwest)'}, {'id': 179, 'name': 'Wine Racks (Northeast)'}, {'id': 180, 'name': 'Wine Racks (Southwest)'}, {'id': 181, 'name': 'Wine Racks (Southeast)'}, {'id': 182, 'name': 'Next to that Barrel with Something Burning in it'}, {'id': 183, 'name': 'Near an Abandoned Refrigerator'}, {'id': 184, 'name': 'Over Where the Old Tires Are'}, {'id': 185, 'name': 'Out By that Rusted-Out Car'}]
class Solution: def amendSentence(self, s): # code here ans = "" string = "" for i in range(len(s)): if 97 <= ord(s[i]) <= 122: string += s[i] else: if string: ans += string ans += " " string = "" string += s[i].lower() ans += string return ans #{ # Driver Code Starts #Initial Template for Python 3 if __name__ == '__main__': t = int(input()) for _ in range(t): s = input() solObj = Solution() print(solObj.amendSentence(s)) # } Driver Code Ends
class Solution: def amend_sentence(self, s): ans = '' string = '' for i in range(len(s)): if 97 <= ord(s[i]) <= 122: string += s[i] else: if string: ans += string ans += ' ' string = '' string += s[i].lower() ans += string return ans if __name__ == '__main__': t = int(input()) for _ in range(t): s = input() sol_obj = solution() print(solObj.amendSentence(s))
# Copyright (c) 2021 Qualcomm Technologies, Inc. # All Rights Reserved. def _tb_advance_global_step(module): if hasattr(module, 'global_step'): module.global_step += 1 return module def _tb_advance_token_counters(module, tensor, verbose=False): token_count = getattr(module, 'tb_token_count', None) if token_count is not None: T = tensor.size(1) if token_count.last != T: if token_count.last != 0: token_count.total += token_count.last token_count.sample_idx += 1 token_count.last = T if verbose: print(f'>>> T={T}\tlast_T={token_count.last}\tcumsum_T={token_count.total}') return module def _tb_hist(module, tensor, name, verbose=False): hist_kw = dict(bins='auto') tb_writer = getattr(module, 'tb_writer', None) if tb_writer is not None: if module.layer_idx == module.num_layers - 1: tensor = tensor[:, 0] # per-tensor layer_s = str(1 + module.layer_idx).zfill(2) full_name = f'{layer_s}/layer/{name}' global_step = module.global_step if verbose: stats = f'min={tensor.min():.1f}, max={tensor.max():.1f}' info = ( f'TB logging {full_name}\t{tuple(tensor.size())}\t({stats})\t' f'[global_step={global_step}] ...' ) print(info) tb_writer.add_histogram(full_name, tensor, global_step=global_step, **hist_kw) # per-token sample_idx_s = str(module.tb_token_count.sample_idx + 1).zfill(2) T = tensor.size(1) full_name = f'{layer_s}/token/{sample_idx_s}/{name}' for i in range(T): tb_writer.add_histogram(full_name, tensor[0, i], global_step=i, **hist_kw)
def _tb_advance_global_step(module): if hasattr(module, 'global_step'): module.global_step += 1 return module def _tb_advance_token_counters(module, tensor, verbose=False): token_count = getattr(module, 'tb_token_count', None) if token_count is not None: t = tensor.size(1) if token_count.last != T: if token_count.last != 0: token_count.total += token_count.last token_count.sample_idx += 1 token_count.last = T if verbose: print(f'>>> T={T}\tlast_T={token_count.last}\tcumsum_T={token_count.total}') return module def _tb_hist(module, tensor, name, verbose=False): hist_kw = dict(bins='auto') tb_writer = getattr(module, 'tb_writer', None) if tb_writer is not None: if module.layer_idx == module.num_layers - 1: tensor = tensor[:, 0] layer_s = str(1 + module.layer_idx).zfill(2) full_name = f'{layer_s}/layer/{name}' global_step = module.global_step if verbose: stats = f'min={tensor.min():.1f}, max={tensor.max():.1f}' info = f'TB logging {full_name}\t{tuple(tensor.size())}\t({stats})\t[global_step={global_step}] ...' print(info) tb_writer.add_histogram(full_name, tensor, global_step=global_step, **hist_kw) sample_idx_s = str(module.tb_token_count.sample_idx + 1).zfill(2) t = tensor.size(1) full_name = f'{layer_s}/token/{sample_idx_s}/{name}' for i in range(T): tb_writer.add_histogram(full_name, tensor[0, i], global_step=i, **hist_kw)
class ExpressionReader: priorityComparision = ['='] andOrComparision = ['OR'] operations = [] operations.extend(priorityComparision) operations.extend(andOrComparision) def read(expression): lst = ExpressionReader.__split(expression) #lst = ExpressionReader.__parsePriorityExpression(lst, ExpressionReader.priorityComparision) #lst = ExpressionReader.__parseExpression(lst) return lst def __split(expression): lst = [] chars = '' acceptSpace = False for char in expression: if char == '(' or char == ')': if chars != '': lst.append(chars) chars = '' lst.append(char) continue if char == '\'' or char == '\"': acceptSpace = not acceptSpace if char == ' ' and acceptSpace == False: if chars != '': lst.append(chars) chars = '' continue else: chars = chars + char if chars != '': lst.append(chars) return lst def __parsePriorityExpression(lst, operations): newLst = [] for i in range(0, len(lst) - 1): if lst[i] in operations: arguments = [] arguments.append(lst[i-1]) operation = lst[i] arguments.append(lst[i+1]) dataDriven = ExpressionReader.toDataDrivenStyle(operation, arguments) if dataDriven is None: return None newLst.append(dataDriven) elif lst[i] in ExpressionReader.operations: newLst.append(lst[i]) return newLst def __parseExpression(lst): if lst is None: return None while len(lst) > 1: arguments = [] arguments.append(lst.pop(0)) operation = lst.pop(0) arguments.append(lst.pop(0)) dataDriven = ExpressionReader.toDataDrivenStyle(operation, arguments) if dataDriven is None: return None lst.insert(0, dataDriven) return lst def toDataDrivenStyle(operation, arguments): if operation == '=': return '[\"==\",[\"get\",\"' + arguments[0] + '\"],' + arguments[1] + ']' if operation == 'OR': return '[\"any\",' + arguments[0] + ',' + arguments[1] + ']' return None # subset = 'loaiDatHT = \'CAN\' OR loaiDatHT = \'COC\' OR loaiDatHT = \'CQP\' OR loaiDatHT = \'DBV\' OR loaiDatHT = \'DCK\' OR loaiDatHT = \'DCH\' OR loaiDatHT = \'DDT\' OR loaiDatHT = \'DGD\' OR loaiDatHT = \'DKH\' OR loaiDatHT = \'DNL\' OR loaiDatHT = \'DSH\' OR loaiDatHT = \'DSN\' OR loaiDatHT = \'DTS\' OR loaiDatHT = \'DTT\' OR loaiDatHT = \'DVH\' OR loaiDatHT = \'DXH\' OR loaiDatHT = \'DYT\' OR loaiDatHT = \'SKC\' OR loaiDatHT = \'SKK\' OR loaiDatHT = \'SKN\' OR loaiDatHT = \'SKX\' OR loaiDatHT = \'TIN\' OR loaiDatHT = \'TMD\' OR loaiDatHT = \'TON\' OR loaiDatHT = \'TSC\' OR loaiDatHT = \'TSN\' OR loaiDatHT = \'SKX\' OR loaiDatHT = \'DRA\' OR loaiDatHT = \'NTD\'' # print(ExpressionReader.read(subset)) testIn = '\"loaiDatHT\" in (\'DGT\')' print(ExpressionReader.read(testIn))
class Expressionreader: priority_comparision = ['='] and_or_comparision = ['OR'] operations = [] operations.extend(priorityComparision) operations.extend(andOrComparision) def read(expression): lst = ExpressionReader.__split(expression) return lst def __split(expression): lst = [] chars = '' accept_space = False for char in expression: if char == '(' or char == ')': if chars != '': lst.append(chars) chars = '' lst.append(char) continue if char == "'" or char == '"': accept_space = not acceptSpace if char == ' ' and acceptSpace == False: if chars != '': lst.append(chars) chars = '' continue else: chars = chars + char if chars != '': lst.append(chars) return lst def __parse_priority_expression(lst, operations): new_lst = [] for i in range(0, len(lst) - 1): if lst[i] in operations: arguments = [] arguments.append(lst[i - 1]) operation = lst[i] arguments.append(lst[i + 1]) data_driven = ExpressionReader.toDataDrivenStyle(operation, arguments) if dataDriven is None: return None newLst.append(dataDriven) elif lst[i] in ExpressionReader.operations: newLst.append(lst[i]) return newLst def __parse_expression(lst): if lst is None: return None while len(lst) > 1: arguments = [] arguments.append(lst.pop(0)) operation = lst.pop(0) arguments.append(lst.pop(0)) data_driven = ExpressionReader.toDataDrivenStyle(operation, arguments) if dataDriven is None: return None lst.insert(0, dataDriven) return lst def to_data_driven_style(operation, arguments): if operation == '=': return '["==",["get","' + arguments[0] + '"],' + arguments[1] + ']' if operation == 'OR': return '["any",' + arguments[0] + ',' + arguments[1] + ']' return None test_in = '"loaiDatHT" in (\'DGT\')' print(ExpressionReader.read(testIn))
'''A large FizzBuzz as an output using small FizzBuzz numbers.(FizzBuzz=FizBuz for better alignment and make sure your output terminal covers the entire length of the screen to avoid automatic newlines)''' # Author: @AmanMatrix def iCheck(i): if i%15==0: i='FizBuz' elif i%3==0: i='Fizz' elif i%5==0: i='Buzz' else:i=i return i for i in range(1,101): if(i==1): print("\n",iCheck(i),end=" ") elif(i<=5): print(iCheck(i),end=" ") elif(i==6): print(" ",iCheck(i),end=" ") elif(i<=9): print(iCheck(i),end=" ") elif(i==10): print(f"\n {iCheck(i)}",end=" ") elif(i<=12): print(iCheck(i),end="") elif(i==13): print(" ",iCheck(i),end=" ") elif(i==14): print(iCheck(i)) elif(i==15): print(iCheck(i),end=" ") elif(i==16): print(iCheck(i),end=" ") elif(i<=18): print(iCheck(i),end=" ") elif(i==19): print(f"\n {iCheck(i)}",end=" ") elif(i<=21): print(iCheck(i),end=" ") elif(i==22): print(f"\n {iCheck(i)}",end=" ") elif(i<=25): print(iCheck(i),end=" ") elif(i==26): print(" ",iCheck(i),end="") elif(i<=27): print(iCheck(i),end=" ") elif(i==28): print(iCheck(i),end=" ") elif(i<=30): print(iCheck(i),end=" ") elif(i==31): print(" ",iCheck(i),end=" ") elif(i<=33): print(iCheck(i),end=" ") elif(i==34): print(" ",iCheck(i),end=" ") elif(i<=36): print(iCheck(i),end="") elif(i<=37): print(" ",iCheck(i),end="") elif(i<=38): print(" ",iCheck(i),end="") elif(i==39): print(" ",iCheck(i),end=" ") elif(i<=41): print(iCheck(i),end=" ") elif(i==42): print(" ",iCheck(i),end=" ") elif(i<=44): print(iCheck(i),end=" ") elif(i==45): print(f"\n{iCheck(i)}",end=" ") elif(i<=47): print(iCheck(i),end=" ") elif(i<=49): print(" ",iCheck(i),end=" ") elif(i==50): print(" ",iCheck(i),end=" ") elif(i==51): print(" ",iCheck(i),end=" ") elif(i==52): print(iCheck(i),end=" ") elif(i==53): print(iCheck(i),end=" ") elif(i<=55): print(iCheck(i),end=" ") elif(i==56): print(f"\n {iCheck(i)}",end=" ") elif(i<=58): print(iCheck(i),end="") elif(i<=60): print(" ",iCheck(i),end=" ") elif(i<=61): print(" ",iCheck(i),end=" ") elif(i<=62): print(iCheck(i),end=" ") elif(i<=64): print(iCheck(i),end=" ") elif(i<=66): print(iCheck(i),end=" ") elif(i<=67): print(f"\n {iCheck(i)}",end=" ") elif(i<=69): print(iCheck(i),end="") elif(i<=71): print(" ",iCheck(i),end=" ") elif(i<=72): print(" ",iCheck(i),end=" ") elif(i<=73): print(iCheck(i),end=" ") elif(i<=74): print(iCheck(i),end=" ") elif(i<=75): print(iCheck(i),end=" ") elif(i<=76): print(iCheck(i),end=" ") elif(i<=77): print(iCheck(i),end=" ") elif(i<=78): print(f"\n {iCheck(i)}",end=" ") elif(i<=80): print(iCheck(i),end="") elif(i==81): print(" ",iCheck(i),end=" ") elif(i<=83): print("",iCheck(i),end="") elif(i<=84): print(" ",iCheck(i),end=" ") elif(i<=86): print(iCheck(i),end="") elif(i<=87): print(" ",iCheck(i),end=" ") elif(i<=89): print(iCheck(i),end=" ") elif(i<=90): print(" ",iCheck(i),end="") elif(i<=92): print(iCheck(i),end="") elif(i<=93): print(" ",iCheck(i),end="") elif(i<=95): print("",iCheck(i),end="") elif(i<=96): print(" ",iCheck(i),end="") elif(i<=99): print(iCheck(i),end="") else: print(" ",iCheck(i))
"""A large FizzBuzz as an output using small FizzBuzz numbers.(FizzBuzz=FizBuz for better alignment and make sure your output terminal covers the entire length of the screen to avoid automatic newlines)""" def i_check(i): if i % 15 == 0: i = 'FizBuz' elif i % 3 == 0: i = 'Fizz' elif i % 5 == 0: i = 'Buzz' else: i = i return i for i in range(1, 101): if i == 1: print('\n', i_check(i), end=' ') elif i <= 5: print(i_check(i), end=' ') elif i == 6: print(' ', i_check(i), end=' ') elif i <= 9: print(i_check(i), end=' ') elif i == 10: print(f'\n {i_check(i)}', end=' ') elif i <= 12: print(i_check(i), end='') elif i == 13: print(' ', i_check(i), end=' ') elif i == 14: print(i_check(i)) elif i == 15: print(i_check(i), end=' ') elif i == 16: print(i_check(i), end=' ') elif i <= 18: print(i_check(i), end=' ') elif i == 19: print(f'\n {i_check(i)}', end=' ') elif i <= 21: print(i_check(i), end=' ') elif i == 22: print(f'\n {i_check(i)}', end=' ') elif i <= 25: print(i_check(i), end=' ') elif i == 26: print(' ', i_check(i), end='') elif i <= 27: print(i_check(i), end=' ') elif i == 28: print(i_check(i), end=' ') elif i <= 30: print(i_check(i), end=' ') elif i == 31: print(' ', i_check(i), end=' ') elif i <= 33: print(i_check(i), end=' ') elif i == 34: print(' ', i_check(i), end=' ') elif i <= 36: print(i_check(i), end='') elif i <= 37: print(' ', i_check(i), end='') elif i <= 38: print(' ', i_check(i), end='') elif i == 39: print(' ', i_check(i), end=' ') elif i <= 41: print(i_check(i), end=' ') elif i == 42: print(' ', i_check(i), end=' ') elif i <= 44: print(i_check(i), end=' ') elif i == 45: print(f'\n{i_check(i)}', end=' ') elif i <= 47: print(i_check(i), end=' ') elif i <= 49: print(' ', i_check(i), end=' ') elif i == 50: print(' ', i_check(i), end=' ') elif i == 51: print(' ', i_check(i), end=' ') elif i == 52: print(i_check(i), end=' ') elif i == 53: print(i_check(i), end=' ') elif i <= 55: print(i_check(i), end=' ') elif i == 56: print(f'\n {i_check(i)}', end=' ') elif i <= 58: print(i_check(i), end='') elif i <= 60: print(' ', i_check(i), end=' ') elif i <= 61: print(' ', i_check(i), end=' ') elif i <= 62: print(i_check(i), end=' ') elif i <= 64: print(i_check(i), end=' ') elif i <= 66: print(i_check(i), end=' ') elif i <= 67: print(f'\n {i_check(i)}', end=' ') elif i <= 69: print(i_check(i), end='') elif i <= 71: print(' ', i_check(i), end=' ') elif i <= 72: print(' ', i_check(i), end=' ') elif i <= 73: print(i_check(i), end=' ') elif i <= 74: print(i_check(i), end=' ') elif i <= 75: print(i_check(i), end=' ') elif i <= 76: print(i_check(i), end=' ') elif i <= 77: print(i_check(i), end=' ') elif i <= 78: print(f'\n {i_check(i)}', end=' ') elif i <= 80: print(i_check(i), end='') elif i == 81: print(' ', i_check(i), end=' ') elif i <= 83: print('', i_check(i), end='') elif i <= 84: print(' ', i_check(i), end=' ') elif i <= 86: print(i_check(i), end='') elif i <= 87: print(' ', i_check(i), end=' ') elif i <= 89: print(i_check(i), end=' ') elif i <= 90: print(' ', i_check(i), end='') elif i <= 92: print(i_check(i), end='') elif i <= 93: print(' ', i_check(i), end='') elif i <= 95: print('', i_check(i), end='') elif i <= 96: print(' ', i_check(i), end='') elif i <= 99: print(i_check(i), end='') else: print(' ', i_check(i))
i = 1.0 print(i) print("Hello world!") print(type(i)) a = "Hello" print(type(a)) # print(a+i) <-Error! a += "world!" print(a) print("this is string: {}, {}".format(3, "ala bala")) print("pi = %f" % 3.14)
i = 1.0 print(i) print('Hello world!') print(type(i)) a = 'Hello' print(type(a)) a += 'world!' print(a) print('this is string: {}, {}'.format(3, 'ala bala')) print('pi = %f' % 3.14)
MACHINE_A = 'MachineA' MACHINE_B = 'MachineB' INIT = 'Init' E_STOP = 'stop' E_INCREASE = 'increase' E_DECREASE = 'decrease'
machine_a = 'MachineA' machine_b = 'MachineB' init = 'Init' e_stop = 'stop' e_increase = 'increase' e_decrease = 'decrease'
#============================================================================= ## Automatic Repository Version Generation Utility ## Author: Zhenyu Wu ## Revision 1: Apr 28. 2016 - Initial Implementation #============================================================================= __all__ = [ 'VersionLint' ]
__all__ = ['VersionLint']
def fun(f): #string # Some functions need zero or more # arguements then we have to use # *args & **kwargs def wrapper(*args, **kwargs): print("Start") #print(string) # to return the values that are passed values = f(*args, **kwargs) print("End") return values # return the wrapper function being called use --> () #return wrapper() return wrapper @fun def fun2(x): print("Funtion 2") return x @fun def fun3(): print("Function 3") ### x = fun(fun2) ##fun(fun2) ##print() ##fun(fun3) ##fun2 = fun(fun2) ##fun3 = fun(fun3) A = fun2('a') print() print(A) print() fun3()
def fun(f): def wrapper(*args, **kwargs): print('Start') values = f(*args, **kwargs) print('End') return values return wrapper @fun def fun2(x): print('Funtion 2') return x @fun def fun3(): print('Function 3') a = fun2('a') print() print(A) print() fun3()
symbols = [ 'TSLA', 'GOOG', 'FB', 'NFLX', 'PFE', 'KO', 'AAPL', 'MSFT', 'DIS', 'UBER', 'AMZN', 'TWTR', 'SBUX', 'F', 'XOM', 'GFINBURO.MX', 'BIMBOA.MX', 'GFNORTEO.MX', 'TLEVISACPO.MX', 'AZTECACPO.MX', 'ALSEA.MX', 'ORBIA.MX', 'POSADASA.MX', 'VOLARA.MX', 'LIVEPOLC-1.MX', 'AEROMEX.MX', 'WALMEX.MX', 'PE&OLES.MX', 'BBVA.MX', 'GAPB.MX', ]
symbols = ['TSLA', 'GOOG', 'FB', 'NFLX', 'PFE', 'KO', 'AAPL', 'MSFT', 'DIS', 'UBER', 'AMZN', 'TWTR', 'SBUX', 'F', 'XOM', 'GFINBURO.MX', 'BIMBOA.MX', 'GFNORTEO.MX', 'TLEVISACPO.MX', 'AZTECACPO.MX', 'ALSEA.MX', 'ORBIA.MX', 'POSADASA.MX', 'VOLARA.MX', 'LIVEPOLC-1.MX', 'AEROMEX.MX', 'WALMEX.MX', 'PE&OLES.MX', 'BBVA.MX', 'GAPB.MX']
# ADD BINARY LEETCODE SOLUTION: # creating a class. class Solution(object): # creating a function to solve the problem. def addBinary(self, a, b): # using the 'bin' function to convert each integer into its binary format. sum = bin(int(a, 2) + int(b, 2)) # returning the value of the sum, while truncating the '0b' prefix. return sum[2:]
class Solution(object): def add_binary(self, a, b): sum = bin(int(a, 2) + int(b, 2)) return sum[2:]
mywords = ['Krishna', 'Rameshwar Dass', 'Usha', 'Ramesh'] for w in mywords: print(w, end='') #Krishna Rameshwar Dass Usha Ramesh
mywords = ['Krishna', 'Rameshwar Dass', 'Usha', 'Ramesh'] for w in mywords: print(w, end='')
#!/usr/bin/env python3 SQL92_reserved = [ "ABSOLUTE", "ACTION", "ADD", "ALL", "ALLOCATE", "ALTER", "AND", "ANY", "ARE", "AS", "ASC", "ASSERTION", "AT", "AUTHORIZATION", "AVG", "BEGIN", "BETWEEN", "BIT", "BIT_LENGTH", "BOTH", "BY", "CASCADE", "CASCADED", "CASE", "CAST", "CATALOG", "CHAR", "CHARACTER", "CHAR_LENGTH", "CHARACTER_LENGTH", "CHECK", "CLOSE", "COALESCE", "COLLATE", "COLLATION", "COLUMN", "COMMIT", "CONNECT", "CONNECTION", "CONSTRAINT", "CONSTRAINTS", "CONTINUE", "CONVERT", "CORRESPONDING", "COUNT", "CREATE", "CROSS", "CURRENT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "CURSOR", "DATE", "DAY", "DEALLOCATE", "DEC", "DECIMAL", "DECLARE", "DEFAULT", "DEFERRABLE", "DEFERRED", "DELETE", "DESC", "DESCRIBE", "DESCRIPTOR", "DIAGNOSTICS", "DISCONNECT", "DISTINCT", "DOMAIN", "DOUBLE", "DROP", "ELSE", "END", "END-EXEC", "ESCAPE", "EXCEPT", "EXCEPTION", "EXEC", "EXECUTE", "EXISTS", "EXTERNAL", "EXTRACT", "FALSE", "FETCH", "FIRST", "FLOAT", "FOR", "FOREIGN", "FOUND", "FROM", "FULL", "GET", "GLOBAL", "GO", "GOTO", "GRANT", "GROUP", "HAVING", "HOUR", "IDENTITY", "IMMEDIATE", "IN", "INDICATOR", "INITIALLY", "INNER", "INPUT", "INSENSITIVE", "INSERT", "INT", "INTEGER", "INTERSECT", "INTERVAL", "INTO", "IS", "ISOLATION", "JOIN", "KEY", "LANGUAGE", "LAST", "LEADING", "LEFT", "LEVEL", "LIKE", "LOCAL", "LOWER", "MATCH", "MAX", "MIN", "MINUTE", "MODULE", "MONTH", "NAMES", "NATIONAL", "NATURAL", "NCHAR", "NEXT", "NO", "NOT", "NULL", "NULLIF", "NUMERIC", "OCTET_LENGTH", "OF", "ON", "ONLY", "OPEN", "OPTION", "OR", "ORDER", "OUTER", "OUTPUT", "OVERLAPS", "PAD", "PARTIAL", "POSITION", "PRECISION", "PREPARE", "PRESERVE", "PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURE", "PUBLIC", "READ", "REAL", "REFERENCES", "RELATIVE", "RESTRICT", "REVOKE", "RIGHT", "ROLLBACK", "ROWS", "SCHEMA", "SCROLL", "SECOND", "SECTION", "SELECT", "SESSION", "SESSION_USER", "SET", "SIZE", "SMALLINT", "SOME", "SPACE", "SQL", "SQLCODE", "SQLERROR", "SQLSTATE", "SUBSTRING", "SUM", "SYSTEM_USER", "TABLE", "TEMPORARY", "THEN", "TIME", "TIMESTAMP", "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TO", "TRAILING", "TRANSACTION", "TRANSLATE", "TRANSLATION", "TRIM", "TRUE", "UNION", "UNIQUE", "UNKNOWN", "UPDATE", "UPPER", "USAGE", "USER", "USING", "VALUE", "VALUES", "VARCHAR", "VARYING", "VIEW", "WHEN", "WHENEVER", "WHERE", "WITH", "WORK", "WRITE", "YEAR", "ZONE", ] SQL92_non_reserved = [ "ADA", "C", "CATALOG_NAME", "CHARACTER_SET_CATALOG", "CHARACTER_SET_NAME", "CHARACTER_SET_SCHEMA", "CLASS_ORIGIN", "COBOL", "COLLATION_CATALOG", "COLLATION_NAME", "COLLATION_SCHEMA", "COLUMN_NAME", "COMMAND_FUNCTION", "COMMITTED", "CONDITION_NUMBER", "CONNECTION_NAME", "CONSTRAINT_CATALOG", "CONSTRAINT_NAME", "CONSTRAINT_SCHEMA", "CURSOR_NAME", "DATA", "DATETIME_INTERVAL_CODE", "DATETIME_INTERVAL_PRECISION", "DYNAMIC_FUNCTION", "FORTRAN", "LENGTH", "MESSAGE_LENGTH", "MESSAGE_OCTET_LENGTH", "MESSAGE_TEXT", "MORE", "MUMPS", "NAME", "NULLABLE", "NUMBER", "PASCAL", "PLI", "REPEATABLE", "RETURNED_LENGTH", "RETURNED_OCTET_LENGTH", "RETURNED_SQLSTATE", "ROW_COUNT", "SCALE", "SCHEMA_NAME", "SERIALIZABLE", "SERVER_NAME", "SUBCLASS_ORIGIN", "TABLE_NAME", "TYPE", "UNCOMMITTED", "UNNAMED", ] if __name__ == '__main__': print("\t // Reserved Keyword") for k in SQL92_reserved: print("\t KEYWORD_{}_TOKEN = \"{}\"".format(k.replace('-', '_'), k)) print("\n") print("\t // Non Reserved Keyword\n") for k in SQL92_non_reserved: print("\t KEYWORD_{}_TOKEN = \"{}\"".format(k.replace('-', '_'), k)) print("\n") print("---------") print("\n") for k in SQL92_reserved: print("\t \"{}\": KEYWORD_{}_TOKEN,".format(k, k.replace('-', '_'))) print("\n") print("---------") print("\n") for k in SQL92_non_reserved: print("\t \"{}\": KEYWORD_{}_TOKEN,".format(k, k.replace('-', '_'))) print() print("\n") print("---------") print("\n") for k in SQL92_reserved: print("{{\"{}\", token.KEYWORD_{}_TOKEN, \"{}\"}}, ".format(k, k.replace('-', '_'), k)) for k in SQL92_non_reserved: print("{{\"{}\", token.KEYWORD_{}_TOKEN, \"{}\"}}, ".format(k, k.replace('-', '_'), k)) print()
sql92_reserved = ['ABSOLUTE', 'ACTION', 'ADD', 'ALL', 'ALLOCATE', 'ALTER', 'AND', 'ANY', 'ARE', 'AS', 'ASC', 'ASSERTION', 'AT', 'AUTHORIZATION', 'AVG', 'BEGIN', 'BETWEEN', 'BIT', 'BIT_LENGTH', 'BOTH', 'BY', 'CASCADE', 'CASCADED', 'CASE', 'CAST', 'CATALOG', 'CHAR', 'CHARACTER', 'CHAR_LENGTH', 'CHARACTER_LENGTH', 'CHECK', 'CLOSE', 'COALESCE', 'COLLATE', 'COLLATION', 'COLUMN', 'COMMIT', 'CONNECT', 'CONNECTION', 'CONSTRAINT', 'CONSTRAINTS', 'CONTINUE', 'CONVERT', 'CORRESPONDING', 'COUNT', 'CREATE', 'CROSS', 'CURRENT', 'CURRENT_DATE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'CURSOR', 'DATE', 'DAY', 'DEALLOCATE', 'DEC', 'DECIMAL', 'DECLARE', 'DEFAULT', 'DEFERRABLE', 'DEFERRED', 'DELETE', 'DESC', 'DESCRIBE', 'DESCRIPTOR', 'DIAGNOSTICS', 'DISCONNECT', 'DISTINCT', 'DOMAIN', 'DOUBLE', 'DROP', 'ELSE', 'END', 'END-EXEC', 'ESCAPE', 'EXCEPT', 'EXCEPTION', 'EXEC', 'EXECUTE', 'EXISTS', 'EXTERNAL', 'EXTRACT', 'FALSE', 'FETCH', 'FIRST', 'FLOAT', 'FOR', 'FOREIGN', 'FOUND', 'FROM', 'FULL', 'GET', 'GLOBAL', 'GO', 'GOTO', 'GRANT', 'GROUP', 'HAVING', 'HOUR', 'IDENTITY', 'IMMEDIATE', 'IN', 'INDICATOR', 'INITIALLY', 'INNER', 'INPUT', 'INSENSITIVE', 'INSERT', 'INT', 'INTEGER', 'INTERSECT', 'INTERVAL', 'INTO', 'IS', 'ISOLATION', 'JOIN', 'KEY', 'LANGUAGE', 'LAST', 'LEADING', 'LEFT', 'LEVEL', 'LIKE', 'LOCAL', 'LOWER', 'MATCH', 'MAX', 'MIN', 'MINUTE', 'MODULE', 'MONTH', 'NAMES', 'NATIONAL', 'NATURAL', 'NCHAR', 'NEXT', 'NO', 'NOT', 'NULL', 'NULLIF', 'NUMERIC', 'OCTET_LENGTH', 'OF', 'ON', 'ONLY', 'OPEN', 'OPTION', 'OR', 'ORDER', 'OUTER', 'OUTPUT', 'OVERLAPS', 'PAD', 'PARTIAL', 'POSITION', 'PRECISION', 'PREPARE', 'PRESERVE', 'PRIMARY', 'PRIOR', 'PRIVILEGES', 'PROCEDURE', 'PUBLIC', 'READ', 'REAL', 'REFERENCES', 'RELATIVE', 'RESTRICT', 'REVOKE', 'RIGHT', 'ROLLBACK', 'ROWS', 'SCHEMA', 'SCROLL', 'SECOND', 'SECTION', 'SELECT', 'SESSION', 'SESSION_USER', 'SET', 'SIZE', 'SMALLINT', 'SOME', 'SPACE', 'SQL', 'SQLCODE', 'SQLERROR', 'SQLSTATE', 'SUBSTRING', 'SUM', 'SYSTEM_USER', 'TABLE', 'TEMPORARY', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_HOUR', 'TIMEZONE_MINUTE', 'TO', 'TRAILING', 'TRANSACTION', 'TRANSLATE', 'TRANSLATION', 'TRIM', 'TRUE', 'UNION', 'UNIQUE', 'UNKNOWN', 'UPDATE', 'UPPER', 'USAGE', 'USER', 'USING', 'VALUE', 'VALUES', 'VARCHAR', 'VARYING', 'VIEW', 'WHEN', 'WHENEVER', 'WHERE', 'WITH', 'WORK', 'WRITE', 'YEAR', 'ZONE'] sql92_non_reserved = ['ADA', 'C', 'CATALOG_NAME', 'CHARACTER_SET_CATALOG', 'CHARACTER_SET_NAME', 'CHARACTER_SET_SCHEMA', 'CLASS_ORIGIN', 'COBOL', 'COLLATION_CATALOG', 'COLLATION_NAME', 'COLLATION_SCHEMA', 'COLUMN_NAME', 'COMMAND_FUNCTION', 'COMMITTED', 'CONDITION_NUMBER', 'CONNECTION_NAME', 'CONSTRAINT_CATALOG', 'CONSTRAINT_NAME', 'CONSTRAINT_SCHEMA', 'CURSOR_NAME', 'DATA', 'DATETIME_INTERVAL_CODE', 'DATETIME_INTERVAL_PRECISION', 'DYNAMIC_FUNCTION', 'FORTRAN', 'LENGTH', 'MESSAGE_LENGTH', 'MESSAGE_OCTET_LENGTH', 'MESSAGE_TEXT', 'MORE', 'MUMPS', 'NAME', 'NULLABLE', 'NUMBER', 'PASCAL', 'PLI', 'REPEATABLE', 'RETURNED_LENGTH', 'RETURNED_OCTET_LENGTH', 'RETURNED_SQLSTATE', 'ROW_COUNT', 'SCALE', 'SCHEMA_NAME', 'SERIALIZABLE', 'SERVER_NAME', 'SUBCLASS_ORIGIN', 'TABLE_NAME', 'TYPE', 'UNCOMMITTED', 'UNNAMED'] if __name__ == '__main__': print('\t // Reserved Keyword') for k in SQL92_reserved: print('\t KEYWORD_{}_TOKEN = "{}"'.format(k.replace('-', '_'), k)) print('\n') print('\t // Non Reserved Keyword\n') for k in SQL92_non_reserved: print('\t KEYWORD_{}_TOKEN = "{}"'.format(k.replace('-', '_'), k)) print('\n') print('---------') print('\n') for k in SQL92_reserved: print('\t "{}": KEYWORD_{}_TOKEN,'.format(k, k.replace('-', '_'))) print('\n') print('---------') print('\n') for k in SQL92_non_reserved: print('\t "{}": KEYWORD_{}_TOKEN,'.format(k, k.replace('-', '_'))) print() print('\n') print('---------') print('\n') for k in SQL92_reserved: print('{{"{}", token.KEYWORD_{}_TOKEN, "{}"}}, '.format(k, k.replace('-', '_'), k)) for k in SQL92_non_reserved: print('{{"{}", token.KEYWORD_{}_TOKEN, "{}"}}, '.format(k, k.replace('-', '_'), k)) print()
def can_build(env, platform): return True def configure(env): pass def is_enabled(): # Disabled by default being experimental at the moment. # Enable manually with `module_gdscript_transpiler_enabled=yes` option. return False
def can_build(env, platform): return True def configure(env): pass def is_enabled(): return False
class PERIOD: DAILY = "daily" WEEKLY = "weekly" MONTHLY = "monthly" # Converting BYTES to KB, MB, GB BYTES_TO_KBYTES = 1024 BYTES_TO_MBYTES = 1048576 BYTES_TO_GBYTES = 1073741824
class Period: daily = 'daily' weekly = 'weekly' monthly = 'monthly' bytes_to_kbytes = 1024 bytes_to_mbytes = 1048576 bytes_to_gbytes = 1073741824
class MyClass: '''This is the docstring for this class''' def __init__(self): # setup per-instance variables self.x = 1 self.y = 2 self.z = 3 class MySecondClass: '''This is the docstring for this second class''' def __init__(self): # setup per-instance variables self.p = 1 self.d = 2 self.q = 3
class Myclass: """This is the docstring for this class""" def __init__(self): self.x = 1 self.y = 2 self.z = 3 class Mysecondclass: """This is the docstring for this second class""" def __init__(self): self.p = 1 self.d = 2 self.q = 3
# coding: utf8 class InvalidUnitToDXAException(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class Unit(object): @classmethod def to_dxa(cls, val): if len(val) < 2: return 0 else: unit = val[-2:] val = int(val.rstrip(unit)) if val == 0: return 0 if unit == 'cm': return cls.cm_to_dxa(val) elif unit == 'in': return cls.in_to_dxa(val) elif unit == 'pt': return cls.pt_to_dxa(val) else: raise InvalidUnitToDXAException("Unit to DXA should be " + "Centimeters(cm), " + "Inches(in) or " + "Points(pt)") @classmethod def pixel_to_emu(cls, pixel): return int(round(pixel * 12700)) @classmethod def cm_to_dxa(cls, centimeters): inches = centimeters / 2.54 points = inches * 72 dxa = points * 20 return dxa @classmethod def in_to_dxa(cls, inches): points = inches * 72 dxa = cls.pt_to_dxa(points) return dxa @classmethod def pt_to_dxa(cls, points): dxa = points * 20 return dxa
class Invalidunittodxaexception(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class Unit(object): @classmethod def to_dxa(cls, val): if len(val) < 2: return 0 else: unit = val[-2:] val = int(val.rstrip(unit)) if val == 0: return 0 if unit == 'cm': return cls.cm_to_dxa(val) elif unit == 'in': return cls.in_to_dxa(val) elif unit == 'pt': return cls.pt_to_dxa(val) else: raise invalid_unit_to_dxa_exception('Unit to DXA should be ' + 'Centimeters(cm), ' + 'Inches(in) or ' + 'Points(pt)') @classmethod def pixel_to_emu(cls, pixel): return int(round(pixel * 12700)) @classmethod def cm_to_dxa(cls, centimeters): inches = centimeters / 2.54 points = inches * 72 dxa = points * 20 return dxa @classmethod def in_to_dxa(cls, inches): points = inches * 72 dxa = cls.pt_to_dxa(points) return dxa @classmethod def pt_to_dxa(cls, points): dxa = points * 20 return dxa
def count(word, letter): count = 0 for i in word: if i == letter: count = count + 1 return count word = input('Enter a word:') letter = input('Enter a letter to count in word:') print("There are {} {}'s in your word".format(count(word,letter), letter))
def count(word, letter): count = 0 for i in word: if i == letter: count = count + 1 return count word = input('Enter a word:') letter = input('Enter a letter to count in word:') print("There are {} {}'s in your word".format(count(word, letter), letter))
class Square: def __init__(self, side): self.side = side def perimeter(self): return self.side * 4 def area(self): return self.side ** 2 pass class Rectangle: def __init__(self, width, height): self.width, self.height = width, height def perimeter(self): return self.width * 2 + self.height * 2 def area(self): return self.width * self.height q = Square(5) print(q.perimeter()) print(q.area()) r = Rectangle(5, 10) print(r.perimeter(), r.area())
class Square: def __init__(self, side): self.side = side def perimeter(self): return self.side * 4 def area(self): return self.side ** 2 pass class Rectangle: def __init__(self, width, height): (self.width, self.height) = (width, height) def perimeter(self): return self.width * 2 + self.height * 2 def area(self): return self.width * self.height q = square(5) print(q.perimeter()) print(q.area()) r = rectangle(5, 10) print(r.perimeter(), r.area())
def first_function(values): ''' (list of int) -> NoneType ''' for i in range(len(values)): if values[i] % 2 == 1: values[i] += 1 def second_function(value): ''' (int) -> int ''' if value % 2 == 1: value += 1 return value def snippet_1(): a = [1, 2, 3] b = 1 first_function(a) second_function(b) print(a) print(b) # output: (2 MARKS) # [2, 2, 4] # 1 # why? second_function(1) will not return 2 if we don't print it. def snippet_2(): a = [1, 2, 3] b = 1 print(first_function(a)) print(second_function(b)) # output: (2 MARKS) # None # 2
def first_function(values): """ (list of int) -> NoneType """ for i in range(len(values)): if values[i] % 2 == 1: values[i] += 1 def second_function(value): """ (int) -> int """ if value % 2 == 1: value += 1 return value def snippet_1(): a = [1, 2, 3] b = 1 first_function(a) second_function(b) print(a) print(b) def snippet_2(): a = [1, 2, 3] b = 1 print(first_function(a)) print(second_function(b))
# -*- coding: utf-8 -*- vagrant = 'vagrant' def up(): return '{} up'.format(vagrant) def ssh(): return '{} ssh'.format(vagrant) def suspend(): return '{} suspend'.format(vagrant) def status(): return '{} status'.format(vagrant) def halt(): return '{} halt'.format(vagrant) def destroy(force=False): options = '' if force: options += '--force' return '{} destroy {}'.format(vagrant, options) def share(**kwargs): options = '' name = kwargs.get('name') if name: options += '--name {}'.format(name) if options != '': options = ' ' + options return '{} share{}'.format(vagrant, options)
vagrant = 'vagrant' def up(): return '{} up'.format(vagrant) def ssh(): return '{} ssh'.format(vagrant) def suspend(): return '{} suspend'.format(vagrant) def status(): return '{} status'.format(vagrant) def halt(): return '{} halt'.format(vagrant) def destroy(force=False): options = '' if force: options += '--force' return '{} destroy {}'.format(vagrant, options) def share(**kwargs): options = '' name = kwargs.get('name') if name: options += '--name {}'.format(name) if options != '': options = ' ' + options return '{} share{}'.format(vagrant, options)
def split_block (string:str, seps:(str, str)) -> str: _, content = string.split (seps[0]) block, _ = content.split (seps[1]) return block def is_not_empty (value): return value != '' def contens_colons (value:str) -> bool: return value.count(":") == 0 content = "" with open ("examples/add.asm") as f: content = f.read() code, data = [*map (lambda x: split_block (content, x), [(".code", ".endcode"), (".data", ".enddata")])] code = [*filter (is_not_empty, code.split ('\n'))] data = [*filter (is_not_empty, data.split ('\n'))] print (code) print (data) instructions = [*filter (contens_colons, code)] markings = [*filter (lambda x: not contens_colons (x), code)] there_is_instruction = [*map ( lambda x: len (x.split (":")[1].replace (" ", "")) != 0, markings)] print (instructions) print (markings) print (there_is_instruction)
def split_block(string: str, seps: (str, str)) -> str: (_, content) = string.split(seps[0]) (block, _) = content.split(seps[1]) return block def is_not_empty(value): return value != '' def contens_colons(value: str) -> bool: return value.count(':') == 0 content = '' with open('examples/add.asm') as f: content = f.read() (code, data) = [*map(lambda x: split_block(content, x), [('.code', '.endcode'), ('.data', '.enddata')])] code = [*filter(is_not_empty, code.split('\n'))] data = [*filter(is_not_empty, data.split('\n'))] print(code) print(data) instructions = [*filter(contens_colons, code)] markings = [*filter(lambda x: not contens_colons(x), code)] there_is_instruction = [*map(lambda x: len(x.split(':')[1].replace(' ', '')) != 0, markings)] print(instructions) print(markings) print(there_is_instruction)
class Solution: # @return an integer def threeSumClosest(self, num, target): num.sort() res = sum(num[:3]) if res > target: diff = res-target elif res < target: diff = target-res else: return res n = len(num) for i in xrange(n): j, k = i+1, n-1 while j < k: s = num[i]+num[j]+num[k] if s > target: n_diff = s-target k -= 1 elif s < target: n_diff = target-s j += 1 else: return s if n_diff < diff: res, diff = s, n_diff return res
class Solution: def three_sum_closest(self, num, target): num.sort() res = sum(num[:3]) if res > target: diff = res - target elif res < target: diff = target - res else: return res n = len(num) for i in xrange(n): (j, k) = (i + 1, n - 1) while j < k: s = num[i] + num[j] + num[k] if s > target: n_diff = s - target k -= 1 elif s < target: n_diff = target - s j += 1 else: return s if n_diff < diff: (res, diff) = (s, n_diff) return res
''' Prompt: Given two strings, s1 and s2, write code to check if s2 is a rotation of s1. (e.g., "waterbottle" is a rotation of "erbottlewat"). Follow up: What if you could use one call of a helper method isSubstring? ''' # Time: O(n), Space: O(n) def isStringRotation(s1, s2): if len(s1) != len(s2): return False strLength = len(s1) or len(s2) s1Prefix = [] s1Suffix = [c for c in s1] s2Prefix = [c for c in s2] s2Suffix = [] for idx in range(strLength): if s1Suffix == s2Prefix and s1Prefix == s2Suffix: return True s1Prefix.append(s1Suffix.pop(0)) s2Suffix.insert(0, s2Prefix.pop()) return False ''' Follow up: Notice that if isStringRotation(s1, s2) == True Let `p` be the prefix of the string and `s` the suffix. Then s1 can be broken down into s1=`ps` and s2=`sp` Therefore, notice that s1s1 = `psps`, so s2 must be a substring. So: return isSubstring(s1+s1, s2) ''' print(isStringRotation("waterbottle", "erbottlewat")) print(isStringRotation("waterbottle", "erbottlewqt")) print(isStringRotation("waterbottle", "eniottlewdt")) print(isStringRotation("lucas", "sluca")) print(isStringRotation("lucas", "wluca"))
""" Prompt: Given two strings, s1 and s2, write code to check if s2 is a rotation of s1. (e.g., "waterbottle" is a rotation of "erbottlewat"). Follow up: What if you could use one call of a helper method isSubstring? """ def is_string_rotation(s1, s2): if len(s1) != len(s2): return False str_length = len(s1) or len(s2) s1_prefix = [] s1_suffix = [c for c in s1] s2_prefix = [c for c in s2] s2_suffix = [] for idx in range(strLength): if s1Suffix == s2Prefix and s1Prefix == s2Suffix: return True s1Prefix.append(s1Suffix.pop(0)) s2Suffix.insert(0, s2Prefix.pop()) return False '\nFollow up:\nNotice that if isStringRotation(s1, s2) == True\nLet `p` be the prefix of the string and `s` the suffix.\nThen s1 can be broken down into s1=`ps` and s2=`sp`\n\nTherefore, notice that s1s1 = `psps`, so s2 must be a substring.\nSo: return isSubstring(s1+s1, s2)\n' print(is_string_rotation('waterbottle', 'erbottlewat')) print(is_string_rotation('waterbottle', 'erbottlewqt')) print(is_string_rotation('waterbottle', 'eniottlewdt')) print(is_string_rotation('lucas', 'sluca')) print(is_string_rotation('lucas', 'wluca'))
# Instantiate Cache information n = 10 cache = [None] * (n + 1) def fib_dyn(n): # Base Case if n == 0 or n == 1: return n # Check cache if cache[n] != None: return cache[n] # Keep setting cache cache[n] = fib_dyn(n-1) + fib_dyn(n-2) return cache[n] fib_dyn(10)
n = 10 cache = [None] * (n + 1) def fib_dyn(n): if n == 0 or n == 1: return n if cache[n] != None: return cache[n] cache[n] = fib_dyn(n - 1) + fib_dyn(n - 2) return cache[n] fib_dyn(10)
# -*- coding: utf-8 -*- # TODO: datetime support ### ### DO NOT CHANGE THIS FILE ### ### The code is auto generated, your change will be overwritten by ### code generating. ### DefinitionsNewrun = {'required': ['name'], 'type': 'object', 'properties': {'count': {'type': 'boolean'}, 'prePro': {'type': 'boolean'}, 'fqRegex': {'type': 'string'}, 'star': {'type': 'boolean'}, 'name': {'type': 'string'}, 'fastqc': {'type': 'boolean'}, 'genomeInddex': {'type': 'string'}, 'gtfFile': {'type': 'string'}, 'rnaseqqc': {'type': 'boolean'}, 'fqDirs': {'type': 'string'}, 'sampleNames': {'type': 'string'}, 'fastaRef': {'type': 'string'}, 'extn': {'type': 'string'}, 'fqDir': {'type': 'string'}, 'makeIndices': {'type': 'boolean'}}} DefinitionsRun = {'required': ['name'], 'type': 'object', 'properties': {'count': {'type': 'boolean'}, 'prePro': {'type': 'boolean'}, 'fqRegex': {'type': 'string'}, 'star': {'type': 'boolean'}, 'name': {'type': 'string'}, 'fastqc': {'type': 'boolean'}, 'genomeInddex': {'type': 'string'}, 'gtfFile': {'type': 'string'}, 'rnaseqqc': {'type': 'boolean'}, 'fqDirs': {'type': 'string'}, 'sampleNames': {'type': 'string'}, 'fastaRef': {'type': 'string'}, 'extn': {'type': 'string'}, 'fqDir': {'type': 'string'}, 'makeIndices': {'type': 'boolean'}}} DefinitionsErrormodel = {'required': ['code', 'message'], 'type': 'object', 'properties': {'message': {'type': 'string'}, 'code': {'type': 'integer', 'format': 'int32'}}} validators = { ('runs', 'POST'): {'json': DefinitionsNewrun}, } filters = { ('runs', 'POST'): {200: {'headers': None, 'schema': DefinitionsRun}}, ('runs', 'GET'): {200: {'headers': None, 'schema': {'items': DefinitionsRun, 'type': 'array'}}}, } scopes = { } class Security(object): def __init__(self): super(Security, self).__init__() self._loader = lambda: [] @property def scopes(self): return self._loader() def scopes_loader(self, func): self._loader = func return func security = Security() def merge_default(schema, value): # TODO: more types support type_defaults = { 'integer': 9573, 'string': 'something', 'object': {}, 'array': [], 'boolean': False } return normalize(schema, value, type_defaults)[0] def normalize(schema, data, required_defaults=None): if required_defaults is None: required_defaults = {} errors = [] class DataWrapper(object): def __init__(self, data): super(DataWrapper, self).__init__() self.data = data def get(self, key, default=None): if isinstance(self.data, dict): return self.data.get(key, default) if hasattr(self.data, key): return getattr(self.data, key) else: return default def has(self, key): if isinstance(self.data, dict): return key in self.data return hasattr(self.data, key) def _normalize_dict(schema, data): result = {} data = DataWrapper(data) for key, _schema in schema.get('properties', {}).iteritems(): # set default type_ = _schema.get('type', 'object') if ('default' not in _schema and key in schema.get('required', []) and type_ in required_defaults): _schema['default'] = required_defaults[type_] # get value if data.has(key): result[key] = _normalize(_schema, data.get(key)) elif 'default' in _schema: result[key] = _schema['default'] elif key in schema.get('required', []): errors.append(dict(name='property_missing', message='`%s` is required' % key)) return result def _normalize_list(schema, data): result = [] if isinstance(data, (list, tuple)): for item in data: result.append(_normalize(schema.get('items'), item)) elif 'default' in schema: result = schema['default'] return result def _normalize_default(schema, data): if data is None: return schema.get('default') else: return data def _normalize(schema, data): if not schema: return None funcs = { 'object': _normalize_dict, 'array': _normalize_list, 'default': _normalize_default, } type_ = schema.get('type', 'object') if not type_ in funcs: type_ = 'default' return funcs[type_](schema, data) return _normalize(schema, data), errors
definitions_newrun = {'required': ['name'], 'type': 'object', 'properties': {'count': {'type': 'boolean'}, 'prePro': {'type': 'boolean'}, 'fqRegex': {'type': 'string'}, 'star': {'type': 'boolean'}, 'name': {'type': 'string'}, 'fastqc': {'type': 'boolean'}, 'genomeInddex': {'type': 'string'}, 'gtfFile': {'type': 'string'}, 'rnaseqqc': {'type': 'boolean'}, 'fqDirs': {'type': 'string'}, 'sampleNames': {'type': 'string'}, 'fastaRef': {'type': 'string'}, 'extn': {'type': 'string'}, 'fqDir': {'type': 'string'}, 'makeIndices': {'type': 'boolean'}}} definitions_run = {'required': ['name'], 'type': 'object', 'properties': {'count': {'type': 'boolean'}, 'prePro': {'type': 'boolean'}, 'fqRegex': {'type': 'string'}, 'star': {'type': 'boolean'}, 'name': {'type': 'string'}, 'fastqc': {'type': 'boolean'}, 'genomeInddex': {'type': 'string'}, 'gtfFile': {'type': 'string'}, 'rnaseqqc': {'type': 'boolean'}, 'fqDirs': {'type': 'string'}, 'sampleNames': {'type': 'string'}, 'fastaRef': {'type': 'string'}, 'extn': {'type': 'string'}, 'fqDir': {'type': 'string'}, 'makeIndices': {'type': 'boolean'}}} definitions_errormodel = {'required': ['code', 'message'], 'type': 'object', 'properties': {'message': {'type': 'string'}, 'code': {'type': 'integer', 'format': 'int32'}}} validators = {('runs', 'POST'): {'json': DefinitionsNewrun}} filters = {('runs', 'POST'): {200: {'headers': None, 'schema': DefinitionsRun}}, ('runs', 'GET'): {200: {'headers': None, 'schema': {'items': DefinitionsRun, 'type': 'array'}}}} scopes = {} class Security(object): def __init__(self): super(Security, self).__init__() self._loader = lambda : [] @property def scopes(self): return self._loader() def scopes_loader(self, func): self._loader = func return func security = security() def merge_default(schema, value): type_defaults = {'integer': 9573, 'string': 'something', 'object': {}, 'array': [], 'boolean': False} return normalize(schema, value, type_defaults)[0] def normalize(schema, data, required_defaults=None): if required_defaults is None: required_defaults = {} errors = [] class Datawrapper(object): def __init__(self, data): super(DataWrapper, self).__init__() self.data = data def get(self, key, default=None): if isinstance(self.data, dict): return self.data.get(key, default) if hasattr(self.data, key): return getattr(self.data, key) else: return default def has(self, key): if isinstance(self.data, dict): return key in self.data return hasattr(self.data, key) def _normalize_dict(schema, data): result = {} data = data_wrapper(data) for (key, _schema) in schema.get('properties', {}).iteritems(): type_ = _schema.get('type', 'object') if 'default' not in _schema and key in schema.get('required', []) and (type_ in required_defaults): _schema['default'] = required_defaults[type_] if data.has(key): result[key] = _normalize(_schema, data.get(key)) elif 'default' in _schema: result[key] = _schema['default'] elif key in schema.get('required', []): errors.append(dict(name='property_missing', message='`%s` is required' % key)) return result def _normalize_list(schema, data): result = [] if isinstance(data, (list, tuple)): for item in data: result.append(_normalize(schema.get('items'), item)) elif 'default' in schema: result = schema['default'] return result def _normalize_default(schema, data): if data is None: return schema.get('default') else: return data def _normalize(schema, data): if not schema: return None funcs = {'object': _normalize_dict, 'array': _normalize_list, 'default': _normalize_default} type_ = schema.get('type', 'object') if not type_ in funcs: type_ = 'default' return funcs[type_](schema, data) return (_normalize(schema, data), errors)
class Callback(object): def __init__(self, fire_rate=1.0, fire_interval=None): self.FireRate = fire_rate self.NextFire = self.FireInterval = fire_interval self.FireLevel = 0.0 self.FireCount = 0 def __call__(self, event, *params, **args): self.FireCount += 1 self.FireLevel += self.FireRate if self.FireInterval is not None and self.FireCount < self.NextFire: return if self.FireLevel < 1.0: return if hasattr(self, event): getattr(self, event)(*params, **args) self.FireLevel -= 1.0 if self.FireInterval is not None: self.NextFire += self.FireInterval class CallbackList(object): # # Sends event data to list of Callback objects and to list of callback functions # def __init__(self, *callbacks): self.Callbacks = list(callbacks) def add(self, *callbacks): self.Callbacks += list(callbacks) def __call__(self, event, *params, **args): for cb in self.Callbacks: cb(event, *params, **args) @staticmethod def convert(arg): if isinstance(arg, CallbackList): return arg elif isinstance(arg, (list, tuple)): return CallbackList(*arg) elif arg is None: return CallbackList() # empty else: raise ValueError("Can not convert %s to CallbackList" % (arg,))
class Callback(object): def __init__(self, fire_rate=1.0, fire_interval=None): self.FireRate = fire_rate self.NextFire = self.FireInterval = fire_interval self.FireLevel = 0.0 self.FireCount = 0 def __call__(self, event, *params, **args): self.FireCount += 1 self.FireLevel += self.FireRate if self.FireInterval is not None and self.FireCount < self.NextFire: return if self.FireLevel < 1.0: return if hasattr(self, event): getattr(self, event)(*params, **args) self.FireLevel -= 1.0 if self.FireInterval is not None: self.NextFire += self.FireInterval class Callbacklist(object): def __init__(self, *callbacks): self.Callbacks = list(callbacks) def add(self, *callbacks): self.Callbacks += list(callbacks) def __call__(self, event, *params, **args): for cb in self.Callbacks: cb(event, *params, **args) @staticmethod def convert(arg): if isinstance(arg, CallbackList): return arg elif isinstance(arg, (list, tuple)): return callback_list(*arg) elif arg is None: return callback_list() else: raise value_error('Can not convert %s to CallbackList' % (arg,))
class A(Exception): def __init__(s, err, *args): s.err = err s.d = 2323 @property def message(s): return 'kawabunga' def __str__(s): return s.message class B(A): pass try: raise A('hh', 89) except B as e: print(1)
class A(Exception): def __init__(s, err, *args): s.err = err s.d = 2323 @property def message(s): return 'kawabunga' def __str__(s): return s.message class B(A): pass try: raise a('hh', 89) except B as e: print(1)
string = input() for i in range(len(string)): emoticon = '' if string[i] == ':': emoticon += string[i] + string[i + 1] print(emoticon)
string = input() for i in range(len(string)): emoticon = '' if string[i] == ':': emoticon += string[i] + string[i + 1] print(emoticon)
# -*- encoding: utf-8 -*- ####################################################################################################################### # DESCRIPTION: ####################################################################################################################### # TODO ####################################################################################################################### # AUTHORS: ####################################################################################################################### # Carlos Serrada, 13-11347, <[email protected]> # Juan Ortiz, 13-11021 <[email protected]> ####################################################################################################################### # CLASS DECLARATION: ####################################################################################################################### class CNF: def __init__(self): self.clauses = [] self.variables = [] self.map = {} def add(self, clause): for term in clause.terms: name = term.name if not (name in self.map): self.map[name] = len(self.variables) self.variables.append(name) self.clauses.append(clause) def __str__(self): header = "p cnf " + str(len(self.variables)) + " " + str(len(self.clauses)) + "\n" cnf = "" for clause in self.clauses: for term in clause.terms: cnf += ("-" if term.negative else "") + str(self.map[term.name] + 1) + " " cnf += "0\n" return header + cnf def parse(self, file_path): variables = [] with open(file_path) as file: for index, line in enumerate(file): if index == 1: variables = [x > 0 for x in list(map(int, line.split(' ')))[:-1]] return variables def solve(self, file_path): values = self.parse(file_path) solution = {} for i in range(len(values)): solution[self.variables[i]] = values[i] return solution ####################################################################################################################### # :) #######################################################################################################################
class Cnf: def __init__(self): self.clauses = [] self.variables = [] self.map = {} def add(self, clause): for term in clause.terms: name = term.name if not name in self.map: self.map[name] = len(self.variables) self.variables.append(name) self.clauses.append(clause) def __str__(self): header = 'p cnf ' + str(len(self.variables)) + ' ' + str(len(self.clauses)) + '\n' cnf = '' for clause in self.clauses: for term in clause.terms: cnf += ('-' if term.negative else '') + str(self.map[term.name] + 1) + ' ' cnf += '0\n' return header + cnf def parse(self, file_path): variables = [] with open(file_path) as file: for (index, line) in enumerate(file): if index == 1: variables = [x > 0 for x in list(map(int, line.split(' ')))[:-1]] return variables def solve(self, file_path): values = self.parse(file_path) solution = {} for i in range(len(values)): solution[self.variables[i]] = values[i] return solution
''' For a string sequence, a string word is k-repeating if word concatenated k times is a substring of sequence. The word's maximum k-repeating value is the highest value k where word is k-repeating in sequence. If word is not a substring of sequence, word's maximum k-repeating value is 0. Given strings sequence and word, return the maximum k-repeating value of word in sequence. Example: Input: sequence = "ababc", word = "ab" Output: 2 Explanation: "abab" is a substring in "ababc". Example: Input: sequence = "ababc", word = "ba" Output: 1 Explanation: "ba" is a substring in "ababc". "baba" is not a substring in "ababc". Example: Input: sequence = "ababc", word = "ac" Output: 0 Explanation: "ac" is not a substring in "ababc". Constraints: - 1 <= sequence.length <= 100 - 1 <= word.length <= 100 - sequence and word contains only lowercase English letters. ''' #Difficulty: Easy #211 / 211 test cases passed. #Runtime: 24 ms #Memory Usage: 14.2 MB #Runtime: 24 ms, faster than 96.10% of Python3 online submissions for Maximum Repeating Substring. #Memory Usage: 14.2 MB, less than 75.28% of Python3 online submissions for Maximum Repeating Substring. class Solution: def maxRepeating(self, sequence: str, word: str) -> int: x = 1 while word*x in sequence: x += 1 return x-1
""" For a string sequence, a string word is k-repeating if word concatenated k times is a substring of sequence. The word's maximum k-repeating value is the highest value k where word is k-repeating in sequence. If word is not a substring of sequence, word's maximum k-repeating value is 0. Given strings sequence and word, return the maximum k-repeating value of word in sequence. Example: Input: sequence = "ababc", word = "ab" Output: 2 Explanation: "abab" is a substring in "ababc". Example: Input: sequence = "ababc", word = "ba" Output: 1 Explanation: "ba" is a substring in "ababc". "baba" is not a substring in "ababc". Example: Input: sequence = "ababc", word = "ac" Output: 0 Explanation: "ac" is not a substring in "ababc". Constraints: - 1 <= sequence.length <= 100 - 1 <= word.length <= 100 - sequence and word contains only lowercase English letters. """ class Solution: def max_repeating(self, sequence: str, word: str) -> int: x = 1 while word * x in sequence: x += 1 return x - 1
altPulo, qntdCano = map(int, input().split()) canos = list(map(int, input().split())) atual = canos.pop(0) for cano in canos: if max([cano, atual]) - min([cano, atual]) > altPulo: print('GAME OVER') quit() atual = cano print('YOU WIN')
(alt_pulo, qntd_cano) = map(int, input().split()) canos = list(map(int, input().split())) atual = canos.pop(0) for cano in canos: if max([cano, atual]) - min([cano, atual]) > altPulo: print('GAME OVER') quit() atual = cano print('YOU WIN')
# this graph to check the algorithm graph={ 'S':['B','D','A'], 'A':['C'], 'B':['D'], 'C':['G','D'], 'S':['G'], } #function of BFS def BFS(graph,start,goal): Visited=[] queue=[[start]] while queue: path=queue.pop(0) node=path[-1] if node in Visited: continue Visited.append(node) if node==goal: return path else: adjecent_nodes=graph.get(node,[]) for node2 in adjecent_nodes: new_path=path.copy() new_path.append(node2) queue.append(new_path) Solution=BFS(graph,'S','G') print('Solution is ',Solution)
graph = {'S': ['B', 'D', 'A'], 'A': ['C'], 'B': ['D'], 'C': ['G', 'D'], 'S': ['G']} def bfs(graph, start, goal): visited = [] queue = [[start]] while queue: path = queue.pop(0) node = path[-1] if node in Visited: continue Visited.append(node) if node == goal: return path else: adjecent_nodes = graph.get(node, []) for node2 in adjecent_nodes: new_path = path.copy() new_path.append(node2) queue.append(new_path) solution = bfs(graph, 'S', 'G') print('Solution is ', Solution)