content
stringlengths 7
1.05M
| fixed_cases
stringlengths 1
1.28M
|
|---|---|
class Solution:
def numTrees(self, n):
"""
:type n: int
:rtype: int
"""
G = [0]*(n+1)
G[0], G[1] = 1, 1
for i in range(2, n+1):
for j in range(1, i+1):
G[i] += G[j-1] * G[i-j]
return G[n]
class MathSolution(object):
def numTrees(self, n):
"""
:type n: int
:rtype: int
"""
C = 1
for i in range(0, n):
C = C * 2*(2*i+1)/(i+2)
return int(C)
|
class Solution:
def num_trees(self, n):
"""
:type n: int
:rtype: int
"""
g = [0] * (n + 1)
(G[0], G[1]) = (1, 1)
for i in range(2, n + 1):
for j in range(1, i + 1):
G[i] += G[j - 1] * G[i - j]
return G[n]
class Mathsolution(object):
def num_trees(self, n):
"""
:type n: int
:rtype: int
"""
c = 1
for i in range(0, n):
c = C * 2 * (2 * i + 1) / (i + 2)
return int(C)
|
#
# PySNMP MIB module PACKETFRONT-SMI (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PACKETFRONT-SMI
# Produced by pysmi-0.3.4 at Wed May 1 14:36:10 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
IpAddress, ModuleIdentity, iso, ObjectIdentity, Counter64, NotificationType, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, Gauge32, enterprises, Unsigned32, Integer32, Bits, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "ModuleIdentity", "iso", "ObjectIdentity", "Counter64", "NotificationType", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "Gauge32", "enterprises", "Unsigned32", "Integer32", "Bits", "MibIdentifier")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
packetfront = ModuleIdentity((1, 3, 6, 1, 4, 1, 9303))
packetfront.setRevisions(('2009-03-23 10:39', '2008-01-17 14:05', '2007-05-11 12:28',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: packetfront.setRevisionsDescriptions(('Updated telephone number in contact-info', 'Correct warnings in imports', 'Created from PACKETFRONT-MIB.mib',))
if mibBuilder.loadTexts: packetfront.setLastUpdated('200903231039Z')
if mibBuilder.loadTexts: packetfront.setOrganization('PacketFront Systems AB')
if mibBuilder.loadTexts: packetfront.setContactInfo('PacketFront Systems AB Customer Service Mail : Isafjordsgatan 35 SE-164 28 Kista Sweden Tel : +46 8 5090 1500 E-mail: snmp@packetfront.com Web : http://www.packetfront.com')
if mibBuilder.loadTexts: packetfront.setDescription('The PacketFront management information base SMI definitions')
pfProduct = ObjectIdentity((1, 3, 6, 1, 4, 1, 9303, 1))
if mibBuilder.loadTexts: pfProduct.setStatus('current')
if mibBuilder.loadTexts: pfProduct.setDescription('The product group from which sysObjectID values are set.')
pfConfig = ObjectIdentity((1, 3, 6, 1, 4, 1, 9303, 2))
if mibBuilder.loadTexts: pfConfig.setStatus('current')
if mibBuilder.loadTexts: pfConfig.setDescription('The configuration subtree')
ipdConfig = ObjectIdentity((1, 3, 6, 1, 4, 1, 9303, 2, 1))
if mibBuilder.loadTexts: ipdConfig.setStatus('current')
if mibBuilder.loadTexts: ipdConfig.setDescription('The configuration subtree')
pfExperiment = ObjectIdentity((1, 3, 6, 1, 4, 1, 9303, 3))
if mibBuilder.loadTexts: pfExperiment.setStatus('current')
if mibBuilder.loadTexts: pfExperiment.setDescription('The root object for experimental objects. Experimental objects are used during development before a permanent assignment to the packetfront mib has been determined. Objects in this tree will come and go. No guarantees for their existance or accuracy is ever provided.')
pfMgmt = ObjectIdentity((1, 3, 6, 1, 4, 1, 9303, 4))
if mibBuilder.loadTexts: pfMgmt.setStatus('current')
if mibBuilder.loadTexts: pfMgmt.setDescription('The root object for all PacketFront management objects')
pfModules = ObjectIdentity((1, 3, 6, 1, 4, 1, 9303, 5))
if mibBuilder.loadTexts: pfModules.setStatus('current')
if mibBuilder.loadTexts: pfModules.setDescription('pfModules provides a root object identifier from which the MODULE-IDENTITY values may be assigned')
mibBuilder.exportSymbols("PACKETFRONT-SMI", ipdConfig=ipdConfig, pfProduct=pfProduct, pfConfig=pfConfig, packetfront=packetfront, pfModules=pfModules, pfExperiment=pfExperiment, pfMgmt=pfMgmt, PYSNMP_MODULE_ID=packetfront)
|
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_range_constraint, single_value_constraint, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(ip_address, module_identity, iso, object_identity, counter64, notification_type, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, gauge32, enterprises, unsigned32, integer32, bits, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'ModuleIdentity', 'iso', 'ObjectIdentity', 'Counter64', 'NotificationType', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'Gauge32', 'enterprises', 'Unsigned32', 'Integer32', 'Bits', 'MibIdentifier')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
packetfront = module_identity((1, 3, 6, 1, 4, 1, 9303))
packetfront.setRevisions(('2009-03-23 10:39', '2008-01-17 14:05', '2007-05-11 12:28'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
packetfront.setRevisionsDescriptions(('Updated telephone number in contact-info', 'Correct warnings in imports', 'Created from PACKETFRONT-MIB.mib'))
if mibBuilder.loadTexts:
packetfront.setLastUpdated('200903231039Z')
if mibBuilder.loadTexts:
packetfront.setOrganization('PacketFront Systems AB')
if mibBuilder.loadTexts:
packetfront.setContactInfo('PacketFront Systems AB Customer Service Mail : Isafjordsgatan 35 SE-164 28 Kista Sweden Tel : +46 8 5090 1500 E-mail: snmp@packetfront.com Web : http://www.packetfront.com')
if mibBuilder.loadTexts:
packetfront.setDescription('The PacketFront management information base SMI definitions')
pf_product = object_identity((1, 3, 6, 1, 4, 1, 9303, 1))
if mibBuilder.loadTexts:
pfProduct.setStatus('current')
if mibBuilder.loadTexts:
pfProduct.setDescription('The product group from which sysObjectID values are set.')
pf_config = object_identity((1, 3, 6, 1, 4, 1, 9303, 2))
if mibBuilder.loadTexts:
pfConfig.setStatus('current')
if mibBuilder.loadTexts:
pfConfig.setDescription('The configuration subtree')
ipd_config = object_identity((1, 3, 6, 1, 4, 1, 9303, 2, 1))
if mibBuilder.loadTexts:
ipdConfig.setStatus('current')
if mibBuilder.loadTexts:
ipdConfig.setDescription('The configuration subtree')
pf_experiment = object_identity((1, 3, 6, 1, 4, 1, 9303, 3))
if mibBuilder.loadTexts:
pfExperiment.setStatus('current')
if mibBuilder.loadTexts:
pfExperiment.setDescription('The root object for experimental objects. Experimental objects are used during development before a permanent assignment to the packetfront mib has been determined. Objects in this tree will come and go. No guarantees for their existance or accuracy is ever provided.')
pf_mgmt = object_identity((1, 3, 6, 1, 4, 1, 9303, 4))
if mibBuilder.loadTexts:
pfMgmt.setStatus('current')
if mibBuilder.loadTexts:
pfMgmt.setDescription('The root object for all PacketFront management objects')
pf_modules = object_identity((1, 3, 6, 1, 4, 1, 9303, 5))
if mibBuilder.loadTexts:
pfModules.setStatus('current')
if mibBuilder.loadTexts:
pfModules.setDescription('pfModules provides a root object identifier from which the MODULE-IDENTITY values may be assigned')
mibBuilder.exportSymbols('PACKETFRONT-SMI', ipdConfig=ipdConfig, pfProduct=pfProduct, pfConfig=pfConfig, packetfront=packetfront, pfModules=pfModules, pfExperiment=pfExperiment, pfMgmt=pfMgmt, PYSNMP_MODULE_ID=packetfront)
|
#!/bin/python3
def generate_prime_numbers(lim):
"""
Generates prime numbers above 100 10**100
"""
start = 10**100
l = []
for num in range(start, lim):
for n in range(2, num):
if num % n == 0:
print("Not found")
break
else: # If the modulus is never zero, it is prime
print(num)
return l
test = generate_prime_numbers((10**100)+38)
|
def generate_prime_numbers(lim):
"""
Generates prime numbers above 100 10**100
"""
start = 10 ** 100
l = []
for num in range(start, lim):
for n in range(2, num):
if num % n == 0:
print('Not found')
break
else:
print(num)
return l
test = generate_prime_numbers(10 ** 100 + 38)
|
"""
Board class that the game takes place in/against/on
"""
class Board(object):
"""The game Board"""
def __init__(self):
brown = ('Mediterranean Avenue', 'Baltic Avenue')
lightBlue = ('Oriential Avenue', 'Vermont Avenue', 'Connecticut Avenue')
pink = ('St. Charles PLace', 'States Avenue', 'Virginia Avenue')
orange = ('St. James Place', 'Tennessee Avenue', 'New York Avenue')
red = ('Kentucky Avenue', 'Indiana Avenue', 'Illinois Avenue')
yellow = ('Atlantic Avenue', 'Ventnor Avenue', 'Marvin Gardens')
green = ('Pacific Avenue', 'North Carolina Avenue', 'Pennsylvania Avenue')
darkBlue = ('Park Place', 'Boardwalk')
stations = ('Reading Railroad', 'Pennsylvania Railroad', 'B & O Railroad', 'Short Line')
jail = ('jail')
go = ('go')
utilities = ('Electric Company', 'Water Works')
|
"""
Board class that the game takes place in/against/on
"""
class Board(object):
"""The game Board"""
def __init__(self):
brown = ('Mediterranean Avenue', 'Baltic Avenue')
light_blue = ('Oriential Avenue', 'Vermont Avenue', 'Connecticut Avenue')
pink = ('St. Charles PLace', 'States Avenue', 'Virginia Avenue')
orange = ('St. James Place', 'Tennessee Avenue', 'New York Avenue')
red = ('Kentucky Avenue', 'Indiana Avenue', 'Illinois Avenue')
yellow = ('Atlantic Avenue', 'Ventnor Avenue', 'Marvin Gardens')
green = ('Pacific Avenue', 'North Carolina Avenue', 'Pennsylvania Avenue')
dark_blue = ('Park Place', 'Boardwalk')
stations = ('Reading Railroad', 'Pennsylvania Railroad', 'B & O Railroad', 'Short Line')
jail = 'jail'
go = 'go'
utilities = ('Electric Company', 'Water Works')
|
"""Rules for ANTLR 3."""
def imports(folder):
""" Returns the grammar and token files found below the given lib directory. """
return (native.glob(["{0}/*.g".format(folder)]) +
native.glob(["{0}/*.g3".format(folder)]) +
native.glob(["{0}/*.tokens".format(folder)]))
def _get_lib_dir(imports):
""" Determines the directory that contains the given imports. """
lib = {}
for resource in imports:
lib[resource.path.replace("/" + resource.basename, "")] = None
count = len(lib)
# the lib directory does not allow nested directories
if count > 1:
fail("All imports must be located in the same directory, but found {}".format(lib))
return lib.keys()[0] if count == 1 else None;
def _generate(ctx):
""" Generates the source files. """
if not ctx.files.srcs:
fail("No grammars provided, either add the srcs attribute or check your filespec", attr="srcs")
args = ctx.actions.args()
if ctx.attr.debug:
args.add("-debug")
if ctx.attr.depend:
args.add("-depend")
if ctx.attr.dfa:
args.add("-dfa")
if ctx.attr.dump:
args.add("-dump")
if ctx.attr.language:
args.add("-language")
args.add(ctx.attr.language)
lib = _get_lib_dir(ctx.files.imports)
if lib:
args.add("-lib")
args.add(lib)
args.add("-make")
if ctx.attr.message_format:
args.add("-message-format")
args.add(ctx.attr.message_format)
if ctx.attr.nfa:
args.add("-nfa")
output_dir = ctx.configuration.genfiles_dir.path
args.add("-o")
args.add(output_dir)
if ctx.attr.profile:
args.add("-profile")
if ctx.attr.report:
args.add("-report")
if ctx.attr.trace:
args.add("-trace")
if ctx.attr.Xconversiontimeout:
args.add("-Xconversiontimeout")
args.add(ctx.attr.Xconversiontimeout)
if ctx.attr.Xdbgconversion:
args.add("-Xdbgconversion")
if ctx.attr.Xdbgst:
args.add("-XdbgST")
if ctx.attr.Xdfa:
args.add("-Xdfa")
if ctx.attr.Xdfaverbose:
args.add("-Xdfaverbose")
if ctx.attr.Xgrtree:
args.add("-Xgrtree")
if ctx.attr.Xm:
args.add("-Xm")
args.add(ctx.attr.Xm)
if ctx.attr.Xmaxdfaedges:
args.add("-Xmaxdfaedges")
args.add(ctx.attr.Xmaxdfaedges)
if ctx.attr.Xmaxinlinedfastates:
args.add("-Xmaxinlinedfastates")
args.add(ctx.attr.Xmaxinlinedfastates)
if ctx.attr.Xmultithreaded:
args.add("-Xmultithreaded")
if ctx.attr.Xnfastates:
args.add("-Xnfastates")
if ctx.attr.Xnocollapse:
args.add("-Xnocollapse")
if ctx.attr.Xnomergestopstates:
args.add("-Xnomergestopstates")
if ctx.attr.Xnoprune:
args.add("-Xnoprune")
if ctx.attr.XsaveLexer:
args.add("-XsaveLexer")
if ctx.attr.Xwatchconversion:
args.add("-Xwatchconversion")
srcjar = ctx.outputs.src_jar
tool_inputs, _, input_manifests=ctx.resolve_command(tools=ctx.attr.deps + [ctx.attr._tool])
ctx.actions.run(
arguments = [args],
inputs = ctx.files.srcs + ctx.files.imports + tool_inputs,
outputs = [srcjar],
mnemonic = "ANTLR3",
executable = ctx.executable._tool,
env = {
"ANTLR_VERSION": "3",
"GRAMMARS": ",".join([f.path for f in ctx.files.srcs]),
"OUTPUT_DIRECTORY": output_dir,
"SRC_JAR": srcjar.path,
"TOOL_CLASSPATH": ",".join([f.path for f in tool_inputs]),
},
input_manifests = input_manifests,
progress_message = "Processing ANTLR 3 grammars",
)
antlr3 = rule(
implementation = _generate,
attrs = {
"debug": attr.bool(default=False),
"depend": attr.bool(default=False),
"deps": attr.label_list(default=[
Label("@antlr3_runtime//jar"),
Label("@antlr3_tool//jar"),
Label("@stringtemplate4//jar"),
]),
"dfa": attr.bool(default=False),
"dump": attr.bool(default=False),
"imports": attr.label_list(allow_files=True),
"language": attr.string(),
"message_format": attr.string(),
"nfa": attr.bool(default=False),
"profile": attr.bool(default=False),
"report": attr.bool(default=False),
"srcs": attr.label_list(allow_files=True, mandatory=True),
"trace": attr.bool(default=False),
"Xconversiontimeout": attr.int(),
"Xdbgconversion": attr.bool(default=False),
"Xdbgst": attr.bool(default=False),
"Xdfa": attr.bool(default=False),
"Xdfaverbose": attr.bool(default=False),
"Xgrtree": attr.bool(default=False),
"Xm": attr.int(),
"Xmaxdfaedges": attr.int(),
"Xmaxinlinedfastates": attr.int(),
"Xminswitchalts": attr.int(),
"Xmultithreaded": attr.bool(default=False),
"Xnfastates": attr.bool(default=False),
"Xnocollapse": attr.bool(default=False),
"Xnoprune": attr.bool(default=False),
"Xnomergestopstates": attr.bool(default=False),
"XsaveLexer": attr.bool(default=False),
"Xwatchconversion": attr.bool(default=False),
"_tool": attr.label(
executable=True,
cfg="host",
default=Label("@rules_antlr//src/main/java/org/antlr/bazel")),
},
outputs = {
"src_jar": "%{name}.srcjar",
},
)
""" Runs [ANTLR 3](https://www.antlr.org//) on a set of grammars.
Args:
debug: Generate a parser that emits debugging events.
depend: Generate file dependencies; don't actually run antlr.
deps: The dependencies to use. Defaults to the most recent ANTLR 3 release,
but if you need to use a different version, you can specify the
dependencies here.
dfa: Generate a DFA for each decision point.
imports: The grammar and .tokens files to import. Must be all in the same directory.
language: The code generation target language. Either C, Cpp, CSharp2, CSharp3,
JavaScript, Java, ObjC, Python, Python3 or Ruby (case-sensitive).
message_format: Specify output style for messages.
nfa: Generate an NFA for each rule.
dump: Print out the grammar without actions.
profile: Generate a parser that computes profiling information.
report: Print out a report about the grammar(s) processed.
srcs: The grammar files to process.
trace: Generate a parser with trace output. If the default output is not
enough, you can override the traceIn and traceOut methods.
Xgrtree: Print the grammar AST.
Xdfa: Print DFA as text.
Xnoprune: Do not test EBNF block exit branches.
Xnocollapse: Collapse incident edges into DFA states.
Xdbgconversion: Dump lots of info during NFA conversion.
Xmultithreaded: Run the analysis in 2 threads.
Xnomergestopstates: Do not merge stop states.
Xdfaverbose: Generate DFA states in DOT with NFA configs.
Xwatchconversion: Print a message for each NFA before converting.
Xdbgst: Put tags at start/stop of all templates in output.
Xm: Max number of rule invocations during conversion.
Xmaxdfaedges: Max "comfortable" number of edges for single DFA state.
Xminswitchalts: Don't generate switch() statements for dfas smaller than given number.
Xconversiontimeout: Set NFA conversion timeout for each decision.
Xmaxinlinedfastates: Max DFA states before table used rather than inlining.
Xnfastates: For nondeterminisms, list NFA states for each path.
Xsavelexer: Don't delete temporary lexers generated from combined grammars.
Outputs:
name.srcjar: The .srcjar with the generated files.
"""
|
"""Rules for ANTLR 3."""
def imports(folder):
""" Returns the grammar and token files found below the given lib directory. """
return native.glob(['{0}/*.g'.format(folder)]) + native.glob(['{0}/*.g3'.format(folder)]) + native.glob(['{0}/*.tokens'.format(folder)])
def _get_lib_dir(imports):
""" Determines the directory that contains the given imports. """
lib = {}
for resource in imports:
lib[resource.path.replace('/' + resource.basename, '')] = None
count = len(lib)
if count > 1:
fail('All imports must be located in the same directory, but found {}'.format(lib))
return lib.keys()[0] if count == 1 else None
def _generate(ctx):
""" Generates the source files. """
if not ctx.files.srcs:
fail('No grammars provided, either add the srcs attribute or check your filespec', attr='srcs')
args = ctx.actions.args()
if ctx.attr.debug:
args.add('-debug')
if ctx.attr.depend:
args.add('-depend')
if ctx.attr.dfa:
args.add('-dfa')
if ctx.attr.dump:
args.add('-dump')
if ctx.attr.language:
args.add('-language')
args.add(ctx.attr.language)
lib = _get_lib_dir(ctx.files.imports)
if lib:
args.add('-lib')
args.add(lib)
args.add('-make')
if ctx.attr.message_format:
args.add('-message-format')
args.add(ctx.attr.message_format)
if ctx.attr.nfa:
args.add('-nfa')
output_dir = ctx.configuration.genfiles_dir.path
args.add('-o')
args.add(output_dir)
if ctx.attr.profile:
args.add('-profile')
if ctx.attr.report:
args.add('-report')
if ctx.attr.trace:
args.add('-trace')
if ctx.attr.Xconversiontimeout:
args.add('-Xconversiontimeout')
args.add(ctx.attr.Xconversiontimeout)
if ctx.attr.Xdbgconversion:
args.add('-Xdbgconversion')
if ctx.attr.Xdbgst:
args.add('-XdbgST')
if ctx.attr.Xdfa:
args.add('-Xdfa')
if ctx.attr.Xdfaverbose:
args.add('-Xdfaverbose')
if ctx.attr.Xgrtree:
args.add('-Xgrtree')
if ctx.attr.Xm:
args.add('-Xm')
args.add(ctx.attr.Xm)
if ctx.attr.Xmaxdfaedges:
args.add('-Xmaxdfaedges')
args.add(ctx.attr.Xmaxdfaedges)
if ctx.attr.Xmaxinlinedfastates:
args.add('-Xmaxinlinedfastates')
args.add(ctx.attr.Xmaxinlinedfastates)
if ctx.attr.Xmultithreaded:
args.add('-Xmultithreaded')
if ctx.attr.Xnfastates:
args.add('-Xnfastates')
if ctx.attr.Xnocollapse:
args.add('-Xnocollapse')
if ctx.attr.Xnomergestopstates:
args.add('-Xnomergestopstates')
if ctx.attr.Xnoprune:
args.add('-Xnoprune')
if ctx.attr.XsaveLexer:
args.add('-XsaveLexer')
if ctx.attr.Xwatchconversion:
args.add('-Xwatchconversion')
srcjar = ctx.outputs.src_jar
(tool_inputs, _, input_manifests) = ctx.resolve_command(tools=ctx.attr.deps + [ctx.attr._tool])
ctx.actions.run(arguments=[args], inputs=ctx.files.srcs + ctx.files.imports + tool_inputs, outputs=[srcjar], mnemonic='ANTLR3', executable=ctx.executable._tool, env={'ANTLR_VERSION': '3', 'GRAMMARS': ','.join([f.path for f in ctx.files.srcs]), 'OUTPUT_DIRECTORY': output_dir, 'SRC_JAR': srcjar.path, 'TOOL_CLASSPATH': ','.join([f.path for f in tool_inputs])}, input_manifests=input_manifests, progress_message='Processing ANTLR 3 grammars')
antlr3 = rule(implementation=_generate, attrs={'debug': attr.bool(default=False), 'depend': attr.bool(default=False), 'deps': attr.label_list(default=[label('@antlr3_runtime//jar'), label('@antlr3_tool//jar'), label('@stringtemplate4//jar')]), 'dfa': attr.bool(default=False), 'dump': attr.bool(default=False), 'imports': attr.label_list(allow_files=True), 'language': attr.string(), 'message_format': attr.string(), 'nfa': attr.bool(default=False), 'profile': attr.bool(default=False), 'report': attr.bool(default=False), 'srcs': attr.label_list(allow_files=True, mandatory=True), 'trace': attr.bool(default=False), 'Xconversiontimeout': attr.int(), 'Xdbgconversion': attr.bool(default=False), 'Xdbgst': attr.bool(default=False), 'Xdfa': attr.bool(default=False), 'Xdfaverbose': attr.bool(default=False), 'Xgrtree': attr.bool(default=False), 'Xm': attr.int(), 'Xmaxdfaedges': attr.int(), 'Xmaxinlinedfastates': attr.int(), 'Xminswitchalts': attr.int(), 'Xmultithreaded': attr.bool(default=False), 'Xnfastates': attr.bool(default=False), 'Xnocollapse': attr.bool(default=False), 'Xnoprune': attr.bool(default=False), 'Xnomergestopstates': attr.bool(default=False), 'XsaveLexer': attr.bool(default=False), 'Xwatchconversion': attr.bool(default=False), '_tool': attr.label(executable=True, cfg='host', default=label('@rules_antlr//src/main/java/org/antlr/bazel'))}, outputs={'src_jar': '%{name}.srcjar'})
' Runs [ANTLR 3](https://www.antlr.org//) on a set of grammars.\n\nArgs:\n debug: Generate a parser that emits debugging events.\n depend: Generate file dependencies; don\'t actually run antlr.\n deps: The dependencies to use. Defaults to the most recent ANTLR 3 release,\n but if you need to use a different version, you can specify the\n dependencies here.\n dfa: Generate a DFA for each decision point.\n imports: The grammar and .tokens files to import. Must be all in the same directory.\n language: The code generation target language. Either C, Cpp, CSharp2, CSharp3,\n JavaScript, Java, ObjC, Python, Python3 or Ruby (case-sensitive).\n message_format: Specify output style for messages.\n nfa: Generate an NFA for each rule.\n dump: Print out the grammar without actions.\n profile: Generate a parser that computes profiling information.\n report: Print out a report about the grammar(s) processed.\n srcs: The grammar files to process.\n trace: Generate a parser with trace output. If the default output is not\n enough, you can override the traceIn and traceOut methods.\n Xgrtree: Print the grammar AST.\n Xdfa: Print DFA as text.\n Xnoprune: Do not test EBNF block exit branches.\n Xnocollapse: Collapse incident edges into DFA states.\n Xdbgconversion: Dump lots of info during NFA conversion.\n Xmultithreaded: Run the analysis in 2 threads.\n Xnomergestopstates: Do not merge stop states.\n Xdfaverbose: Generate DFA states in DOT with NFA configs.\n Xwatchconversion: Print a message for each NFA before converting.\n Xdbgst: Put tags at start/stop of all templates in output.\n Xm: Max number of rule invocations during conversion.\n Xmaxdfaedges: Max "comfortable" number of edges for single DFA state.\n Xminswitchalts: Don\'t generate switch() statements for dfas smaller than given number.\n Xconversiontimeout: Set NFA conversion timeout for each decision.\n Xmaxinlinedfastates: Max DFA states before table used rather than inlining.\n Xnfastates: For nondeterminisms, list NFA states for each path.\n Xsavelexer: Don\'t delete temporary lexers generated from combined grammars.\n\n\nOutputs:\n name.srcjar: The .srcjar with the generated files.\n'
|
class Error(Exception):
"""
Base class for other exceptions
"""
def __init__(self, *args):
if args:
self.message = args[0]
else:
self.message = None
def __str__(self):
return self.message if self.message else " "
class DatabaseError(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class DatabaseIsLocked(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class DatabaseUndefinedTable(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class DatabaseNotFound(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class OSNotSupported(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class BadOS(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class BrowserNotImplemented(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class MacOSKeychainAccessError(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class LinuxSafeStorageError(Error):
def __init__(self, *args):
Error.__init__(self, *args)
|
class Error(Exception):
"""
Base class for other exceptions
"""
def __init__(self, *args):
if args:
self.message = args[0]
else:
self.message = None
def __str__(self):
return self.message if self.message else ' '
class Databaseerror(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class Databaseislocked(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class Databaseundefinedtable(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class Databasenotfound(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class Osnotsupported(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class Bados(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class Browsernotimplemented(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class Macoskeychainaccesserror(Error):
def __init__(self, *args):
Error.__init__(self, *args)
class Linuxsafestorageerror(Error):
def __init__(self, *args):
Error.__init__(self, *args)
|
# Python Program to find Perfect Number using For loop
Number = int(input(" Please Enter any Number: "))
Sum = 0
for i in range(1, Number):
if(Number % i == 0):
Sum = Sum + i
if (Sum == Number):
print(" %d is a Perfect Number" %Number)
else:
print(" %d is not a Perfect Number" %Number)
|
number = int(input(' Please Enter any Number: '))
sum = 0
for i in range(1, Number):
if Number % i == 0:
sum = Sum + i
if Sum == Number:
print(' %d is a Perfect Number' % Number)
else:
print(' %d is not a Perfect Number' % Number)
|
## Copyright (c) 2022, Team FirmWire
## SPDX-License-Identifier: BSD-3-Clause
TASKNAMES_LTE = [
"ERT",
"EMACDL",
"EL2H",
"EL2",
"ERRC",
"EMM",
"EVAL",
"ETC",
"LPP",
"IMC",
"SDM",
"VDM",
"IWLAN",
"WO",
"EL1",
"EL1_MPC",
"MLL1",
"SIMMNGR",
"L1ADT",
"SSDS",
]
TASKNAMES_2G3G = [
"RRLP",
"RATCM",
"MRS",
"URR",
"UL2",
"TL2",
"UL2D",
"TL2D",
"GL1_PCORE",
"RSVA",
"MM",
"CC",
"CISS",
"SMS",
"SIM",
"SIM2",
"L4",
"RR_FDD",
"RR_TDD",
"RSMFDD",
"RSMTDD",
"SNDCP",
"USM",
"LLC",
"ULCS",
"NWSEL",
"MMF_PCORE",
"TRR",
"UL1",
"L1",
"L1_2",
"LAS",
"MRF",
"TL1",
"TL1DATA",
"FTA",
"XTST",
"ATP",
"DDM",
"L1D_MDM",
"LMD",
"CPSW",
"CVAL",
"XRLP",
"CHLP",
"CUIM",
"CSS",
"CHSC",
"EVSLC",
"EVCLC",
"EVRMC",
"EVFCP",
"EVRCP",
"CLEC",
"CSEC",
"CL1TST",
"RR_SMP",
"RR_sMP_TDD",
"SBP",
"IPC_ADAPTER",
"SSIPC",
"SSDIAG",
"SSU",
"CASS",
"SS_STARTUP",
]
TASKNAMES_SRV = [
"NVRAM",
"SRVCCCI",
"DHL",
"DR",
"DRT0",
"DRT1",
"0MDDBG",
"1MDDBG",
"DHL_SPR",
"DHLHD",
"DSMT",
"DSMR",
"STKBRG",
"STKMBUF",
"STKEVTD",
"STKDEMX",
"MDM",
]
TASKNAMES_MIDDLEWARE = [
"VT",
"FT",
"FTC",
"LBS",
"IPCORE",
"NMU",
"DEVCCCI",
"LTECSR",
"DPCOPRO",
"KPALV",
"CMUX",
"AUDIO",
"L1AUDIO_SPH_SRV",
"MED",
"0IDLE",
"1IDLE",
"2IDLE",
"3IDLE",
"AUDL",
"CCISMCORE",
"LHIFCORE",
"CCBCCISM",
"SCPCCISM",
]
TASKNAMES_DEACTIVATED = [
# 2G/3G
"MRF",
# LTE
"ERT",
"EMACDL",
"EL2H",
"EL2",
"EL1",
"EL1_MPC",
"MLL1",
# Middle ware
"AUDIO",
]
ROM_BASE_ADDR = 0x0
|
tasknames_lte = ['ERT', 'EMACDL', 'EL2H', 'EL2', 'ERRC', 'EMM', 'EVAL', 'ETC', 'LPP', 'IMC', 'SDM', 'VDM', 'IWLAN', 'WO', 'EL1', 'EL1_MPC', 'MLL1', 'SIMMNGR', 'L1ADT', 'SSDS']
tasknames_2_g3_g = ['RRLP', 'RATCM', 'MRS', 'URR', 'UL2', 'TL2', 'UL2D', 'TL2D', 'GL1_PCORE', 'RSVA', 'MM', 'CC', 'CISS', 'SMS', 'SIM', 'SIM2', 'L4', 'RR_FDD', 'RR_TDD', 'RSMFDD', 'RSMTDD', 'SNDCP', 'USM', 'LLC', 'ULCS', 'NWSEL', 'MMF_PCORE', 'TRR', 'UL1', 'L1', 'L1_2', 'LAS', 'MRF', 'TL1', 'TL1DATA', 'FTA', 'XTST', 'ATP', 'DDM', 'L1D_MDM', 'LMD', 'CPSW', 'CVAL', 'XRLP', 'CHLP', 'CUIM', 'CSS', 'CHSC', 'EVSLC', 'EVCLC', 'EVRMC', 'EVFCP', 'EVRCP', 'CLEC', 'CSEC', 'CL1TST', 'RR_SMP', 'RR_sMP_TDD', 'SBP', 'IPC_ADAPTER', 'SSIPC', 'SSDIAG', 'SSU', 'CASS', 'SS_STARTUP']
tasknames_srv = ['NVRAM', 'SRVCCCI', 'DHL', 'DR', 'DRT0', 'DRT1', '0MDDBG', '1MDDBG', 'DHL_SPR', 'DHLHD', 'DSMT', 'DSMR', 'STKBRG', 'STKMBUF', 'STKEVTD', 'STKDEMX', 'MDM']
tasknames_middleware = ['VT', 'FT', 'FTC', 'LBS', 'IPCORE', 'NMU', 'DEVCCCI', 'LTECSR', 'DPCOPRO', 'KPALV', 'CMUX', 'AUDIO', 'L1AUDIO_SPH_SRV', 'MED', '0IDLE', '1IDLE', '2IDLE', '3IDLE', 'AUDL', 'CCISMCORE', 'LHIFCORE', 'CCBCCISM', 'SCPCCISM']
tasknames_deactivated = ['MRF', 'ERT', 'EMACDL', 'EL2H', 'EL2', 'EL1', 'EL1_MPC', 'MLL1', 'AUDIO']
rom_base_addr = 0
|
def helper(N):
if (N <= 2):
print ("NO")
return
value = (N * (N + 1)) // 2
if(value%2==1):
print ("NO")
return
s1 = []
s2 = []
if (N%2==0):
shift = True
start = 1
last = N
while (start < last):
if (shift):
s1.append(start)
s1.append(last)
turn = 0
else:
s2.append(start)
s2.append(last)
turn = 1
start += 1
last -= 1
else:
rem = value // 2
vis = [False] * (N + 1)
for i in range (1, N + 1):
vis[i] = False
vis[0] = True
for i in range (N , 0, -1):
if (rem > i):
s1.append(i)
vis[i] = True
rem -= i
else:
s1.append(rem)
vis[rem] = True
break
for i in range (1, N + 1):
if (not vis[i]):
s2.append(i)
s1.sort()
s2.sort()
print("YES")
print (len(s1))
print(s1)
print(len(s2))
print(s2)
n = int(input())
helper(n)
|
def helper(N):
if N <= 2:
print('NO')
return
value = N * (N + 1) // 2
if value % 2 == 1:
print('NO')
return
s1 = []
s2 = []
if N % 2 == 0:
shift = True
start = 1
last = N
while start < last:
if shift:
s1.append(start)
s1.append(last)
turn = 0
else:
s2.append(start)
s2.append(last)
turn = 1
start += 1
last -= 1
else:
rem = value // 2
vis = [False] * (N + 1)
for i in range(1, N + 1):
vis[i] = False
vis[0] = True
for i in range(N, 0, -1):
if rem > i:
s1.append(i)
vis[i] = True
rem -= i
else:
s1.append(rem)
vis[rem] = True
break
for i in range(1, N + 1):
if not vis[i]:
s2.append(i)
s1.sort()
s2.sort()
print('YES')
print(len(s1))
print(s1)
print(len(s2))
print(s2)
n = int(input())
helper(n)
|
ls=[12,3,9,4,1]
a=len(ls)
l=[]
for i in reversed(range(a)):
l.append(ls[i])
print(l)
|
ls = [12, 3, 9, 4, 1]
a = len(ls)
l = []
for i in reversed(range(a)):
l.append(ls[i])
print(l)
|
html = """\
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>$title</title>
<style media="screen">
html {
background-color: #dfdfdf;
color: #333;
}
body {
max-width: 750px;
margin: auto;
}
.content {
border-top: 10px solid rgb(5, 75, 159);
border-bottom: 10px solid rgb(123, 207, 3);
box-shadow: 0px 0px 5px 1px #ccc;
padding: 20px;
background-color: #eee;
}
pre {
padding: 5px;
overflow-x: auto;;
background-color: #b6b6b6;
}
code {
padding: 1px 5px;
border-radius: 2px;
background-color: #b6b6b6;
}
pre code {
padding: 0;
}
/* Pygements bw.css
Credits: https://github.com/richleland/pygments-css */
.highlight code, .highlight pre{color:#fdce93;background-color:#3f3f3f}
.highlight .hll{background-color:#222}
.highlight .c{color:#7f9f7f}
.highlight .err{color:#e37170;background-color:#3d3535}
.highlight .g{color:#7f9f7f}
.highlight .k{color:#f0dfaf}
.highlight .l{color:#ccc}
.highlight .n{color:#dcdccc}
.highlight .o{color:#f0efd0}
.highlight .x{color:#ccc}
.highlight .p{color:#41706f}
.highlight .cm{color:#7f9f7f}
.highlight .cp{color:#7f9f7f}
.highlight .c1{color:#7f9f7f}
.highlight .cs{color:#cd0000;font-weight:bold}
.highlight .gd{color:#cd0000}
.highlight .ge{color:#ccc;font-style:italic}
.highlight .gr{color:red}
.highlight .gh{color:#dcdccc;font-weight:bold}
.highlight .gi{color:#00cd00}
.highlight .go{color:gray}
.highlight .gp{color:#dcdccc;font-weight:bold}
.highlight .gs{color:#ccc;font-weight:bold}
.highlight .gu{color:purple;font-weight:bold}
.highlight .gt{color:#0040D0}
.highlight .kc{color:#dca3a3}
.highlight .kd{color:#ffff86}
.highlight .kn{color:#dfaf8f;font-weight:bold}
.highlight .kp{color:#cdcf99}
.highlight .kr{color:#cdcd00}
.highlight .kt{color:#00cd00}
.highlight .ld{color:#cc9393}
.highlight .m{color:#8cd0d3}
.highlight .s{color:#cc9393}
.highlight .na{color:#9ac39f}
.highlight .nb{color:#efef8f}
.highlight .nc{color:#efef8f}
.highlight .no{color:#ccc}
.highlight .nd{color:#ccc}
.highlight .ni{color:#c28182}
.highlight .ne{color:#c3bf9f;font-weight:bold}
.highlight .nf{color:#efef8f}
.highlight .nl{color:#ccc}
.highlight .nn{color:#8fbede}
.highlight .nx{color:#ccc}
.highlight .py{color:#ccc}
.highlight .nt{color:#9ac39f}
.highlight .nv{color:#dcdccc}
.highlight .ow{color:#f0efd0}
.highlight .w{color:#ccc}
.highlight .mf{color:#8cd0d3}
.highlight .mh{color:#8cd0d3}
.highlight .mi{color:#8cd0d3}
.highlight .mo{color:#8cd0d3}
.highlight .sb{color:#cc9393}
.highlight .sc{color:#cc9393}
.highlight .sd{color:#cc9393}
.highlight .s2{color:#cc9393}
.highlight .se{color:#cc9393}
.highlight .sh{color:#cc9393}
.highlight .si{color:#cc9393}
.highlight .sx{color:#cc9393}
.highlight .sr{color:#cc9393}
.highlight .s1{color:#cc9393}
.highlight .ss{color:#cc9393}
.highlight .bp{color:#efef8f}
.highlight .vc{color:#efef8f}
.highlight .vg{color:#dcdccc}
.highlight .vi{color:#ffffc7}
.highlight .il{color:#8cd0d3}
</style>
</head>
<body>
<div class="content">
$content
</div>
</body>
</html>
"""
|
html = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset="utf-8">\n <title>$title</title>\n <style media="screen">\n html {\n background-color: #dfdfdf;\n color: #333;\n }\n body {\n max-width: 750px;\n margin: auto;\n }\n .content {\n border-top: 10px solid rgb(5, 75, 159);\n border-bottom: 10px solid rgb(123, 207, 3);\n box-shadow: 0px 0px 5px 1px #ccc;\n padding: 20px;\n background-color: #eee;\n }\n pre {\n padding: 5px;\n overflow-x: auto;;\n background-color: #b6b6b6;\n }\n\n code {\n padding: 1px 5px;\n border-radius: 2px;\n background-color: #b6b6b6;\n }\n\n pre code {\n padding: 0;\n }\n\n /* Pygements bw.css\n Credits: https://github.com/richleland/pygments-css */\n .highlight code, .highlight pre{color:#fdce93;background-color:#3f3f3f}\n .highlight .hll{background-color:#222}\n .highlight .c{color:#7f9f7f}\n .highlight .err{color:#e37170;background-color:#3d3535}\n .highlight .g{color:#7f9f7f}\n .highlight .k{color:#f0dfaf}\n .highlight .l{color:#ccc}\n .highlight .n{color:#dcdccc}\n .highlight .o{color:#f0efd0}\n .highlight .x{color:#ccc}\n .highlight .p{color:#41706f}\n .highlight .cm{color:#7f9f7f}\n .highlight .cp{color:#7f9f7f}\n .highlight .c1{color:#7f9f7f}\n .highlight .cs{color:#cd0000;font-weight:bold}\n .highlight .gd{color:#cd0000}\n .highlight .ge{color:#ccc;font-style:italic}\n .highlight .gr{color:red}\n .highlight .gh{color:#dcdccc;font-weight:bold}\n .highlight .gi{color:#00cd00}\n .highlight .go{color:gray}\n .highlight .gp{color:#dcdccc;font-weight:bold}\n .highlight .gs{color:#ccc;font-weight:bold}\n .highlight .gu{color:purple;font-weight:bold}\n .highlight .gt{color:#0040D0}\n .highlight .kc{color:#dca3a3}\n .highlight .kd{color:#ffff86}\n .highlight .kn{color:#dfaf8f;font-weight:bold}\n .highlight .kp{color:#cdcf99}\n .highlight .kr{color:#cdcd00}\n .highlight .kt{color:#00cd00}\n .highlight .ld{color:#cc9393}\n .highlight .m{color:#8cd0d3}\n .highlight .s{color:#cc9393}\n .highlight .na{color:#9ac39f}\n .highlight .nb{color:#efef8f}\n .highlight .nc{color:#efef8f}\n .highlight .no{color:#ccc}\n .highlight .nd{color:#ccc}\n .highlight .ni{color:#c28182}\n .highlight .ne{color:#c3bf9f;font-weight:bold}\n .highlight .nf{color:#efef8f}\n .highlight .nl{color:#ccc}\n .highlight .nn{color:#8fbede}\n .highlight .nx{color:#ccc}\n .highlight .py{color:#ccc}\n .highlight .nt{color:#9ac39f}\n .highlight .nv{color:#dcdccc}\n .highlight .ow{color:#f0efd0}\n .highlight .w{color:#ccc}\n .highlight .mf{color:#8cd0d3}\n .highlight .mh{color:#8cd0d3}\n .highlight .mi{color:#8cd0d3}\n .highlight .mo{color:#8cd0d3}\n .highlight .sb{color:#cc9393}\n .highlight .sc{color:#cc9393}\n .highlight .sd{color:#cc9393}\n .highlight .s2{color:#cc9393}\n .highlight .se{color:#cc9393}\n .highlight .sh{color:#cc9393}\n .highlight .si{color:#cc9393}\n .highlight .sx{color:#cc9393}\n .highlight .sr{color:#cc9393}\n .highlight .s1{color:#cc9393}\n .highlight .ss{color:#cc9393}\n .highlight .bp{color:#efef8f}\n .highlight .vc{color:#efef8f}\n .highlight .vg{color:#dcdccc}\n .highlight .vi{color:#ffffc7}\n .highlight .il{color:#8cd0d3}\n </style>\n </head>\n <body>\n <div class="content">\n $content\n </div>\n </body>\n</html>\n'
|
def test_alert_message(alert_message):
"""Use this for check message in different cases:Incorrectly username/password, only username, only password by
parameters """
print(alert_message)
assert 'No match for Username and/or Password.' in alert_message
|
def test_alert_message(alert_message):
"""Use this for check message in different cases:Incorrectly username/password, only username, only password by
parameters """
print(alert_message)
assert 'No match for Username and/or Password.' in alert_message
|
class Solution(object):
def maxArea(self, height):
"""
:type height: List[int]
:rtype: int
"""
n = len(height)
d = [0] * n
for i in range(n):
d[i] = height[i]
for i in range(1, n):
avg = d[i-1] / (i * 1.0)
if height[i] >= avg:
d[i] = max(d[i], d[i-1], d[i-1] + avg)
else:
d[i] = max(d[i], d[i-1], height[i] * (1 + d[i-1]/(avg *1.0)))
for j in range(n):
print('d[%d]:%d' % (j, d[j]))
return d[n-1]
sol = Solution()
height = [10, 8, 0, 7, 7, 9, 9]
ret = sol.maxArea(height)
print('ret: %d' % ret)
|
class Solution(object):
def max_area(self, height):
"""
:type height: List[int]
:rtype: int
"""
n = len(height)
d = [0] * n
for i in range(n):
d[i] = height[i]
for i in range(1, n):
avg = d[i - 1] / (i * 1.0)
if height[i] >= avg:
d[i] = max(d[i], d[i - 1], d[i - 1] + avg)
else:
d[i] = max(d[i], d[i - 1], height[i] * (1 + d[i - 1] / (avg * 1.0)))
for j in range(n):
print('d[%d]:%d' % (j, d[j]))
return d[n - 1]
sol = solution()
height = [10, 8, 0, 7, 7, 9, 9]
ret = sol.maxArea(height)
print('ret: %d' % ret)
|
"""
Function to retrieve location of a key in nested data structure
"""
def locate_element(data, look_up_elem):
'''
Function to locate the exact location of a an element in a data structure
'''
data_orig = data
loc_list = []
#### Step 1: Create loop: while look_up_elem not in loc_list
while look_up_elem not in loc_list:
data = data_orig
if loc_list != []:
for location in loc_list:
data = data[location]
#### Step 2: Create loop for each element in data.
# This element needs to be appended to loc_list if element is
# found in (sub-levels of) this element
# Combine step 4 and 5 in one function.
# Function is to flatten the data and check if look_up_elem is present in data.
# If element is found, return loc_list
def check_branche(data):
#### Step 2: Check if look_up_element is present on 1st level of data
if look_up_elem in data:
loc_list.append(look_up_elem)
return loc_list
#### Step 3: If element not present on 1st level, filter out strings and integers from data.
# Method is different for different data types
# Note: data_tuple = () (will be problematic, as you cannot append elements to a tuple).
# We may be able to add items from tuple to list as tuple is also a Sequence
# Define data_elements
if isinstance(data, dict):
data_elements = list(data.keys())
elif isinstance(data, list):
data_elements = list(range(len(data)))
# elif type(data)==tuple:
# data_elements = list(range(len(data)))
else:
return "Element not present"
for element in data_elements:
data_to_check = data[element]
# Define data_dict, data_list and data_tuple
if isinstance(data_to_check, dict):
data_dict = data_to_check
data_list = []
data_tuple = ()
elif isinstance(data_to_check, list):
data_dict = {}
data_list = data_to_check
data_tuple = ()
elif isinstance(data_to_check, tuple):
data_dict = {}
data_list = []
data_tuple = data_to_check
elif not isinstance(data_to_check, dict) and not isinstance(data_to_check, list) \
and not isinstance(data_to_check, tuple):
continue
else:
return "Error"
#### Step 5: Enter while loop (is within the for loop of step 4).
# From the filtered data obtained in step 3, divide the different elements into its data type
# Then, flatten type(data) data type first and then the other two data types
# When look_up_elem is found, append element to loc_list and return loc_list
while data_dict != {} or data_list != [] or data_tuple != ():
# Flatten dictionary and check if element is present on any of the levels and
# add list elements to data_list
# After first round, if any elements were added to data_dict,
# go through these added elements
while data_dict != {}:
if look_up_elem in data_dict:
loc_list.append(element)
return
data_dict_temp = {}
# Filter the elements in data_dict
for key, value in iter(data_dict.items()):
if isinstance(value, dict):
data_dict_temp.update(value)
elif isinstance(value, list):
data_list.append(value)
# elif isinstance(value, tuple):
# test_tuple
# to check if tuple is also a sequence, can also use chain(element) for this
else:
continue
data_dict = data_dict_temp
# After data_dict is (temporarily) exhausted, go through data_list
while data_list != []:
if look_up_elem in data_list:
loc_list.append(element)
return loc_list
data_list_temp = []
# Filter the elements in data_dict
for item in data_list:
if isinstance(item, dict):
data_dict.update(item)
elif isinstance(item, list):
for idx in item:
data_list_temp.append(idx)
else:
continue
data_list = data_list_temp
# After data_list is (temporarily) exhausted, go through data_tuple
# while data_tuple !=():
# Flatten tuple, check if element is present on any of the levels and add dictionary
# and list elements to data_dict or data_list
# pass
if look_up_elem not in loc_list:
return "Element not Found"
check_branche(data)
return loc_list
|
"""
Function to retrieve location of a key in nested data structure
"""
def locate_element(data, look_up_elem):
"""
Function to locate the exact location of a an element in a data structure
"""
data_orig = data
loc_list = []
while look_up_elem not in loc_list:
data = data_orig
if loc_list != []:
for location in loc_list:
data = data[location]
def check_branche(data):
if look_up_elem in data:
loc_list.append(look_up_elem)
return loc_list
if isinstance(data, dict):
data_elements = list(data.keys())
elif isinstance(data, list):
data_elements = list(range(len(data)))
else:
return 'Element not present'
for element in data_elements:
data_to_check = data[element]
if isinstance(data_to_check, dict):
data_dict = data_to_check
data_list = []
data_tuple = ()
elif isinstance(data_to_check, list):
data_dict = {}
data_list = data_to_check
data_tuple = ()
elif isinstance(data_to_check, tuple):
data_dict = {}
data_list = []
data_tuple = data_to_check
elif not isinstance(data_to_check, dict) and (not isinstance(data_to_check, list)) and (not isinstance(data_to_check, tuple)):
continue
else:
return 'Error'
while data_dict != {} or data_list != [] or data_tuple != ():
while data_dict != {}:
if look_up_elem in data_dict:
loc_list.append(element)
return
data_dict_temp = {}
for (key, value) in iter(data_dict.items()):
if isinstance(value, dict):
data_dict_temp.update(value)
elif isinstance(value, list):
data_list.append(value)
else:
continue
data_dict = data_dict_temp
while data_list != []:
if look_up_elem in data_list:
loc_list.append(element)
return loc_list
data_list_temp = []
for item in data_list:
if isinstance(item, dict):
data_dict.update(item)
elif isinstance(item, list):
for idx in item:
data_list_temp.append(idx)
else:
continue
data_list = data_list_temp
if look_up_elem not in loc_list:
return 'Element not Found'
check_branche(data)
return loc_list
|
#default
def printx(name,age):
print(name)
print(age)
return;
printx(name='miki',age=96)
#keyword
def printm(str):
print(str)
return;
printm(str='sandy')
#required
def printme(str):
print(str)
return;
printme()
|
def printx(name, age):
print(name)
print(age)
return
printx(name='miki', age=96)
def printm(str):
print(str)
return
printm(str='sandy')
def printme(str):
print(str)
return
printme()
|
# Add Bold Tag in String
# Given a string s and a list of strings words, you need to add a closed pair of bold tag
# <b> and </b> to wrap the substrings in s that exist in dict.
# If two such substrings overlap, you need to wrap them together by only one pair of closed bold tag.
# Also, if two substrings wrapped by bold tags are consecutive, you need to combine them.
# Example:
# s = "aaabbcc"
# words = ["aaa","aab","bc"]
# => "<b>aaabbc</b>c"
# assume words won't contain duplicates
class Solution(object):
def addBoldTag(self, s, words):
"""
:type s: str
:type words: List[str]
:rtype: str
"""
bold = [False] * len(s)
# index can't jump or skip since there is overlappign words
right = -1 # last index so far of the char that should be bold
for i in range(len(s)):
for word in words:
if s.startswith(word, i):
right = max(right, i + len(word) - 1)
bold[i] = i <= right
res = []
for i in range(len(s)):
if bold[i]:
if i == 0 or not bold[i-1]:
res.append('<b>')
res.append(s[i])
if i == len(s) - 1 or not bold[i+1]:
res.append('</b>')
else:
res.append(s[i])
return ''.join(res)
# note: words can be matched for multiple times
# O(n * c) time, O(n) space, with n being length of s, c being total chars in words
|
class Solution(object):
def add_bold_tag(self, s, words):
"""
:type s: str
:type words: List[str]
:rtype: str
"""
bold = [False] * len(s)
right = -1
for i in range(len(s)):
for word in words:
if s.startswith(word, i):
right = max(right, i + len(word) - 1)
bold[i] = i <= right
res = []
for i in range(len(s)):
if bold[i]:
if i == 0 or not bold[i - 1]:
res.append('<b>')
res.append(s[i])
if i == len(s) - 1 or not bold[i + 1]:
res.append('</b>')
else:
res.append(s[i])
return ''.join(res)
|
# Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( arr , n , k ) :
count = 0
for i in range ( 0 , n ) :
if ( arr [ i ] <= k ) :
count = count + 1
bad = 0
for i in range ( 0 , count ) :
if ( arr [ i ] > k ) :
bad = bad + 1
ans = bad
j = count
for i in range ( 0 , n ) :
if ( j == n ) :
break
if ( arr [ i ] > k ) :
bad = bad - 1
if ( arr [ j ] > k ) :
bad = bad + 1
ans = min ( ans , bad )
j = j + 1
return ans
#TOFILL
if __name__ == '__main__':
param = [
([7, 12, 15, 30, 33, 34, 53, 66, 73, 74, 76, 77, 85, 90],9,8,),
([-62, -20, -26, -24, 92, 66, -74, -4, 18, -82, -36, 92, -4, 92, -80, 56, -24, 4, -48, -10, -14, -46, -16, -58, -58, -6, -68, -22, -82, -16, 76, -30, -86, -38, -66, 28, 58, 30, -44, -56],24,28,),
([0, 0, 0, 0, 0, 1, 1],5,6,),
([8, 48, 64, 77, 61, 60, 96, 95, 41, 68, 9, 67, 10, 66, 16, 59, 83, 21, 47, 16, 13, 85, 52, 11, 48, 31, 99, 57, 57, 44, 66, 93, 80, 69, 23, 2, 55, 90],36,24,),
([-80, -58, -40, -34, 14, 36, 48, 56, 58, 60, 84, 90, 92, 92],7,8,),
([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1],26,23,),
([4, 4, 8, 9, 13, 17, 18, 19, 21, 22, 22, 23, 27, 28, 30, 44, 46, 48, 53, 53, 55, 60, 61, 62, 68, 70, 70, 71, 73, 80, 82, 82, 85, 88, 90, 93, 99],28,36,),
([-28, 50, 82, -32, 32, -78, 12, 50, 38, 34, -10, 6, 86, -56, -2],13,9,),
([0, 0, 0, 0, 1, 1, 1, 1, 1, 1],9,8,),
([37, 88, 83, 91, 11, 39, 98, 70, 93, 74, 24, 90, 66, 3, 6, 28],12,12,)
]
n_success = 0
for i, parameters_set in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success+=1
print("#Results: %i, %i" % (n_success, len(param)))
|
def f_gold(arr, n, k):
count = 0
for i in range(0, n):
if arr[i] <= k:
count = count + 1
bad = 0
for i in range(0, count):
if arr[i] > k:
bad = bad + 1
ans = bad
j = count
for i in range(0, n):
if j == n:
break
if arr[i] > k:
bad = bad - 1
if arr[j] > k:
bad = bad + 1
ans = min(ans, bad)
j = j + 1
return ans
if __name__ == '__main__':
param = [([7, 12, 15, 30, 33, 34, 53, 66, 73, 74, 76, 77, 85, 90], 9, 8), ([-62, -20, -26, -24, 92, 66, -74, -4, 18, -82, -36, 92, -4, 92, -80, 56, -24, 4, -48, -10, -14, -46, -16, -58, -58, -6, -68, -22, -82, -16, 76, -30, -86, -38, -66, 28, 58, 30, -44, -56], 24, 28), ([0, 0, 0, 0, 0, 1, 1], 5, 6), ([8, 48, 64, 77, 61, 60, 96, 95, 41, 68, 9, 67, 10, 66, 16, 59, 83, 21, 47, 16, 13, 85, 52, 11, 48, 31, 99, 57, 57, 44, 66, 93, 80, 69, 23, 2, 55, 90], 36, 24), ([-80, -58, -40, -34, 14, 36, 48, 56, 58, 60, 84, 90, 92, 92], 7, 8), ([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1], 26, 23), ([4, 4, 8, 9, 13, 17, 18, 19, 21, 22, 22, 23, 27, 28, 30, 44, 46, 48, 53, 53, 55, 60, 61, 62, 68, 70, 70, 71, 73, 80, 82, 82, 85, 88, 90, 93, 99], 28, 36), ([-28, 50, 82, -32, 32, -78, 12, 50, 38, 34, -10, 6, 86, -56, -2], 13, 9), ([0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 9, 8), ([37, 88, 83, 91, 11, 39, 98, 70, 93, 74, 24, 90, 66, 3, 6, 28], 12, 12)]
n_success = 0
for (i, parameters_set) in enumerate(param):
if f_filled(*parameters_set) == f_gold(*parameters_set):
n_success += 1
print('#Results: %i, %i' % (n_success, len(param)))
|
def is_leap(year):
leap = False
if year%400==0:
return True
if year%4==0 and year%100!=0:
return True
return leap
year = int(input())
print(is_leap(year))
|
def is_leap(year):
leap = False
if year % 400 == 0:
return True
if year % 4 == 0 and year % 100 != 0:
return True
return leap
year = int(input())
print(is_leap(year))
|
"""
'The module for first_inside_quotes'
Arthur Wayne asw263
September 22 2020
"""
def first_inside_quotes(s):
"""
Returns the first substring of s between two (double) quotes
A quote character is one that is inside a string, not one that
delimits it. We typically use single quotes (') to delimit a
string if want to use a double quote character (") inside of it.
Examples:
first_inside_quotes('A "B C" D') returns 'B C'
first_inside_quotes('A "B C" D "E F" G') also returns 'B C',
because it only picks the first such substring
Parameter s: a string to search
Precondition: s is a string containing at least two double quotes
"""
start = s.index('"')+1
end = s.index('"',start)
insidequotes = s[start:end]
return insidequotes
|
"""
'The module for first_inside_quotes'
Arthur Wayne asw263
September 22 2020
"""
def first_inside_quotes(s):
"""
Returns the first substring of s between two (double) quotes
A quote character is one that is inside a string, not one that
delimits it. We typically use single quotes (') to delimit a
string if want to use a double quote character (") inside of it.
Examples:
first_inside_quotes('A "B C" D') returns 'B C'
first_inside_quotes('A "B C" D "E F" G') also returns 'B C',
because it only picks the first such substring
Parameter s: a string to search
Precondition: s is a string containing at least two double quotes
"""
start = s.index('"') + 1
end = s.index('"', start)
insidequotes = s[start:end]
return insidequotes
|
"""
A linked list is given such that each node contains an additional random pointer
which could point to any node in the list or null.
Return a deep copy of the list.
"""
# Definition for singly-linked list with a random pointer.
# class RandomListNode(object):
# def __init__(self, x):
# self.label = x
# self.next = None
# self.random = None
class Solution(object):
def copyRandomList(self, head):
"""
:type head: RandomListNode
:rtype: RandomListNode
"""
if head is None:
return head
curr = head
while curr:
p = curr.next
curr.next = RandomListNode(curr.label)
curr.next.next = p
curr = p
curr = head
while curr:
if curr.random:
curr.next.random = curr.random.next
else:
curr.next.random = None
curr = curr.next.next
newhead = RandomListNode(0)
newhead.next = head.next
curr = head
while curr:
p = curr.next.next
if p:
curr.next.next = p.next
else:
curr.next.next = None
curr.next = p
curr = p
return newhead.next
"""
Solved with the help of hash dictionary
def copyRandomList(self, head):
if head is None:
return head
table = {}
table[None] = None
curr = head
while curr:
table[curr] = RandomListNode(curr.label)
curr = curr.next
newhead = table[head]
curr = head
while curr:
table[curr].next = table[curr.next]
table[curr].random = table[curr.random]
curr = curr.next
return newhead
"""
|
"""
A linked list is given such that each node contains an additional random pointer
which could point to any node in the list or null.
Return a deep copy of the list.
"""
class Solution(object):
def copy_random_list(self, head):
"""
:type head: RandomListNode
:rtype: RandomListNode
"""
if head is None:
return head
curr = head
while curr:
p = curr.next
curr.next = random_list_node(curr.label)
curr.next.next = p
curr = p
curr = head
while curr:
if curr.random:
curr.next.random = curr.random.next
else:
curr.next.random = None
curr = curr.next.next
newhead = random_list_node(0)
newhead.next = head.next
curr = head
while curr:
p = curr.next.next
if p:
curr.next.next = p.next
else:
curr.next.next = None
curr.next = p
curr = p
return newhead.next
'\nSolved with the help of hash dictionary\n def copyRandomList(self, head):\n if head is None:\n return head\n table = {}\n table[None] = None\n curr = head\n while curr:\n table[curr] = RandomListNode(curr.label)\n curr = curr.next\n newhead = table[head]\n curr = head\n while curr:\n table[curr].next = table[curr.next]\n table[curr].random = table[curr.random]\n curr = curr.next\n return newhead\n'
|
with open("inp1.txt") as file:
data = file.read()
depths = [int(line) for line in data.splitlines()]
depth_inc_cnt = 0
for i in range(1, len(depths)):
if depths[i] > depths[i - 1]:
depth_inc_cnt += 1
print(f"Part 1: {depth_inc_cnt}")
assert depth_inc_cnt == 1832
depth_windowed_inc_cnt = 0
for i in range(1, len(depths) - 2):
if sum(depths[i: i + 3]) > sum(depths[i - 1: i + 2]):
depth_windowed_inc_cnt += 1
print(f"Part 2: {depth_windowed_inc_cnt}")
assert depth_windowed_inc_cnt == 1858
|
with open('inp1.txt') as file:
data = file.read()
depths = [int(line) for line in data.splitlines()]
depth_inc_cnt = 0
for i in range(1, len(depths)):
if depths[i] > depths[i - 1]:
depth_inc_cnt += 1
print(f'Part 1: {depth_inc_cnt}')
assert depth_inc_cnt == 1832
depth_windowed_inc_cnt = 0
for i in range(1, len(depths) - 2):
if sum(depths[i:i + 3]) > sum(depths[i - 1:i + 2]):
depth_windowed_inc_cnt += 1
print(f'Part 2: {depth_windowed_inc_cnt}')
assert depth_windowed_inc_cnt == 1858
|
class ListNode:
def __init__ (self, val, next = None):
self.val = val
self.next = next
class Solution:
def swapPairs(self, head):
dummy = ListNode(0)
curr = dummy
dummy.next = head
while curr.next and curr.next.next:
tmp = curr.next
tmp2 = curr.next.next
tmp3 = curr.next.next.next
curr.next = tmp2
tmp2.next = tmp
tmp.next = tmp3
curr = tmp
return dummy.next
if __name__ == "__main__":
l1 = ListNode(1)
l2 = ListNode(2)
l3 = ListNode(3)
l4 = ListNode(4)
l1.next = l2
l2.next = l3
l3.next = l4
s = Solution()
s.swapPairs(l1)
|
class Listnode:
def __init__(self, val, next=None):
self.val = val
self.next = next
class Solution:
def swap_pairs(self, head):
dummy = list_node(0)
curr = dummy
dummy.next = head
while curr.next and curr.next.next:
tmp = curr.next
tmp2 = curr.next.next
tmp3 = curr.next.next.next
curr.next = tmp2
tmp2.next = tmp
tmp.next = tmp3
curr = tmp
return dummy.next
if __name__ == '__main__':
l1 = list_node(1)
l2 = list_node(2)
l3 = list_node(3)
l4 = list_node(4)
l1.next = l2
l2.next = l3
l3.next = l4
s = solution()
s.swapPairs(l1)
|
# UVa 11450 - Wedding Shopping - Bottom Up (faster than Top Down)
def main():
TC = int(input())
for tc in range(TC):
MAX_gm = 30 # 20 garments at most and 20 models per garment at most
MAX_M = 210 # maximum budget is 200
price = [[-1 for i in range(MAX_gm)] for j in range(MAX_gm)] # price[g (<= 20)][model (<= 20)]
#reachable = [[False for i in range(MAX_M)] for j in range(MAX_gm)] # reachable table[g (<= 20)][money (<= 200)]
# if using space saving technique
reachable = [[False for i in range(MAX_M)] for j in range(2)] # reachable table[ONLY TWO ROWS][money (<= 200)]
M, C = [int(x) for x in input().split(" ")]
for g in range(C):
s = [int(x) for x in input().split(" ")]
price[g][0] = s[0] # store number of models in price[g][0]
for k in range(1, price[g][0]+1):
price[g][k] = s[k]
# initial values (base cases), using first garment g = 0
for k in range(1, price[0][0]+1):
if (M-price[0][k] >= 0):
reachable[0][M-price[0][k]] = True
# for g in range(1, C): # for each remaining garment
# for money in range(0, M):
# if (reachable[g-1][money]):
# for k in range(1, price[g][0]+1):
# if (money-price[g][k] >= 0):
# reachable[g][money-price[g][k]] = True # also reachable now
# money = 0
# while (money <= M and not reachable[C-1][money]):
# money += 1
# then we modify the main loop in main a bit
cur = 1 # we start with this row
for g in range(1, C): # for each remaining garment
reachable[cur] = [False for i in range(MAX_M)] # reset row
for money in range(0, M):
if (reachable[1-cur][money]):
for k in range(1, price[g][0]+1):
if (money-price[g][k] >= 0):
reachable[cur][money-price[g][k]] = True
cur = 1-cur # IMPORTANT technique: flip the two rows
money = 0
while (money <= M and not reachable[1-cur][money]):
money += 1
if (money == M+1):
print("no solution")
else:
print(str(M-money))
main()
|
def main():
tc = int(input())
for tc in range(TC):
max_gm = 30
max_m = 210
price = [[-1 for i in range(MAX_gm)] for j in range(MAX_gm)]
reachable = [[False for i in range(MAX_M)] for j in range(2)]
(m, c) = [int(x) for x in input().split(' ')]
for g in range(C):
s = [int(x) for x in input().split(' ')]
price[g][0] = s[0]
for k in range(1, price[g][0] + 1):
price[g][k] = s[k]
for k in range(1, price[0][0] + 1):
if M - price[0][k] >= 0:
reachable[0][M - price[0][k]] = True
cur = 1
for g in range(1, C):
reachable[cur] = [False for i in range(MAX_M)]
for money in range(0, M):
if reachable[1 - cur][money]:
for k in range(1, price[g][0] + 1):
if money - price[g][k] >= 0:
reachable[cur][money - price[g][k]] = True
cur = 1 - cur
money = 0
while money <= M and (not reachable[1 - cur][money]):
money += 1
if money == M + 1:
print('no solution')
else:
print(str(M - money))
main()
|
LOVE = 'this'
def lover():
"""
docstring
"""
print(LOVE)
def print_nothing():
"""
printing nothing
"""
print('nothing')
def print_nothings():
"""
printing nothings
"""
print('nothings')
class All():
"""
Some doc right here
"""
def __init__(self):
"""
Doctst
"""
self.hell = 'ok'
def alpha(self):
"""
Some doc right here
"""
print(self.hell)
def alphax(self):
"""
Some doc right heres
"""
print(self.hell)
|
love = 'this'
def lover():
"""
docstring
"""
print(LOVE)
def print_nothing():
"""
printing nothing
"""
print('nothing')
def print_nothings():
"""
printing nothings
"""
print('nothings')
class All:
"""
Some doc right here
"""
def __init__(self):
"""
Doctst
"""
self.hell = 'ok'
def alpha(self):
"""
Some doc right here
"""
print(self.hell)
def alphax(self):
"""
Some doc right heres
"""
print(self.hell)
|
price_list = { 1 : 4.0, 2 : 4.5, 3 : 5.0, 4 : 2.0, 5 : 1.5}
values = input()
product_code, price_product = [int(value) for value in values.split(' ')]
print('Total: R$ {:.2f}'.format(price_list[product_code] * price_product))
|
price_list = {1: 4.0, 2: 4.5, 3: 5.0, 4: 2.0, 5: 1.5}
values = input()
(product_code, price_product) = [int(value) for value in values.split(' ')]
print('Total: R$ {:.2f}'.format(price_list[product_code] * price_product))
|
# try out the Python stack functions
# TODO: create a new empty stack
stack = []
# TODO: push items onto the stack
stack.append(1)
stack.append(2)
stack.append(3)
stack.append(4)
# TODO: print the stack contents
print(stack)
#TODO: pop an item off the stack
x = stack.pop()
print(x)
print(stack)
|
stack = []
stack.append(1)
stack.append(2)
stack.append(3)
stack.append(4)
print(stack)
x = stack.pop()
print(x)
print(stack)
|
class Sword():
def __init__(self, name, damage):
self.damage = damage
self.name = name
@staticmethod
def showAbilities():
print("Swords can only attack orcs and elves, and do zero damage agains magic armour.")
Sword.showAbilities()
|
class Sword:
def __init__(self, name, damage):
self.damage = damage
self.name = name
@staticmethod
def show_abilities():
print('Swords can only attack orcs and elves, and do zero damage agains magic armour.')
Sword.showAbilities()
|
class EdsError(Exception):
"""EDS base exception."""
class DuplicateIncludeError(Exception):
"""Raised when a duplicate include occurs."""
class PluginNameNotFoundError(EdsError):
"""Raised when a specific plugin is not found."""
class PluginNameMismatchError(EdsError):
"""Raised when a plugin name does not match the 'plugin_name' attribute of the object."""
class UnknownPluginIntefaceError(EdsError):
"""Raised when a plugin group or interface is unknown."""
class PluginInterfaceNotImplementedError(EdsError):
"""Raised when a plugin does not implement the expected interface."""
class DuplicatePluginError(EdsError):
"""Raised when a specific name has multiple plugins."""
class NoPluginsFoundError(EdsError):
"""Raised when no template plugins are found."""
class PluginNoNameAttributeError(EdsError):
"""Raised when a plugin has no 'plugin_name' attribute."""
|
class Edserror(Exception):
"""EDS base exception."""
class Duplicateincludeerror(Exception):
"""Raised when a duplicate include occurs."""
class Pluginnamenotfounderror(EdsError):
"""Raised when a specific plugin is not found."""
class Pluginnamemismatcherror(EdsError):
"""Raised when a plugin name does not match the 'plugin_name' attribute of the object."""
class Unknownpluginintefaceerror(EdsError):
"""Raised when a plugin group or interface is unknown."""
class Plugininterfacenotimplementederror(EdsError):
"""Raised when a plugin does not implement the expected interface."""
class Duplicatepluginerror(EdsError):
"""Raised when a specific name has multiple plugins."""
class Nopluginsfounderror(EdsError):
"""Raised when no template plugins are found."""
class Pluginnonameattributeerror(EdsError):
"""Raised when a plugin has no 'plugin_name' attribute."""
|
''' instantiating a class
The process of creating a an object from a class.
'''
|
""" instantiating a class
The process of creating a an object from a class.
"""
|
#
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
#
# SPDX-License-Identifier: Apache-2.0
#
SOC_IRAM_LOW = 0x4037c000
SOC_IRAM_HIGH = 0x403e0000
SOC_DRAM_LOW = 0x3fc80000
SOC_DRAM_HIGH = 0x3fce0000
SOC_RTC_DRAM_LOW = 0x50000000
SOC_RTC_DRAM_HIGH = 0x50002000
SOC_RTC_DATA_LOW = 0x50000000
SOC_RTC_DATA_HIGH = 0x50002000
|
soc_iram_low = 1077395456
soc_iram_high = 1077805056
soc_dram_low = 1070071808
soc_dram_high = 1070465024
soc_rtc_dram_low = 1342177280
soc_rtc_dram_high = 1342185472
soc_rtc_data_low = 1342177280
soc_rtc_data_high = 1342185472
|
# greaseweazle/image/hfe.py
#
# Written & released by Keir Fraser <keir.xen@gmail.com>
#
# This is free and unencumbered software released into the public domain.
# See the file COPYING for more details, or visit <http://unlicense.org>.
class HFE:
def __init__(self, start_cyl, nr_sides):
self.start_cyl = start_cyl
self.nr_sides = nr_sides
self.nr_revs = None
self.track_list = []
@classmethod
def from_file(cls, dat):
hfe = cls(0, 2)
return hfe
def get_track(self, cyl, side, writeout=False):
return None
def append_track(self, flux):
pass
def get_image(self):
return bytes()
# Local variables:
# python-indent: 4
# End:
|
class Hfe:
def __init__(self, start_cyl, nr_sides):
self.start_cyl = start_cyl
self.nr_sides = nr_sides
self.nr_revs = None
self.track_list = []
@classmethod
def from_file(cls, dat):
hfe = cls(0, 2)
return hfe
def get_track(self, cyl, side, writeout=False):
return None
def append_track(self, flux):
pass
def get_image(self):
return bytes()
|
# ------------------------------------------------------------------------------
# Access to the CodeHawk Binary Analyzer Analysis Results
# Author: Henny Sipma
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2016-2020 Kestrel Technology LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
class JumpTable(object):
def __init__(self,app,x):
self.app = app
self.x = x
self.base = self.x.get('start')
self.tgts = [ n.get('a') for n in self.x.findall('tgt') ]
def get_targets(self): return self.tgts
def __str__(self):
lines = []
lines.append('base: ' + str(self.base))
for t in self.tgts:
lines.append(' ' + str(t))
return '\n'.join(lines)
|
class Jumptable(object):
def __init__(self, app, x):
self.app = app
self.x = x
self.base = self.x.get('start')
self.tgts = [n.get('a') for n in self.x.findall('tgt')]
def get_targets(self):
return self.tgts
def __str__(self):
lines = []
lines.append('base: ' + str(self.base))
for t in self.tgts:
lines.append(' ' + str(t))
return '\n'.join(lines)
|
# @desc By Anay '24
def check_age(age):
if age < 21:
return age
return age + 5
def main():
print(check_age(5))
print(check_age(29))
print(check_age(42))
print(check_age(15))
print(check_age(0.38))
print(check_age(21))
if __name__ == '__main__':
main()
|
def check_age(age):
if age < 21:
return age
return age + 5
def main():
print(check_age(5))
print(check_age(29))
print(check_age(42))
print(check_age(15))
print(check_age(0.38))
print(check_age(21))
if __name__ == '__main__':
main()
|
# https://projecteuler.net/problem=91
# Fast enough
"""
Note that:
OP^2 = X_P^2 + Y_P^2
OQ^2 = X_Q^2 + Y_Q^2
PQ^2 = (X_P - X_Q)^2 + (Y_P - Y_Q)^2
There are 3 cases:
1. OP^2 + OQ^2 = PQ^2
-> X_P * X_Q + Y_P * Y_Q = 0
2. OP^2 + PQ^2 = OQ^2
-> X_P^2 + Y_P^2 - X_P * X_Q - Y_P * Y_Q = 0
3. OQ^2 + PQ^2 = OP^2
-> X_Q^2 + Y_Q^2 - X_P * X_Q - Y_P * Y_Q = 0
"""
N = 50
ans = 0
for xP in range(N+1):
for yP in range(N+1):
if xP == 0 and yP == 0:
continue
alpha = xP**2 + yP**2
for xQ in range(N+1):
for yQ in range(N+1):
if xQ == 0 and yQ == 0:
continue
if xP == xQ and yP == yQ:
continue
beta = xQ**2 + yQ**2
gamma = xP * xQ + yP * yQ
if gamma*(alpha - gamma)*(beta - gamma) == 0:
ans = ans + 1
# For each pair (P = (x1, y1), Q = (x2, y2)), we have that (P = (x2, y2), Q = (x1, y1)) is also counted a solution.
# So we divide the current answer by 2.
print(ans//2)
|
"""
Note that:
OP^2 = X_P^2 + Y_P^2
OQ^2 = X_Q^2 + Y_Q^2
PQ^2 = (X_P - X_Q)^2 + (Y_P - Y_Q)^2
There are 3 cases:
1. OP^2 + OQ^2 = PQ^2
-> X_P * X_Q + Y_P * Y_Q = 0
2. OP^2 + PQ^2 = OQ^2
-> X_P^2 + Y_P^2 - X_P * X_Q - Y_P * Y_Q = 0
3. OQ^2 + PQ^2 = OP^2
-> X_Q^2 + Y_Q^2 - X_P * X_Q - Y_P * Y_Q = 0
"""
n = 50
ans = 0
for x_p in range(N + 1):
for y_p in range(N + 1):
if xP == 0 and yP == 0:
continue
alpha = xP ** 2 + yP ** 2
for x_q in range(N + 1):
for y_q in range(N + 1):
if xQ == 0 and yQ == 0:
continue
if xP == xQ and yP == yQ:
continue
beta = xQ ** 2 + yQ ** 2
gamma = xP * xQ + yP * yQ
if gamma * (alpha - gamma) * (beta - gamma) == 0:
ans = ans + 1
print(ans // 2)
|
#test
print('==================================')
print(' this is just a test ')
print('==================================')
num = int(input('insert a number: '))
print((num * 5) % 3)
|
print('==================================')
print(' this is just a test ')
print('==================================')
num = int(input('insert a number: '))
print(num * 5 % 3)
|
def is_isogram(word):
word_dict = dict()
for c in word:
c = c.lower()
if ord('a') <= ord(c) <= ord('z'):
word_dict[c] = word_dict.get(c, 0) + 1
if word_dict[c] >= 2:
return False
return True
|
def is_isogram(word):
word_dict = dict()
for c in word:
c = c.lower()
if ord('a') <= ord(c) <= ord('z'):
word_dict[c] = word_dict.get(c, 0) + 1
if word_dict[c] >= 2:
return False
return True
|
class Vector3f(object,IEquatable[Vector3f],IComparable[Vector3f],IComparable,IEpsilonFComparable[Vector3f]):
""" Vector3f(x: Single,y: Single,z: Single) """
@staticmethod
def Add(point,vector):
""" Add(point: Point3f,vector: Vector3f) -> Point3f """
pass
def CompareTo(self,other):
""" CompareTo(self: Vector3f,other: Vector3f) -> int """
pass
@staticmethod
def CrossProduct(a,b):
""" CrossProduct(a: Vector3f,b: Vector3f) -> Vector3f """
pass
def EpsilonEquals(self,other,epsilon):
""" EpsilonEquals(self: Vector3f,other: Vector3f,epsilon: Single) -> bool """
pass
def Equals(self,*__args):
"""
Equals(self: Vector3f,vector: Vector3f) -> bool
Equals(self: Vector3f,obj: object) -> bool
"""
pass
def GetHashCode(self):
""" GetHashCode(self: Vector3f) -> int """
pass
@staticmethod
def Multiply(*__args):
"""
Multiply(t: Single,vector: Vector3f) -> Vector3f
Multiply(vector: Vector3f,t: Single) -> Vector3f
"""
pass
def PerpendicularTo(self,other):
""" PerpendicularTo(self: Vector3f,other: Vector3f) -> bool """
pass
def Reverse(self):
""" Reverse(self: Vector3f) -> bool """
pass
def Rotate(self,angleRadians,rotationAxis):
""" Rotate(self: Vector3f,angleRadians: float,rotationAxis: Vector3f) -> bool """
pass
def ToString(self):
""" ToString(self: Vector3f) -> str """
pass
def Transform(self,transformation):
""" Transform(self: Vector3f,transformation: Transform) """
pass
def Unitize(self):
""" Unitize(self: Vector3f) -> bool """
pass
def __eq__(self,*args):
""" x.__eq__(y) <==> x==y """
pass
def __ge__(self,*args):
pass
def __gt__(self,*args):
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self,*args):
pass
def __lt__(self,*args):
pass
def __mul__(self,*args):
""" x.__mul__(y) <==> x*y """
pass
@staticmethod
def __new__(self,x,y,z):
"""
__new__[Vector3f]() -> Vector3f
__new__(cls: type,x: Single,y: Single,z: Single)
"""
pass
def __ne__(self,*args):
pass
def __radd__(self,*args):
""" __radd__(point: Point3f,vector: Vector3f) -> Point3f """
pass
def __reduce_ex__(self,*args):
pass
def __repr__(self,*args):
""" __repr__(self: object) -> str """
pass
def __rmul__(self,*args):
""" __rmul__(t: Single,vector: Vector3f) -> Vector3f """
pass
def __str__(self,*args):
pass
Length=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: Length(self: Vector3f) -> Single
"""
X=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: X(self: Vector3f) -> Single
Set: X(self: Vector3f)=value
"""
Y=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: Y(self: Vector3f) -> Single
Set: Y(self: Vector3f)=value
"""
Z=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: Z(self: Vector3f) -> Single
Set: Z(self: Vector3f)=value
"""
Unset=None
XAxis=None
YAxis=None
ZAxis=None
Zero=None
# variables with complex values
|
class Vector3F(object, IEquatable[Vector3f], IComparable[Vector3f], IComparable, IEpsilonFComparable[Vector3f]):
""" Vector3f(x: Single,y: Single,z: Single) """
@staticmethod
def add(point, vector):
""" Add(point: Point3f,vector: Vector3f) -> Point3f """
pass
def compare_to(self, other):
""" CompareTo(self: Vector3f,other: Vector3f) -> int """
pass
@staticmethod
def cross_product(a, b):
""" CrossProduct(a: Vector3f,b: Vector3f) -> Vector3f """
pass
def epsilon_equals(self, other, epsilon):
""" EpsilonEquals(self: Vector3f,other: Vector3f,epsilon: Single) -> bool """
pass
def equals(self, *__args):
"""
Equals(self: Vector3f,vector: Vector3f) -> bool
Equals(self: Vector3f,obj: object) -> bool
"""
pass
def get_hash_code(self):
""" GetHashCode(self: Vector3f) -> int """
pass
@staticmethod
def multiply(*__args):
"""
Multiply(t: Single,vector: Vector3f) -> Vector3f
Multiply(vector: Vector3f,t: Single) -> Vector3f
"""
pass
def perpendicular_to(self, other):
""" PerpendicularTo(self: Vector3f,other: Vector3f) -> bool """
pass
def reverse(self):
""" Reverse(self: Vector3f) -> bool """
pass
def rotate(self, angleRadians, rotationAxis):
""" Rotate(self: Vector3f,angleRadians: float,rotationAxis: Vector3f) -> bool """
pass
def to_string(self):
""" ToString(self: Vector3f) -> str """
pass
def transform(self, transformation):
""" Transform(self: Vector3f,transformation: Transform) """
pass
def unitize(self):
""" Unitize(self: Vector3f) -> bool """
pass
def __eq__(self, *args):
""" x.__eq__(y) <==> x==y """
pass
def __ge__(self, *args):
pass
def __gt__(self, *args):
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args):
pass
def __lt__(self, *args):
pass
def __mul__(self, *args):
""" x.__mul__(y) <==> x*y """
pass
@staticmethod
def __new__(self, x, y, z):
"""
__new__[Vector3f]() -> Vector3f
__new__(cls: type,x: Single,y: Single,z: Single)
"""
pass
def __ne__(self, *args):
pass
def __radd__(self, *args):
""" __radd__(point: Point3f,vector: Vector3f) -> Point3f """
pass
def __reduce_ex__(self, *args):
pass
def __repr__(self, *args):
""" __repr__(self: object) -> str """
pass
def __rmul__(self, *args):
""" __rmul__(t: Single,vector: Vector3f) -> Vector3f """
pass
def __str__(self, *args):
pass
length = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Get: Length(self: Vector3f) -> Single\n\n\n\n'
x = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Get: X(self: Vector3f) -> Single\n\n\n\nSet: X(self: Vector3f)=value\n\n'
y = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Get: Y(self: Vector3f) -> Single\n\n\n\nSet: Y(self: Vector3f)=value\n\n'
z = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Get: Z(self: Vector3f) -> Single\n\n\n\nSet: Z(self: Vector3f)=value\n\n'
unset = None
x_axis = None
y_axis = None
z_axis = None
zero = None
|
option = None
def pytest_addoption(parser):
parser.addoption('--nproc', help='run tests on n processes', type=int, default=1)
parser.addoption('--lsf', help='run tests on with lsf clusters', action="store_true")
parser.addoption('--specs', help='test specs')
parser.addoption('--cases', help='test case list string or file')
parser.addoption('--basic-only', help='only run basic test cases for instructions', action="store_true")
parser.addoption('--retry', help='retry last failed cases', action="store_true")
parser.addoption('--xlen', help='bits of int register (xreg)', default=64, choices=[32,64], type=int)
parser.addoption('--flen', help='bits of float register (freg)', default=64, choices=[32,64], type=int)
parser.addoption('--vlen', help='bits of vector register (vreg)', default=1024, choices=[256, 512, 1024, 2048], type=int)
parser.addoption('--elen', help='bits of maximum size of vector element', default=64, choices=[32, 64], type=int)
parser.addoption('--slen', help='bits of vector striping distance', default=1024, choices=[256, 512, 1024, 2048], type=int)
parser.addoption('--clang', help='path of clang compiler', default='clang')
parser.addoption('--spike', help='path of spike simulator', default='spike')
parser.addoption('--vcs', help='path of vcs simulator', default=None)
parser.addoption('--gem5', help='path of gem5 simulator', default=None)
parser.addoption('--fsdb', help='generate fsdb waveform file when running vcs simulator', action="store_true")
parser.addoption('--tsiloadmem', help='Load binary through TSI instead of backdoor', action="store_true")
parser.addoption('--vcstimeout', help='Number of cycles after which VCS stops', default=1000000, type=int)
parser.addoption('--verilator', help='path of verilator simulator', default=None)
|
option = None
def pytest_addoption(parser):
parser.addoption('--nproc', help='run tests on n processes', type=int, default=1)
parser.addoption('--lsf', help='run tests on with lsf clusters', action='store_true')
parser.addoption('--specs', help='test specs')
parser.addoption('--cases', help='test case list string or file')
parser.addoption('--basic-only', help='only run basic test cases for instructions', action='store_true')
parser.addoption('--retry', help='retry last failed cases', action='store_true')
parser.addoption('--xlen', help='bits of int register (xreg)', default=64, choices=[32, 64], type=int)
parser.addoption('--flen', help='bits of float register (freg)', default=64, choices=[32, 64], type=int)
parser.addoption('--vlen', help='bits of vector register (vreg)', default=1024, choices=[256, 512, 1024, 2048], type=int)
parser.addoption('--elen', help='bits of maximum size of vector element', default=64, choices=[32, 64], type=int)
parser.addoption('--slen', help='bits of vector striping distance', default=1024, choices=[256, 512, 1024, 2048], type=int)
parser.addoption('--clang', help='path of clang compiler', default='clang')
parser.addoption('--spike', help='path of spike simulator', default='spike')
parser.addoption('--vcs', help='path of vcs simulator', default=None)
parser.addoption('--gem5', help='path of gem5 simulator', default=None)
parser.addoption('--fsdb', help='generate fsdb waveform file when running vcs simulator', action='store_true')
parser.addoption('--tsiloadmem', help='Load binary through TSI instead of backdoor', action='store_true')
parser.addoption('--vcstimeout', help='Number of cycles after which VCS stops', default=1000000, type=int)
parser.addoption('--verilator', help='path of verilator simulator', default=None)
|
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
def merge_list(head1, head2):
if head1 is None:
return head2
if head2 is None:
return head1
if head2.val < head1.val:
head1, head2 = head2, head1
head1.next = merge_list(head1.next, head2)
return head1
def get_size(head):
curr = head
count = 0
while curr is not None:
curr = curr.next
count += 1
return count
def partition(head):
size = get_size(head)
if size <= 2:
return head, size
curr = head
for i in range(size//2):
curr = curr.next
return curr, size
def sort_list(head: ListNode) -> ListNode:
if head is None:
return None
mid, size = partition(head)
if size == 1:
return head
mid_next = mid.next
mid.next = None
head = sort_list(head)
mid_next = sort_list(mid_next)
head = merge_list(head, mid_next)
return head
def print_list(head):
while head is not None:
print(head.val)
head = head.next
def main():
node1 = ListNode(4)
node2 = ListNode(3)
node3 = ListNode(2)
node1.next = node2
node2.next = node3
ans = sort_list(node1)
print_list(ans)
main()
|
class Listnode:
def __init__(self, x):
self.val = x
self.next = None
def merge_list(head1, head2):
if head1 is None:
return head2
if head2 is None:
return head1
if head2.val < head1.val:
(head1, head2) = (head2, head1)
head1.next = merge_list(head1.next, head2)
return head1
def get_size(head):
curr = head
count = 0
while curr is not None:
curr = curr.next
count += 1
return count
def partition(head):
size = get_size(head)
if size <= 2:
return (head, size)
curr = head
for i in range(size // 2):
curr = curr.next
return (curr, size)
def sort_list(head: ListNode) -> ListNode:
if head is None:
return None
(mid, size) = partition(head)
if size == 1:
return head
mid_next = mid.next
mid.next = None
head = sort_list(head)
mid_next = sort_list(mid_next)
head = merge_list(head, mid_next)
return head
def print_list(head):
while head is not None:
print(head.val)
head = head.next
def main():
node1 = list_node(4)
node2 = list_node(3)
node3 = list_node(2)
node1.next = node2
node2.next = node3
ans = sort_list(node1)
print_list(ans)
main()
|
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def nextLargerNodes(self, head):
"""
:type head: ListNode
:rtype: List[int]
"""
array = []
stack = []
while head:
array.append(0)
# Keep going until we find a great value or the stack is empty
while stack and stack[-1][1] < head.val:
# Assign head's value to array at index from stack
array[stack.pop()[0]] = head.val
# Add index and head's value to end of stack
stack.append((len(array) - 1, head.val))
# Move forward in list
head = head.next
return array
|
class Solution(object):
def next_larger_nodes(self, head):
"""
:type head: ListNode
:rtype: List[int]
"""
array = []
stack = []
while head:
array.append(0)
while stack and stack[-1][1] < head.val:
array[stack.pop()[0]] = head.val
stack.append((len(array) - 1, head.val))
head = head.next
return array
|
first_number = int(input())
second_number = int(input())
large_number = max(first_number, second_number)
small_number = min(first_number, second_number)
remaining_number = 0
gcd = 0
while True:
times = large_number // small_number
remain = large_number - ( small_number * times )
if 0 == remain:
gcd = small_number
break
else:
large_number = small_number
small_number = remain
print(gcd)
|
first_number = int(input())
second_number = int(input())
large_number = max(first_number, second_number)
small_number = min(first_number, second_number)
remaining_number = 0
gcd = 0
while True:
times = large_number // small_number
remain = large_number - small_number * times
if 0 == remain:
gcd = small_number
break
else:
large_number = small_number
small_number = remain
print(gcd)
|
#
# PySNMP MIB module HM2-TRAFFICMGMT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HM2-TRAFFICMGMT-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:19:47 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint")
hm2ConfigurationMibs, HmEnabledStatus = mibBuilder.importSymbols("HM2-TC-MIB", "hm2ConfigurationMibs", "HmEnabledStatus")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
iso, Counter32, IpAddress, TimeTicks, Gauge32, Counter64, ModuleIdentity, Bits, MibIdentifier, Integer32, NotificationType, Unsigned32, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Counter32", "IpAddress", "TimeTicks", "Gauge32", "Counter64", "ModuleIdentity", "Bits", "MibIdentifier", "Integer32", "NotificationType", "Unsigned32", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
hm2TrafficMgmtMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 248, 11, 31))
hm2TrafficMgmtMib.setRevisions(('2011-03-16 00:00',))
if mibBuilder.loadTexts: hm2TrafficMgmtMib.setLastUpdated('201103160000Z')
if mibBuilder.loadTexts: hm2TrafficMgmtMib.setOrganization('Hirschmann Automation and Control GmbH')
hm2TrafficMgmtMibNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 248, 11, 31, 0))
hm2TrafficMgmtMibObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 248, 11, 31, 1))
hm2TrafficMgmtIfTable = MibTable((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1), )
if mibBuilder.loadTexts: hm2TrafficMgmtIfTable.setStatus('current')
hm2TrafficMgmtIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hm2TrafficMgmtIfEntry.setStatus('current')
hm2TrafficMgmtIfFlowControl = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 1), HmEnabledStatus().clone('enable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hm2TrafficMgmtIfFlowControl.setStatus('current')
hm2TrafficMgmtIfEgressShapingRate = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 2), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hm2TrafficMgmtIfEgressShapingRate.setStatus('current')
hm2TrafficMgmtIfEgressShapingRateUnit = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("percent", 1), ("kbps", 2))).clone('percent')).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2TrafficMgmtIfEgressShapingRateUnit.setStatus('current')
hm2TrafficMgmtIfIngressStormCtlThresholdUnit = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("percent", 1), ("pps", 2))).clone('percent')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hm2TrafficMgmtIfIngressStormCtlThresholdUnit.setStatus('current')
hm2TrafficMgmtIfIngressStormCtlBcastMode = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 5), HmEnabledStatus().clone('disable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hm2TrafficMgmtIfIngressStormCtlBcastMode.setStatus('current')
hm2TrafficMgmtIfIngressStormCtlBcastThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 14880000))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hm2TrafficMgmtIfIngressStormCtlBcastThreshold.setStatus('current')
hm2TrafficMgmtIfIngressStormCtlMcastMode = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 7), HmEnabledStatus().clone('disable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hm2TrafficMgmtIfIngressStormCtlMcastMode.setStatus('current')
hm2TrafficMgmtIfIngressStormCtlMcastThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 8), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 14880000))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hm2TrafficMgmtIfIngressStormCtlMcastThreshold.setStatus('current')
hm2TrafficMgmtIfIngressStormCtlUcastMode = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 9), HmEnabledStatus().clone('disable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hm2TrafficMgmtIfIngressStormCtlUcastMode.setStatus('current')
hm2TrafficMgmtIfIngressStormCtlUcastThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 10), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 14880000))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hm2TrafficMgmtIfIngressStormCtlUcastThreshold.setStatus('current')
hm2TrafficMgmtFlowControl = MibScalar((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 2), HmEnabledStatus().clone('disable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hm2TrafficMgmtFlowControl.setStatus('current')
hm2TrafficMgmtIngressStormBucketType = MibScalar((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("single-bucket", 1), ("multi-bucket", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hm2TrafficMgmtIngressStormBucketType.setStatus('current')
mibBuilder.exportSymbols("HM2-TRAFFICMGMT-MIB", hm2TrafficMgmtIfIngressStormCtlBcastThreshold=hm2TrafficMgmtIfIngressStormCtlBcastThreshold, PYSNMP_MODULE_ID=hm2TrafficMgmtMib, hm2TrafficMgmtIngressStormBucketType=hm2TrafficMgmtIngressStormBucketType, hm2TrafficMgmtIfEgressShapingRateUnit=hm2TrafficMgmtIfEgressShapingRateUnit, hm2TrafficMgmtMibNotifications=hm2TrafficMgmtMibNotifications, hm2TrafficMgmtIfIngressStormCtlBcastMode=hm2TrafficMgmtIfIngressStormCtlBcastMode, hm2TrafficMgmtIfIngressStormCtlThresholdUnit=hm2TrafficMgmtIfIngressStormCtlThresholdUnit, hm2TrafficMgmtIfIngressStormCtlMcastThreshold=hm2TrafficMgmtIfIngressStormCtlMcastThreshold, hm2TrafficMgmtIfTable=hm2TrafficMgmtIfTable, hm2TrafficMgmtFlowControl=hm2TrafficMgmtFlowControl, hm2TrafficMgmtIfIngressStormCtlMcastMode=hm2TrafficMgmtIfIngressStormCtlMcastMode, hm2TrafficMgmtIfIngressStormCtlUcastMode=hm2TrafficMgmtIfIngressStormCtlUcastMode, hm2TrafficMgmtIfEgressShapingRate=hm2TrafficMgmtIfEgressShapingRate, hm2TrafficMgmtMib=hm2TrafficMgmtMib, hm2TrafficMgmtIfFlowControl=hm2TrafficMgmtIfFlowControl, hm2TrafficMgmtMibObjects=hm2TrafficMgmtMibObjects, hm2TrafficMgmtIfEntry=hm2TrafficMgmtIfEntry, hm2TrafficMgmtIfIngressStormCtlUcastThreshold=hm2TrafficMgmtIfIngressStormCtlUcastThreshold)
|
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, constraints_intersection, constraints_union, value_range_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint', 'ValueSizeConstraint')
(hm2_configuration_mibs, hm_enabled_status) = mibBuilder.importSymbols('HM2-TC-MIB', 'hm2ConfigurationMibs', 'HmEnabledStatus')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(iso, counter32, ip_address, time_ticks, gauge32, counter64, module_identity, bits, mib_identifier, integer32, notification_type, unsigned32, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'Counter32', 'IpAddress', 'TimeTicks', 'Gauge32', 'Counter64', 'ModuleIdentity', 'Bits', 'MibIdentifier', 'Integer32', 'NotificationType', 'Unsigned32', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
hm2_traffic_mgmt_mib = module_identity((1, 3, 6, 1, 4, 1, 248, 11, 31))
hm2TrafficMgmtMib.setRevisions(('2011-03-16 00:00',))
if mibBuilder.loadTexts:
hm2TrafficMgmtMib.setLastUpdated('201103160000Z')
if mibBuilder.loadTexts:
hm2TrafficMgmtMib.setOrganization('Hirschmann Automation and Control GmbH')
hm2_traffic_mgmt_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 248, 11, 31, 0))
hm2_traffic_mgmt_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 248, 11, 31, 1))
hm2_traffic_mgmt_if_table = mib_table((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1))
if mibBuilder.loadTexts:
hm2TrafficMgmtIfTable.setStatus('current')
hm2_traffic_mgmt_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
hm2TrafficMgmtIfEntry.setStatus('current')
hm2_traffic_mgmt_if_flow_control = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 1), hm_enabled_status().clone('enable')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hm2TrafficMgmtIfFlowControl.setStatus('current')
hm2_traffic_mgmt_if_egress_shaping_rate = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 2), unsigned32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hm2TrafficMgmtIfEgressShapingRate.setStatus('current')
hm2_traffic_mgmt_if_egress_shaping_rate_unit = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('percent', 1), ('kbps', 2))).clone('percent')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2TrafficMgmtIfEgressShapingRateUnit.setStatus('current')
hm2_traffic_mgmt_if_ingress_storm_ctl_threshold_unit = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('percent', 1), ('pps', 2))).clone('percent')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hm2TrafficMgmtIfIngressStormCtlThresholdUnit.setStatus('current')
hm2_traffic_mgmt_if_ingress_storm_ctl_bcast_mode = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 5), hm_enabled_status().clone('disable')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hm2TrafficMgmtIfIngressStormCtlBcastMode.setStatus('current')
hm2_traffic_mgmt_if_ingress_storm_ctl_bcast_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 14880000))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hm2TrafficMgmtIfIngressStormCtlBcastThreshold.setStatus('current')
hm2_traffic_mgmt_if_ingress_storm_ctl_mcast_mode = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 7), hm_enabled_status().clone('disable')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hm2TrafficMgmtIfIngressStormCtlMcastMode.setStatus('current')
hm2_traffic_mgmt_if_ingress_storm_ctl_mcast_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 8), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 14880000))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hm2TrafficMgmtIfIngressStormCtlMcastThreshold.setStatus('current')
hm2_traffic_mgmt_if_ingress_storm_ctl_ucast_mode = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 9), hm_enabled_status().clone('disable')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hm2TrafficMgmtIfIngressStormCtlUcastMode.setStatus('current')
hm2_traffic_mgmt_if_ingress_storm_ctl_ucast_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 1, 1, 10), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 14880000))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hm2TrafficMgmtIfIngressStormCtlUcastThreshold.setStatus('current')
hm2_traffic_mgmt_flow_control = mib_scalar((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 2), hm_enabled_status().clone('disable')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hm2TrafficMgmtFlowControl.setStatus('current')
hm2_traffic_mgmt_ingress_storm_bucket_type = mib_scalar((1, 3, 6, 1, 4, 1, 248, 11, 31, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('single-bucket', 1), ('multi-bucket', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hm2TrafficMgmtIngressStormBucketType.setStatus('current')
mibBuilder.exportSymbols('HM2-TRAFFICMGMT-MIB', hm2TrafficMgmtIfIngressStormCtlBcastThreshold=hm2TrafficMgmtIfIngressStormCtlBcastThreshold, PYSNMP_MODULE_ID=hm2TrafficMgmtMib, hm2TrafficMgmtIngressStormBucketType=hm2TrafficMgmtIngressStormBucketType, hm2TrafficMgmtIfEgressShapingRateUnit=hm2TrafficMgmtIfEgressShapingRateUnit, hm2TrafficMgmtMibNotifications=hm2TrafficMgmtMibNotifications, hm2TrafficMgmtIfIngressStormCtlBcastMode=hm2TrafficMgmtIfIngressStormCtlBcastMode, hm2TrafficMgmtIfIngressStormCtlThresholdUnit=hm2TrafficMgmtIfIngressStormCtlThresholdUnit, hm2TrafficMgmtIfIngressStormCtlMcastThreshold=hm2TrafficMgmtIfIngressStormCtlMcastThreshold, hm2TrafficMgmtIfTable=hm2TrafficMgmtIfTable, hm2TrafficMgmtFlowControl=hm2TrafficMgmtFlowControl, hm2TrafficMgmtIfIngressStormCtlMcastMode=hm2TrafficMgmtIfIngressStormCtlMcastMode, hm2TrafficMgmtIfIngressStormCtlUcastMode=hm2TrafficMgmtIfIngressStormCtlUcastMode, hm2TrafficMgmtIfEgressShapingRate=hm2TrafficMgmtIfEgressShapingRate, hm2TrafficMgmtMib=hm2TrafficMgmtMib, hm2TrafficMgmtIfFlowControl=hm2TrafficMgmtIfFlowControl, hm2TrafficMgmtMibObjects=hm2TrafficMgmtMibObjects, hm2TrafficMgmtIfEntry=hm2TrafficMgmtIfEntry, hm2TrafficMgmtIfIngressStormCtlUcastThreshold=hm2TrafficMgmtIfIngressStormCtlUcastThreshold)
|
def find(s):
if s > 0 :
for i in range(9):
if s + i == 10:
return i
else :
return 0
s = 0
t = int(input())
for _ in range(int(t)):
n = int(input())
f = n
while(n>0):
d = n%10
s += d
n = n//10
x = find(s)
print(str(f)+str(x))
d = 0
s = 0
|
def find(s):
if s > 0:
for i in range(9):
if s + i == 10:
return i
else:
return 0
s = 0
t = int(input())
for _ in range(int(t)):
n = int(input())
f = n
while n > 0:
d = n % 10
s += d
n = n // 10
x = find(s)
print(str(f) + str(x))
d = 0
s = 0
|
REQUEST_BODY_JSON = """
{
"customer_ids": [
"string"
]
}
"""
RESPONSE_200_JSON = """
{
"customers_balance": [
{
"balance": 1.1,
"customer_id": "string"
}
]
}
"""
|
request_body_json = '\n{\n "customer_ids": [\n "string"\n ]\n}\n'
response_200_json = '\n{\n "customers_balance": [\n {\n "balance": 1.1, \n "customer_id": "string"\n }\n ]\n}\n'
|
def get_hello(name: str) -> tuple: # noqa: E501
"""
# noqa: E501
:param name:
:type name: str
:rtype: None
"""
return {"response": f" ola {name}. bem vindo ao clube"}, 200
# import aiohttp
# from connexion.lifecycle import ConnexionResponse
# async def get_hello(name: str) -> tuple: # noqa: E501
# """
# # noqa: E501
# :param name:
# :type name: str
# :rtype: None
# """
# return aiohttp.web.json_response(
# {"response": f" ola {name}. bem vindo ao clube"}, 200
# )
# async def get_hello(name: str) -> tuple: # noqa: E501
# """
# # noqa: E501
# :param name:
# :type name: str
# :rtype: None
# """
# return aiohttp.web.json_response(
# {"response": f" ola {name}. bem vindo ao clube"}, 200
# )
|
def get_hello(name: str) -> tuple:
"""
# noqa: E501
:param name:
:type name: str
:rtype: None
"""
return ({'response': f' ola {name}. bem vindo ao clube'}, 200)
|
x=int(input())
if x < 0:
print(-x)
else:
print(x)
|
x = int(input())
if x < 0:
print(-x)
else:
print(x)
|
students = int(input())
students_dict = {}
top_students = {}
for _ in range(students):
name = input()
grade = float(input())
if name in students_dict:
students_dict[name].append(grade)
else:
students_dict[name] = [grade]
# for key, item in students_dict.items():
# if sum(item) / len(item) >= 4.50:
# top_students[key] = sum(item) / len(item)
top_students = {k: sum(v) / len(v) for k, v in students_dict.items() if sum(v) / len(v) >= 4.50}
top_students = dict(sorted(top_students.items(), key=lambda el: -el[1]))
[print(f"{name} -> {grade:.2f}") for name, grade in top_students.items()]
|
students = int(input())
students_dict = {}
top_students = {}
for _ in range(students):
name = input()
grade = float(input())
if name in students_dict:
students_dict[name].append(grade)
else:
students_dict[name] = [grade]
top_students = {k: sum(v) / len(v) for (k, v) in students_dict.items() if sum(v) / len(v) >= 4.5}
top_students = dict(sorted(top_students.items(), key=lambda el: -el[1]))
[print(f'{name} -> {grade:.2f}') for (name, grade) in top_students.items()]
|
TASKS = {
"binary_classification": 1,
"multi_class_classification": 2,
"entity_extraction": 4,
"extractive_question_answering": 5,
"summarization": 8,
"single_column_regression": 10,
"speech_recognition": 11,
}
DATASETS_TASKS = ["text-classification", "question-answering-extractive"]
|
tasks = {'binary_classification': 1, 'multi_class_classification': 2, 'entity_extraction': 4, 'extractive_question_answering': 5, 'summarization': 8, 'single_column_regression': 10, 'speech_recognition': 11}
datasets_tasks = ['text-classification', 'question-answering-extractive']
|
# enable: C0103
class FooClass:
"""
Attribute names should be in mixed case,
with the first letter lower case,
each word separated by having its first letter capitalized
just like method names.
And all private names should begin with an underscore.
"""
def __init__(self):
"""
A init of this class
"""
# Bad names.
self.foo_bar_zar = None
self.FooBarZar = None
self.a = None
self._fooBar_ = None
self._fooBar__ = None
self.__fooBar_ = None
self.___longStart__ = None
self.__longEnd___ = None
# Good names.
self.fooBarZar = None
self._fooBarZar = None
self.foobar = None
# Any __*__ name is accepted.
self.__foobar__ = None
self.__fooBar__ = None
self.__foo_bar__ = None
self.__dict__ = {}
self.__version__ = {}
self.__a__ = {}
# In some cases constants are lazy initialized as instance members.
self.FOOBARZAR = None
|
class Fooclass:
"""
Attribute names should be in mixed case,
with the first letter lower case,
each word separated by having its first letter capitalized
just like method names.
And all private names should begin with an underscore.
"""
def __init__(self):
"""
A init of this class
"""
self.foo_bar_zar = None
self.FooBarZar = None
self.a = None
self._fooBar_ = None
self._fooBar__ = None
self.__fooBar_ = None
self.___longStart__ = None
self.__longEnd___ = None
self.fooBarZar = None
self._fooBarZar = None
self.foobar = None
self.__foobar__ = None
self.__fooBar__ = None
self.__foo_bar__ = None
self.__dict__ = {}
self.__version__ = {}
self.__a__ = {}
self.FOOBARZAR = None
|
class GuiAbstractObject:
def is_clicked(self, mouse):
area = (self.position[0] * self.screen.engine.settings.graphic['screen']['resolution_scale'][0],
self.position[1] * self.screen.engine.settings.graphic['screen']['resolution_scale'][1],
(self.position[0] + self.position[2]) * self.screen.engine.settings.graphic['screen']['resolution_scale'][0],
(self.position[1] + self.position[3]) * self.screen.engine.settings.graphic['screen']['resolution_scale'][1] )
if mouse[0][0] >= area[0] and mouse[0][0] <= area[2] \
and mouse[0][1] >= area[1] and mouse[0][1] <= area[3]:
return True
return False
def clicked(self, mouse):
print('clicked')
|
class Guiabstractobject:
def is_clicked(self, mouse):
area = (self.position[0] * self.screen.engine.settings.graphic['screen']['resolution_scale'][0], self.position[1] * self.screen.engine.settings.graphic['screen']['resolution_scale'][1], (self.position[0] + self.position[2]) * self.screen.engine.settings.graphic['screen']['resolution_scale'][0], (self.position[1] + self.position[3]) * self.screen.engine.settings.graphic['screen']['resolution_scale'][1])
if mouse[0][0] >= area[0] and mouse[0][0] <= area[2] and (mouse[0][1] >= area[1]) and (mouse[0][1] <= area[3]):
return True
return False
def clicked(self, mouse):
print('clicked')
|
class NagiosException(Exception):
pass
class NagiosUnexpectedResultError(Exception):
pass
|
class Nagiosexception(Exception):
pass
class Nagiosunexpectedresulterror(Exception):
pass
|
#!/usr/bin/env python
log_dir = os.environ['LOG_DIR']
admin_server_listen_address = os.environ['ADMIN_SERVER_LISTEN_ADDRESS']
admin_server_listen_port = os.environ['ADMIN_SERVER_LISTEN_PORT']
admin_username = os.environ['ADMIN_USERNAME']
admin_password = os.environ['ADMIN_PASSWORD']
managed_server_name = os.environ['MANAGED_SERVER_NAME']
######################################################################
def set_server_datasource_log_config(_log_dir, _server_name):
cd('/Servers/' + _server_name + '/DataSource/' + _server_name)
cmo.setRmiJDBCSecurity('Compatibility')
cd('/Servers/' + _server_name + '/DataSource/' + _server_name + '/DataSourceLogFile/' + _server_name)
cmo.setFileName(_log_dir + '/' + _server_name + '/' +
'datasource.' + _server_name + '.%%yyyy%%%%MM%%%%dd%%_%%HH%%%%mm%%%%ss%%.log')
# cmo.setFileName('/dev/null')
cmo.setRotationType('byTime')
cmo.setRotationTime('00:00')
cmo.setFileTimeSpan(24)
cmo.setNumberOfFilesLimited(True)
cmo.setFileCount(30)
cmo.setRotateLogOnStartup(False)
######################################################################
admin_server_url = 't3://' + admin_server_listen_address + ':' + admin_server_listen_port
connect(admin_username, admin_password, admin_server_url)
edit()
startEdit()
domain_version = cmo.getDomainVersion()
set_server_datasource_log_config(log_dir, managed_server_name)
save()
activate()
exit()
|
log_dir = os.environ['LOG_DIR']
admin_server_listen_address = os.environ['ADMIN_SERVER_LISTEN_ADDRESS']
admin_server_listen_port = os.environ['ADMIN_SERVER_LISTEN_PORT']
admin_username = os.environ['ADMIN_USERNAME']
admin_password = os.environ['ADMIN_PASSWORD']
managed_server_name = os.environ['MANAGED_SERVER_NAME']
def set_server_datasource_log_config(_log_dir, _server_name):
cd('/Servers/' + _server_name + '/DataSource/' + _server_name)
cmo.setRmiJDBCSecurity('Compatibility')
cd('/Servers/' + _server_name + '/DataSource/' + _server_name + '/DataSourceLogFile/' + _server_name)
cmo.setFileName(_log_dir + '/' + _server_name + '/' + 'datasource.' + _server_name + '.%%yyyy%%%%MM%%%%dd%%_%%HH%%%%mm%%%%ss%%.log')
cmo.setRotationType('byTime')
cmo.setRotationTime('00:00')
cmo.setFileTimeSpan(24)
cmo.setNumberOfFilesLimited(True)
cmo.setFileCount(30)
cmo.setRotateLogOnStartup(False)
admin_server_url = 't3://' + admin_server_listen_address + ':' + admin_server_listen_port
connect(admin_username, admin_password, admin_server_url)
edit()
start_edit()
domain_version = cmo.getDomainVersion()
set_server_datasource_log_config(log_dir, managed_server_name)
save()
activate()
exit()
|
print("Choose from below options:")
print("1.Celsius to Fahrenheit.")
print("2.Fahrenheit to Celsius.")
o=int(input("option(1/2):"))
if(o==1):
c=float(input("Temperature in Celsius:"))
f=1.8*(c)+32.0
f=round(f,1) #temperature in fahrenheit precise to 1 decimal place
print("Temperature in Fahrenheit:",f)
elif(o==2):
f=float(input("Temperature in Fahrenheit:"))
c=(f-32)/1.8
c=round(c,1) #temperature in celsius precise to 1 decimal place
print("Temperature in Celsius:",c)
else:
print("Choose 1 or 2.")
|
print('Choose from below options:')
print('1.Celsius to Fahrenheit.')
print('2.Fahrenheit to Celsius.')
o = int(input('option(1/2):'))
if o == 1:
c = float(input('Temperature in Celsius:'))
f = 1.8 * c + 32.0
f = round(f, 1)
print('Temperature in Fahrenheit:', f)
elif o == 2:
f = float(input('Temperature in Fahrenheit:'))
c = (f - 32) / 1.8
c = round(c, 1)
print('Temperature in Celsius:', c)
else:
print('Choose 1 or 2.')
|
#!/usr/bin/env python
# $Revision: 1.1.1.12 $ $Date: 2007/01/08 14:40:09 $ kgm
"""Monitor 1.8 This dummy module is only provided for backward compatibility.
It does nothing. class Monitor is now part of Simulation
and SimulationXXX."""
__version__ ='1.8 $Revision: 1.1.1.12 $ $Date: 2007/01/08 14:40:09 $'
pass
|
"""Monitor 1.8 This dummy module is only provided for backward compatibility.
It does nothing. class Monitor is now part of Simulation
and SimulationXXX."""
__version__ = '1.8 $Revision: 1.1.1.12 $ $Date: 2007/01/08 14:40:09 $'
pass
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# */AIPND-revision/intropyproject-classify-pet-images/adjust_results4_isadog.py
#
# PROGRAMMER: Sotirios Zikas
# DATE CREATED: April 16, 2019
def adjust_results4_isadog(results_dic, dogfile):
"""
Adjusts the results dictionary to determine if classifier correctly
classified images 'as a dog' or 'not a dog' especially when not a match.
Demonstrates if model architecture correctly classifies dog images even if
it gets dog breed wrong (not a match).
Parameters:
results_dic - Dictionary with 'key' as image filename and 'value' as a
List. Where the list will contain the following items:
index 0 = pet image label (string)
index 1 = classifier label (string)
index 2 = 1/0 (int) where 1 = match between pet image
and classifer labels and 0 = no match between labels
------ where index 3 & index 4 are added by this function -----
NEW - index 3 = 1/0 (int) where 1 = pet image 'is-a' dog and
0 = pet Image 'is-NOT-a' dog.
NEW - index 4 = 1/0 (int) where 1 = Classifier classifies image
'as-a' dog and 0 = Classifier classifies image
'as-NOT-a' dog.
dogfile - A text file that contains names of all dogs from the classifier
function and dog names from the pet image files. This file has
one dog name per line dog names are all in lowercase with
spaces separating the distinct words of the dog name. Dog names
from the classifier function can be a string of dog names separated
by commas when a particular breed of dog has multiple dog names
associated with that breed (ex. maltese dog, maltese terrier,
maltese) (string - indicates text file's filename)
Returns:
None - results_dic is mutable data type so no return needed.
"""
dognames_dic = dict()
with open(dogfile, "r") as infile:
line = infile.readline()
while line != "":
line = line.rstrip('\n')
if line not in dognames_dic:
dognames_dic[line] = [1]
line = infile.readline()
for key in results_dic:
if results_dic[key][0] in dognames_dic:
if results_dic[key][1] in dognames_dic:
results_dic[key].extend((1,1))
else:
results_dic[key].extend((1,0))
else:
if results_dic[key][1] in dognames_dic:
results_dic[key].extend((0,1))
else:
results_dic[key].extend((0,0))
|
def adjust_results4_isadog(results_dic, dogfile):
"""
Adjusts the results dictionary to determine if classifier correctly
classified images 'as a dog' or 'not a dog' especially when not a match.
Demonstrates if model architecture correctly classifies dog images even if
it gets dog breed wrong (not a match).
Parameters:
results_dic - Dictionary with 'key' as image filename and 'value' as a
List. Where the list will contain the following items:
index 0 = pet image label (string)
index 1 = classifier label (string)
index 2 = 1/0 (int) where 1 = match between pet image
and classifer labels and 0 = no match between labels
------ where index 3 & index 4 are added by this function -----
NEW - index 3 = 1/0 (int) where 1 = pet image 'is-a' dog and
0 = pet Image 'is-NOT-a' dog.
NEW - index 4 = 1/0 (int) where 1 = Classifier classifies image
'as-a' dog and 0 = Classifier classifies image
'as-NOT-a' dog.
dogfile - A text file that contains names of all dogs from the classifier
function and dog names from the pet image files. This file has
one dog name per line dog names are all in lowercase with
spaces separating the distinct words of the dog name. Dog names
from the classifier function can be a string of dog names separated
by commas when a particular breed of dog has multiple dog names
associated with that breed (ex. maltese dog, maltese terrier,
maltese) (string - indicates text file's filename)
Returns:
None - results_dic is mutable data type so no return needed.
"""
dognames_dic = dict()
with open(dogfile, 'r') as infile:
line = infile.readline()
while line != '':
line = line.rstrip('\n')
if line not in dognames_dic:
dognames_dic[line] = [1]
line = infile.readline()
for key in results_dic:
if results_dic[key][0] in dognames_dic:
if results_dic[key][1] in dognames_dic:
results_dic[key].extend((1, 1))
else:
results_dic[key].extend((1, 0))
elif results_dic[key][1] in dognames_dic:
results_dic[key].extend((0, 1))
else:
results_dic[key].extend((0, 0))
|
# This is a single line comment in Python
print("Hello World!") # This is a single comment
""" For multi-line
comments use three
double quotes
...
"""
|
print('Hello World!')
' For multi-line\ncomments use three\ndouble quotes\n...\n'
|
"""
A rnd component generator.
"""
class RandomComponent:
def __init__(self, gen, str, var, par):
"""
Create a new RandomComponent.
:param gen: the random generator.
:param str: (dict) streams configuration.
:param var: (dict) variates configuration.
:param par: (dict) variates parameters.
"""
self.gen = gen
self.str = str
self.var = var
self.par = par
def generate(self, key):
"""
Generate a random number for the specified key.
:param key: a key.
:return: a random number for the specified key.
"""
self.gen.stream(self.str[key])
return self.var[key].generator.generate(u=self.gen, **self.par[key])
def __str__(self):
"""
String representation.
:return: the string representation.
"""
sb = [
"{attr}={value}".format(attr=attr, value=self.__dict__[attr])
for attr in self.__dict__
if not attr.startswith("__") and not callable(getattr(self, attr))
]
return "RandomComponent({}:{})".format(id(self), ", ".join(sb))
|
"""
A rnd component generator.
"""
class Randomcomponent:
def __init__(self, gen, str, var, par):
"""
Create a new RandomComponent.
:param gen: the random generator.
:param str: (dict) streams configuration.
:param var: (dict) variates configuration.
:param par: (dict) variates parameters.
"""
self.gen = gen
self.str = str
self.var = var
self.par = par
def generate(self, key):
"""
Generate a random number for the specified key.
:param key: a key.
:return: a random number for the specified key.
"""
self.gen.stream(self.str[key])
return self.var[key].generator.generate(u=self.gen, **self.par[key])
def __str__(self):
"""
String representation.
:return: the string representation.
"""
sb = ['{attr}={value}'.format(attr=attr, value=self.__dict__[attr]) for attr in self.__dict__ if not attr.startswith('__') and (not callable(getattr(self, attr)))]
return 'RandomComponent({}:{})'.format(id(self), ', '.join(sb))
|
__author__ = 'Nils Schmidt'
def memoize_pos_args(fun):
""" Memoize the functions positional arguments and return the same result for it """
# arguments, result
memo = {}
def wrapper(*args, **kwargs):
if args in memo:
return memo[args]
else:
memoize = True
if kwargs.get("no_memoize"):
del kwargs["no_memoize"]
memoize = False
res = fun(*args, **kwargs)
if memoize:
memo[args] = res
return res
return wrapper
|
__author__ = 'Nils Schmidt'
def memoize_pos_args(fun):
""" Memoize the functions positional arguments and return the same result for it """
memo = {}
def wrapper(*args, **kwargs):
if args in memo:
return memo[args]
else:
memoize = True
if kwargs.get('no_memoize'):
del kwargs['no_memoize']
memoize = False
res = fun(*args, **kwargs)
if memoize:
memo[args] = res
return res
return wrapper
|
class Symbol:
def __init__(self,S,sign=1):
if type(S) != str:
raise TypeError("Symbols must be strings")
if S not in "abcdefghijklmnopqrstuvwxyz":
raise ValueError("Symbols must be lowercase letters")
self.S = S
self.sign = sign
def __str__(self):
if self.sign == 1:
return self.S
else:
return f"-{self.S}"
def __eq__(self,other):
if type(other) == Symbol:
if other.S == self.S:
return True
return False
def __neg__(self):
return Symbol(self.S,self.sign*-1)
def __add__(self,other):
if self == other:
return Product([2,self])
else:
return Sum([self,other])
###############
## Combiners ##
###############
class Product:
def __init__(self,L):
if type(L) != list:
raise TypeError("Products must be lists")
self.L = L
def simplify(self):
pass
def __str__(self):
out = ""
for i in self.L:
out += f"{i}"
return out
class Sum:
def __init__(self,L):
if type(L) != list:
raise TypeError("Sums must be lists")
self.L = L
def simplify(self):
pass
def __str__(self):
out = ""
for i in self.L:
out += f" + {i}"
return out
#class Ratio:
#
# def __init__(self,N,D):
# self.N = N
# self.D = D
#
# def simplify(self):
# pass
#
# def __str__(self):
# return f"({self.N})/({self.D})"
#
#
#
#
#
#class Power:
#
# def __init__(self,b,p):
# self.b = b
# self.p = p
#
# def simplify(self):
# pass
#
# def __str__(self):
# return f"{self.b}^{self.p}"
|
class Symbol:
def __init__(self, S, sign=1):
if type(S) != str:
raise type_error('Symbols must be strings')
if S not in 'abcdefghijklmnopqrstuvwxyz':
raise value_error('Symbols must be lowercase letters')
self.S = S
self.sign = sign
def __str__(self):
if self.sign == 1:
return self.S
else:
return f'-{self.S}'
def __eq__(self, other):
if type(other) == Symbol:
if other.S == self.S:
return True
return False
def __neg__(self):
return symbol(self.S, self.sign * -1)
def __add__(self, other):
if self == other:
return product([2, self])
else:
return sum([self, other])
class Product:
def __init__(self, L):
if type(L) != list:
raise type_error('Products must be lists')
self.L = L
def simplify(self):
pass
def __str__(self):
out = ''
for i in self.L:
out += f'{i}'
return out
class Sum:
def __init__(self, L):
if type(L) != list:
raise type_error('Sums must be lists')
self.L = L
def simplify(self):
pass
def __str__(self):
out = ''
for i in self.L:
out += f' + {i}'
return out
|
# Enter your code here. Read input from STDIN. Print output to STDOUT
n=int(input())
roll_n=set(map(int,input().split()))
m=int(input())
roll_m=set(map(int,input().split()))
s=roll_n|roll_m
print(len(s))
|
n = int(input())
roll_n = set(map(int, input().split()))
m = int(input())
roll_m = set(map(int, input().split()))
s = roll_n | roll_m
print(len(s))
|
logLevel = 0
def log(msg):
if logLevel > 0:
print(msg)
else:
pass
def setLogLevel(value):
global logLevel
logLevel = value
|
log_level = 0
def log(msg):
if logLevel > 0:
print(msg)
else:
pass
def set_log_level(value):
global logLevel
log_level = value
|
def solution(moves):
moves = list(moves)
programs = [chr(s) for s in range(ord("a"), ord("a") + 16)]
hashmap = {program: position for position, program in enumerate(programs)}
movemap = {"s": spin, "x": exchange, "p": partner}
seen = []
s = "".join(programs)
while s not in seen:
seen.append(s)
for move, instructions in moves:
movemap.get(move)(instructions, programs, hashmap)
s = "".join(programs)
first = seen[1]
billionth = seen[1000000000 % len(seen)]
return first, billionth
def spin(x, programs, hashmap):
spin_size = int(x[0]) % len(programs)
new_programs = programs[-spin_size:] + programs[:-spin_size]
for i, program in enumerate(programs[-spin_size:]):
hashmap[program] = i
for program in programs[:-spin_size]:
hashmap[program] += spin_size
for i in range(len(programs)):
programs[i] = new_programs[i]
def exchange(positions, programs, hashmap):
a, b = map(int, positions)
pA, pB = programs[a], programs[b]
programs[a], programs[b] = programs[b], programs[a]
hashmap[pA], hashmap[pB] = hashmap[pB], hashmap[pA]
def partner(prog_names, programs, hashmap):
pA, pB = prog_names
a, b = hashmap[pA], hashmap[pB]
programs[a], programs[b] = programs[b], programs[a]
hashmap[pA], hashmap[pB] = hashmap[pB], hashmap[pA]
if __name__ == "__main__":
with open("aoc_day_16_input.txt", "r") as f:
s = ((inst[0], inst[1:].split("/")) for inst in f.readlines()[0].split(","))
answer = solution(s)
print(f"Part One: {answer[0]}")
print(f"Part Two: {answer[1]}")
|
def solution(moves):
moves = list(moves)
programs = [chr(s) for s in range(ord('a'), ord('a') + 16)]
hashmap = {program: position for (position, program) in enumerate(programs)}
movemap = {'s': spin, 'x': exchange, 'p': partner}
seen = []
s = ''.join(programs)
while s not in seen:
seen.append(s)
for (move, instructions) in moves:
movemap.get(move)(instructions, programs, hashmap)
s = ''.join(programs)
first = seen[1]
billionth = seen[1000000000 % len(seen)]
return (first, billionth)
def spin(x, programs, hashmap):
spin_size = int(x[0]) % len(programs)
new_programs = programs[-spin_size:] + programs[:-spin_size]
for (i, program) in enumerate(programs[-spin_size:]):
hashmap[program] = i
for program in programs[:-spin_size]:
hashmap[program] += spin_size
for i in range(len(programs)):
programs[i] = new_programs[i]
def exchange(positions, programs, hashmap):
(a, b) = map(int, positions)
(p_a, p_b) = (programs[a], programs[b])
(programs[a], programs[b]) = (programs[b], programs[a])
(hashmap[pA], hashmap[pB]) = (hashmap[pB], hashmap[pA])
def partner(prog_names, programs, hashmap):
(p_a, p_b) = prog_names
(a, b) = (hashmap[pA], hashmap[pB])
(programs[a], programs[b]) = (programs[b], programs[a])
(hashmap[pA], hashmap[pB]) = (hashmap[pB], hashmap[pA])
if __name__ == '__main__':
with open('aoc_day_16_input.txt', 'r') as f:
s = ((inst[0], inst[1:].split('/')) for inst in f.readlines()[0].split(','))
answer = solution(s)
print(f'Part One: {answer[0]}')
print(f'Part Two: {answer[1]}')
|
# The Nexus software is licensed under the BSD 2-Clause license.
#
# You should have recieved a copy of this license with the software.
# If you did not, you can find one at the following link.
#
# http://opensource.org/licenses/bsd-license.php
if len(parts) < 5:
self.client.sendServerMessage("For Make-a-Mob please use:")
self.client.sendServerMessage("/entity var blocktype MovementBehavior NearBehavior")
self.client.sendServerMessage("MovementBehavior: follow engulf pet random none")
self.client.sendServerMessage("NearBehavior: kill explode none")
var_continue = False
else:
if parts[2] == 0 or parts[2].lower() == "air" or parts[2].lower() == "blank" or parts[2].lower() == "clear" or parts[2].lower() == "empty" or parts[2].lower() == "none" or parts[2].lower() == "nothing":
self.client.sendServerMessage("Sorry, no invisible Make-a-Mobs allowed.")
var_continue = False
if var_continue:
try:
block = int(parts[2])
except ValueError:
try:
block = globals()['BLOCK_%s' % parts[2].upper()]
except KeyError:
self.client.sendServerMessage("'%s' is not a valid block type." % parts[2])
var_continue = False
if var_continue:
validmovebehaviors = ["follow","engulf","pet","random","none"]
movementbehavior = parts[3]
if movementbehavior not in validmovebehaviors:
self.client.sendServerMessage("'%s' is not a valid MovementBehavior." % movementbehavior)
var_continue = False
if var_continue:
validnearbehaviors = ["kill","explode","none"]
nearbehavior = parts[4]
if nearbehavior not in validnearbehaviors:
self.client.sendServerMessage("'%s' is not a valid NearBehavior." % nearbehavior)
var_continue = False
if var_continue:
self.var_entityselected = "var"
self.var_entityparts = [block,movementbehavior,nearbehavior]
|
if len(parts) < 5:
self.client.sendServerMessage('For Make-a-Mob please use:')
self.client.sendServerMessage('/entity var blocktype MovementBehavior NearBehavior')
self.client.sendServerMessage('MovementBehavior: follow engulf pet random none')
self.client.sendServerMessage('NearBehavior: kill explode none')
var_continue = False
else:
if parts[2] == 0 or parts[2].lower() == 'air' or parts[2].lower() == 'blank' or (parts[2].lower() == 'clear') or (parts[2].lower() == 'empty') or (parts[2].lower() == 'none') or (parts[2].lower() == 'nothing'):
self.client.sendServerMessage('Sorry, no invisible Make-a-Mobs allowed.')
var_continue = False
if var_continue:
try:
block = int(parts[2])
except ValueError:
try:
block = globals()['BLOCK_%s' % parts[2].upper()]
except KeyError:
self.client.sendServerMessage("'%s' is not a valid block type." % parts[2])
var_continue = False
if var_continue:
validmovebehaviors = ['follow', 'engulf', 'pet', 'random', 'none']
movementbehavior = parts[3]
if movementbehavior not in validmovebehaviors:
self.client.sendServerMessage("'%s' is not a valid MovementBehavior." % movementbehavior)
var_continue = False
if var_continue:
validnearbehaviors = ['kill', 'explode', 'none']
nearbehavior = parts[4]
if nearbehavior not in validnearbehaviors:
self.client.sendServerMessage("'%s' is not a valid NearBehavior." % nearbehavior)
var_continue = False
if var_continue:
self.var_entityselected = 'var'
self.var_entityparts = [block, movementbehavior, nearbehavior]
|
del_items(0x80122D48)
SetType(0x80122D48, "struct THEME_LOC themeLoc[50]")
del_items(0x80123490)
SetType(0x80123490, "int OldBlock[4]")
del_items(0x801234A0)
SetType(0x801234A0, "unsigned char L5dungeon[80][80]")
del_items(0x80123130)
SetType(0x80123130, "struct ShadowStruct SPATS[37]")
del_items(0x80123234)
SetType(0x80123234, "unsigned char BSTYPES[206]")
del_items(0x80123304)
SetType(0x80123304, "unsigned char L5BTYPES[206]")
del_items(0x801233D4)
SetType(0x801233D4, "unsigned char STAIRSUP[34]")
del_items(0x801233F8)
SetType(0x801233F8, "unsigned char L5STAIRSUP[34]")
del_items(0x8012341C)
SetType(0x8012341C, "unsigned char STAIRSDOWN[26]")
del_items(0x80123438)
SetType(0x80123438, "unsigned char LAMPS[10]")
del_items(0x80123444)
SetType(0x80123444, "unsigned char PWATERIN[74]")
del_items(0x80122D38)
SetType(0x80122D38, "unsigned char L5ConvTbl[16]")
del_items(0x8012B6D0)
SetType(0x8012B6D0, "struct ROOMNODE RoomList[81]")
del_items(0x8012BD24)
SetType(0x8012BD24, "unsigned char predungeon[40][40]")
del_items(0x80129E60)
SetType(0x80129E60, "int Dir_Xadd[5]")
del_items(0x80129E74)
SetType(0x80129E74, "int Dir_Yadd[5]")
del_items(0x80129E88)
SetType(0x80129E88, "struct ShadowStruct SPATSL2[2]")
del_items(0x80129E98)
SetType(0x80129E98, "unsigned char BTYPESL2[161]")
del_items(0x80129F3C)
SetType(0x80129F3C, "unsigned char BSTYPESL2[161]")
del_items(0x80129FE0)
SetType(0x80129FE0, "unsigned char VARCH1[18]")
del_items(0x80129FF4)
SetType(0x80129FF4, "unsigned char VARCH2[18]")
del_items(0x8012A008)
SetType(0x8012A008, "unsigned char VARCH3[18]")
del_items(0x8012A01C)
SetType(0x8012A01C, "unsigned char VARCH4[18]")
del_items(0x8012A030)
SetType(0x8012A030, "unsigned char VARCH5[18]")
del_items(0x8012A044)
SetType(0x8012A044, "unsigned char VARCH6[18]")
del_items(0x8012A058)
SetType(0x8012A058, "unsigned char VARCH7[18]")
del_items(0x8012A06C)
SetType(0x8012A06C, "unsigned char VARCH8[18]")
del_items(0x8012A080)
SetType(0x8012A080, "unsigned char VARCH9[18]")
del_items(0x8012A094)
SetType(0x8012A094, "unsigned char VARCH10[18]")
del_items(0x8012A0A8)
SetType(0x8012A0A8, "unsigned char VARCH11[18]")
del_items(0x8012A0BC)
SetType(0x8012A0BC, "unsigned char VARCH12[18]")
del_items(0x8012A0D0)
SetType(0x8012A0D0, "unsigned char VARCH13[18]")
del_items(0x8012A0E4)
SetType(0x8012A0E4, "unsigned char VARCH14[18]")
del_items(0x8012A0F8)
SetType(0x8012A0F8, "unsigned char VARCH15[18]")
del_items(0x8012A10C)
SetType(0x8012A10C, "unsigned char VARCH16[18]")
del_items(0x8012A120)
SetType(0x8012A120, "unsigned char VARCH17[14]")
del_items(0x8012A130)
SetType(0x8012A130, "unsigned char VARCH18[14]")
del_items(0x8012A140)
SetType(0x8012A140, "unsigned char VARCH19[14]")
del_items(0x8012A150)
SetType(0x8012A150, "unsigned char VARCH20[14]")
del_items(0x8012A160)
SetType(0x8012A160, "unsigned char VARCH21[14]")
del_items(0x8012A170)
SetType(0x8012A170, "unsigned char VARCH22[14]")
del_items(0x8012A180)
SetType(0x8012A180, "unsigned char VARCH23[14]")
del_items(0x8012A190)
SetType(0x8012A190, "unsigned char VARCH24[14]")
del_items(0x8012A1A0)
SetType(0x8012A1A0, "unsigned char VARCH25[18]")
del_items(0x8012A1B4)
SetType(0x8012A1B4, "unsigned char VARCH26[18]")
del_items(0x8012A1C8)
SetType(0x8012A1C8, "unsigned char VARCH27[18]")
del_items(0x8012A1DC)
SetType(0x8012A1DC, "unsigned char VARCH28[18]")
del_items(0x8012A1F0)
SetType(0x8012A1F0, "unsigned char VARCH29[18]")
del_items(0x8012A204)
SetType(0x8012A204, "unsigned char VARCH30[18]")
del_items(0x8012A218)
SetType(0x8012A218, "unsigned char VARCH31[18]")
del_items(0x8012A22C)
SetType(0x8012A22C, "unsigned char VARCH32[18]")
del_items(0x8012A240)
SetType(0x8012A240, "unsigned char VARCH33[18]")
del_items(0x8012A254)
SetType(0x8012A254, "unsigned char VARCH34[18]")
del_items(0x8012A268)
SetType(0x8012A268, "unsigned char VARCH35[18]")
del_items(0x8012A27C)
SetType(0x8012A27C, "unsigned char VARCH36[18]")
del_items(0x8012A290)
SetType(0x8012A290, "unsigned char VARCH37[18]")
del_items(0x8012A2A4)
SetType(0x8012A2A4, "unsigned char VARCH38[18]")
del_items(0x8012A2B8)
SetType(0x8012A2B8, "unsigned char VARCH39[18]")
del_items(0x8012A2CC)
SetType(0x8012A2CC, "unsigned char VARCH40[18]")
del_items(0x8012A2E0)
SetType(0x8012A2E0, "unsigned char HARCH1[14]")
del_items(0x8012A2F0)
SetType(0x8012A2F0, "unsigned char HARCH2[14]")
del_items(0x8012A300)
SetType(0x8012A300, "unsigned char HARCH3[14]")
del_items(0x8012A310)
SetType(0x8012A310, "unsigned char HARCH4[14]")
del_items(0x8012A320)
SetType(0x8012A320, "unsigned char HARCH5[14]")
del_items(0x8012A330)
SetType(0x8012A330, "unsigned char HARCH6[14]")
del_items(0x8012A340)
SetType(0x8012A340, "unsigned char HARCH7[14]")
del_items(0x8012A350)
SetType(0x8012A350, "unsigned char HARCH8[14]")
del_items(0x8012A360)
SetType(0x8012A360, "unsigned char HARCH9[14]")
del_items(0x8012A370)
SetType(0x8012A370, "unsigned char HARCH10[14]")
del_items(0x8012A380)
SetType(0x8012A380, "unsigned char HARCH11[14]")
del_items(0x8012A390)
SetType(0x8012A390, "unsigned char HARCH12[14]")
del_items(0x8012A3A0)
SetType(0x8012A3A0, "unsigned char HARCH13[14]")
del_items(0x8012A3B0)
SetType(0x8012A3B0, "unsigned char HARCH14[14]")
del_items(0x8012A3C0)
SetType(0x8012A3C0, "unsigned char HARCH15[14]")
del_items(0x8012A3D0)
SetType(0x8012A3D0, "unsigned char HARCH16[14]")
del_items(0x8012A3E0)
SetType(0x8012A3E0, "unsigned char HARCH17[14]")
del_items(0x8012A3F0)
SetType(0x8012A3F0, "unsigned char HARCH18[14]")
del_items(0x8012A400)
SetType(0x8012A400, "unsigned char HARCH19[14]")
del_items(0x8012A410)
SetType(0x8012A410, "unsigned char HARCH20[14]")
del_items(0x8012A420)
SetType(0x8012A420, "unsigned char HARCH21[14]")
del_items(0x8012A430)
SetType(0x8012A430, "unsigned char HARCH22[14]")
del_items(0x8012A440)
SetType(0x8012A440, "unsigned char HARCH23[14]")
del_items(0x8012A450)
SetType(0x8012A450, "unsigned char HARCH24[14]")
del_items(0x8012A460)
SetType(0x8012A460, "unsigned char HARCH25[14]")
del_items(0x8012A470)
SetType(0x8012A470, "unsigned char HARCH26[14]")
del_items(0x8012A480)
SetType(0x8012A480, "unsigned char HARCH27[14]")
del_items(0x8012A490)
SetType(0x8012A490, "unsigned char HARCH28[14]")
del_items(0x8012A4A0)
SetType(0x8012A4A0, "unsigned char HARCH29[14]")
del_items(0x8012A4B0)
SetType(0x8012A4B0, "unsigned char HARCH30[14]")
del_items(0x8012A4C0)
SetType(0x8012A4C0, "unsigned char HARCH31[14]")
del_items(0x8012A4D0)
SetType(0x8012A4D0, "unsigned char HARCH32[14]")
del_items(0x8012A4E0)
SetType(0x8012A4E0, "unsigned char HARCH33[14]")
del_items(0x8012A4F0)
SetType(0x8012A4F0, "unsigned char HARCH34[14]")
del_items(0x8012A500)
SetType(0x8012A500, "unsigned char HARCH35[14]")
del_items(0x8012A510)
SetType(0x8012A510, "unsigned char HARCH36[14]")
del_items(0x8012A520)
SetType(0x8012A520, "unsigned char HARCH37[14]")
del_items(0x8012A530)
SetType(0x8012A530, "unsigned char HARCH38[14]")
del_items(0x8012A540)
SetType(0x8012A540, "unsigned char HARCH39[14]")
del_items(0x8012A550)
SetType(0x8012A550, "unsigned char HARCH40[14]")
del_items(0x8012A560)
SetType(0x8012A560, "unsigned char USTAIRS[34]")
del_items(0x8012A584)
SetType(0x8012A584, "unsigned char DSTAIRS[34]")
del_items(0x8012A5A8)
SetType(0x8012A5A8, "unsigned char WARPSTAIRS[34]")
del_items(0x8012A5CC)
SetType(0x8012A5CC, "unsigned char CRUSHCOL[20]")
del_items(0x8012A5E0)
SetType(0x8012A5E0, "unsigned char BIG1[10]")
del_items(0x8012A5EC)
SetType(0x8012A5EC, "unsigned char BIG2[10]")
del_items(0x8012A5F8)
SetType(0x8012A5F8, "unsigned char BIG5[10]")
del_items(0x8012A604)
SetType(0x8012A604, "unsigned char BIG8[10]")
del_items(0x8012A610)
SetType(0x8012A610, "unsigned char BIG9[10]")
del_items(0x8012A61C)
SetType(0x8012A61C, "unsigned char BIG10[10]")
del_items(0x8012A628)
SetType(0x8012A628, "unsigned char PANCREAS1[32]")
del_items(0x8012A648)
SetType(0x8012A648, "unsigned char PANCREAS2[32]")
del_items(0x8012A668)
SetType(0x8012A668, "unsigned char CTRDOOR1[20]")
del_items(0x8012A67C)
SetType(0x8012A67C, "unsigned char CTRDOOR2[20]")
del_items(0x8012A690)
SetType(0x8012A690, "unsigned char CTRDOOR3[20]")
del_items(0x8012A6A4)
SetType(0x8012A6A4, "unsigned char CTRDOOR4[20]")
del_items(0x8012A6B8)
SetType(0x8012A6B8, "unsigned char CTRDOOR5[20]")
del_items(0x8012A6CC)
SetType(0x8012A6CC, "unsigned char CTRDOOR6[20]")
del_items(0x8012A6E0)
SetType(0x8012A6E0, "unsigned char CTRDOOR7[20]")
del_items(0x8012A6F4)
SetType(0x8012A6F4, "unsigned char CTRDOOR8[20]")
del_items(0x8012A708)
SetType(0x8012A708, "int Patterns[10][100]")
del_items(0x80131718)
SetType(0x80131718, "unsigned char lockout[40][40]")
del_items(0x80131478)
SetType(0x80131478, "unsigned char L3ConvTbl[16]")
del_items(0x80131488)
SetType(0x80131488, "unsigned char L3UP[20]")
del_items(0x8013149C)
SetType(0x8013149C, "unsigned char L3DOWN[20]")
del_items(0x801314B0)
SetType(0x801314B0, "unsigned char L3HOLDWARP[20]")
del_items(0x801314C4)
SetType(0x801314C4, "unsigned char L3TITE1[34]")
del_items(0x801314E8)
SetType(0x801314E8, "unsigned char L3TITE2[34]")
del_items(0x8013150C)
SetType(0x8013150C, "unsigned char L3TITE3[34]")
del_items(0x80131530)
SetType(0x80131530, "unsigned char L3TITE6[42]")
del_items(0x8013155C)
SetType(0x8013155C, "unsigned char L3TITE7[42]")
del_items(0x80131588)
SetType(0x80131588, "unsigned char L3TITE8[20]")
del_items(0x8013159C)
SetType(0x8013159C, "unsigned char L3TITE9[20]")
del_items(0x801315B0)
SetType(0x801315B0, "unsigned char L3TITE10[20]")
del_items(0x801315C4)
SetType(0x801315C4, "unsigned char L3TITE11[20]")
del_items(0x801315D8)
SetType(0x801315D8, "unsigned char L3ISLE1[14]")
del_items(0x801315E8)
SetType(0x801315E8, "unsigned char L3ISLE2[14]")
del_items(0x801315F8)
SetType(0x801315F8, "unsigned char L3ISLE3[14]")
del_items(0x80131608)
SetType(0x80131608, "unsigned char L3ISLE4[14]")
del_items(0x80131618)
SetType(0x80131618, "unsigned char L3ISLE5[10]")
del_items(0x80131624)
SetType(0x80131624, "unsigned char L3ANVIL[244]")
del_items(0x80136534)
SetType(0x80136534, "unsigned char dung[20][20]")
del_items(0x801366C4)
SetType(0x801366C4, "unsigned char hallok[20]")
del_items(0x801366D8)
SetType(0x801366D8, "unsigned char L4dungeon[80][80]")
del_items(0x80137FD8)
SetType(0x80137FD8, "unsigned char L4ConvTbl[16]")
del_items(0x80137FE8)
SetType(0x80137FE8, "unsigned char L4USTAIRS[42]")
del_items(0x80138014)
SetType(0x80138014, "unsigned char L4TWARP[42]")
del_items(0x80138040)
SetType(0x80138040, "unsigned char L4DSTAIRS[52]")
del_items(0x80138074)
SetType(0x80138074, "unsigned char L4PENTA[52]")
del_items(0x801380A8)
SetType(0x801380A8, "unsigned char L4PENTA2[52]")
del_items(0x801380DC)
SetType(0x801380DC, "unsigned char L4BTYPES[140]")
|
del_items(2148674888)
set_type(2148674888, 'struct THEME_LOC themeLoc[50]')
del_items(2148676752)
set_type(2148676752, 'int OldBlock[4]')
del_items(2148676768)
set_type(2148676768, 'unsigned char L5dungeon[80][80]')
del_items(2148675888)
set_type(2148675888, 'struct ShadowStruct SPATS[37]')
del_items(2148676148)
set_type(2148676148, 'unsigned char BSTYPES[206]')
del_items(2148676356)
set_type(2148676356, 'unsigned char L5BTYPES[206]')
del_items(2148676564)
set_type(2148676564, 'unsigned char STAIRSUP[34]')
del_items(2148676600)
set_type(2148676600, 'unsigned char L5STAIRSUP[34]')
del_items(2148676636)
set_type(2148676636, 'unsigned char STAIRSDOWN[26]')
del_items(2148676664)
set_type(2148676664, 'unsigned char LAMPS[10]')
del_items(2148676676)
set_type(2148676676, 'unsigned char PWATERIN[74]')
del_items(2148674872)
set_type(2148674872, 'unsigned char L5ConvTbl[16]')
del_items(2148710096)
set_type(2148710096, 'struct ROOMNODE RoomList[81]')
del_items(2148711716)
set_type(2148711716, 'unsigned char predungeon[40][40]')
del_items(2148703840)
set_type(2148703840, 'int Dir_Xadd[5]')
del_items(2148703860)
set_type(2148703860, 'int Dir_Yadd[5]')
del_items(2148703880)
set_type(2148703880, 'struct ShadowStruct SPATSL2[2]')
del_items(2148703896)
set_type(2148703896, 'unsigned char BTYPESL2[161]')
del_items(2148704060)
set_type(2148704060, 'unsigned char BSTYPESL2[161]')
del_items(2148704224)
set_type(2148704224, 'unsigned char VARCH1[18]')
del_items(2148704244)
set_type(2148704244, 'unsigned char VARCH2[18]')
del_items(2148704264)
set_type(2148704264, 'unsigned char VARCH3[18]')
del_items(2148704284)
set_type(2148704284, 'unsigned char VARCH4[18]')
del_items(2148704304)
set_type(2148704304, 'unsigned char VARCH5[18]')
del_items(2148704324)
set_type(2148704324, 'unsigned char VARCH6[18]')
del_items(2148704344)
set_type(2148704344, 'unsigned char VARCH7[18]')
del_items(2148704364)
set_type(2148704364, 'unsigned char VARCH8[18]')
del_items(2148704384)
set_type(2148704384, 'unsigned char VARCH9[18]')
del_items(2148704404)
set_type(2148704404, 'unsigned char VARCH10[18]')
del_items(2148704424)
set_type(2148704424, 'unsigned char VARCH11[18]')
del_items(2148704444)
set_type(2148704444, 'unsigned char VARCH12[18]')
del_items(2148704464)
set_type(2148704464, 'unsigned char VARCH13[18]')
del_items(2148704484)
set_type(2148704484, 'unsigned char VARCH14[18]')
del_items(2148704504)
set_type(2148704504, 'unsigned char VARCH15[18]')
del_items(2148704524)
set_type(2148704524, 'unsigned char VARCH16[18]')
del_items(2148704544)
set_type(2148704544, 'unsigned char VARCH17[14]')
del_items(2148704560)
set_type(2148704560, 'unsigned char VARCH18[14]')
del_items(2148704576)
set_type(2148704576, 'unsigned char VARCH19[14]')
del_items(2148704592)
set_type(2148704592, 'unsigned char VARCH20[14]')
del_items(2148704608)
set_type(2148704608, 'unsigned char VARCH21[14]')
del_items(2148704624)
set_type(2148704624, 'unsigned char VARCH22[14]')
del_items(2148704640)
set_type(2148704640, 'unsigned char VARCH23[14]')
del_items(2148704656)
set_type(2148704656, 'unsigned char VARCH24[14]')
del_items(2148704672)
set_type(2148704672, 'unsigned char VARCH25[18]')
del_items(2148704692)
set_type(2148704692, 'unsigned char VARCH26[18]')
del_items(2148704712)
set_type(2148704712, 'unsigned char VARCH27[18]')
del_items(2148704732)
set_type(2148704732, 'unsigned char VARCH28[18]')
del_items(2148704752)
set_type(2148704752, 'unsigned char VARCH29[18]')
del_items(2148704772)
set_type(2148704772, 'unsigned char VARCH30[18]')
del_items(2148704792)
set_type(2148704792, 'unsigned char VARCH31[18]')
del_items(2148704812)
set_type(2148704812, 'unsigned char VARCH32[18]')
del_items(2148704832)
set_type(2148704832, 'unsigned char VARCH33[18]')
del_items(2148704852)
set_type(2148704852, 'unsigned char VARCH34[18]')
del_items(2148704872)
set_type(2148704872, 'unsigned char VARCH35[18]')
del_items(2148704892)
set_type(2148704892, 'unsigned char VARCH36[18]')
del_items(2148704912)
set_type(2148704912, 'unsigned char VARCH37[18]')
del_items(2148704932)
set_type(2148704932, 'unsigned char VARCH38[18]')
del_items(2148704952)
set_type(2148704952, 'unsigned char VARCH39[18]')
del_items(2148704972)
set_type(2148704972, 'unsigned char VARCH40[18]')
del_items(2148704992)
set_type(2148704992, 'unsigned char HARCH1[14]')
del_items(2148705008)
set_type(2148705008, 'unsigned char HARCH2[14]')
del_items(2148705024)
set_type(2148705024, 'unsigned char HARCH3[14]')
del_items(2148705040)
set_type(2148705040, 'unsigned char HARCH4[14]')
del_items(2148705056)
set_type(2148705056, 'unsigned char HARCH5[14]')
del_items(2148705072)
set_type(2148705072, 'unsigned char HARCH6[14]')
del_items(2148705088)
set_type(2148705088, 'unsigned char HARCH7[14]')
del_items(2148705104)
set_type(2148705104, 'unsigned char HARCH8[14]')
del_items(2148705120)
set_type(2148705120, 'unsigned char HARCH9[14]')
del_items(2148705136)
set_type(2148705136, 'unsigned char HARCH10[14]')
del_items(2148705152)
set_type(2148705152, 'unsigned char HARCH11[14]')
del_items(2148705168)
set_type(2148705168, 'unsigned char HARCH12[14]')
del_items(2148705184)
set_type(2148705184, 'unsigned char HARCH13[14]')
del_items(2148705200)
set_type(2148705200, 'unsigned char HARCH14[14]')
del_items(2148705216)
set_type(2148705216, 'unsigned char HARCH15[14]')
del_items(2148705232)
set_type(2148705232, 'unsigned char HARCH16[14]')
del_items(2148705248)
set_type(2148705248, 'unsigned char HARCH17[14]')
del_items(2148705264)
set_type(2148705264, 'unsigned char HARCH18[14]')
del_items(2148705280)
set_type(2148705280, 'unsigned char HARCH19[14]')
del_items(2148705296)
set_type(2148705296, 'unsigned char HARCH20[14]')
del_items(2148705312)
set_type(2148705312, 'unsigned char HARCH21[14]')
del_items(2148705328)
set_type(2148705328, 'unsigned char HARCH22[14]')
del_items(2148705344)
set_type(2148705344, 'unsigned char HARCH23[14]')
del_items(2148705360)
set_type(2148705360, 'unsigned char HARCH24[14]')
del_items(2148705376)
set_type(2148705376, 'unsigned char HARCH25[14]')
del_items(2148705392)
set_type(2148705392, 'unsigned char HARCH26[14]')
del_items(2148705408)
set_type(2148705408, 'unsigned char HARCH27[14]')
del_items(2148705424)
set_type(2148705424, 'unsigned char HARCH28[14]')
del_items(2148705440)
set_type(2148705440, 'unsigned char HARCH29[14]')
del_items(2148705456)
set_type(2148705456, 'unsigned char HARCH30[14]')
del_items(2148705472)
set_type(2148705472, 'unsigned char HARCH31[14]')
del_items(2148705488)
set_type(2148705488, 'unsigned char HARCH32[14]')
del_items(2148705504)
set_type(2148705504, 'unsigned char HARCH33[14]')
del_items(2148705520)
set_type(2148705520, 'unsigned char HARCH34[14]')
del_items(2148705536)
set_type(2148705536, 'unsigned char HARCH35[14]')
del_items(2148705552)
set_type(2148705552, 'unsigned char HARCH36[14]')
del_items(2148705568)
set_type(2148705568, 'unsigned char HARCH37[14]')
del_items(2148705584)
set_type(2148705584, 'unsigned char HARCH38[14]')
del_items(2148705600)
set_type(2148705600, 'unsigned char HARCH39[14]')
del_items(2148705616)
set_type(2148705616, 'unsigned char HARCH40[14]')
del_items(2148705632)
set_type(2148705632, 'unsigned char USTAIRS[34]')
del_items(2148705668)
set_type(2148705668, 'unsigned char DSTAIRS[34]')
del_items(2148705704)
set_type(2148705704, 'unsigned char WARPSTAIRS[34]')
del_items(2148705740)
set_type(2148705740, 'unsigned char CRUSHCOL[20]')
del_items(2148705760)
set_type(2148705760, 'unsigned char BIG1[10]')
del_items(2148705772)
set_type(2148705772, 'unsigned char BIG2[10]')
del_items(2148705784)
set_type(2148705784, 'unsigned char BIG5[10]')
del_items(2148705796)
set_type(2148705796, 'unsigned char BIG8[10]')
del_items(2148705808)
set_type(2148705808, 'unsigned char BIG9[10]')
del_items(2148705820)
set_type(2148705820, 'unsigned char BIG10[10]')
del_items(2148705832)
set_type(2148705832, 'unsigned char PANCREAS1[32]')
del_items(2148705864)
set_type(2148705864, 'unsigned char PANCREAS2[32]')
del_items(2148705896)
set_type(2148705896, 'unsigned char CTRDOOR1[20]')
del_items(2148705916)
set_type(2148705916, 'unsigned char CTRDOOR2[20]')
del_items(2148705936)
set_type(2148705936, 'unsigned char CTRDOOR3[20]')
del_items(2148705956)
set_type(2148705956, 'unsigned char CTRDOOR4[20]')
del_items(2148705976)
set_type(2148705976, 'unsigned char CTRDOOR5[20]')
del_items(2148705996)
set_type(2148705996, 'unsigned char CTRDOOR6[20]')
del_items(2148706016)
set_type(2148706016, 'unsigned char CTRDOOR7[20]')
del_items(2148706036)
set_type(2148706036, 'unsigned char CTRDOOR8[20]')
del_items(2148706056)
set_type(2148706056, 'int Patterns[10][100]')
del_items(2148734744)
set_type(2148734744, 'unsigned char lockout[40][40]')
del_items(2148734072)
set_type(2148734072, 'unsigned char L3ConvTbl[16]')
del_items(2148734088)
set_type(2148734088, 'unsigned char L3UP[20]')
del_items(2148734108)
set_type(2148734108, 'unsigned char L3DOWN[20]')
del_items(2148734128)
set_type(2148734128, 'unsigned char L3HOLDWARP[20]')
del_items(2148734148)
set_type(2148734148, 'unsigned char L3TITE1[34]')
del_items(2148734184)
set_type(2148734184, 'unsigned char L3TITE2[34]')
del_items(2148734220)
set_type(2148734220, 'unsigned char L3TITE3[34]')
del_items(2148734256)
set_type(2148734256, 'unsigned char L3TITE6[42]')
del_items(2148734300)
set_type(2148734300, 'unsigned char L3TITE7[42]')
del_items(2148734344)
set_type(2148734344, 'unsigned char L3TITE8[20]')
del_items(2148734364)
set_type(2148734364, 'unsigned char L3TITE9[20]')
del_items(2148734384)
set_type(2148734384, 'unsigned char L3TITE10[20]')
del_items(2148734404)
set_type(2148734404, 'unsigned char L3TITE11[20]')
del_items(2148734424)
set_type(2148734424, 'unsigned char L3ISLE1[14]')
del_items(2148734440)
set_type(2148734440, 'unsigned char L3ISLE2[14]')
del_items(2148734456)
set_type(2148734456, 'unsigned char L3ISLE3[14]')
del_items(2148734472)
set_type(2148734472, 'unsigned char L3ISLE4[14]')
del_items(2148734488)
set_type(2148734488, 'unsigned char L3ISLE5[10]')
del_items(2148734500)
set_type(2148734500, 'unsigned char L3ANVIL[244]')
del_items(2148754740)
set_type(2148754740, 'unsigned char dung[20][20]')
del_items(2148755140)
set_type(2148755140, 'unsigned char hallok[20]')
del_items(2148755160)
set_type(2148755160, 'unsigned char L4dungeon[80][80]')
del_items(2148761560)
set_type(2148761560, 'unsigned char L4ConvTbl[16]')
del_items(2148761576)
set_type(2148761576, 'unsigned char L4USTAIRS[42]')
del_items(2148761620)
set_type(2148761620, 'unsigned char L4TWARP[42]')
del_items(2148761664)
set_type(2148761664, 'unsigned char L4DSTAIRS[52]')
del_items(2148761716)
set_type(2148761716, 'unsigned char L4PENTA[52]')
del_items(2148761768)
set_type(2148761768, 'unsigned char L4PENTA2[52]')
del_items(2148761820)
set_type(2148761820, 'unsigned char L4BTYPES[140]')
|
'''
some other implementations:
recursive:
def binary_search(array, key, start, end):
if end < start:
return -1
else:
midpoint = start + (end - start) // 2
if key < array[midpoint]:
return binary_search(array, key, start, midpoint - 1)
elif key > array[midpoint]:
return binary_search(array, key, midpoint + 1, end)
else:
return midpoint
iterative:
def binary_search(array, key, start, end):
while start <= end:
midpoint = start + (end - start) // 2
if key < array[midpoint]:
end = midpoint - 1
elif key > array[midpoint]:
start = midpoint + 1
else:
return midpoint
return -1
'''
def binary_search(array, key, start, end):
while start < end:
midpoint = start + (end - start) // 2
if array[midpoint] < key:
start = midpoint + 1
else:
end = midpoint
if start == end and array[start] == key:
return start
else:
return -1
|
"""
some other implementations:
recursive:
def binary_search(array, key, start, end):
if end < start:
return -1
else:
midpoint = start + (end - start) // 2
if key < array[midpoint]:
return binary_search(array, key, start, midpoint - 1)
elif key > array[midpoint]:
return binary_search(array, key, midpoint + 1, end)
else:
return midpoint
iterative:
def binary_search(array, key, start, end):
while start <= end:
midpoint = start + (end - start) // 2
if key < array[midpoint]:
end = midpoint - 1
elif key > array[midpoint]:
start = midpoint + 1
else:
return midpoint
return -1
"""
def binary_search(array, key, start, end):
while start < end:
midpoint = start + (end - start) // 2
if array[midpoint] < key:
start = midpoint + 1
else:
end = midpoint
if start == end and array[start] == key:
return start
else:
return -1
|
bil = -4
if (bil > 0):
print("Bilangan positif")
else:
print("Bilangan negatif atau nol")
|
bil = -4
if bil > 0:
print('Bilangan positif')
else:
print('Bilangan negatif atau nol')
|
input_name: str = input()
if input_name == 'Johnny':
print('Hello, my love!')
else:
print(f'Hello, {input_name}!')
|
input_name: str = input()
if input_name == 'Johnny':
print('Hello, my love!')
else:
print(f'Hello, {input_name}!')
|
def binary_search(array, target):
first = 0
last = len(array) - 1
while first <= last:
midpoint = (first + last) // 2
if array[midpoint] == target:
return midpoint
elif array[midpoint] < target:
first = midpoint + 1
elif array[midpoint] > target:
last = midpoint - 1
return None
def verify(index, target):
if index is not None:
print("Target", target, "found at index:", index)
else:
print("Target", target, "not in list")
array = [x for x in range(1, 11)]
print("Input array:", array)
verify(binary_search(array, 6), 6)
verify(binary_search(array, 20), 20)
|
def binary_search(array, target):
first = 0
last = len(array) - 1
while first <= last:
midpoint = (first + last) // 2
if array[midpoint] == target:
return midpoint
elif array[midpoint] < target:
first = midpoint + 1
elif array[midpoint] > target:
last = midpoint - 1
return None
def verify(index, target):
if index is not None:
print('Target', target, 'found at index:', index)
else:
print('Target', target, 'not in list')
array = [x for x in range(1, 11)]
print('Input array:', array)
verify(binary_search(array, 6), 6)
verify(binary_search(array, 20), 20)
|
def next_bigger(n):
"""Finds the next bigger number with the same digits."""
# Convert n to a string and a list in reverse for ease.
n_string = str(n)[::-1]
n_list = [int(x) for x in n_string]
# Go through each digit and identify when there is a lower digit.
number_previous = n_list[0]
for position, number in enumerate(n_list):
if number_previous > number:
# Create slice of numbers that need to be changed.
n_list_piece = n_list[:position+1]
# Set the starting digit which will be the next higher than the "number"
first_set_list = list(set(n_list_piece))
first_set_list.sort()
number_position = first_set_list.index(number)
first = first_set_list[number_position+1]
# Numbers after the position will always be in sorted order.
n_list_piece.sort()
n_list_piece.remove(first)
n_list_piece = [first] + n_list_piece
n_string_piece = ""
for z in n_list_piece:
n_string_piece += str(z)
# Magic
if n_list[position+1:]:
n_string = n_string[position+1:]
solution = n_string[::-1] + n_string_piece
else:
solution = n_string_piece
return int(solution)
else:
number_previous = number
return -1
print(next_bigger(541237520))
|
def next_bigger(n):
"""Finds the next bigger number with the same digits."""
n_string = str(n)[::-1]
n_list = [int(x) for x in n_string]
number_previous = n_list[0]
for (position, number) in enumerate(n_list):
if number_previous > number:
n_list_piece = n_list[:position + 1]
first_set_list = list(set(n_list_piece))
first_set_list.sort()
number_position = first_set_list.index(number)
first = first_set_list[number_position + 1]
n_list_piece.sort()
n_list_piece.remove(first)
n_list_piece = [first] + n_list_piece
n_string_piece = ''
for z in n_list_piece:
n_string_piece += str(z)
if n_list[position + 1:]:
n_string = n_string[position + 1:]
solution = n_string[::-1] + n_string_piece
else:
solution = n_string_piece
return int(solution)
else:
number_previous = number
return -1
print(next_bigger(541237520))
|
class Solution:
def heightChecker(self, heights: List[int]) -> int:
expected = sorted(heights)
indices=0
for i in range(len(heights)):
if(heights[i] != expected[i]):
indices += 1
return indices
|
class Solution:
def height_checker(self, heights: List[int]) -> int:
expected = sorted(heights)
indices = 0
for i in range(len(heights)):
if heights[i] != expected[i]:
indices += 1
return indices
|
"""Top-level package for Nearest Neigbor Similarity."""
__author__ = """Shivam Ralli"""
__email__ = 'shivamralli167@gmail.com'
__version__ = '0.1.0'
|
"""Top-level package for Nearest Neigbor Similarity."""
__author__ = 'Shivam Ralli'
__email__ = 'shivamralli167@gmail.com'
__version__ = '0.1.0'
|
def Plus(a,b):
return a + b
def Minus(a,b):
return a - b
def Times(a,b):
return a*b
def Divide(a,b):
return a/b
|
def plus(a, b):
return a + b
def minus(a, b):
return a - b
def times(a, b):
return a * b
def divide(a, b):
return a / b
|
def filesFunctionField2list(files, func, field):
theList = []
for file in files:
record = {
"name": file,
field: func(file)
}
theList.append(record)
return theList
def filesClassFunctionField2list(files, Class, functionString, field):
theList = []
for file in files:
myClass = Class(file)
method = getattr(myClass, functionString)
record = {
"name": file,
field: method()
}
theList.append(record)
return theList
|
def files_function_field2list(files, func, field):
the_list = []
for file in files:
record = {'name': file, field: func(file)}
theList.append(record)
return theList
def files_class_function_field2list(files, Class, functionString, field):
the_list = []
for file in files:
my_class = class(file)
method = getattr(myClass, functionString)
record = {'name': file, field: method()}
theList.append(record)
return theList
|
"""PostgreSQL helpers."""
# Use pgcrypto, instead of uuid-ossp
# Also create a function uuid_generate_v4 for backward compatibility
UUID_SUPPORT_STMT = """CREATE EXTENSION IF NOT EXISTS "pgcrypto";
CREATE OR REPLACE FUNCTION uuid_generate_v4()
RETURNS uuid
AS '
BEGIN
RETURN gen_random_uuid();
END'
LANGUAGE 'plpgsql';
"""
|
"""PostgreSQL helpers."""
uuid_support_stmt = 'CREATE EXTENSION IF NOT EXISTS "pgcrypto";\nCREATE OR REPLACE FUNCTION uuid_generate_v4()\nRETURNS uuid\nAS \'\nBEGIN\nRETURN gen_random_uuid();\nEND\'\nLANGUAGE \'plpgsql\';\n'
|
cancerlist = ["ACC", "BLCA", "BRCA", "CESC", "CHOL", "COAD", "DLBC", "ESCA", "GBM", "HNSC", "KICH", "KIRC", "KIRP", "LGG", "LIHC", "LUAD", "LUSC", "MESO", "OV", "PAAD", "PCPG", "PRAD", "READ", "SARC", "SKCM", "STAD", "TGCT", "THCA", "THYM", "UCEC", "UCS", "UVM"]
input_data_path = "/ngs/data3/public_data/TCGA_FireBrowse/Methylation"
merge_data_path = "/home/kwangsookim_lab/joonhyeong_park/Practice"
input_tumor = []
input_normal = []
output_merge_tumor = open(merge_data_path + "/PANCANCER.humanmethylation450.tumor.31tumors.txt", "w")
output_merge_normal = open(merge_data_path + "/PANCANCER.humanmethylation450.normal.31tumors.txt", 'w')
tumor_header = ["Site"]
normal_header = ["Site"]
for i in range(len(cancerlist)) :
cancer_data_path = input_data_path + "/" + cancerlist[i] + ".humanmethylation450/" + cancerlist[i] + ".humanmethylation450."
input_tumor.append(open(cancer_data_path + "tumor.txt", 'r'))
input_normal.append(open(cancer_data_path + "normal.txt", 'r'))
tumor_header += input_tumor[i].readline().replace('\n', '').split()[2:]
input_tumor[i].readline()
normal_header += input_normal[i].readline().replace('\n', '').split()[2:]
input_normal[i].readline()
output_merge_tumor.write("\t".join(tumor_header) + "\n")
output_merge_normal.write("\t".join(normal_header) + "\n")
iteration_number = 0
while(True) :
empty_line_check = 0
for i in range(len(cancerlist)) :
tumor_line = input_tumor[i].readline().split()
normal_line = input_normal[i].readline().split()
if(len(normal_line) == 0) : break
empty_line_check += len(normal_line) - 1
if(i != 0) :
del tumor_line[0]
del normal_line[0]
output_merge_tumor.write("\t".join(tumor_line))
output_merge_normal.write("\t".join(normal_line))
if(i != len(cancerlist) - 1) :
output_merge_tumor.write("\t")
output_merge_normal.write("\t")
if(empty_line_check == 0) : break
output_merge_tumor.write("\n")
output_merge_normal.write("\n")
if(iteration_number % 10000 == 0) : print(iteration_number)
iteration_number += 1
|
cancerlist = ['ACC', 'BLCA', 'BRCA', 'CESC', 'CHOL', 'COAD', 'DLBC', 'ESCA', 'GBM', 'HNSC', 'KICH', 'KIRC', 'KIRP', 'LGG', 'LIHC', 'LUAD', 'LUSC', 'MESO', 'OV', 'PAAD', 'PCPG', 'PRAD', 'READ', 'SARC', 'SKCM', 'STAD', 'TGCT', 'THCA', 'THYM', 'UCEC', 'UCS', 'UVM']
input_data_path = '/ngs/data3/public_data/TCGA_FireBrowse/Methylation'
merge_data_path = '/home/kwangsookim_lab/joonhyeong_park/Practice'
input_tumor = []
input_normal = []
output_merge_tumor = open(merge_data_path + '/PANCANCER.humanmethylation450.tumor.31tumors.txt', 'w')
output_merge_normal = open(merge_data_path + '/PANCANCER.humanmethylation450.normal.31tumors.txt', 'w')
tumor_header = ['Site']
normal_header = ['Site']
for i in range(len(cancerlist)):
cancer_data_path = input_data_path + '/' + cancerlist[i] + '.humanmethylation450/' + cancerlist[i] + '.humanmethylation450.'
input_tumor.append(open(cancer_data_path + 'tumor.txt', 'r'))
input_normal.append(open(cancer_data_path + 'normal.txt', 'r'))
tumor_header += input_tumor[i].readline().replace('\n', '').split()[2:]
input_tumor[i].readline()
normal_header += input_normal[i].readline().replace('\n', '').split()[2:]
input_normal[i].readline()
output_merge_tumor.write('\t'.join(tumor_header) + '\n')
output_merge_normal.write('\t'.join(normal_header) + '\n')
iteration_number = 0
while True:
empty_line_check = 0
for i in range(len(cancerlist)):
tumor_line = input_tumor[i].readline().split()
normal_line = input_normal[i].readline().split()
if len(normal_line) == 0:
break
empty_line_check += len(normal_line) - 1
if i != 0:
del tumor_line[0]
del normal_line[0]
output_merge_tumor.write('\t'.join(tumor_line))
output_merge_normal.write('\t'.join(normal_line))
if i != len(cancerlist) - 1:
output_merge_tumor.write('\t')
output_merge_normal.write('\t')
if empty_line_check == 0:
break
output_merge_tumor.write('\n')
output_merge_normal.write('\n')
if iteration_number % 10000 == 0:
print(iteration_number)
iteration_number += 1
|
N, L = map(int, input().split())
ans = 0
margin = float("inf")
for i in range(1, N + 1):
tar = 0
for j in range(1, N + 1):
tar += L + j - 1
res = 0
for j in range(1, N + 1):
if j == i:
continue
else:
res += L + j - 1
if abs(tar - res) < margin:
ans = res
margin = abs(tar - res)
print(ans)
|
(n, l) = map(int, input().split())
ans = 0
margin = float('inf')
for i in range(1, N + 1):
tar = 0
for j in range(1, N + 1):
tar += L + j - 1
res = 0
for j in range(1, N + 1):
if j == i:
continue
else:
res += L + j - 1
if abs(tar - res) < margin:
ans = res
margin = abs(tar - res)
print(ans)
|
#!/usr/bin/python3
def max_integer(my_list=[]):
if (len(my_list) == 0):
return (None)
a = my_list[0]
for i in range(0, len(my_list)):
if (my_list[i] > a):
a = my_list[i]
return (a)
|
def max_integer(my_list=[]):
if len(my_list) == 0:
return None
a = my_list[0]
for i in range(0, len(my_list)):
if my_list[i] > a:
a = my_list[i]
return a
|
"""Global constants module."""
GDRIVE_URL = 'https://drive.google.com'
DATASET_URL = '{0}/uc?id=1xABlWE790uWmT0mMxbDjn9KZlNUB6Y57'.format(GDRIVE_URL)
# dataset
LABEL_COLS = ('Jp', 'Becca', 'Katy')
# ignore resize
NO_RESIZE = (0, 0)
|
"""Global constants module."""
gdrive_url = 'https://drive.google.com'
dataset_url = '{0}/uc?id=1xABlWE790uWmT0mMxbDjn9KZlNUB6Y57'.format(GDRIVE_URL)
label_cols = ('Jp', 'Becca', 'Katy')
no_resize = (0, 0)
|
# Enter your code here
def triple(num):
num = num*3
print(num)
triple(6)
triple(99)
|
def triple(num):
num = num * 3
print(num)
triple(6)
triple(99)
|
""" Some exception classes for the ondevice client """
class _Exception(Exception):
def __init__(self, *args, **kwargs):
Exception.__init__(self, *args)
self.msg = args[0]
for k,v in kwargs.items():
setattr(self, k, v)
class ConfigurationError(_Exception):
""" Indicates a missing/faulty configuration value """
pass
class ImplementationError(_Exception):
""" Indicates implementation issues with a command or module """
pass
class TransportError(_Exception):
""" Indicates a communication error with the server """
pass
class UsageError(_Exception):
""" Indicates issues with the commandline usage (unknown command, unsupported argument, etc.) """
pass
|
""" Some exception classes for the ondevice client """
class _Exception(Exception):
def __init__(self, *args, **kwargs):
Exception.__init__(self, *args)
self.msg = args[0]
for (k, v) in kwargs.items():
setattr(self, k, v)
class Configurationerror(_Exception):
""" Indicates a missing/faulty configuration value """
pass
class Implementationerror(_Exception):
""" Indicates implementation issues with a command or module """
pass
class Transporterror(_Exception):
""" Indicates a communication error with the server """
pass
class Usageerror(_Exception):
""" Indicates issues with the commandline usage (unknown command, unsupported argument, etc.) """
pass
|
EMBED_SIZE = 200
NUM_LAYERS = 2
LR = 0.0001
MAX_GRAD_NORM = 5.0
PAD_ID = 0
UNK_ID = 1
START_ID = 2
EOS_ID = 3
CONV_SIZE = 3
# sanity
# BUCKETS = [(55, 50)]
# BATCH_SIZE = 10
# NUM_EPOCHS = 50
# NUM_SAMPLES = 498
# HIDDEN_SIZE = 400
# test
BUCKETS = [(30, 30), (55, 50)]
BATCH_SIZE = 20
NUM_EPOCHS = 3
NUM_SAMPLES = 498
HIDDEN_SIZE = 400
# experiment 1
# BUCKETS = [(16, 28), (31, 28), (51, 28)]
# BATCH_SIZE = 400
# NUM_EPOCHS = 5
# NUM_SAMPLES = 40960
# HIDDEN_SIZE = 400
# experiment 2
# BUCKETS = [(102, 28)]
# BATCH_SIZE = 300
# NUM_EPOCHS = 5
# NUM_SAMPLES = 40960
# HIDDEN_SIZE = 250
|
embed_size = 200
num_layers = 2
lr = 0.0001
max_grad_norm = 5.0
pad_id = 0
unk_id = 1
start_id = 2
eos_id = 3
conv_size = 3
buckets = [(30, 30), (55, 50)]
batch_size = 20
num_epochs = 3
num_samples = 498
hidden_size = 400
|
# a = 42
# print(type(a))
# a = str(a)
# print(type(a))
a = 42.3
print(type(a))
a = str(a)
print(type(a))
|
a = 42.3
print(type(a))
a = str(a)
print(type(a))
|
#
# PySNMP MIB module ENTERASYS-IEEE802DOT11EXT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ENTERASYS-IEEE802DOT11EXT-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:49:11 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion")
etsysModules, = mibBuilder.importSymbols("ENTERASYS-MIB-NAMES", "etsysModules")
dot11WEPDefaultKeyIndex, = mibBuilder.importSymbols("IEEE802dot11-MIB", "dot11WEPDefaultKeyIndex")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
EnabledStatus, = mibBuilder.importSymbols("P-BRIDGE-MIB", "EnabledStatus")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
IpAddress, iso, Bits, Integer32, NotificationType, ModuleIdentity, TimeTicks, Gauge32, Unsigned32, Counter64, Counter32, ObjectIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "iso", "Bits", "Integer32", "NotificationType", "ModuleIdentity", "TimeTicks", "Gauge32", "Unsigned32", "Counter64", "Counter32", "ObjectIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
TruthValue, AutonomousType, MacAddress, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "AutonomousType", "MacAddress", "DisplayString", "TextualConvention")
etsysDot11ExtMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9))
etsysDot11ExtMIB.setRevisions(('2002-03-07 19:45', '2001-05-08 18:00',))
if mibBuilder.loadTexts: etsysDot11ExtMIB.setLastUpdated('200203071945Z')
if mibBuilder.loadTexts: etsysDot11ExtMIB.setOrganization('Enterasys Networks, Inc')
etsysDot11ExtObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1))
etsysDot11ExtLinkTest = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1))
etsysDot11ExtGeneral = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2))
etsysDot11ExtBldg = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3))
etsysDot11ExtWEP = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4))
etsysDot11ExtEffect = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 5))
etsysDot11ExtLinkTestTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1, 1), )
if mibBuilder.loadTexts: etsysDot11ExtLinkTestTable.setStatus('current')
etsysDot11ExtLinkTestEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: etsysDot11ExtLinkTestEntry.setStatus('current')
etsysDot11ExtLTRemoteStationMAC = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1, 1, 1, 1), MacAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtLTRemoteStationMAC.setStatus('current')
etsysDot11ExtLTRemoteStationName = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1, 1, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 20))).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysDot11ExtLTRemoteStationName.setStatus('current')
etsysDot11ExtLTTrigger = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtLTTrigger.setStatus('current')
etsysDot11ExtLTRemoteContents = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1, 1, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(84, 84)).setFixedLength(84)).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysDot11ExtLTRemoteContents.setStatus('current')
etsysDot11ExtGeneralTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1), )
if mibBuilder.loadTexts: etsysDot11ExtGeneralTable.setStatus('current')
etsysDot11ExtGeneralEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: etsysDot11ExtGeneralEntry.setStatus('current')
etsysDot11ExtPCCardType = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 15))).clone(namedValues=NamedValues(("none", 1), ("deprecatedValue1", 2), ("deprecatedValue2", 3), ("deprecatedValue3", 4), ("ds80211b", 5), ("ds80211a", 6), ("unknown", 15)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysDot11ExtPCCardType.setStatus('current')
etsysDot11ExtPCCardVersions = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 80))).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysDot11ExtPCCardVersions.setStatus('current')
etsysDot11ExtBridgeMode = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("workgroup", 1), ("lanToLanEndpoint", 2), ("lanToLanMultipoint", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtBridgeMode.setStatus('current')
etsysDot11ExtResetOptions = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("noReset", 0), ("resetRadioCardIfNecessary", 1), ("resetRadioCardRegardless", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtResetOptions.setStatus('current')
etsysDot11ExtSystemScale = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("low", 1), ("medium", 2), ("high", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtSystemScale.setStatus('current')
etsysDot11ExtSecureAccess = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 6), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtSecureAccess.setStatus('current')
etsysDot11ExtMulticastTxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("fixed1Mbit", 1), ("fixed2Mbit", 2), ("fixedMediumRate", 3), ("fixedHighRate", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtMulticastTxRate.setStatus('current')
etsysDot11ExtIntraBSSRelay = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 8), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtIntraBSSRelay.setStatus('current')
etsysDot11ExtStationName = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 9), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 20))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtStationName.setStatus('current')
etsysDot11ExtBldgTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1), )
if mibBuilder.loadTexts: etsysDot11ExtBldgTable.setStatus('current')
etsysDot11ExtBldgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: etsysDot11ExtBldgEntry.setStatus('current')
etsysDot11ExtBldgRemoteMAC1 = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 1), MacAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtBldgRemoteMAC1.setStatus('current')
etsysDot11ExtBldgRemoteMAC2 = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 2), MacAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtBldgRemoteMAC2.setStatus('current')
etsysDot11ExtBldgRemoteMAC3 = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 3), MacAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtBldgRemoteMAC3.setStatus('current')
etsysDot11ExtBldgRemoteMAC4 = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 4), MacAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtBldgRemoteMAC4.setStatus('current')
etsysDot11ExtBldgRemoteMAC5 = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 5), MacAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtBldgRemoteMAC5.setStatus('current')
etsysDot11ExtBldgRemoteMAC6 = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 6), MacAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtBldgRemoteMAC6.setStatus('current')
etsysDot11ExtBldgMPActivationKey = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtBldgMPActivationKey.setStatus('current')
etsysDot11ExtWEPDefaultKeysTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 1), )
if mibBuilder.loadTexts: etsysDot11ExtWEPDefaultKeysTable.setStatus('current')
etsysDot11ExtWEPDefaultKeysEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "IEEE802dot11-MIB", "dot11WEPDefaultKeyIndex"))
if mibBuilder.loadTexts: etsysDot11ExtWEPDefaultKeysEntry.setStatus('current')
etsysDot11ExtWEPKeyDefined = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 1, 1, 1), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysDot11ExtWEPKeyDefined.setStatus('current')
etsysDot11ExtWEPKeyValue = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 1, 1, 2), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(5, 5), ValueSizeConstraint(13, 13), ))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysDot11ExtWEPKeyValue.setStatus('current')
etsysDot11ExtWEPEnhancedTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 2), )
if mibBuilder.loadTexts: etsysDot11ExtWEPEnhancedTable.setStatus('current')
etsysDot11ExtWEPEnhancedEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: etsysDot11ExtWEPEnhancedEntry.setStatus('current')
etsysDot11ExtWEPEnhancedImplemented = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 2, 1, 1), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysDot11ExtWEPEnhancedImplemented.setStatus('current')
etsysDot11ExtOIDNotInEffectTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 5, 1), )
if mibBuilder.loadTexts: etsysDot11ExtOIDNotInEffectTable.setStatus('current')
etsysDot11ExtOIDNotInEffectEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 5, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtOIDIndex"))
if mibBuilder.loadTexts: etsysDot11ExtOIDNotInEffectEntry.setStatus('current')
etsysDot11ExtOIDIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 5, 1, 1, 1), AutonomousType())
if mibBuilder.loadTexts: etsysDot11ExtOIDIndex.setStatus('current')
etsysDot11ExtOIDNotInEffect = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 5, 1, 1, 2), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysDot11ExtOIDNotInEffect.setStatus('current')
etsysDot11ExtConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 2))
etsysDot11ExtGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 2, 1))
etsysDot11ExtCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 2, 2))
etsysDot11ExtBaseGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 2, 1, 1)).setObjects(("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtLTRemoteStationMAC"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtLTRemoteStationName"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtLTTrigger"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtLTRemoteContents"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtSystemScale"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtSecureAccess"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtMulticastTxRate"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtIntraBSSRelay"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtPCCardType"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtPCCardVersions"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtBridgeMode"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtResetOptions"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtStationName"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtBldgRemoteMAC1"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtBldgRemoteMAC2"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtBldgRemoteMAC3"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtBldgRemoteMAC4"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtBldgRemoteMAC5"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtBldgRemoteMAC6"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtBldgMPActivationKey"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtWEPKeyDefined"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtWEPKeyValue"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtWEPEnhancedImplemented"), ("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtOIDNotInEffect"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysDot11ExtBaseGroup = etsysDot11ExtBaseGroup.setStatus('current')
etsysDot11ExtCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 2, 2, 1)).setObjects(("ENTERASYS-IEEE802DOT11EXT-MIB", "etsysDot11ExtBaseGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysDot11ExtCompliance = etsysDot11ExtCompliance.setStatus('current')
mibBuilder.exportSymbols("ENTERASYS-IEEE802DOT11EXT-MIB", etsysDot11ExtLTRemoteStationMAC=etsysDot11ExtLTRemoteStationMAC, etsysDot11ExtOIDNotInEffect=etsysDot11ExtOIDNotInEffect, etsysDot11ExtPCCardType=etsysDot11ExtPCCardType, etsysDot11ExtMulticastTxRate=etsysDot11ExtMulticastTxRate, etsysDot11ExtLTRemoteContents=etsysDot11ExtLTRemoteContents, etsysDot11ExtWEPDefaultKeysTable=etsysDot11ExtWEPDefaultKeysTable, etsysDot11ExtBldg=etsysDot11ExtBldg, etsysDot11ExtConformance=etsysDot11ExtConformance, etsysDot11ExtLTTrigger=etsysDot11ExtLTTrigger, etsysDot11ExtStationName=etsysDot11ExtStationName, etsysDot11ExtBldgEntry=etsysDot11ExtBldgEntry, etsysDot11ExtBldgRemoteMAC4=etsysDot11ExtBldgRemoteMAC4, etsysDot11ExtOIDNotInEffectTable=etsysDot11ExtOIDNotInEffectTable, etsysDot11ExtWEPKeyValue=etsysDot11ExtWEPKeyValue, etsysDot11ExtOIDIndex=etsysDot11ExtOIDIndex, etsysDot11ExtLinkTest=etsysDot11ExtLinkTest, etsysDot11ExtGeneralTable=etsysDot11ExtGeneralTable, etsysDot11ExtWEP=etsysDot11ExtWEP, etsysDot11ExtBldgRemoteMAC5=etsysDot11ExtBldgRemoteMAC5, etsysDot11ExtPCCardVersions=etsysDot11ExtPCCardVersions, etsysDot11ExtLinkTestEntry=etsysDot11ExtLinkTestEntry, etsysDot11ExtWEPDefaultKeysEntry=etsysDot11ExtWEPDefaultKeysEntry, etsysDot11ExtGroups=etsysDot11ExtGroups, etsysDot11ExtLinkTestTable=etsysDot11ExtLinkTestTable, etsysDot11ExtOIDNotInEffectEntry=etsysDot11ExtOIDNotInEffectEntry, etsysDot11ExtBldgRemoteMAC1=etsysDot11ExtBldgRemoteMAC1, etsysDot11ExtEffect=etsysDot11ExtEffect, etsysDot11ExtBldgMPActivationKey=etsysDot11ExtBldgMPActivationKey, etsysDot11ExtSystemScale=etsysDot11ExtSystemScale, PYSNMP_MODULE_ID=etsysDot11ExtMIB, etsysDot11ExtBldgRemoteMAC6=etsysDot11ExtBldgRemoteMAC6, etsysDot11ExtGeneral=etsysDot11ExtGeneral, etsysDot11ExtWEPEnhancedTable=etsysDot11ExtWEPEnhancedTable, etsysDot11ExtWEPEnhancedEntry=etsysDot11ExtWEPEnhancedEntry, etsysDot11ExtWEPEnhancedImplemented=etsysDot11ExtWEPEnhancedImplemented, etsysDot11ExtBaseGroup=etsysDot11ExtBaseGroup, etsysDot11ExtMIB=etsysDot11ExtMIB, etsysDot11ExtWEPKeyDefined=etsysDot11ExtWEPKeyDefined, etsysDot11ExtResetOptions=etsysDot11ExtResetOptions, etsysDot11ExtSecureAccess=etsysDot11ExtSecureAccess, etsysDot11ExtCompliances=etsysDot11ExtCompliances, etsysDot11ExtBldgTable=etsysDot11ExtBldgTable, etsysDot11ExtLTRemoteStationName=etsysDot11ExtLTRemoteStationName, etsysDot11ExtCompliance=etsysDot11ExtCompliance, etsysDot11ExtGeneralEntry=etsysDot11ExtGeneralEntry, etsysDot11ExtBldgRemoteMAC2=etsysDot11ExtBldgRemoteMAC2, etsysDot11ExtObjects=etsysDot11ExtObjects, etsysDot11ExtIntraBSSRelay=etsysDot11ExtIntraBSSRelay, etsysDot11ExtBldgRemoteMAC3=etsysDot11ExtBldgRemoteMAC3, etsysDot11ExtBridgeMode=etsysDot11ExtBridgeMode)
|
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_intersection, value_size_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion')
(etsys_modules,) = mibBuilder.importSymbols('ENTERASYS-MIB-NAMES', 'etsysModules')
(dot11_wep_default_key_index,) = mibBuilder.importSymbols('IEEE802dot11-MIB', 'dot11WEPDefaultKeyIndex')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(enabled_status,) = mibBuilder.importSymbols('P-BRIDGE-MIB', 'EnabledStatus')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(ip_address, iso, bits, integer32, notification_type, module_identity, time_ticks, gauge32, unsigned32, counter64, counter32, object_identity, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'iso', 'Bits', 'Integer32', 'NotificationType', 'ModuleIdentity', 'TimeTicks', 'Gauge32', 'Unsigned32', 'Counter64', 'Counter32', 'ObjectIdentity', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn')
(truth_value, autonomous_type, mac_address, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'AutonomousType', 'MacAddress', 'DisplayString', 'TextualConvention')
etsys_dot11_ext_mib = module_identity((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9))
etsysDot11ExtMIB.setRevisions(('2002-03-07 19:45', '2001-05-08 18:00'))
if mibBuilder.loadTexts:
etsysDot11ExtMIB.setLastUpdated('200203071945Z')
if mibBuilder.loadTexts:
etsysDot11ExtMIB.setOrganization('Enterasys Networks, Inc')
etsys_dot11_ext_objects = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1))
etsys_dot11_ext_link_test = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1))
etsys_dot11_ext_general = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2))
etsys_dot11_ext_bldg = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3))
etsys_dot11_ext_wep = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4))
etsys_dot11_ext_effect = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 5))
etsys_dot11_ext_link_test_table = mib_table((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1, 1))
if mibBuilder.loadTexts:
etsysDot11ExtLinkTestTable.setStatus('current')
etsys_dot11_ext_link_test_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
etsysDot11ExtLinkTestEntry.setStatus('current')
etsys_dot11_ext_lt_remote_station_mac = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1, 1, 1, 1), mac_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtLTRemoteStationMAC.setStatus('current')
etsys_dot11_ext_lt_remote_station_name = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1, 1, 1, 2), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 20))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysDot11ExtLTRemoteStationName.setStatus('current')
etsys_dot11_ext_lt_trigger = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 1))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtLTTrigger.setStatus('current')
etsys_dot11_ext_lt_remote_contents = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 1, 1, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(84, 84)).setFixedLength(84)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysDot11ExtLTRemoteContents.setStatus('current')
etsys_dot11_ext_general_table = mib_table((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1))
if mibBuilder.loadTexts:
etsysDot11ExtGeneralTable.setStatus('current')
etsys_dot11_ext_general_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
etsysDot11ExtGeneralEntry.setStatus('current')
etsys_dot11_ext_pc_card_type = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 15))).clone(namedValues=named_values(('none', 1), ('deprecatedValue1', 2), ('deprecatedValue2', 3), ('deprecatedValue3', 4), ('ds80211b', 5), ('ds80211a', 6), ('unknown', 15)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysDot11ExtPCCardType.setStatus('current')
etsys_dot11_ext_pc_card_versions = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 2), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 80))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysDot11ExtPCCardVersions.setStatus('current')
etsys_dot11_ext_bridge_mode = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('workgroup', 1), ('lanToLanEndpoint', 2), ('lanToLanMultipoint', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtBridgeMode.setStatus('current')
etsys_dot11_ext_reset_options = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('noReset', 0), ('resetRadioCardIfNecessary', 1), ('resetRadioCardRegardless', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtResetOptions.setStatus('current')
etsys_dot11_ext_system_scale = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('low', 1), ('medium', 2), ('high', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtSystemScale.setStatus('current')
etsys_dot11_ext_secure_access = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 6), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtSecureAccess.setStatus('current')
etsys_dot11_ext_multicast_tx_rate = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('fixed1Mbit', 1), ('fixed2Mbit', 2), ('fixedMediumRate', 3), ('fixedHighRate', 4)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtMulticastTxRate.setStatus('current')
etsys_dot11_ext_intra_bss_relay = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 8), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtIntraBSSRelay.setStatus('current')
etsys_dot11_ext_station_name = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 2, 1, 1, 9), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 20))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtStationName.setStatus('current')
etsys_dot11_ext_bldg_table = mib_table((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1))
if mibBuilder.loadTexts:
etsysDot11ExtBldgTable.setStatus('current')
etsys_dot11_ext_bldg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
etsysDot11ExtBldgEntry.setStatus('current')
etsys_dot11_ext_bldg_remote_mac1 = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 1), mac_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtBldgRemoteMAC1.setStatus('current')
etsys_dot11_ext_bldg_remote_mac2 = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 2), mac_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtBldgRemoteMAC2.setStatus('current')
etsys_dot11_ext_bldg_remote_mac3 = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 3), mac_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtBldgRemoteMAC3.setStatus('current')
etsys_dot11_ext_bldg_remote_mac4 = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 4), mac_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtBldgRemoteMAC4.setStatus('current')
etsys_dot11_ext_bldg_remote_mac5 = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 5), mac_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtBldgRemoteMAC5.setStatus('current')
etsys_dot11_ext_bldg_remote_mac6 = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 6), mac_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtBldgRemoteMAC6.setStatus('current')
etsys_dot11_ext_bldg_mp_activation_key = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 3, 1, 1, 7), octet_string().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtBldgMPActivationKey.setStatus('current')
etsys_dot11_ext_wep_default_keys_table = mib_table((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 1))
if mibBuilder.loadTexts:
etsysDot11ExtWEPDefaultKeysTable.setStatus('current')
etsys_dot11_ext_wep_default_keys_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'IEEE802dot11-MIB', 'dot11WEPDefaultKeyIndex'))
if mibBuilder.loadTexts:
etsysDot11ExtWEPDefaultKeysEntry.setStatus('current')
etsys_dot11_ext_wep_key_defined = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 1, 1, 1), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysDot11ExtWEPKeyDefined.setStatus('current')
etsys_dot11_ext_wep_key_value = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 1, 1, 2), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(5, 5), value_size_constraint(13, 13)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysDot11ExtWEPKeyValue.setStatus('current')
etsys_dot11_ext_wep_enhanced_table = mib_table((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 2))
if mibBuilder.loadTexts:
etsysDot11ExtWEPEnhancedTable.setStatus('current')
etsys_dot11_ext_wep_enhanced_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
etsysDot11ExtWEPEnhancedEntry.setStatus('current')
etsys_dot11_ext_wep_enhanced_implemented = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 4, 2, 1, 1), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysDot11ExtWEPEnhancedImplemented.setStatus('current')
etsys_dot11_ext_oid_not_in_effect_table = mib_table((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 5, 1))
if mibBuilder.loadTexts:
etsysDot11ExtOIDNotInEffectTable.setStatus('current')
etsys_dot11_ext_oid_not_in_effect_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 5, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtOIDIndex'))
if mibBuilder.loadTexts:
etsysDot11ExtOIDNotInEffectEntry.setStatus('current')
etsys_dot11_ext_oid_index = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 5, 1, 1, 1), autonomous_type())
if mibBuilder.loadTexts:
etsysDot11ExtOIDIndex.setStatus('current')
etsys_dot11_ext_oid_not_in_effect = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 1, 5, 1, 1, 2), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysDot11ExtOIDNotInEffect.setStatus('current')
etsys_dot11_ext_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 2))
etsys_dot11_ext_groups = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 2, 1))
etsys_dot11_ext_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 2, 2))
etsys_dot11_ext_base_group = object_group((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 2, 1, 1)).setObjects(('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtLTRemoteStationMAC'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtLTRemoteStationName'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtLTTrigger'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtLTRemoteContents'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtSystemScale'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtSecureAccess'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtMulticastTxRate'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtIntraBSSRelay'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtPCCardType'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtPCCardVersions'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtBridgeMode'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtResetOptions'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtStationName'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtBldgRemoteMAC1'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtBldgRemoteMAC2'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtBldgRemoteMAC3'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtBldgRemoteMAC4'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtBldgRemoteMAC5'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtBldgRemoteMAC6'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtBldgMPActivationKey'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtWEPKeyDefined'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtWEPKeyValue'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtWEPEnhancedImplemented'), ('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtOIDNotInEffect'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_dot11_ext_base_group = etsysDot11ExtBaseGroup.setStatus('current')
etsys_dot11_ext_compliance = module_compliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 9, 2, 2, 1)).setObjects(('ENTERASYS-IEEE802DOT11EXT-MIB', 'etsysDot11ExtBaseGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_dot11_ext_compliance = etsysDot11ExtCompliance.setStatus('current')
mibBuilder.exportSymbols('ENTERASYS-IEEE802DOT11EXT-MIB', etsysDot11ExtLTRemoteStationMAC=etsysDot11ExtLTRemoteStationMAC, etsysDot11ExtOIDNotInEffect=etsysDot11ExtOIDNotInEffect, etsysDot11ExtPCCardType=etsysDot11ExtPCCardType, etsysDot11ExtMulticastTxRate=etsysDot11ExtMulticastTxRate, etsysDot11ExtLTRemoteContents=etsysDot11ExtLTRemoteContents, etsysDot11ExtWEPDefaultKeysTable=etsysDot11ExtWEPDefaultKeysTable, etsysDot11ExtBldg=etsysDot11ExtBldg, etsysDot11ExtConformance=etsysDot11ExtConformance, etsysDot11ExtLTTrigger=etsysDot11ExtLTTrigger, etsysDot11ExtStationName=etsysDot11ExtStationName, etsysDot11ExtBldgEntry=etsysDot11ExtBldgEntry, etsysDot11ExtBldgRemoteMAC4=etsysDot11ExtBldgRemoteMAC4, etsysDot11ExtOIDNotInEffectTable=etsysDot11ExtOIDNotInEffectTable, etsysDot11ExtWEPKeyValue=etsysDot11ExtWEPKeyValue, etsysDot11ExtOIDIndex=etsysDot11ExtOIDIndex, etsysDot11ExtLinkTest=etsysDot11ExtLinkTest, etsysDot11ExtGeneralTable=etsysDot11ExtGeneralTable, etsysDot11ExtWEP=etsysDot11ExtWEP, etsysDot11ExtBldgRemoteMAC5=etsysDot11ExtBldgRemoteMAC5, etsysDot11ExtPCCardVersions=etsysDot11ExtPCCardVersions, etsysDot11ExtLinkTestEntry=etsysDot11ExtLinkTestEntry, etsysDot11ExtWEPDefaultKeysEntry=etsysDot11ExtWEPDefaultKeysEntry, etsysDot11ExtGroups=etsysDot11ExtGroups, etsysDot11ExtLinkTestTable=etsysDot11ExtLinkTestTable, etsysDot11ExtOIDNotInEffectEntry=etsysDot11ExtOIDNotInEffectEntry, etsysDot11ExtBldgRemoteMAC1=etsysDot11ExtBldgRemoteMAC1, etsysDot11ExtEffect=etsysDot11ExtEffect, etsysDot11ExtBldgMPActivationKey=etsysDot11ExtBldgMPActivationKey, etsysDot11ExtSystemScale=etsysDot11ExtSystemScale, PYSNMP_MODULE_ID=etsysDot11ExtMIB, etsysDot11ExtBldgRemoteMAC6=etsysDot11ExtBldgRemoteMAC6, etsysDot11ExtGeneral=etsysDot11ExtGeneral, etsysDot11ExtWEPEnhancedTable=etsysDot11ExtWEPEnhancedTable, etsysDot11ExtWEPEnhancedEntry=etsysDot11ExtWEPEnhancedEntry, etsysDot11ExtWEPEnhancedImplemented=etsysDot11ExtWEPEnhancedImplemented, etsysDot11ExtBaseGroup=etsysDot11ExtBaseGroup, etsysDot11ExtMIB=etsysDot11ExtMIB, etsysDot11ExtWEPKeyDefined=etsysDot11ExtWEPKeyDefined, etsysDot11ExtResetOptions=etsysDot11ExtResetOptions, etsysDot11ExtSecureAccess=etsysDot11ExtSecureAccess, etsysDot11ExtCompliances=etsysDot11ExtCompliances, etsysDot11ExtBldgTable=etsysDot11ExtBldgTable, etsysDot11ExtLTRemoteStationName=etsysDot11ExtLTRemoteStationName, etsysDot11ExtCompliance=etsysDot11ExtCompliance, etsysDot11ExtGeneralEntry=etsysDot11ExtGeneralEntry, etsysDot11ExtBldgRemoteMAC2=etsysDot11ExtBldgRemoteMAC2, etsysDot11ExtObjects=etsysDot11ExtObjects, etsysDot11ExtIntraBSSRelay=etsysDot11ExtIntraBSSRelay, etsysDot11ExtBldgRemoteMAC3=etsysDot11ExtBldgRemoteMAC3, etsysDot11ExtBridgeMode=etsysDot11ExtBridgeMode)
|
class Solution:
def longestCommonSub(self, a, n, b, m):
dp = [[0]*(m+1) for i in range(n+1)]
for i in range(1, n+1):
for j in range(1, m+1):
if a[i-1] == b[j-1]:
dp[i][j] = dp[i-1][j-1] + 1
else:
dp[i][j] = max(dp[i-1][j], dp[i][j-1])
return dp[n][m]
def sequencePatternMatching(self, a:str, b:str)->bool:
n = len(a)
m = len(b)
lcs = self.longestCommonSub(a, n,b,m)
if lcs == n:
return True
else:
return False
if __name__ == '__main__':
a = "AXY"
b = "ADXCPY"
print(Solution().sequencePatternMatching(a, b))
|
class Solution:
def longest_common_sub(self, a, n, b, m):
dp = [[0] * (m + 1) for i in range(n + 1)]
for i in range(1, n + 1):
for j in range(1, m + 1):
if a[i - 1] == b[j - 1]:
dp[i][j] = dp[i - 1][j - 1] + 1
else:
dp[i][j] = max(dp[i - 1][j], dp[i][j - 1])
return dp[n][m]
def sequence_pattern_matching(self, a: str, b: str) -> bool:
n = len(a)
m = len(b)
lcs = self.longestCommonSub(a, n, b, m)
if lcs == n:
return True
else:
return False
if __name__ == '__main__':
a = 'AXY'
b = 'ADXCPY'
print(solution().sequencePatternMatching(a, b))
|
"""
Code for training prototype segmentation model on Cityscapes dataset
https://www.cityscapes-dataset.com/
"""
|
"""
Code for training prototype segmentation model on Cityscapes dataset
https://www.cityscapes-dataset.com/
"""
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
load("//antlir/bzl:shape.bzl", "shape")
load("//antlir/bzl:target_tagger.shape.bzl", "target_tagged_image_source_t")
tarball_t = shape.shape(
force_root_ownership = shape.field(bool, optional = True),
into_dir = shape.path,
source = target_tagged_image_source_t,
)
|
load('//antlir/bzl:shape.bzl', 'shape')
load('//antlir/bzl:target_tagger.shape.bzl', 'target_tagged_image_source_t')
tarball_t = shape.shape(force_root_ownership=shape.field(bool, optional=True), into_dir=shape.path, source=target_tagged_image_source_t)
|
# -*- coding: utf-8 -*-
if __name__ == '__main__':
a = u'\u5f53\u524d\u4e91\u533a\u57df\u6ca1\u6709\u53ef\u7528\u7684'
# PROXY\uff0c\u8bf7\u5148\u68c0\u67e5\u5e76\u5b89\u88c5', u'\u76f4\u8fde\u533a\u57df\uff0c\u4e0d\u80fd\u5b89\u88c5PROXY\u548cPAGENT'
print(a)
|
if __name__ == '__main__':
a = u'当前云区域没有可用的'
print(a)
|
if condition:
...
else:
...
|
if condition:
...
else:
...
|
r"""Two example systems.
The :py:mod:`~example_systems.beryllium` module contains a calculation of the
process matrices for a :math:`^9\text{Be}^+` ion
addressed by a laser resonant with the :math:`^2S_{1/2}, F=2, m_F=2
\leftrightarrow ^2P_{3/2}, m_J=3/2` level, with perfect :math:`\sigma^+`
polarization.
The :py:mod:`~example_systems.three_states` module contains a small example
three state module.
"""
|
"""Two example systems.
The :py:mod:`~example_systems.beryllium` module contains a calculation of the
process matrices for a :math:`^9\\text{Be}^+` ion
addressed by a laser resonant with the :math:`^2S_{1/2}, F=2, m_F=2
\\leftrightarrow ^2P_{3/2}, m_J=3/2` level, with perfect :math:`\\sigma^+`
polarization.
The :py:mod:`~example_systems.three_states` module contains a small example
three state module.
"""
|
#
# PySNMP MIB module Juniper-DNS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-DNS-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:51:26 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint")
InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType")
juniMibs, = mibBuilder.importSymbols("Juniper-MIBs", "juniMibs")
JuniEnable, = mibBuilder.importSymbols("Juniper-TC", "JuniEnable")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
NotificationType, iso, Gauge32, Bits, TimeTicks, Counter64, ObjectIdentity, Integer32, Counter32, Unsigned32, MibIdentifier, IpAddress, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "iso", "Gauge32", "Bits", "TimeTicks", "Counter64", "ObjectIdentity", "Integer32", "Counter32", "Unsigned32", "MibIdentifier", "IpAddress", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
RowStatus, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "DisplayString", "TextualConvention")
juniDnsMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47))
juniDnsMIB.setRevisions(('2006-09-15 08:32', '2003-09-11 15:50', '2002-09-16 21:44', '2001-03-22 19:29',))
if mibBuilder.loadTexts: juniDnsMIB.setLastUpdated('200609150832Z')
if mibBuilder.loadTexts: juniDnsMIB.setOrganization('Juniper Networks, Inc.')
class JuniNextServerListIndex(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 2147483647)
class ServerListIndex(TextualConvention, Integer32):
status = 'current'
displayHint = 'd'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 2147483647)
class JuniNextLocalDomainNameListIndex(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 2147483647)
class LocalDomainNameListIndex(TextualConvention, Integer32):
status = 'current'
displayHint = 'd'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 2147483647)
class LocalDomainName(TextualConvention, OctetString):
reference = 'RFC 854: NVT ASCII character set. See SNMPv2-TC.DisplayString DESCRIPTION for a summary.'
status = 'current'
displayHint = '1025a'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 1025)
juniDnsObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1))
juniDnsGeneral = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 1))
juniDnsServerList = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2))
juniDnsLocalDomainNameList = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3))
juniDnsEnable = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 1, 1), JuniEnable()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: juniDnsEnable.setStatus('current')
juniDnsServerListNextIndex = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 1), JuniNextServerListIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniDnsServerListNextIndex.setStatus('current')
juniDnsServerListTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2), )
if mibBuilder.loadTexts: juniDnsServerListTable.setStatus('current')
juniDnsServerListEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2, 1), ).setIndexNames((0, "Juniper-DNS-MIB", "juniDnsServerListIndex"))
if mibBuilder.loadTexts: juniDnsServerListEntry.setStatus('current')
juniDnsServerListIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2, 1, 1), ServerListIndex())
if mibBuilder.loadTexts: juniDnsServerListIndex.setStatus('current')
juniDnsServerListAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2, 1, 2), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniDnsServerListAddress.setStatus('obsolete')
juniDnsServerListRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniDnsServerListRowStatus.setStatus('current')
juniDnsV4V6ServerListAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2, 1, 4), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniDnsV4V6ServerListAddressType.setStatus('current')
juniDnsV4V6ServerListAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2, 1, 5), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniDnsV4V6ServerListAddress.setStatus('current')
juniDnsLocalDomainNameListNextIndex = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3, 1), JuniNextLocalDomainNameListIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniDnsLocalDomainNameListNextIndex.setStatus('current')
juniDnsLocalDomainNameListTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3, 2), )
if mibBuilder.loadTexts: juniDnsLocalDomainNameListTable.setStatus('current')
juniDnsLocalDomainNameListEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3, 2, 1), ).setIndexNames((0, "Juniper-DNS-MIB", "juniDnsLocalDomainNameListIndex"))
if mibBuilder.loadTexts: juniDnsLocalDomainNameListEntry.setStatus('current')
juniDnsLocalDomainNameListIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3, 2, 1, 1), LocalDomainNameListIndex())
if mibBuilder.loadTexts: juniDnsLocalDomainNameListIndex.setStatus('current')
juniDnsLocalDomainNameListName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3, 2, 1, 2), LocalDomainName()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniDnsLocalDomainNameListName.setStatus('current')
juniDnsLocalDomainNameListRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3, 2, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniDnsLocalDomainNameListRowStatus.setStatus('current')
juniDnsConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2))
juniDnsCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 1))
juniDnsGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 2))
juniDnsCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 1, 1)).setObjects(("Juniper-DNS-MIB", "juniDnsEnableGroup"), ("Juniper-DNS-MIB", "juniDnsServerListGroup"), ("Juniper-DNS-MIB", "juniDnsV4V6ServerListGroup"), ("Juniper-DNS-MIB", "juniDnsLocalDomainNameListGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniDnsCompliance = juniDnsCompliance.setStatus('current')
juniDnsEnableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 2, 1)).setObjects(("Juniper-DNS-MIB", "juniDnsEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniDnsEnableGroup = juniDnsEnableGroup.setStatus('current')
juniDnsServerListGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 2, 2)).setObjects(("Juniper-DNS-MIB", "juniDnsServerListNextIndex"), ("Juniper-DNS-MIB", "juniDnsServerListAddress"), ("Juniper-DNS-MIB", "juniDnsServerListRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniDnsServerListGroup = juniDnsServerListGroup.setStatus('obsolete')
juniDnsLocalDomainNameListGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 2, 3)).setObjects(("Juniper-DNS-MIB", "juniDnsLocalDomainNameListNextIndex"), ("Juniper-DNS-MIB", "juniDnsLocalDomainNameListName"), ("Juniper-DNS-MIB", "juniDnsLocalDomainNameListRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniDnsLocalDomainNameListGroup = juniDnsLocalDomainNameListGroup.setStatus('current')
juniDnsV4V6ServerListGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 2, 4)).setObjects(("Juniper-DNS-MIB", "juniDnsServerListNextIndex"), ("Juniper-DNS-MIB", "juniDnsServerListRowStatus"), ("Juniper-DNS-MIB", "juniDnsV4V6ServerListAddress"), ("Juniper-DNS-MIB", "juniDnsV4V6ServerListAddressType"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniDnsV4V6ServerListGroup = juniDnsV4V6ServerListGroup.setStatus('current')
mibBuilder.exportSymbols("Juniper-DNS-MIB", juniDnsServerList=juniDnsServerList, PYSNMP_MODULE_ID=juniDnsMIB, juniDnsLocalDomainNameListRowStatus=juniDnsLocalDomainNameListRowStatus, juniDnsLocalDomainNameListName=juniDnsLocalDomainNameListName, juniDnsLocalDomainNameListNextIndex=juniDnsLocalDomainNameListNextIndex, juniDnsConformance=juniDnsConformance, juniDnsMIB=juniDnsMIB, juniDnsServerListNextIndex=juniDnsServerListNextIndex, JuniNextServerListIndex=JuniNextServerListIndex, juniDnsServerListIndex=juniDnsServerListIndex, juniDnsEnableGroup=juniDnsEnableGroup, juniDnsServerListAddress=juniDnsServerListAddress, LocalDomainName=LocalDomainName, juniDnsServerListGroup=juniDnsServerListGroup, JuniNextLocalDomainNameListIndex=JuniNextLocalDomainNameListIndex, LocalDomainNameListIndex=LocalDomainNameListIndex, juniDnsLocalDomainNameListGroup=juniDnsLocalDomainNameListGroup, juniDnsEnable=juniDnsEnable, juniDnsV4V6ServerListAddress=juniDnsV4V6ServerListAddress, juniDnsServerListTable=juniDnsServerListTable, juniDnsLocalDomainNameListEntry=juniDnsLocalDomainNameListEntry, juniDnsGroups=juniDnsGroups, juniDnsV4V6ServerListGroup=juniDnsV4V6ServerListGroup, juniDnsCompliances=juniDnsCompliances, juniDnsCompliance=juniDnsCompliance, juniDnsServerListEntry=juniDnsServerListEntry, juniDnsLocalDomainNameListTable=juniDnsLocalDomainNameListTable, juniDnsGeneral=juniDnsGeneral, juniDnsV4V6ServerListAddressType=juniDnsV4V6ServerListAddressType, juniDnsObjects=juniDnsObjects, juniDnsLocalDomainNameList=juniDnsLocalDomainNameList, ServerListIndex=ServerListIndex, juniDnsLocalDomainNameListIndex=juniDnsLocalDomainNameListIndex, juniDnsServerListRowStatus=juniDnsServerListRowStatus)
|
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, single_value_constraint, value_size_constraint, constraints_union, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint')
(inet_address, inet_address_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddress', 'InetAddressType')
(juni_mibs,) = mibBuilder.importSymbols('Juniper-MIBs', 'juniMibs')
(juni_enable,) = mibBuilder.importSymbols('Juniper-TC', 'JuniEnable')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(notification_type, iso, gauge32, bits, time_ticks, counter64, object_identity, integer32, counter32, unsigned32, mib_identifier, ip_address, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'iso', 'Gauge32', 'Bits', 'TimeTicks', 'Counter64', 'ObjectIdentity', 'Integer32', 'Counter32', 'Unsigned32', 'MibIdentifier', 'IpAddress', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn')
(row_status, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'DisplayString', 'TextualConvention')
juni_dns_mib = module_identity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47))
juniDnsMIB.setRevisions(('2006-09-15 08:32', '2003-09-11 15:50', '2002-09-16 21:44', '2001-03-22 19:29'))
if mibBuilder.loadTexts:
juniDnsMIB.setLastUpdated('200609150832Z')
if mibBuilder.loadTexts:
juniDnsMIB.setOrganization('Juniper Networks, Inc.')
class Juninextserverlistindex(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 2147483647)
class Serverlistindex(TextualConvention, Integer32):
status = 'current'
display_hint = 'd'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 2147483647)
class Juninextlocaldomainnamelistindex(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 2147483647)
class Localdomainnamelistindex(TextualConvention, Integer32):
status = 'current'
display_hint = 'd'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 2147483647)
class Localdomainname(TextualConvention, OctetString):
reference = 'RFC 854: NVT ASCII character set. See SNMPv2-TC.DisplayString DESCRIPTION for a summary.'
status = 'current'
display_hint = '1025a'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 1025)
juni_dns_objects = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1))
juni_dns_general = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 1))
juni_dns_server_list = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2))
juni_dns_local_domain_name_list = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3))
juni_dns_enable = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 1, 1), juni_enable()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
juniDnsEnable.setStatus('current')
juni_dns_server_list_next_index = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 1), juni_next_server_list_index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniDnsServerListNextIndex.setStatus('current')
juni_dns_server_list_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2))
if mibBuilder.loadTexts:
juniDnsServerListTable.setStatus('current')
juni_dns_server_list_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2, 1)).setIndexNames((0, 'Juniper-DNS-MIB', 'juniDnsServerListIndex'))
if mibBuilder.loadTexts:
juniDnsServerListEntry.setStatus('current')
juni_dns_server_list_index = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2, 1, 1), server_list_index())
if mibBuilder.loadTexts:
juniDnsServerListIndex.setStatus('current')
juni_dns_server_list_address = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2, 1, 2), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniDnsServerListAddress.setStatus('obsolete')
juni_dns_server_list_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2, 1, 3), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniDnsServerListRowStatus.setStatus('current')
juni_dns_v4_v6_server_list_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2, 1, 4), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniDnsV4V6ServerListAddressType.setStatus('current')
juni_dns_v4_v6_server_list_address = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 2, 2, 1, 5), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniDnsV4V6ServerListAddress.setStatus('current')
juni_dns_local_domain_name_list_next_index = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3, 1), juni_next_local_domain_name_list_index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniDnsLocalDomainNameListNextIndex.setStatus('current')
juni_dns_local_domain_name_list_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3, 2))
if mibBuilder.loadTexts:
juniDnsLocalDomainNameListTable.setStatus('current')
juni_dns_local_domain_name_list_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3, 2, 1)).setIndexNames((0, 'Juniper-DNS-MIB', 'juniDnsLocalDomainNameListIndex'))
if mibBuilder.loadTexts:
juniDnsLocalDomainNameListEntry.setStatus('current')
juni_dns_local_domain_name_list_index = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3, 2, 1, 1), local_domain_name_list_index())
if mibBuilder.loadTexts:
juniDnsLocalDomainNameListIndex.setStatus('current')
juni_dns_local_domain_name_list_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3, 2, 1, 2), local_domain_name()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniDnsLocalDomainNameListName.setStatus('current')
juni_dns_local_domain_name_list_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 1, 3, 2, 1, 3), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniDnsLocalDomainNameListRowStatus.setStatus('current')
juni_dns_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2))
juni_dns_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 1))
juni_dns_groups = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 2))
juni_dns_compliance = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 1, 1)).setObjects(('Juniper-DNS-MIB', 'juniDnsEnableGroup'), ('Juniper-DNS-MIB', 'juniDnsServerListGroup'), ('Juniper-DNS-MIB', 'juniDnsV4V6ServerListGroup'), ('Juniper-DNS-MIB', 'juniDnsLocalDomainNameListGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_dns_compliance = juniDnsCompliance.setStatus('current')
juni_dns_enable_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 2, 1)).setObjects(('Juniper-DNS-MIB', 'juniDnsEnable'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_dns_enable_group = juniDnsEnableGroup.setStatus('current')
juni_dns_server_list_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 2, 2)).setObjects(('Juniper-DNS-MIB', 'juniDnsServerListNextIndex'), ('Juniper-DNS-MIB', 'juniDnsServerListAddress'), ('Juniper-DNS-MIB', 'juniDnsServerListRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_dns_server_list_group = juniDnsServerListGroup.setStatus('obsolete')
juni_dns_local_domain_name_list_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 2, 3)).setObjects(('Juniper-DNS-MIB', 'juniDnsLocalDomainNameListNextIndex'), ('Juniper-DNS-MIB', 'juniDnsLocalDomainNameListName'), ('Juniper-DNS-MIB', 'juniDnsLocalDomainNameListRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_dns_local_domain_name_list_group = juniDnsLocalDomainNameListGroup.setStatus('current')
juni_dns_v4_v6_server_list_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 47, 2, 2, 4)).setObjects(('Juniper-DNS-MIB', 'juniDnsServerListNextIndex'), ('Juniper-DNS-MIB', 'juniDnsServerListRowStatus'), ('Juniper-DNS-MIB', 'juniDnsV4V6ServerListAddress'), ('Juniper-DNS-MIB', 'juniDnsV4V6ServerListAddressType'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_dns_v4_v6_server_list_group = juniDnsV4V6ServerListGroup.setStatus('current')
mibBuilder.exportSymbols('Juniper-DNS-MIB', juniDnsServerList=juniDnsServerList, PYSNMP_MODULE_ID=juniDnsMIB, juniDnsLocalDomainNameListRowStatus=juniDnsLocalDomainNameListRowStatus, juniDnsLocalDomainNameListName=juniDnsLocalDomainNameListName, juniDnsLocalDomainNameListNextIndex=juniDnsLocalDomainNameListNextIndex, juniDnsConformance=juniDnsConformance, juniDnsMIB=juniDnsMIB, juniDnsServerListNextIndex=juniDnsServerListNextIndex, JuniNextServerListIndex=JuniNextServerListIndex, juniDnsServerListIndex=juniDnsServerListIndex, juniDnsEnableGroup=juniDnsEnableGroup, juniDnsServerListAddress=juniDnsServerListAddress, LocalDomainName=LocalDomainName, juniDnsServerListGroup=juniDnsServerListGroup, JuniNextLocalDomainNameListIndex=JuniNextLocalDomainNameListIndex, LocalDomainNameListIndex=LocalDomainNameListIndex, juniDnsLocalDomainNameListGroup=juniDnsLocalDomainNameListGroup, juniDnsEnable=juniDnsEnable, juniDnsV4V6ServerListAddress=juniDnsV4V6ServerListAddress, juniDnsServerListTable=juniDnsServerListTable, juniDnsLocalDomainNameListEntry=juniDnsLocalDomainNameListEntry, juniDnsGroups=juniDnsGroups, juniDnsV4V6ServerListGroup=juniDnsV4V6ServerListGroup, juniDnsCompliances=juniDnsCompliances, juniDnsCompliance=juniDnsCompliance, juniDnsServerListEntry=juniDnsServerListEntry, juniDnsLocalDomainNameListTable=juniDnsLocalDomainNameListTable, juniDnsGeneral=juniDnsGeneral, juniDnsV4V6ServerListAddressType=juniDnsV4V6ServerListAddressType, juniDnsObjects=juniDnsObjects, juniDnsLocalDomainNameList=juniDnsLocalDomainNameList, ServerListIndex=ServerListIndex, juniDnsLocalDomainNameListIndex=juniDnsLocalDomainNameListIndex, juniDnsServerListRowStatus=juniDnsServerListRowStatus)
|
# I have no idea if this is actually functioning.
def line_intersection(l1, l2):
xdiff = (l1[0][0] - l1[1][0], l2[0][0] - l2[1][0])
ydiff = (l1[0][1] - l1[1][1], l2[0][1] - l2[1][1])
def det(a, b):
return a[0] * b[1] - a[1] * b[0]
div = det(xdiff, ydiff)
if div == 0:
return False
d = (det(*l1), det(*l2))
x = det(d, xdiff) / div
y = det(d, ydiff) / div
if x < min(l2[0][0], l2[1][0]) or x > max(l2[0][0], l2[1][0]) or y < min(l2[0][1], l2[1][1]) or y > max(l2[0][1], l2[1][1]):
return False
else:
return x,y
# 0 0 3 3
# 1
# 4 1 2 2 2 2 1 1 1
main_line = list(map(int, input().split()))
num = int(input())
print(line_intersection((A, B), (C, D)))
|
def line_intersection(l1, l2):
xdiff = (l1[0][0] - l1[1][0], l2[0][0] - l2[1][0])
ydiff = (l1[0][1] - l1[1][1], l2[0][1] - l2[1][1])
def det(a, b):
return a[0] * b[1] - a[1] * b[0]
div = det(xdiff, ydiff)
if div == 0:
return False
d = (det(*l1), det(*l2))
x = det(d, xdiff) / div
y = det(d, ydiff) / div
if x < min(l2[0][0], l2[1][0]) or x > max(l2[0][0], l2[1][0]) or y < min(l2[0][1], l2[1][1]) or (y > max(l2[0][1], l2[1][1])):
return False
else:
return (x, y)
main_line = list(map(int, input().split()))
num = int(input())
print(line_intersection((A, B), (C, D)))
|
fr = input('Frase: ')
for i in range(len(fr) -1,-1,-1):
print(fr[i], end='')
|
fr = input('Frase: ')
for i in range(len(fr) - 1, -1, -1):
print(fr[i], end='')
|
"""
Fundamental Template for LinkedList
"""
# General Definition of a node
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class LinkedList:
def __init__(self):
self.head = None
self.tail = None
return
def push_elements(self, item):
"""
:param item: Push elements into a SLL
:return:
"""
if not isinstance(item, ListNode):
item = ListNode(item)
if self.head is None:
self.head = item
else:
self.tail.next = item
self.tail = item
return
def print_list(self):
current = self.head
while current:
print(current.val, end=" ")
current = current.next
return
def reverse_list(self):
prev = None
current = self.head
while current is not None:
nxt = current.next
current.next = prev
prev = current
current = nxt
self.head = prev
def has_cycle(self):
fast = self.head
slow = self.head
while fast is not None and fast.next is not None:
fast = fast.next.next
slow = slow.next
if fast == slow:
return True
return False
def delete_element_given_value(self, data):
current = self.head
while current:
if current.next.val == data:
current.next = current.next.next
break
return
def delete_node_given_only_node(self, node):
while node.next:
node.val = node.next.val
if node.next.next is None:
node.next = None
break
else:
node = node.next
def get_middle_node(self):
slow = self.heaf
fast = self.head
while fast and fast.next:
slow = slow.next
fast = fast.next
return slow
def delete_duplicates(self):
# Assume I/P list is sorted
current = self.head
while current and current.next:
if current.val == current.next.val:
current.next = current.next.next
else:
current = current.next
return self.head
if __name__ == "__main__":
s1 = ListNode(5)
s2 = ListNode(6)
s3 = ListNode(7)
s4 = ListNode(8)
t1 = LinkedList()
t1.push_elements(s1)
t1.push_elements(s2)
t1.push_elements(s3)
t1.push_elements(s4)
print("Intial LinkedList")
t1.print_list()
print("\n")
print("Reversing the List")
t1.reverse_list()
t1.print_list()
|
"""
Fundamental Template for LinkedList
"""
class Listnode:
def __init__(self, x):
self.val = x
self.next = None
class Linkedlist:
def __init__(self):
self.head = None
self.tail = None
return
def push_elements(self, item):
"""
:param item: Push elements into a SLL
:return:
"""
if not isinstance(item, ListNode):
item = list_node(item)
if self.head is None:
self.head = item
else:
self.tail.next = item
self.tail = item
return
def print_list(self):
current = self.head
while current:
print(current.val, end=' ')
current = current.next
return
def reverse_list(self):
prev = None
current = self.head
while current is not None:
nxt = current.next
current.next = prev
prev = current
current = nxt
self.head = prev
def has_cycle(self):
fast = self.head
slow = self.head
while fast is not None and fast.next is not None:
fast = fast.next.next
slow = slow.next
if fast == slow:
return True
return False
def delete_element_given_value(self, data):
current = self.head
while current:
if current.next.val == data:
current.next = current.next.next
break
return
def delete_node_given_only_node(self, node):
while node.next:
node.val = node.next.val
if node.next.next is None:
node.next = None
break
else:
node = node.next
def get_middle_node(self):
slow = self.heaf
fast = self.head
while fast and fast.next:
slow = slow.next
fast = fast.next
return slow
def delete_duplicates(self):
current = self.head
while current and current.next:
if current.val == current.next.val:
current.next = current.next.next
else:
current = current.next
return self.head
if __name__ == '__main__':
s1 = list_node(5)
s2 = list_node(6)
s3 = list_node(7)
s4 = list_node(8)
t1 = linked_list()
t1.push_elements(s1)
t1.push_elements(s2)
t1.push_elements(s3)
t1.push_elements(s4)
print('Intial LinkedList')
t1.print_list()
print('\n')
print('Reversing the List')
t1.reverse_list()
t1.print_list()
|
def solve(arr, k):
cur=float("-inf")
ans=tuple()
total=sum(arr)
for i in range(len(arr), k-1, -1):
temp=compute(arr, total, i)
if temp[0]>cur:
cur=temp[0]
ans=(temp[1], i)
total-=arr[i-1]
return ans
def compute(arr, total, k):
cur=total
index=0
avg=cur/k
for i in range(k, len(arr)):
cur+=arr[i]-arr[i-k]
if (cur/k)>=avg:
avg=cur/k
index=i-k+1
return (avg, index)
|
def solve(arr, k):
cur = float('-inf')
ans = tuple()
total = sum(arr)
for i in range(len(arr), k - 1, -1):
temp = compute(arr, total, i)
if temp[0] > cur:
cur = temp[0]
ans = (temp[1], i)
total -= arr[i - 1]
return ans
def compute(arr, total, k):
cur = total
index = 0
avg = cur / k
for i in range(k, len(arr)):
cur += arr[i] - arr[i - k]
if cur / k >= avg:
avg = cur / k
index = i - k + 1
return (avg, index)
|
# Move all xeroes to right
N = int(input(''))
array = list(map(int, input().split(' ')[:N]))
flag = 0
# BRING/REPLACE ALL NON-ZEROES TO LEFT
for index in range(0, len(array)):
if(array[index] != 0):
array[flag] = array[index]
flag = flag+1
# NOW ADD ALL ZEROS TOWARDS RIGHT
for index in range(flag, len(array)):
array[index] = 0
print(array)
|
n = int(input(''))
array = list(map(int, input().split(' ')[:N]))
flag = 0
for index in range(0, len(array)):
if array[index] != 0:
array[flag] = array[index]
flag = flag + 1
for index in range(flag, len(array)):
array[index] = 0
print(array)
|
# Space : O(n)
# Time : O(n)
class Solution:
def reverseWords(self, s: str) -> str:
l = s.split(" ")
for i in range(len(l)):
l[i] = l[i][::-1]
return " ".join(l)
|
class Solution:
def reverse_words(self, s: str) -> str:
l = s.split(' ')
for i in range(len(l)):
l[i] = l[i][::-1]
return ' '.join(l)
|
inputTemplates = {
"M3": {
"QCD": [
[
0.0,
0.0004418671450315185,
0.01605229202018541,
0.05825334528354453,
0.08815209477081883,
0.1030093733105401,
0.10513254530282935,
0.09543913272896494,
0.08512520799056993,
0.07489480051367764,
0.06022183314704696,
0.05275434234820922,
0.04426859109280948,
0.03513151550399711,
0.029967498933300033,
0.024464081551639382,
0.020998482981290444,
0.015085519053806937,
0.013212552619472365,
0.010921640496635408,
0.010786019690654257,
0.0079331542797628,
0.007046335967650891,
0.0066796992713355876,
0.00484778962979943,
0.0043565342466071995,
0.0040794364492200835,
0.0027885993970205324,
0.002756423064350152,
0.002331355056268065,
0.0021416660945894994,
0.0017759566793966012,
0.0011629584663072486,
0.001009451124859111,
0.0012831188698206983,
0.0007967669328031654,
0.004698017985185181,
0.0,
0.0,
0.0
],
[
0.0,
0.0004418671450315186,
0.016052292020185415,
0.05825334528354453,
0.08815209477081884,
0.10300937331054011,
0.10513254530282935,
0.09543913272896497,
0.08512520799056993,
0.07489480051367763,
0.06022183314704697,
0.05275434234820922,
0.04426859109280948,
0.03513151550399711,
0.029967498933300037,
0.024464081551639386,
0.020998482981290444,
0.015085519053806937,
0.013212552619472366,
0.010921640496635408,
0.010786019690654257,
0.0079331542797628,
0.007046335967650892,
0.006679699271335588,
0.00484778962979943,
0.0043565342466071995,
0.004079436449220084,
0.002788599397020533,
0.002756423064350152,
0.002331355056268065,
0.0021416660945894994,
0.0017759566793966015,
0.0011629584663072486,
0.0010094511248591113,
0.0012831188698206985,
0.0007967669328031655,
0.004698017985185181,
0.0,
0.0,
0.0
],
[
0.0,
0.00044186714503151845,
0.016052292020185405,
0.058253345283544505,
0.0881520947708188,
0.10300937331054005,
0.10513254530282928,
0.09543913272896491,
0.08512520799056988,
0.0748948005136776,
0.06022183314704694,
0.0527543423482092,
0.044268591092809464,
0.035131515503997096,
0.029967498933300023,
0.02446408155163937,
0.020998482981290433,
0.015085519053806931,
0.013212552619472361,
0.010921640496635406,
0.010786019690654252,
0.007933154279762796,
0.007046335967650889,
0.006679699271335586,
0.004847789629799428,
0.004356534246607198,
0.004079436449220083,
0.0027885993970205316,
0.002756423064350151,
0.0023313550562680647,
0.0021416660945894985,
0.0017759566793966006,
0.0011629584663072482,
0.0010094511248591109,
0.0012831188698206976,
0.0007967669328031652,
0.0046980179851851805,
0.0,
0.0,
0.0
],
[
0.0,
0.00044186714503151856,
0.016052292020185415,
0.058253345283544526,
0.08815209477081883,
0.1030093733105401,
0.10513254530282934,
0.09543913272896495,
0.08512520799056993,
0.07489480051367763,
0.06022183314704697,
0.05275434234820922,
0.04426859109280948,
0.03513151550399711,
0.029967498933300033,
0.024464081551639382,
0.020998482981290444,
0.01508551905380694,
0.013212552619472365,
0.010921640496635408,
0.010786019690654257,
0.0079331542797628,
0.0070463359676508925,
0.006679699271335588,
0.0048477896297994295,
0.0043565342466071995,
0.004079436449220084,
0.002788599397020533,
0.002756423064350152,
0.0023313550562680655,
0.0021416660945894994,
0.0017759566793966015,
0.0011629584663072486,
0.0010094511248591113,
0.0012831188698206983,
0.0007967669328031656,
0.004698017985185182,
0.0,
0.0,
0.0
],
[
0.0,
0.00044186714503151845,
0.016052292020185408,
0.05825334528354451,
0.08815209477081881,
0.10300937331054007,
0.10513254530282931,
0.09543913272896493,
0.0851252079905699,
0.07489480051367763,
0.060221833147046946,
0.05275434234820921,
0.044268591092809464,
0.0351315155039971,
0.02996749893330003,
0.02446408155163937,
0.02099848298129044,
0.015085519053806935,
0.013212552619472363,
0.010921640496635408,
0.010786019690654255,
0.007933154279762798,
0.00704633596765089,
0.006679699271335587,
0.004847789629799429,
0.004356534246607199,
0.0040794364492200835,
0.0027885993970205324,
0.002756423064350151,
0.0023313550562680647,
0.002141666094589499,
0.001775956679396601,
0.0011629584663072484,
0.001009451124859111,
0.0012831188698206976,
0.0007967669328031653,
0.0046980179851851805,
0.0,
0.0,
0.0
],
[
0.0,
0.00044186714503151845,
0.016052292020185408,
0.05825334528354452,
0.08815209477081881,
0.1030093733105401,
0.10513254530282932,
0.09543913272896495,
0.08512520799056991,
0.07489480051367763,
0.060221833147046946,
0.052754342348209214,
0.044268591092809464,
0.0351315155039971,
0.02996749893330003,
0.02446408155163937,
0.02099848298129044,
0.015085519053806935,
0.013212552619472363,
0.010921640496635408,
0.010786019690654253,
0.007933154279762798,
0.007046335967650891,
0.006679699271335587,
0.0048477896297994295,
0.004356534246607198,
0.0040794364492200835,
0.0027885993970205324,
0.0027564230643501515,
0.002331355056268065,
0.002141666094589499,
0.001775956679396601,
0.0011629584663072484,
0.001009451124859111,
0.0012831188698206979,
0.0007967669328031655,
0.0046980179851851805,
0.0,
0.0,
0.0
]
],
"SingleTop": [
[
0.0,
0.0,
0.005832177218207422,
0.03178392883540604,
0.07169459952763149,
0.11287210836676197,
0.12176478715865051,
0.12613012243319208,
0.09279832309977645,
0.0794145472218926,
0.06006907882516122,
0.05255651613575753,
0.040665134899883736,
0.03624912116256268,
0.019772311111878084,
0.021835717802889197,
0.01593884467082636,
0.019743744021810564,
0.008520333396281287,
0.008972922567677826,
0.00866376260113745,
0.010388777243208618,
0.007465864279390942,
0.008541920826701573,
0.0069814633847972846,
0.004641107502972211,
0.005051657691380684,
0.003139862804695983,
0.0064010107328637145,
0.0018922562881085226,
0.000984504344510512,
0.0006270305039092417,
0.0,
0.0004977320603021565,
0.0004854616714298998,
0.0007746782412963946,
0.006848591367048002,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.006464253844897605,
0.026118917653010134,
0.060112787514841975,
0.09584106586560479,
0.12925563138779625,
0.11715408034300653,
0.09440622815766804,
0.0716779573912037,
0.06916348777011985,
0.05498302637465252,
0.042697413569360194,
0.03739191469243603,
0.030265823351673254,
0.02017805782885195,
0.020967376788849502,
0.018012820429670742,
0.01701231602942316,
0.011241488781432862,
0.013054428387246958,
0.011576167379020312,
0.006085157039789595,
0.008138644498565663,
0.003003338789354045,
0.0031858415089799684,
0.005792637555725393,
0.004107311320351441,
0.0009511534181744243,
0.00275249480381622,
0.004384640907243928,
0.0018999453119997332,
0.0023273554030316707,
0.0016001069427164683,
0.0010718452947245862,
0.0012111180899201381,
0.005913165574839969,
0.0,
0.0,
0.0
],
[
0.0,
0.000730898105715262,
0.004345582215870544,
0.02798607884595784,
0.058042809009575966,
0.08283302044377722,
0.12365219544544459,
0.11925280674249097,
0.07900946342989748,
0.0729889060967615,
0.06555652145311269,
0.05500702243367231,
0.03727507362592039,
0.03497935430893025,
0.038758173666694595,
0.022026642610227798,
0.020289974876133793,
0.02390005152672489,
0.015996129394221792,
0.015502623414619431,
0.013383170539170194,
0.008222802588575384,
0.008923541477108209,
0.009493835160659504,
0.007416365558061059,
0.006450296693177907,
0.006153831272067389,
0.004196024662363883,
0.003400842304431063,
0.005252293744180164,
0.0039361210244639845,
0.004358739163202468,
0.00287066741824079,
0.002285628915640503,
0.002764779086954986,
0.0014452620379491693,
0.011312470708004386,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.01600155485970672,
0.03639273911473297,
0.05968874574025049,
0.10598450262625334,
0.11388841443601717,
0.08307443249770091,
0.08639375480501353,
0.05741122320100601,
0.06314537056043235,
0.053346999957043284,
0.043790356322535307,
0.03638268872477183,
0.028617051623100895,
0.032593396108858065,
0.013798591164209608,
0.02230033822729821,
0.01580926917445075,
0.006236987296217145,
0.017497312659310434,
0.011933038792119726,
0.011202353000571373,
0.005562222992955815,
0.006945493185204689,
0.009975553245066583,
0.005022960250692474,
0.007047783899380394,
0.006433393500369129,
0.006724854313022172,
0.004743829720451964,
0.004778845074539503,
0.005801395394700851,
0.003081124868615164,
0.0023767450175057143,
0.016016677645895455,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0034855705626097616,
0.010025916336663884,
0.027364239400232984,
0.037694745308698235,
0.09663206840536868,
0.09970075477836253,
0.06106233761893696,
0.056412910319662585,
0.057912542580936144,
0.041328923907318675,
0.06704352646140234,
0.047223924190355336,
0.031021114902507748,
0.03758027943204309,
0.022834400563328236,
0.024808105880289092,
0.036654808787627724,
0.031893202006165335,
0.02739260061438384,
0.012395283525136105,
0.01054237296279351,
0.020567685747427896,
0.012583514912694046,
0.009008845505670094,
0.012527762077976097,
0.017938595283369566,
0.010789448025986654,
0.003632023138839643,
0.01816042267512064,
0.0015585333839998625,
0.0027675759622464006,
0.019484546123949304,
0.004103330254325486,
0.009631143922782703,
0.016236944440788555,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.007336647376339268,
0.02347544978530838,
0.06263222854439522,
0.06610613086026246,
0.035369146080455695,
0.04408531650826217,
0.043560791950211564,
0.09582421142939976,
0.024197640811710778,
0.05814140173848918,
0.025521248131010324,
0.053856110255041584,
0.03162162916096726,
0.07115652068544676,
0.016567788392908175,
0.020825518489763186,
0.02428868407680062,
0.031889226678125646,
0.013637606734355396,
0.029101557862528757,
0.0,
0.025475944986739763,
0.029517463743032837,
0.01538260011507948,
0.006017436893000935,
0.01865575381438486,
0.015824792234214888,
0.0030866067227976217,
0.013980448208807261,
0.0,
0.008943475556169688,
0.025516356476877198,
0.058404265697113315,
0.0,
0.0,
0.0
]
],
"TTJet": [
[
0.0,
0.0,
0.005866260054832973,
0.032014476569687776,
0.07611743723353019,
0.12269913163544673,
0.204669959277149,
0.1780022148266413,
0.0902222568133845,
0.06720996262179303,
0.045621861833730876,
0.03585930513808567,
0.027308801181492228,
0.022550773464298984,
0.01697272151879135,
0.014303918822958318,
0.009536675235431601,
0.008151062240943892,
0.006990013596176034,
0.005622428289760508,
0.005432733235420568,
0.004571707788875856,
0.0030247979877491816,
0.0025379990687445786,
0.0021322114740614994,
0.0018967639068011742,
0.001600198531484904,
0.001760907897112518,
0.0010930826959057282,
0.0012682896008723822,
0.0007330317183938927,
0.0007410646772215062,
0.000665137515949025,
0.0005346326125257873,
0.00039168832065960966,
0.00025771205206101376,
0.0016387805620258422,
0.0,
0.0,
0.0
],
[
0.0,
7.262560201399413e-05,
0.005459965341619546,
0.03172214511310284,
0.07699353745814363,
0.12491126396204628,
0.20003559424615688,
0.17066165025335486,
0.08996890767405352,
0.06649813957714566,
0.05061011517828175,
0.03584184011202735,
0.027588795134809475,
0.023294770858547913,
0.01757932753487905,
0.013027107776830716,
0.012195905630129025,
0.009600558514058243,
0.006854961641894884,
0.0058081556303386135,
0.004698636898302152,
0.004593892903081976,
0.003409789788416189,
0.0021757282806029953,
0.002259041246620286,
0.00221698886107549,
0.0020069814624712992,
0.0014849074170667832,
0.0014821376683882836,
0.0009165103021072048,
0.0005584379824681107,
0.0007847520606728024,
0.0004956669967263232,
0.0007192863381122417,
0.00044359338561214204,
0.000283998679673084,
0.0027442824891683155,
0.0,
0.0,
0.0
],
[
0.0,
0.00010999244899275781,
0.004524250010912452,
0.030522524117397948,
0.06765121697833965,
0.11925184104915117,
0.18208569394951088,
0.1678624854487025,
0.09332137586299127,
0.06492288997550127,
0.05287619322834948,
0.038590428081298624,
0.03148344300415997,
0.024806268142032767,
0.021888358435464855,
0.016696569370059054,
0.012486064354286668,
0.011756333188735998,
0.00958964683937508,
0.007049851662028582,
0.005738821121195343,
0.005400646562344024,
0.004162263767899146,
0.003934996784796343,
0.00356665539154776,
0.0026563631439693474,
0.0022957990527197767,
0.001734408902217747,
0.0018663108219949586,
0.0012663255620451552,
0.0008837863377775026,
0.0013098166043183537,
0.0005873395717754564,
0.0008883902275125473,
0.0008014397012084036,
0.0008264688444718471,
0.004604741454914939,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0023000264038757798,
0.01705439603921528,
0.04910070346416718,
0.09122001899630586,
0.17588293609181563,
0.18507124253611063,
0.09123159958610425,
0.05960162269734152,
0.05217691285173646,
0.04256359509315278,
0.03655345441422678,
0.03347575846500428,
0.024626447013499187,
0.020432978830003327,
0.018561221373061258,
0.015463103655853658,
0.013714304272130806,
0.010177342106655817,
0.007905429232179009,
0.007063551755709067,
0.006327206254554339,
0.005548799854541709,
0.00473154328286029,
0.0028560148177622416,
0.003584833469792769,
0.0031925925174912575,
0.0020649767313211443,
0.002451003450795212,
0.0021984280785497233,
0.0011494329646675383,
0.0013478106212170275,
0.0012014834048370694,
0.0007953963931541348,
0.0008277202379397255,
0.007546113042367408,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.008510891182227956,
0.027618114739544775,
0.0636993366514693,
0.14246282154415016,
0.19098302504658946,
0.0872846975295914,
0.05823132301671626,
0.054630204652622194,
0.05224415539511138,
0.03774462633291826,
0.03664568879307432,
0.03118798584556276,
0.025179552074013272,
0.027141927663582498,
0.018962738084157393,
0.017223786461534024,
0.012446304790499648,
0.016704397350814998,
0.010397188282338298,
0.011885364365900734,
0.00654541669225773,
0.0040150732738811505,
0.00794356577980281,
0.004932553709318321,
0.00832159001726371,
0.004070225735221562,
0.004060922854342003,
0.002952745784692842,
0.0018856875946734997,
0.0019478722702617498,
0.0023680681218760063,
0.0023425849040899396,
0.002593594715463811,
0.014835968744435398,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0021323691782451095,
0.006747644148045247,
0.02513638990110083,
0.09137187949815516,
0.17543353593257902,
0.082276692770331,
0.055565932825706814,
0.04899686699219004,
0.048526846692094026,
0.0430927385806642,
0.045633959497397604,
0.03788645694588343,
0.03701656523569493,
0.027036724921725,
0.025113196273446294,
0.031936114241276965,
0.01971309713885621,
0.01574158090833572,
0.019199474721680914,
0.015918849921157444,
0.020868544525546172,
0.01747935795697653,
0.011748327914222433,
0.011164996360747675,
0.005749847798091752,
0.008617229066506017,
0.0075600827784392515,
0.005840168166936298,
0.004992409839912211,
0.0034805126985320766,
0.004064677716135877,
0.008239422111627327,
0.00550017795981303,
0.030217328781947526,
0.0,
0.0,
0.0
]
],
"V+Jets": [
[
0.0,
0.0003142927948550799,
0.014512953130632845,
0.05277088304876486,
0.08603434012912506,
0.10506007172016002,
0.1067469629669173,
0.09819689497361543,
0.08685199609224331,
0.0751422047093353,
0.06330097494347225,
0.05305337891368768,
0.042655702448659835,
0.03651482989040328,
0.02983395150144785,
0.02444199511955661,
0.019900292964464696,
0.017253925481071554,
0.014184603279955183,
0.011779383448541635,
0.00996429756420057,
0.008054020034949594,
0.006814650499510039,
0.005461215783698751,
0.004786373871279337,
0.004022818533689391,
0.0032319528725585503,
0.002762787299816871,
0.0021703208306309983,
0.0021801373564605993,
0.0018673122370412762,
0.0014108542664235356,
0.0012263135535731382,
0.0010058133245547092,
0.0009499002073703987,
0.0008661948281679969,
0.004675399379164311,
0.0,
0.0,
0.0
],
[
0.0,
0.00022095428396729953,
0.012707124119856623,
0.05007359016055423,
0.0816346426541373,
0.10173271618458331,
0.10290453572384554,
0.09596862491288694,
0.0884082114992676,
0.07362064853080143,
0.06504901232482868,
0.05374270427931259,
0.04477683652470922,
0.03677843045188911,
0.03136199798739972,
0.02541267694460663,
0.02154691592437478,
0.018001364153149808,
0.015421585508605756,
0.012398978119919494,
0.01003514773672651,
0.009161746424217295,
0.007765969135257237,
0.006138711956013194,
0.0052930499804763696,
0.004422823978351614,
0.0037285515669491375,
0.0033000573885081388,
0.0021477243482608396,
0.0023129205624489945,
0.0020536026976429207,
0.0015157122589255537,
0.0013647949956127356,
0.001133513142190638,
0.0011879424280584426,
0.0010872865461224862,
0.005588894565542552,
0.0,
0.0,
0.0
],
[
0.0,
0.00013748062767261643,
0.009877166688101645,
0.03985777001865452,
0.07035317931696078,
0.08564991747635955,
0.09321755789073534,
0.09152769571355399,
0.08454969496307257,
0.07437875824892262,
0.06683322444614226,
0.056037952121561985,
0.04893731863087072,
0.04248881561509729,
0.03354193912141039,
0.029281795324918397,
0.024076685745943033,
0.021720554346112426,
0.018596818125468612,
0.017199212713088562,
0.013127731797598251,
0.010460260246874836,
0.00954157139587826,
0.007835480797804073,
0.007545069860911577,
0.006347245018720189,
0.005118963773785227,
0.004003056250401388,
0.004070861464439643,
0.0029419886267184367,
0.0025250167311909725,
0.002418125998750675,
0.002143447981672106,
0.002081763711086102,
0.0014299016844281053,
0.0011152608200720772,
0.009030716705020644,
0.0,
0.0,
0.0
],
[
0.0,
3.810027164398639e-05,
0.003721172602538792,
0.022266225487734905,
0.052880858317373075,
0.06936234087048895,
0.08056057120449574,
0.07733315150944509,
0.08125574087757274,
0.07549143445289774,
0.06728456262529578,
0.06192836491888306,
0.05536944645421989,
0.045633394393801645,
0.04032623500121411,
0.03503166182734747,
0.03146724875386978,
0.027856292271809024,
0.021188248413009467,
0.020359562334310768,
0.017957863346561007,
0.015314505194193905,
0.013059129371655766,
0.01171264945102591,
0.010269417507639498,
0.0082138966340941,
0.007373820414424706,
0.005699349402425763,
0.005494052845004428,
0.0035857607089320705,
0.004141242402878959,
0.00366804368163215,
0.0036880485413815184,
0.0022419443424711526,
0.002389293316833953,
0.0017510306661065013,
0.014085339584786628,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0008402959145172021,
0.01012304376017877,
0.03413361809478428,
0.055835686302263654,
0.06144655746472205,
0.07274592538382918,
0.0695957039335041,
0.06912507857595256,
0.06049550766683466,
0.06076662998718386,
0.05139536619729753,
0.05230417197185052,
0.04817265716878424,
0.042399582340700605,
0.038569102780889535,
0.03069187593457968,
0.02962141430746964,
0.02472928826393837,
0.020171917940323816,
0.022754474514120604,
0.018291841915874994,
0.0156584356121414,
0.013409375018530394,
0.01158163392322997,
0.008650132858846873,
0.00852104997162392,
0.0077395923376918545,
0.007206155491780463,
0.006961542442628282,
0.005860017366697022,
0.00391848289653562,
0.004549713178876572,
0.003079624087702752,
0.0036477362613671497,
0.025006768132747617,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
9.377464267757747e-05,
0.0009536114146946773,
0.008546856978907304,
0.025105409968864692,
0.03635345299364116,
0.05233149636769967,
0.06279576970695548,
0.0619969969286244,
0.06518475509471011,
0.057002525687038286,
0.05525064394424468,
0.055771707355333607,
0.050594964937779464,
0.048175642600253726,
0.03993835458284252,
0.04207656080204922,
0.0334895737691743,
0.03163942279546589,
0.02498391970544256,
0.027361052245516607,
0.020400636414576803,
0.01862628852026504,
0.015241004242652663,
0.016301343991875956,
0.013793322994982956,
0.016745694488133258,
0.012666671579355788,
0.011513765256619228,
0.006897541689718618,
0.009931398827012047,
0.005615202714648623,
0.008076860989598289,
0.005774921550162517,
0.005468100083585777,
0.05330075413489653,
0.0,
0.0,
0.0
]
],
"data": [
[
0.0,
0.00020732908308713005,
0.006997356554190639,
0.037267402684911625,
0.07494946353599752,
0.11750375783963096,
0.17384543616855855,
0.16451562742963768,
0.0927797646814907,
0.06878142331415539,
0.05043279946094439,
0.0388223708080651,
0.03120302700461307,
0.026278961281293735,
0.0210439019333437,
0.0177784688747214,
0.013580054942207018,
0.012698906339086716,
0.007930337428082725,
0.007204685637277769,
0.005286891618721816,
0.0050277302648629035,
0.003835588037111906,
0.0030062717047633857,
0.002954439433991603,
0.0020732908308713003,
0.002021458560099518,
0.0021769553724148654,
0.0016586326646970404,
0.0013476390400663453,
0.0004664904369460426,
0.0009329808738920852,
0.0003628258954024776,
0.0006738195200331726,
0.0004664904369460426,
0.0003628258954024776,
0.003524594412481211,
0.0,
0.0,
0.0
],
[
0.0,
3.771307889576105e-05,
0.006335797254487856,
0.035827424950973,
0.07572786242268818,
0.1239251772514708,
0.17084024739779755,
0.15775380902096847,
0.09582893347412882,
0.07007090058832403,
0.05336400663750188,
0.04080555136521345,
0.031829838588022324,
0.024362648966661637,
0.02191129883843717,
0.015877206215115403,
0.013086438376829084,
0.011351636747624076,
0.007806607331422537,
0.006373510333383617,
0.006524362648966661,
0.005317544124302308,
0.003884447126263388,
0.0032810378639312114,
0.0027907678382863175,
0.002300497812641424,
0.0018102277869965302,
0.0019610801025795746,
0.0013953839191431588,
0.0011691054457685925,
0.0009051138934982651,
0.000791974656810982,
0.0005656961834364158,
0.0005656961834364158,
0.00041484386785337155,
0.00045255694674913255,
0.0027530547593905565,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.004676616915422886,
0.03189054726368159,
0.07034825870646766,
0.11233830845771144,
0.16432835820895522,
0.16218905472636816,
0.10064676616915423,
0.0691542288557214,
0.052089552238805965,
0.04318407960199005,
0.03228855721393035,
0.028308457711442785,
0.021194029850746268,
0.01890547263681592,
0.014328358208955224,
0.01218905472636816,
0.01054726368159204,
0.008059701492537314,
0.007064676616915423,
0.005920398009950248,
0.004676616915422886,
0.0038308457711442785,
0.003233830845771144,
0.002338308457711443,
0.002238805970149254,
0.0015920398009950248,
0.0019402985074626865,
0.0014427860696517413,
0.0013930348258706466,
0.0011442786069651742,
0.0007462686567164179,
0.0008955223880597015,
0.0008457711442786069,
0.00029850746268656717,
0.0037313432835820895,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0020511418022699304,
0.01887050458088336,
0.055791057021742106,
0.088062354710789,
0.1500068371393409,
0.17489402434021606,
0.09462600847805279,
0.06262819636264187,
0.05825242718446602,
0.04307397784766854,
0.03733078080131273,
0.03432243949131684,
0.025981129495419118,
0.021058389169971284,
0.01736633392588541,
0.01627239163134145,
0.014221249829071518,
0.013400793108163545,
0.010529194584985642,
0.009298509503623684,
0.005059483112265829,
0.0051962258990838235,
0.005469711472719814,
0.003965540817721865,
0.005743197046355805,
0.0030083413099958978,
0.002734855736359907,
0.0025981129495419118,
0.0015041706549979489,
0.0025981129495419118,
0.0013674278681799535,
0.0017776562286339398,
0.0009571995077259675,
0.0012306850813619582,
0.008751538356351703,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0009174311926605505,
0.006880733944954129,
0.03165137614678899,
0.05963302752293578,
0.12201834862385322,
0.19174311926605506,
0.09128440366972478,
0.060550458715596334,
0.05733944954128441,
0.05045871559633028,
0.044954128440366975,
0.0463302752293578,
0.027522935779816515,
0.021559633027522937,
0.029357798165137616,
0.01834862385321101,
0.017889908256880735,
0.012844036697247707,
0.01651376146788991,
0.00871559633027523,
0.01055045871559633,
0.00871559633027523,
0.008256880733944955,
0.0045871559633027525,
0.0045871559633027525,
0.006422018348623854,
0.005045871559633028,
0.004128440366972477,
0.0013761467889908258,
0.003211009174311927,
0.0013761467889908258,
0.003211009174311927,
0.0022935779816513763,
0.0013761467889908258,
0.01834862385321101,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.007164790174002047,
0.03377686796315251,
0.08290685772773798,
0.14534288638689868,
0.08290685772773798,
0.07164790174002048,
0.05834186284544524,
0.06038894575230297,
0.04401228249744115,
0.04401228249744115,
0.037871033776867964,
0.037871033776867964,
0.03991811668372569,
0.022517911975435005,
0.02456499488229273,
0.016376663254861822,
0.019447287615148415,
0.01023541453428864,
0.016376663254861822,
0.015353121801432959,
0.012282497441146366,
0.012282497441146366,
0.009211873080859774,
0.011258955987717503,
0.011258955987717503,
0.006141248720573183,
0.007164790174002047,
0.008188331627430911,
0.006141248720573183,
0.006141248720573183,
0.0040941658137154556,
0.0040941658137154556,
0.030706243602865918,
0.0,
0.0,
0.0
]
]
},
"absolute_eta": {
"QCD": [
[
0.05987675238307467,
0.06522186801449939,
0.06936891269300377,
0.07829640333350174,
0.08460292507612137,
0.07806791978226571,
0.07703068379218096,
0.031704073447097934,
0.09427044093820772,
0.11600675641580427,
0.1344869003709273,
0.0900188937850448,
0.021047469968270324,
0.0,
0.0
],
[
0.05987675238307468,
0.06522186801449939,
0.06936891269300377,
0.07829640333350173,
0.08460292507612138,
0.07806791978226571,
0.07703068379218096,
0.03170407344709794,
0.09427044093820772,
0.11600675641580428,
0.1344869003709273,
0.09001889378504481,
0.021047469968270324,
0.0,
0.0
],
[
0.05987675238307468,
0.06522186801449939,
0.06936891269300377,
0.07829640333350174,
0.08460292507612137,
0.07806791978226571,
0.07703068379218095,
0.03170407344709794,
0.09427044093820772,
0.11600675641580428,
0.1344869003709273,
0.0900188937850448,
0.02104746996827032,
0.0,
0.0
],
[
0.05987675238307467,
0.06522186801449939,
0.06936891269300376,
0.07829640333350173,
0.08460292507612137,
0.07806791978226571,
0.07703068379218095,
0.031704073447097934,
0.09427044093820772,
0.11600675641580427,
0.1344869003709273,
0.09001889378504481,
0.021047469968270324,
0.0,
0.0
],
[
0.05987675238307469,
0.0652218680144994,
0.0693689126930038,
0.07829640333350177,
0.0846029250761214,
0.07806791978226574,
0.07703068379218098,
0.03170407344709795,
0.09427044093820774,
0.11600675641580432,
0.1344869003709274,
0.09001889378504484,
0.02104746996827033,
0.0,
0.0
],
[
0.05987675238307467,
0.06522186801449939,
0.06936891269300376,
0.07829640333350174,
0.08460292507612137,
0.07806791978226572,
0.07703068379218095,
0.031704073447097934,
0.09427044093820772,
0.11600675641580428,
0.1344869003709273,
0.0900188937850448,
0.02104746996827032,
0.0,
0.0
]
],
"SingleTop": [
[
0.18057558218441327,
0.14499025725382114,
0.14301457067321732,
0.11905510149999471,
0.11116281843218555,
0.10175203166424354,
0.08358722065220654,
0.024903272404934507,
0.0270673005092648,
0.027792316493843693,
0.020813846295080696,
0.01136307728578325,
0.003922604651011212,
0.0,
0.0
],
[
0.16907559988820747,
0.15424141546526418,
0.1460068746361783,
0.1300906193839936,
0.1063964739259216,
0.1000232454738788,
0.08228563667081995,
0.018089722201396815,
0.032019124346381045,
0.02602573031911643,
0.022796910191220873,
0.01072218606059552,
0.0022264614370255727,
0.0,
0.0
],
[
0.16003961460015984,
0.1626323442032677,
0.1558254727209446,
0.11305712673294387,
0.12336094402733422,
0.09205742315926084,
0.0775142068231737,
0.026461227676590055,
0.03517330384409255,
0.027647442061625817,
0.012133430061119343,
0.011603624701286785,
0.0024938393882007735,
0.0,
0.0
],
[
0.15734594848409675,
0.15888786299617055,
0.14814652354908442,
0.14086782219989935,
0.09786627247386094,
0.09662926694197307,
0.09284393641032654,
0.02523098583944025,
0.02753618419509209,
0.02286857701816419,
0.012113382427501733,
0.014989407173932287,
0.0046738302904579246,
0.0,
0.0
],
[
0.16246752294791864,
0.15318236969029106,
0.1906390406902598,
0.1297060823117596,
0.1386042400986142,
0.07852093522670325,
0.06554985680699696,
0.02079115609683946,
0.03400310240241055,
0.004458509076762609,
0.012248645880851786,
0.009792302376248768,
3.6236394343341215e-05,
0.0,
0.0
],
[
0.15871640987822966,
0.15470658723972922,
0.21755053984397163,
0.1533375154822228,
0.11998310855118453,
0.08626869845902692,
0.04116515500954365,
0.013292578526454766,
0.026961724289846035,
0.014452548628575262,
0.013565134091215745,
0.0,
0.0,
0.0,
0.0
]
],
"TTJet": [
[
0.1550545124008465,
0.15200333447806322,
0.1436862018143008,
0.13298893526240232,
0.12138064638016564,
0.09762957809840218,
0.08305499669941117,
0.02363678761091243,
0.036811901085146016,
0.026785286346499862,
0.01634337857373554,
0.00847384086084817,
0.0021506003892662103,
0.0,
0.0
],
[
0.15808975127740826,
0.15219383074518758,
0.14271015995344613,
0.13167512293756195,
0.11396100462917787,
0.09912118618932568,
0.08319327208386104,
0.022194287617898788,
0.03707235631115356,
0.027925522225522366,
0.019326643549551395,
0.009897596165277064,
0.002639266314628483,
0.0,
0.0
],
[
0.15874199770924025,
0.15089836772498144,
0.14680274569852497,
0.13660298679841007,
0.11534445603379266,
0.09858125663432105,
0.0838638803072332,
0.019756645643396943,
0.035524658273683216,
0.027139786100692998,
0.01637367661515989,
0.008113890656868862,
0.0022556518036943285,
0.0,
0.0
],
[
0.16582660651645012,
0.1610555374976697,
0.14677026228381246,
0.1378879509576639,
0.110469194129696,
0.1028065053750657,
0.07775811978136431,
0.019685941077031324,
0.03254771208542584,
0.022355523180477437,
0.014241466088826444,
0.006291155754810762,
0.0023040252717060825,
0.0,
0.0
],
[
0.1736521960304793,
0.16350182984525446,
0.1422609250027656,
0.14455830491061172,
0.11273444407704002,
0.10339767524840501,
0.07521970265615449,
0.017155293766308036,
0.029652231359880883,
0.020994220007513983,
0.011485919309238313,
0.0037617621544219094,
0.0016254956319265003,
0.0,
0.0
],
[
0.1747817277705337,
0.16889849861722145,
0.16018415241705022,
0.1451208694903543,
0.12013365391432626,
0.09263394205358792,
0.0704598773869391,
0.021411741844544023,
0.025683289949135886,
0.01197646461682272,
0.004616187660517965,
0.003423724033064587,
0.000675870245902091,
0.0,
0.0
]
],
"V+Jets": [
[
0.09810317004334954,
0.0987340013013674,
0.10245387658905408,
0.10237809106375455,
0.10598791899285333,
0.10457449516769708,
0.10681369313771015,
0.03443851151421318,
0.07294918890165078,
0.06783182732875304,
0.056051872555258064,
0.037127155408704524,
0.012556197995634203,
0.0,
0.0
],
[
0.09656302149893584,
0.09777789491691936,
0.10039883058469286,
0.10281822034922027,
0.1033500404439202,
0.10539633428984513,
0.10338779203893626,
0.0335961678370141,
0.07271336912630523,
0.07106426178033483,
0.0588231789442643,
0.04137150761797474,
0.012739380571636847,
0.0,
0.0
],
[
0.09618069059555734,
0.09993127772863424,
0.10301892816397343,
0.10465766501421543,
0.10326547778632636,
0.10645977234658961,
0.10304636166633643,
0.032782572681552075,
0.07221093148581915,
0.07108301513391589,
0.05628005779754584,
0.0390270624198895,
0.012056187179644715,
0.0,
0.0
],
[
0.10680681613625684,
0.10551260762245762,
0.10917668940639748,
0.11161748490713201,
0.10941719560109794,
0.1138374532848857,
0.10161332797791646,
0.0335299143257606,
0.0665756499092455,
0.06202811535605133,
0.045718236205316926,
0.026004507320246093,
0.008162001947235502,
0.0,
0.0
],
[
0.12052741638537087,
0.10846579552963456,
0.11658850567084543,
0.11192714926420477,
0.11775280491057286,
0.10941590622671524,
0.10739117633730312,
0.031503909191679544,
0.06309008040662006,
0.05076946146323644,
0.03643053178704978,
0.020305098964242832,
0.005832163862524572,
0.0,
0.0
],
[
0.12975384284701516,
0.1267251769167847,
0.12312672165614938,
0.12411696032523022,
0.11582675418832444,
0.10965521123202573,
0.10913622385814377,
0.027345217535621948,
0.053308768731306605,
0.03841122930940112,
0.021513264049698146,
0.016549558772534407,
0.004531070577764191,
0.0,
0.0
]
],
"data": [
[
0.13787384025294147,
0.14476753226558856,
0.13740734981599545,
0.12574508889234437,
0.11584512517493392,
0.09765199813403826,
0.08806302804125848,
0.024827657699683824,
0.043020784740579486,
0.03628258954024776,
0.026227129010521953,
0.01694915254237288,
0.005338723889493599,
0.0,
0.0
],
[
0.1466661638256147,
0.14828782621813244,
0.13784130336400663,
0.13267461155528737,
0.11491175139538391,
0.09786543973449992,
0.08451500980540051,
0.023495248152059132,
0.04122039523306682,
0.032697239402624825,
0.023721526625433698,
0.0129732991401418,
0.003130185548348167,
0.0,
0.0
],
[
0.1528358208955224,
0.14880597014925373,
0.14751243781094528,
0.13417910447761194,
0.1172636815920398,
0.09706467661691542,
0.08373134328358209,
0.01970149253731343,
0.03691542288557214,
0.028407960199004975,
0.020597014925373133,
0.010298507462686566,
0.0026865671641791043,
0.0,
0.0
],
[
0.1450840968138931,
0.15492957746478875,
0.1450840968138931,
0.1355121017366334,
0.12101736633392589,
0.10255709011349652,
0.0824559004512512,
0.022562559824969235,
0.03432243949131684,
0.027758785724053058,
0.017776562286339396,
0.00943525229044168,
0.0015041706549979489,
0.0,
0.0
],
[
0.15825688073394495,
0.16834862385321103,
0.1559633027522936,
0.12385321100917432,
0.12568807339449542,
0.1018348623853211,
0.07155963302752294,
0.022018348623853212,
0.033486238532110094,
0.02018348623853211,
0.013302752293577982,
0.0045871559633027525,
0.0009174311926605505,
0.0,
0.0
],
[
0.18628454452405324,
0.18526100307062437,
0.14943705220061412,
0.1187308085977482,
0.13715455475946775,
0.08700102354145343,
0.061412487205731836,
0.02456499488229273,
0.01842374616171955,
0.015353121801432959,
0.006141248720573183,
0.009211873080859774,
0.0010235414534288639,
0.0,
0.0
]
]
},
"angle_bl": {
"QCD": [
[
0.014948806610719855,
0.040811329597561834,
0.07230211935795718,
0.09245654083596451,
0.08198826353962475,
0.07707368362629263,
0.07128824050954027,
0.07500887052363427,
0.07313950417418742,
0.06999112443841299,
0.07117100434460526,
0.06963996625573543,
0.06937435511875396,
0.06144702385913922,
0.044024700942259534,
0.015334466265610622,
0.0,
0.0,
0.0,
0.0
],
[
0.014948806610719857,
0.04081132959756185,
0.07230211935795719,
0.09245654083596452,
0.08198826353962477,
0.07707368362629265,
0.07128824050954029,
0.07500887052363427,
0.07313950417418744,
0.069991124438413,
0.07117100434460528,
0.06963996625573544,
0.06937435511875398,
0.06144702385913922,
0.04402470094225954,
0.015334466265610623,
0.0,
0.0,
0.0,
0.0
],
[
0.014948806610719857,
0.04081132959756185,
0.07230211935795719,
0.09245654083596452,
0.08198826353962475,
0.07707368362629265,
0.07128824050954027,
0.07500887052363427,
0.07313950417418744,
0.069991124438413,
0.07117100434460527,
0.06963996625573544,
0.06937435511875398,
0.06144702385913922,
0.04402470094225954,
0.015334466265610622,
0.0,
0.0,
0.0,
0.0
],
[
0.014948806610719857,
0.04081132959756185,
0.0723021193579572,
0.09245654083596454,
0.08198826353962478,
0.07707368362629266,
0.07128824050954029,
0.07500887052363428,
0.07313950417418744,
0.06999112443841302,
0.07117100434460528,
0.06963996625573544,
0.06937435511875398,
0.06144702385913923,
0.044024700942259555,
0.015334466265610625,
0.0,
0.0,
0.0,
0.0
],
[
0.014948806610719857,
0.04081132959756185,
0.07230211935795719,
0.09245654083596454,
0.08198826353962478,
0.07707368362629266,
0.07128824050954029,
0.07500887052363427,
0.07313950417418744,
0.069991124438413,
0.07117100434460527,
0.06963996625573546,
0.06937435511875398,
0.06144702385913923,
0.04402470094225954,
0.015334466265610623,
0.0,
0.0,
0.0,
0.0
],
[
0.014948806610719853,
0.04081132959756185,
0.07230211935795718,
0.09245654083596452,
0.08198826353962477,
0.07707368362629265,
0.07128824050954029,
0.07500887052363425,
0.07313950417418742,
0.069991124438413,
0.07117100434460527,
0.06963996625573544,
0.06937435511875396,
0.06144702385913922,
0.04402470094225954,
0.015334466265610623,
0.0,
0.0,
0.0,
0.0
]
],
"SingleTop": [
[
0.0039046088803905993,
0.0468224953538969,
0.09579928482616777,
0.12595253180535548,
0.11777897388008238,
0.1498882626577888,
0.13266536894410155,
0.09526073124638967,
0.09009423712618884,
0.0581134004322832,
0.035990036883331286,
0.02499864359315429,
0.015675007743320927,
0.0064284873235083695,
0.0,
0.0006279293040401627,
0.0,
0.0,
0.0,
0.0
],
[
0.0030043350271660306,
0.04090570271049234,
0.09921906893962014,
0.13280694993585118,
0.11890105132240404,
0.1384492036480165,
0.12061061527434254,
0.09462047674239636,
0.08625557938505997,
0.05693862407551142,
0.04573908605552821,
0.0370767712650885,
0.014202677471047753,
0.007966212352980747,
0.0033036457944943206,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.005305113055895024,
0.03820766486469783,
0.08859780314960239,
0.12159514179547479,
0.13532397095489504,
0.13146481946982322,
0.1233788256486948,
0.10661246024236333,
0.07947192817124155,
0.07702284821574824,
0.03915642931492725,
0.02387711180017436,
0.015647896598402714,
0.008348368058359947,
0.005421840937790337,
0.0005677777219091426,
0.0,
0.0,
0.0,
0.0
],
[
0.005373502159378196,
0.03394559712385344,
0.10036628252312571,
0.1268301740947897,
0.132763843085672,
0.13059388443129716,
0.11898859613758431,
0.10078268593932638,
0.08387062667655523,
0.06486620067652175,
0.04499811474394459,
0.03179146606632535,
0.011515261132118149,
0.011871971411068214,
0.0014417937984399403,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
3.6236394343341215e-05,
0.022192024901051845,
0.0936171041756505,
0.12962619975448886,
0.14378709042327772,
0.12329263844201582,
0.1273403823145343,
0.12538907608746688,
0.07350118737075455,
0.062492193160663685,
0.034915248311680885,
0.040084252462314986,
0.015086722933157425,
0.00863964326859921,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.018180978013050075,
0.1271108104042842,
0.11009502410076885,
0.13029456150713759,
0.08477187366729436,
0.09856207259936148,
0.11798851074054852,
0.12113559223892216,
0.033864511687758385,
0.08447926937520527,
0.02574341736979062,
0.031744650817397045,
0.013459984855643353,
0.002568742622838117,
0.0,
0.0,
0.0,
0.0,
0.0
]
],
"TTJet": [
[
0.003480091226042866,
0.043984096758788255,
0.11452728728744802,
0.14898203136159344,
0.1560439985753794,
0.1450982592356159,
0.12262834347830495,
0.09590979119544099,
0.0655258657422941,
0.04425877017362726,
0.030056612454449502,
0.015653881802439904,
0.00878533677757391,
0.0032171636031975803,
0.001700338090636742,
0.00014813223716723204,
0.0,
0.0,
0.0,
0.0
],
[
0.004159459158989972,
0.04706654361068396,
0.11421815935270008,
0.1563841026022785,
0.14965383121264697,
0.14007040911447977,
0.1201856061748921,
0.09338970376184354,
0.0676209523871961,
0.045655689306888764,
0.030207238850880107,
0.017986929069649365,
0.008474479846015974,
0.003634897534104121,
0.0011192912172336225,
0.00017270679951702342,
0.0,
0.0,
0.0,
0.0
],
[
0.0032581601038781756,
0.04657526905961961,
0.11743934924960031,
0.15089669601363306,
0.15263100075767067,
0.1379052659230357,
0.11695929643988157,
0.092301719219073,
0.06907903054627627,
0.04759067177768197,
0.029020888222445335,
0.019655799243985486,
0.010834201314263448,
0.00401148110295032,
0.0014235242267248685,
0.0004176467992800951,
0.0,
0.0,
0.0,
0.0
],
[
0.002760937104959862,
0.04880297591087044,
0.12220075782334347,
0.15160861681258872,
0.15457075138800133,
0.13363217509976422,
0.11561962756713415,
0.09006578502558703,
0.06649730974585269,
0.04651019740475168,
0.03152330279310956,
0.01715118539791801,
0.012299336965665219,
0.00473613170958992,
0.0019295894161559233,
9.131983470784158e-05,
0.0,
0.0,
0.0,
0.0
],
[
0.0044173500599130255,
0.052517009746740964,
0.15360699943658074,
0.15050589373764617,
0.16193409864810168,
0.14142959315605183,
0.10655366091622036,
0.07874301883301783,
0.05240542264521773,
0.042610043751563915,
0.02624073455032506,
0.014945834501212655,
0.008509256675874976,
0.004748373074091724,
0.0006159125147027135,
0.00021679775273854992,
0.0,
0.0,
0.0,
0.0
],
[
0.0035190108766115155,
0.07751477565596746,
0.16486537665477827,
0.20619457767391186,
0.1561797448906424,
0.11890125995332525,
0.09240630355471696,
0.060022237958876096,
0.04004777375781091,
0.03054078206711892,
0.023459980935669884,
0.012617602409851627,
0.005836939426081265,
0.004561216918333808,
0.0026028787684306896,
0.0007295384978730949,
0.0,
0.0,
0.0,
0.0
]
],
"V+Jets": [
[
0.005232249690924095,
0.04804504393562702,
0.08665461064850623,
0.11397685384223152,
0.10510580805725092,
0.09639128332438138,
0.10342173364229315,
0.09332936636045015,
0.09259456965073734,
0.08058673012873738,
0.06254861389416443,
0.058726208247432646,
0.029099705980963918,
0.01929873067644767,
0.004645684777564139,
0.0003428071422880995,
0.0,
0.0,
0.0,
0.0
],
[
0.008153057569074529,
0.051270035698688925,
0.08427410766735173,
0.10196234814846003,
0.10810939436016276,
0.09373650112973582,
0.09866098791532578,
0.10491991292586804,
0.0825251934449296,
0.08118767641716787,
0.06956920693918874,
0.047840857459107176,
0.041155582300322756,
0.018617594513993613,
0.007486227105081234,
0.0005313164055415914,
0.0,
0.0,
0.0,
0.0
],
[
0.0054733561194921085,
0.04456323225374236,
0.07592348727403073,
0.09287722886846272,
0.12044686637921556,
0.10564601306989904,
0.10295187047187623,
0.09256333027989423,
0.09998876689145801,
0.07577730959705979,
0.060838142101634886,
0.06211686282777812,
0.028783901680846664,
0.025962524091274194,
0.006087108093335067,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.007195744806787184,
0.029642462669177853,
0.06420621534730936,
0.11233903490589119,
0.12454477143817928,
0.08216625297431576,
0.08510506064273342,
0.09040518957328482,
0.12055247076395395,
0.08712992336665631,
0.06093727342953177,
0.05935791460681155,
0.04817501504620984,
0.018791707810709934,
0.00945096261844774,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.04458806406624592,
0.031175629763670495,
0.07809552258309761,
0.08226898864922706,
0.0934169589565704,
0.1013694079433151,
0.07734890252511513,
0.13464099347268435,
0.09485523961791913,
0.09790629756040296,
0.07536367434236739,
0.02551497295485148,
0.03759488650692585,
0.02586046105760723,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.00260442129680468,
0.03972848751584939,
0.02924765873510957,
0.05711568918858208,
0.08990618469918282,
0.10770822649909946,
0.10793313382185941,
0.09972141665085242,
0.1461018433967429,
0.10112523775710691,
0.0721685934724986,
0.07075104525348042,
0.05771902890600391,
0.018169032806827457,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
]
],
"data": [
[
0.005442388431037164,
0.047063701860778524,
0.10459752241745711,
0.1395843051884103,
0.14310889960089151,
0.14279790597626082,
0.11439382159332401,
0.09500855232467735,
0.07422381174519256,
0.05136578033483647,
0.034831285958637846,
0.022909863681127872,
0.01404654537915306,
0.007256517908049552,
0.0032136007878505158,
0.00015549681231534753,
0.0,
0.0,
0.0,
0.0
],
[
0.003771307889576105,
0.04623623472620304,
0.11015990345451802,
0.1397269573087947,
0.14843867853371548,
0.13829386031075577,
0.12022929551968622,
0.09390556645044501,
0.07470960929250263,
0.05072409111479861,
0.032584100165937546,
0.02164730728616684,
0.011955046009956252,
0.0057701010710514405,
0.0016593754714134862,
0.00018856539447880525,
0.0,
0.0,
0.0,
0.0
],
[
0.0031840796019900496,
0.04497512437810945,
0.11069651741293532,
0.1417412935323383,
0.14432835820895523,
0.13706467661691543,
0.11711442786069651,
0.09731343283582089,
0.07139303482587064,
0.05616915422885572,
0.03711442786069652,
0.021641791044776117,
0.01,
0.00527363184079602,
0.0016417910447761193,
0.00034825870646766166,
0.0,
0.0,
0.0,
0.0
],
[
0.003692055244085875,
0.048133460959934364,
0.11951319567892794,
0.15055380828661288,
0.14344318337207712,
0.13140981813209354,
0.11773553945029401,
0.09216463831532887,
0.06645699439354574,
0.04895391768084234,
0.03404895391768085,
0.023383016545877208,
0.010665937371803639,
0.00765759606180774,
0.001914399015451935,
0.0002734855736359907,
0.0,
0.0,
0.0,
0.0
],
[
0.005045871559633028,
0.045871559633027525,
0.12752293577981652,
0.13990825688073394,
0.17293577981651376,
0.12155963302752294,
0.11788990825688074,
0.08256880733944955,
0.06651376146788991,
0.05,
0.03256880733944954,
0.01743119266055046,
0.012385321100917432,
0.004128440366972477,
0.003211009174311927,
0.00045871559633027525,
0.0,
0.0,
0.0,
0.0
],
[
0.0020470829068577278,
0.05322415557830092,
0.172978505629478,
0.15967246673490276,
0.15967246673490276,
0.13203684749232344,
0.09825997952917093,
0.06653019447287616,
0.05834186284544524,
0.032753326509723645,
0.016376663254861822,
0.02968270214943705,
0.009211873080859774,
0.008188331627430911,
0.0010235414534288639,
0.0,
0.0,
0.0,
0.0,
0.0
]
]
}
}
|
input_templates = {'M3': {'QCD': [[0.0, 0.0004418671450315185, 0.01605229202018541, 0.05825334528354453, 0.08815209477081883, 0.1030093733105401, 0.10513254530282935, 0.09543913272896494, 0.08512520799056993, 0.07489480051367764, 0.06022183314704696, 0.05275434234820922, 0.04426859109280948, 0.03513151550399711, 0.029967498933300033, 0.024464081551639382, 0.020998482981290444, 0.015085519053806937, 0.013212552619472365, 0.010921640496635408, 0.010786019690654257, 0.0079331542797628, 0.007046335967650891, 0.0066796992713355876, 0.00484778962979943, 0.0043565342466071995, 0.0040794364492200835, 0.0027885993970205324, 0.002756423064350152, 0.002331355056268065, 0.0021416660945894994, 0.0017759566793966012, 0.0011629584663072486, 0.001009451124859111, 0.0012831188698206983, 0.0007967669328031654, 0.004698017985185181, 0.0, 0.0, 0.0], [0.0, 0.0004418671450315186, 0.016052292020185415, 0.05825334528354453, 0.08815209477081884, 0.10300937331054011, 0.10513254530282935, 0.09543913272896497, 0.08512520799056993, 0.07489480051367763, 0.06022183314704697, 0.05275434234820922, 0.04426859109280948, 0.03513151550399711, 0.029967498933300037, 0.024464081551639386, 0.020998482981290444, 0.015085519053806937, 0.013212552619472366, 0.010921640496635408, 0.010786019690654257, 0.0079331542797628, 0.007046335967650892, 0.006679699271335588, 0.00484778962979943, 0.0043565342466071995, 0.004079436449220084, 0.002788599397020533, 0.002756423064350152, 0.002331355056268065, 0.0021416660945894994, 0.0017759566793966015, 0.0011629584663072486, 0.0010094511248591113, 0.0012831188698206985, 0.0007967669328031655, 0.004698017985185181, 0.0, 0.0, 0.0], [0.0, 0.00044186714503151845, 0.016052292020185405, 0.058253345283544505, 0.0881520947708188, 0.10300937331054005, 0.10513254530282928, 0.09543913272896491, 0.08512520799056988, 0.0748948005136776, 0.06022183314704694, 0.0527543423482092, 0.044268591092809464, 0.035131515503997096, 0.029967498933300023, 0.02446408155163937, 0.020998482981290433, 0.015085519053806931, 0.013212552619472361, 0.010921640496635406, 0.010786019690654252, 0.007933154279762796, 0.007046335967650889, 0.006679699271335586, 0.004847789629799428, 0.004356534246607198, 0.004079436449220083, 0.0027885993970205316, 0.002756423064350151, 0.0023313550562680647, 0.0021416660945894985, 0.0017759566793966006, 0.0011629584663072482, 0.0010094511248591109, 0.0012831188698206976, 0.0007967669328031652, 0.0046980179851851805, 0.0, 0.0, 0.0], [0.0, 0.00044186714503151856, 0.016052292020185415, 0.058253345283544526, 0.08815209477081883, 0.1030093733105401, 0.10513254530282934, 0.09543913272896495, 0.08512520799056993, 0.07489480051367763, 0.06022183314704697, 0.05275434234820922, 0.04426859109280948, 0.03513151550399711, 0.029967498933300033, 0.024464081551639382, 0.020998482981290444, 0.01508551905380694, 0.013212552619472365, 0.010921640496635408, 0.010786019690654257, 0.0079331542797628, 0.0070463359676508925, 0.006679699271335588, 0.0048477896297994295, 0.0043565342466071995, 0.004079436449220084, 0.002788599397020533, 0.002756423064350152, 0.0023313550562680655, 0.0021416660945894994, 0.0017759566793966015, 0.0011629584663072486, 0.0010094511248591113, 0.0012831188698206983, 0.0007967669328031656, 0.004698017985185182, 0.0, 0.0, 0.0], [0.0, 0.00044186714503151845, 0.016052292020185408, 0.05825334528354451, 0.08815209477081881, 0.10300937331054007, 0.10513254530282931, 0.09543913272896493, 0.0851252079905699, 0.07489480051367763, 0.060221833147046946, 0.05275434234820921, 0.044268591092809464, 0.0351315155039971, 0.02996749893330003, 0.02446408155163937, 0.02099848298129044, 0.015085519053806935, 0.013212552619472363, 0.010921640496635408, 0.010786019690654255, 0.007933154279762798, 0.00704633596765089, 0.006679699271335587, 0.004847789629799429, 0.004356534246607199, 0.0040794364492200835, 0.0027885993970205324, 0.002756423064350151, 0.0023313550562680647, 0.002141666094589499, 0.001775956679396601, 0.0011629584663072484, 0.001009451124859111, 0.0012831188698206976, 0.0007967669328031653, 0.0046980179851851805, 0.0, 0.0, 0.0], [0.0, 0.00044186714503151845, 0.016052292020185408, 0.05825334528354452, 0.08815209477081881, 0.1030093733105401, 0.10513254530282932, 0.09543913272896495, 0.08512520799056991, 0.07489480051367763, 0.060221833147046946, 0.052754342348209214, 0.044268591092809464, 0.0351315155039971, 0.02996749893330003, 0.02446408155163937, 0.02099848298129044, 0.015085519053806935, 0.013212552619472363, 0.010921640496635408, 0.010786019690654253, 0.007933154279762798, 0.007046335967650891, 0.006679699271335587, 0.0048477896297994295, 0.004356534246607198, 0.0040794364492200835, 0.0027885993970205324, 0.0027564230643501515, 0.002331355056268065, 0.002141666094589499, 0.001775956679396601, 0.0011629584663072484, 0.001009451124859111, 0.0012831188698206979, 0.0007967669328031655, 0.0046980179851851805, 0.0, 0.0, 0.0]], 'SingleTop': [[0.0, 0.0, 0.005832177218207422, 0.03178392883540604, 0.07169459952763149, 0.11287210836676197, 0.12176478715865051, 0.12613012243319208, 0.09279832309977645, 0.0794145472218926, 0.06006907882516122, 0.05255651613575753, 0.040665134899883736, 0.03624912116256268, 0.019772311111878084, 0.021835717802889197, 0.01593884467082636, 0.019743744021810564, 0.008520333396281287, 0.008972922567677826, 0.00866376260113745, 0.010388777243208618, 0.007465864279390942, 0.008541920826701573, 0.0069814633847972846, 0.004641107502972211, 0.005051657691380684, 0.003139862804695983, 0.0064010107328637145, 0.0018922562881085226, 0.000984504344510512, 0.0006270305039092417, 0.0, 0.0004977320603021565, 0.0004854616714298998, 0.0007746782412963946, 0.006848591367048002, 0.0, 0.0, 0.0], [0.0, 0.0, 0.006464253844897605, 0.026118917653010134, 0.060112787514841975, 0.09584106586560479, 0.12925563138779625, 0.11715408034300653, 0.09440622815766804, 0.0716779573912037, 0.06916348777011985, 0.05498302637465252, 0.042697413569360194, 0.03739191469243603, 0.030265823351673254, 0.02017805782885195, 0.020967376788849502, 0.018012820429670742, 0.01701231602942316, 0.011241488781432862, 0.013054428387246958, 0.011576167379020312, 0.006085157039789595, 0.008138644498565663, 0.003003338789354045, 0.0031858415089799684, 0.005792637555725393, 0.004107311320351441, 0.0009511534181744243, 0.00275249480381622, 0.004384640907243928, 0.0018999453119997332, 0.0023273554030316707, 0.0016001069427164683, 0.0010718452947245862, 0.0012111180899201381, 0.005913165574839969, 0.0, 0.0, 0.0], [0.0, 0.000730898105715262, 0.004345582215870544, 0.02798607884595784, 0.058042809009575966, 0.08283302044377722, 0.12365219544544459, 0.11925280674249097, 0.07900946342989748, 0.0729889060967615, 0.06555652145311269, 0.05500702243367231, 0.03727507362592039, 0.03497935430893025, 0.038758173666694595, 0.022026642610227798, 0.020289974876133793, 0.02390005152672489, 0.015996129394221792, 0.015502623414619431, 0.013383170539170194, 0.008222802588575384, 0.008923541477108209, 0.009493835160659504, 0.007416365558061059, 0.006450296693177907, 0.006153831272067389, 0.004196024662363883, 0.003400842304431063, 0.005252293744180164, 0.0039361210244639845, 0.004358739163202468, 0.00287066741824079, 0.002285628915640503, 0.002764779086954986, 0.0014452620379491693, 0.011312470708004386, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.01600155485970672, 0.03639273911473297, 0.05968874574025049, 0.10598450262625334, 0.11388841443601717, 0.08307443249770091, 0.08639375480501353, 0.05741122320100601, 0.06314537056043235, 0.053346999957043284, 0.043790356322535307, 0.03638268872477183, 0.028617051623100895, 0.032593396108858065, 0.013798591164209608, 0.02230033822729821, 0.01580926917445075, 0.006236987296217145, 0.017497312659310434, 0.011933038792119726, 0.011202353000571373, 0.005562222992955815, 0.006945493185204689, 0.009975553245066583, 0.005022960250692474, 0.007047783899380394, 0.006433393500369129, 0.006724854313022172, 0.004743829720451964, 0.004778845074539503, 0.005801395394700851, 0.003081124868615164, 0.0023767450175057143, 0.016016677645895455, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0034855705626097616, 0.010025916336663884, 0.027364239400232984, 0.037694745308698235, 0.09663206840536868, 0.09970075477836253, 0.06106233761893696, 0.056412910319662585, 0.057912542580936144, 0.041328923907318675, 0.06704352646140234, 0.047223924190355336, 0.031021114902507748, 0.03758027943204309, 0.022834400563328236, 0.024808105880289092, 0.036654808787627724, 0.031893202006165335, 0.02739260061438384, 0.012395283525136105, 0.01054237296279351, 0.020567685747427896, 0.012583514912694046, 0.009008845505670094, 0.012527762077976097, 0.017938595283369566, 0.010789448025986654, 0.003632023138839643, 0.01816042267512064, 0.0015585333839998625, 0.0027675759622464006, 0.019484546123949304, 0.004103330254325486, 0.009631143922782703, 0.016236944440788555, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.007336647376339268, 0.02347544978530838, 0.06263222854439522, 0.06610613086026246, 0.035369146080455695, 0.04408531650826217, 0.043560791950211564, 0.09582421142939976, 0.024197640811710778, 0.05814140173848918, 0.025521248131010324, 0.053856110255041584, 0.03162162916096726, 0.07115652068544676, 0.016567788392908175, 0.020825518489763186, 0.02428868407680062, 0.031889226678125646, 0.013637606734355396, 0.029101557862528757, 0.0, 0.025475944986739763, 0.029517463743032837, 0.01538260011507948, 0.006017436893000935, 0.01865575381438486, 0.015824792234214888, 0.0030866067227976217, 0.013980448208807261, 0.0, 0.008943475556169688, 0.025516356476877198, 0.058404265697113315, 0.0, 0.0, 0.0]], 'TTJet': [[0.0, 0.0, 0.005866260054832973, 0.032014476569687776, 0.07611743723353019, 0.12269913163544673, 0.204669959277149, 0.1780022148266413, 0.0902222568133845, 0.06720996262179303, 0.045621861833730876, 0.03585930513808567, 0.027308801181492228, 0.022550773464298984, 0.01697272151879135, 0.014303918822958318, 0.009536675235431601, 0.008151062240943892, 0.006990013596176034, 0.005622428289760508, 0.005432733235420568, 0.004571707788875856, 0.0030247979877491816, 0.0025379990687445786, 0.0021322114740614994, 0.0018967639068011742, 0.001600198531484904, 0.001760907897112518, 0.0010930826959057282, 0.0012682896008723822, 0.0007330317183938927, 0.0007410646772215062, 0.000665137515949025, 0.0005346326125257873, 0.00039168832065960966, 0.00025771205206101376, 0.0016387805620258422, 0.0, 0.0, 0.0], [0.0, 7.262560201399413e-05, 0.005459965341619546, 0.03172214511310284, 0.07699353745814363, 0.12491126396204628, 0.20003559424615688, 0.17066165025335486, 0.08996890767405352, 0.06649813957714566, 0.05061011517828175, 0.03584184011202735, 0.027588795134809475, 0.023294770858547913, 0.01757932753487905, 0.013027107776830716, 0.012195905630129025, 0.009600558514058243, 0.006854961641894884, 0.0058081556303386135, 0.004698636898302152, 0.004593892903081976, 0.003409789788416189, 0.0021757282806029953, 0.002259041246620286, 0.00221698886107549, 0.0020069814624712992, 0.0014849074170667832, 0.0014821376683882836, 0.0009165103021072048, 0.0005584379824681107, 0.0007847520606728024, 0.0004956669967263232, 0.0007192863381122417, 0.00044359338561214204, 0.000283998679673084, 0.0027442824891683155, 0.0, 0.0, 0.0], [0.0, 0.00010999244899275781, 0.004524250010912452, 0.030522524117397948, 0.06765121697833965, 0.11925184104915117, 0.18208569394951088, 0.1678624854487025, 0.09332137586299127, 0.06492288997550127, 0.05287619322834948, 0.038590428081298624, 0.03148344300415997, 0.024806268142032767, 0.021888358435464855, 0.016696569370059054, 0.012486064354286668, 0.011756333188735998, 0.00958964683937508, 0.007049851662028582, 0.005738821121195343, 0.005400646562344024, 0.004162263767899146, 0.003934996784796343, 0.00356665539154776, 0.0026563631439693474, 0.0022957990527197767, 0.001734408902217747, 0.0018663108219949586, 0.0012663255620451552, 0.0008837863377775026, 0.0013098166043183537, 0.0005873395717754564, 0.0008883902275125473, 0.0008014397012084036, 0.0008264688444718471, 0.004604741454914939, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0023000264038757798, 0.01705439603921528, 0.04910070346416718, 0.09122001899630586, 0.17588293609181563, 0.18507124253611063, 0.09123159958610425, 0.05960162269734152, 0.05217691285173646, 0.04256359509315278, 0.03655345441422678, 0.03347575846500428, 0.024626447013499187, 0.020432978830003327, 0.018561221373061258, 0.015463103655853658, 0.013714304272130806, 0.010177342106655817, 0.007905429232179009, 0.007063551755709067, 0.006327206254554339, 0.005548799854541709, 0.00473154328286029, 0.0028560148177622416, 0.003584833469792769, 0.0031925925174912575, 0.0020649767313211443, 0.002451003450795212, 0.0021984280785497233, 0.0011494329646675383, 0.0013478106212170275, 0.0012014834048370694, 0.0007953963931541348, 0.0008277202379397255, 0.007546113042367408, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.008510891182227956, 0.027618114739544775, 0.0636993366514693, 0.14246282154415016, 0.19098302504658946, 0.0872846975295914, 0.05823132301671626, 0.054630204652622194, 0.05224415539511138, 0.03774462633291826, 0.03664568879307432, 0.03118798584556276, 0.025179552074013272, 0.027141927663582498, 0.018962738084157393, 0.017223786461534024, 0.012446304790499648, 0.016704397350814998, 0.010397188282338298, 0.011885364365900734, 0.00654541669225773, 0.0040150732738811505, 0.00794356577980281, 0.004932553709318321, 0.00832159001726371, 0.004070225735221562, 0.004060922854342003, 0.002952745784692842, 0.0018856875946734997, 0.0019478722702617498, 0.0023680681218760063, 0.0023425849040899396, 0.002593594715463811, 0.014835968744435398, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0021323691782451095, 0.006747644148045247, 0.02513638990110083, 0.09137187949815516, 0.17543353593257902, 0.082276692770331, 0.055565932825706814, 0.04899686699219004, 0.048526846692094026, 0.0430927385806642, 0.045633959497397604, 0.03788645694588343, 0.03701656523569493, 0.027036724921725, 0.025113196273446294, 0.031936114241276965, 0.01971309713885621, 0.01574158090833572, 0.019199474721680914, 0.015918849921157444, 0.020868544525546172, 0.01747935795697653, 0.011748327914222433, 0.011164996360747675, 0.005749847798091752, 0.008617229066506017, 0.0075600827784392515, 0.005840168166936298, 0.004992409839912211, 0.0034805126985320766, 0.004064677716135877, 0.008239422111627327, 0.00550017795981303, 0.030217328781947526, 0.0, 0.0, 0.0]], 'V+Jets': [[0.0, 0.0003142927948550799, 0.014512953130632845, 0.05277088304876486, 0.08603434012912506, 0.10506007172016002, 0.1067469629669173, 0.09819689497361543, 0.08685199609224331, 0.0751422047093353, 0.06330097494347225, 0.05305337891368768, 0.042655702448659835, 0.03651482989040328, 0.02983395150144785, 0.02444199511955661, 0.019900292964464696, 0.017253925481071554, 0.014184603279955183, 0.011779383448541635, 0.00996429756420057, 0.008054020034949594, 0.006814650499510039, 0.005461215783698751, 0.004786373871279337, 0.004022818533689391, 0.0032319528725585503, 0.002762787299816871, 0.0021703208306309983, 0.0021801373564605993, 0.0018673122370412762, 0.0014108542664235356, 0.0012263135535731382, 0.0010058133245547092, 0.0009499002073703987, 0.0008661948281679969, 0.004675399379164311, 0.0, 0.0, 0.0], [0.0, 0.00022095428396729953, 0.012707124119856623, 0.05007359016055423, 0.0816346426541373, 0.10173271618458331, 0.10290453572384554, 0.09596862491288694, 0.0884082114992676, 0.07362064853080143, 0.06504901232482868, 0.05374270427931259, 0.04477683652470922, 0.03677843045188911, 0.03136199798739972, 0.02541267694460663, 0.02154691592437478, 0.018001364153149808, 0.015421585508605756, 0.012398978119919494, 0.01003514773672651, 0.009161746424217295, 0.007765969135257237, 0.006138711956013194, 0.0052930499804763696, 0.004422823978351614, 0.0037285515669491375, 0.0033000573885081388, 0.0021477243482608396, 0.0023129205624489945, 0.0020536026976429207, 0.0015157122589255537, 0.0013647949956127356, 0.001133513142190638, 0.0011879424280584426, 0.0010872865461224862, 0.005588894565542552, 0.0, 0.0, 0.0], [0.0, 0.00013748062767261643, 0.009877166688101645, 0.03985777001865452, 0.07035317931696078, 0.08564991747635955, 0.09321755789073534, 0.09152769571355399, 0.08454969496307257, 0.07437875824892262, 0.06683322444614226, 0.056037952121561985, 0.04893731863087072, 0.04248881561509729, 0.03354193912141039, 0.029281795324918397, 0.024076685745943033, 0.021720554346112426, 0.018596818125468612, 0.017199212713088562, 0.013127731797598251, 0.010460260246874836, 0.00954157139587826, 0.007835480797804073, 0.007545069860911577, 0.006347245018720189, 0.005118963773785227, 0.004003056250401388, 0.004070861464439643, 0.0029419886267184367, 0.0025250167311909725, 0.002418125998750675, 0.002143447981672106, 0.002081763711086102, 0.0014299016844281053, 0.0011152608200720772, 0.009030716705020644, 0.0, 0.0, 0.0], [0.0, 3.810027164398639e-05, 0.003721172602538792, 0.022266225487734905, 0.052880858317373075, 0.06936234087048895, 0.08056057120449574, 0.07733315150944509, 0.08125574087757274, 0.07549143445289774, 0.06728456262529578, 0.06192836491888306, 0.05536944645421989, 0.045633394393801645, 0.04032623500121411, 0.03503166182734747, 0.03146724875386978, 0.027856292271809024, 0.021188248413009467, 0.020359562334310768, 0.017957863346561007, 0.015314505194193905, 0.013059129371655766, 0.01171264945102591, 0.010269417507639498, 0.0082138966340941, 0.007373820414424706, 0.005699349402425763, 0.005494052845004428, 0.0035857607089320705, 0.004141242402878959, 0.00366804368163215, 0.0036880485413815184, 0.0022419443424711526, 0.002389293316833953, 0.0017510306661065013, 0.014085339584786628, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0008402959145172021, 0.01012304376017877, 0.03413361809478428, 0.055835686302263654, 0.06144655746472205, 0.07274592538382918, 0.0695957039335041, 0.06912507857595256, 0.06049550766683466, 0.06076662998718386, 0.05139536619729753, 0.05230417197185052, 0.04817265716878424, 0.042399582340700605, 0.038569102780889535, 0.03069187593457968, 0.02962141430746964, 0.02472928826393837, 0.020171917940323816, 0.022754474514120604, 0.018291841915874994, 0.0156584356121414, 0.013409375018530394, 0.01158163392322997, 0.008650132858846873, 0.00852104997162392, 0.0077395923376918545, 0.007206155491780463, 0.006961542442628282, 0.005860017366697022, 0.00391848289653562, 0.004549713178876572, 0.003079624087702752, 0.0036477362613671497, 0.025006768132747617, 0.0, 0.0, 0.0], [0.0, 0.0, 9.377464267757747e-05, 0.0009536114146946773, 0.008546856978907304, 0.025105409968864692, 0.03635345299364116, 0.05233149636769967, 0.06279576970695548, 0.0619969969286244, 0.06518475509471011, 0.057002525687038286, 0.05525064394424468, 0.055771707355333607, 0.050594964937779464, 0.048175642600253726, 0.03993835458284252, 0.04207656080204922, 0.0334895737691743, 0.03163942279546589, 0.02498391970544256, 0.027361052245516607, 0.020400636414576803, 0.01862628852026504, 0.015241004242652663, 0.016301343991875956, 0.013793322994982956, 0.016745694488133258, 0.012666671579355788, 0.011513765256619228, 0.006897541689718618, 0.009931398827012047, 0.005615202714648623, 0.008076860989598289, 0.005774921550162517, 0.005468100083585777, 0.05330075413489653, 0.0, 0.0, 0.0]], 'data': [[0.0, 0.00020732908308713005, 0.006997356554190639, 0.037267402684911625, 0.07494946353599752, 0.11750375783963096, 0.17384543616855855, 0.16451562742963768, 0.0927797646814907, 0.06878142331415539, 0.05043279946094439, 0.0388223708080651, 0.03120302700461307, 0.026278961281293735, 0.0210439019333437, 0.0177784688747214, 0.013580054942207018, 0.012698906339086716, 0.007930337428082725, 0.007204685637277769, 0.005286891618721816, 0.0050277302648629035, 0.003835588037111906, 0.0030062717047633857, 0.002954439433991603, 0.0020732908308713003, 0.002021458560099518, 0.0021769553724148654, 0.0016586326646970404, 0.0013476390400663453, 0.0004664904369460426, 0.0009329808738920852, 0.0003628258954024776, 0.0006738195200331726, 0.0004664904369460426, 0.0003628258954024776, 0.003524594412481211, 0.0, 0.0, 0.0], [0.0, 3.771307889576105e-05, 0.006335797254487856, 0.035827424950973, 0.07572786242268818, 0.1239251772514708, 0.17084024739779755, 0.15775380902096847, 0.09582893347412882, 0.07007090058832403, 0.05336400663750188, 0.04080555136521345, 0.031829838588022324, 0.024362648966661637, 0.02191129883843717, 0.015877206215115403, 0.013086438376829084, 0.011351636747624076, 0.007806607331422537, 0.006373510333383617, 0.006524362648966661, 0.005317544124302308, 0.003884447126263388, 0.0032810378639312114, 0.0027907678382863175, 0.002300497812641424, 0.0018102277869965302, 0.0019610801025795746, 0.0013953839191431588, 0.0011691054457685925, 0.0009051138934982651, 0.000791974656810982, 0.0005656961834364158, 0.0005656961834364158, 0.00041484386785337155, 0.00045255694674913255, 0.0027530547593905565, 0.0, 0.0, 0.0], [0.0, 0.0, 0.004676616915422886, 0.03189054726368159, 0.07034825870646766, 0.11233830845771144, 0.16432835820895522, 0.16218905472636816, 0.10064676616915423, 0.0691542288557214, 0.052089552238805965, 0.04318407960199005, 0.03228855721393035, 0.028308457711442785, 0.021194029850746268, 0.01890547263681592, 0.014328358208955224, 0.01218905472636816, 0.01054726368159204, 0.008059701492537314, 0.007064676616915423, 0.005920398009950248, 0.004676616915422886, 0.0038308457711442785, 0.003233830845771144, 0.002338308457711443, 0.002238805970149254, 0.0015920398009950248, 0.0019402985074626865, 0.0014427860696517413, 0.0013930348258706466, 0.0011442786069651742, 0.0007462686567164179, 0.0008955223880597015, 0.0008457711442786069, 0.00029850746268656717, 0.0037313432835820895, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0020511418022699304, 0.01887050458088336, 0.055791057021742106, 0.088062354710789, 0.1500068371393409, 0.17489402434021606, 0.09462600847805279, 0.06262819636264187, 0.05825242718446602, 0.04307397784766854, 0.03733078080131273, 0.03432243949131684, 0.025981129495419118, 0.021058389169971284, 0.01736633392588541, 0.01627239163134145, 0.014221249829071518, 0.013400793108163545, 0.010529194584985642, 0.009298509503623684, 0.005059483112265829, 0.0051962258990838235, 0.005469711472719814, 0.003965540817721865, 0.005743197046355805, 0.0030083413099958978, 0.002734855736359907, 0.0025981129495419118, 0.0015041706549979489, 0.0025981129495419118, 0.0013674278681799535, 0.0017776562286339398, 0.0009571995077259675, 0.0012306850813619582, 0.008751538356351703, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0009174311926605505, 0.006880733944954129, 0.03165137614678899, 0.05963302752293578, 0.12201834862385322, 0.19174311926605506, 0.09128440366972478, 0.060550458715596334, 0.05733944954128441, 0.05045871559633028, 0.044954128440366975, 0.0463302752293578, 0.027522935779816515, 0.021559633027522937, 0.029357798165137616, 0.01834862385321101, 0.017889908256880735, 0.012844036697247707, 0.01651376146788991, 0.00871559633027523, 0.01055045871559633, 0.00871559633027523, 0.008256880733944955, 0.0045871559633027525, 0.0045871559633027525, 0.006422018348623854, 0.005045871559633028, 0.004128440366972477, 0.0013761467889908258, 0.003211009174311927, 0.0013761467889908258, 0.003211009174311927, 0.0022935779816513763, 0.0013761467889908258, 0.01834862385321101, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.007164790174002047, 0.03377686796315251, 0.08290685772773798, 0.14534288638689868, 0.08290685772773798, 0.07164790174002048, 0.05834186284544524, 0.06038894575230297, 0.04401228249744115, 0.04401228249744115, 0.037871033776867964, 0.037871033776867964, 0.03991811668372569, 0.022517911975435005, 0.02456499488229273, 0.016376663254861822, 0.019447287615148415, 0.01023541453428864, 0.016376663254861822, 0.015353121801432959, 0.012282497441146366, 0.012282497441146366, 0.009211873080859774, 0.011258955987717503, 0.011258955987717503, 0.006141248720573183, 0.007164790174002047, 0.008188331627430911, 0.006141248720573183, 0.006141248720573183, 0.0040941658137154556, 0.0040941658137154556, 0.030706243602865918, 0.0, 0.0, 0.0]]}, 'absolute_eta': {'QCD': [[0.05987675238307467, 0.06522186801449939, 0.06936891269300377, 0.07829640333350174, 0.08460292507612137, 0.07806791978226571, 0.07703068379218096, 0.031704073447097934, 0.09427044093820772, 0.11600675641580427, 0.1344869003709273, 0.0900188937850448, 0.021047469968270324, 0.0, 0.0], [0.05987675238307468, 0.06522186801449939, 0.06936891269300377, 0.07829640333350173, 0.08460292507612138, 0.07806791978226571, 0.07703068379218096, 0.03170407344709794, 0.09427044093820772, 0.11600675641580428, 0.1344869003709273, 0.09001889378504481, 0.021047469968270324, 0.0, 0.0], [0.05987675238307468, 0.06522186801449939, 0.06936891269300377, 0.07829640333350174, 0.08460292507612137, 0.07806791978226571, 0.07703068379218095, 0.03170407344709794, 0.09427044093820772, 0.11600675641580428, 0.1344869003709273, 0.0900188937850448, 0.02104746996827032, 0.0, 0.0], [0.05987675238307467, 0.06522186801449939, 0.06936891269300376, 0.07829640333350173, 0.08460292507612137, 0.07806791978226571, 0.07703068379218095, 0.031704073447097934, 0.09427044093820772, 0.11600675641580427, 0.1344869003709273, 0.09001889378504481, 0.021047469968270324, 0.0, 0.0], [0.05987675238307469, 0.0652218680144994, 0.0693689126930038, 0.07829640333350177, 0.0846029250761214, 0.07806791978226574, 0.07703068379218098, 0.03170407344709795, 0.09427044093820774, 0.11600675641580432, 0.1344869003709274, 0.09001889378504484, 0.02104746996827033, 0.0, 0.0], [0.05987675238307467, 0.06522186801449939, 0.06936891269300376, 0.07829640333350174, 0.08460292507612137, 0.07806791978226572, 0.07703068379218095, 0.031704073447097934, 0.09427044093820772, 0.11600675641580428, 0.1344869003709273, 0.0900188937850448, 0.02104746996827032, 0.0, 0.0]], 'SingleTop': [[0.18057558218441327, 0.14499025725382114, 0.14301457067321732, 0.11905510149999471, 0.11116281843218555, 0.10175203166424354, 0.08358722065220654, 0.024903272404934507, 0.0270673005092648, 0.027792316493843693, 0.020813846295080696, 0.01136307728578325, 0.003922604651011212, 0.0, 0.0], [0.16907559988820747, 0.15424141546526418, 0.1460068746361783, 0.1300906193839936, 0.1063964739259216, 0.1000232454738788, 0.08228563667081995, 0.018089722201396815, 0.032019124346381045, 0.02602573031911643, 0.022796910191220873, 0.01072218606059552, 0.0022264614370255727, 0.0, 0.0], [0.16003961460015984, 0.1626323442032677, 0.1558254727209446, 0.11305712673294387, 0.12336094402733422, 0.09205742315926084, 0.0775142068231737, 0.026461227676590055, 0.03517330384409255, 0.027647442061625817, 0.012133430061119343, 0.011603624701286785, 0.0024938393882007735, 0.0, 0.0], [0.15734594848409675, 0.15888786299617055, 0.14814652354908442, 0.14086782219989935, 0.09786627247386094, 0.09662926694197307, 0.09284393641032654, 0.02523098583944025, 0.02753618419509209, 0.02286857701816419, 0.012113382427501733, 0.014989407173932287, 0.0046738302904579246, 0.0, 0.0], [0.16246752294791864, 0.15318236969029106, 0.1906390406902598, 0.1297060823117596, 0.1386042400986142, 0.07852093522670325, 0.06554985680699696, 0.02079115609683946, 0.03400310240241055, 0.004458509076762609, 0.012248645880851786, 0.009792302376248768, 3.6236394343341215e-05, 0.0, 0.0], [0.15871640987822966, 0.15470658723972922, 0.21755053984397163, 0.1533375154822228, 0.11998310855118453, 0.08626869845902692, 0.04116515500954365, 0.013292578526454766, 0.026961724289846035, 0.014452548628575262, 0.013565134091215745, 0.0, 0.0, 0.0, 0.0]], 'TTJet': [[0.1550545124008465, 0.15200333447806322, 0.1436862018143008, 0.13298893526240232, 0.12138064638016564, 0.09762957809840218, 0.08305499669941117, 0.02363678761091243, 0.036811901085146016, 0.026785286346499862, 0.01634337857373554, 0.00847384086084817, 0.0021506003892662103, 0.0, 0.0], [0.15808975127740826, 0.15219383074518758, 0.14271015995344613, 0.13167512293756195, 0.11396100462917787, 0.09912118618932568, 0.08319327208386104, 0.022194287617898788, 0.03707235631115356, 0.027925522225522366, 0.019326643549551395, 0.009897596165277064, 0.002639266314628483, 0.0, 0.0], [0.15874199770924025, 0.15089836772498144, 0.14680274569852497, 0.13660298679841007, 0.11534445603379266, 0.09858125663432105, 0.0838638803072332, 0.019756645643396943, 0.035524658273683216, 0.027139786100692998, 0.01637367661515989, 0.008113890656868862, 0.0022556518036943285, 0.0, 0.0], [0.16582660651645012, 0.1610555374976697, 0.14677026228381246, 0.1378879509576639, 0.110469194129696, 0.1028065053750657, 0.07775811978136431, 0.019685941077031324, 0.03254771208542584, 0.022355523180477437, 0.014241466088826444, 0.006291155754810762, 0.0023040252717060825, 0.0, 0.0], [0.1736521960304793, 0.16350182984525446, 0.1422609250027656, 0.14455830491061172, 0.11273444407704002, 0.10339767524840501, 0.07521970265615449, 0.017155293766308036, 0.029652231359880883, 0.020994220007513983, 0.011485919309238313, 0.0037617621544219094, 0.0016254956319265003, 0.0, 0.0], [0.1747817277705337, 0.16889849861722145, 0.16018415241705022, 0.1451208694903543, 0.12013365391432626, 0.09263394205358792, 0.0704598773869391, 0.021411741844544023, 0.025683289949135886, 0.01197646461682272, 0.004616187660517965, 0.003423724033064587, 0.000675870245902091, 0.0, 0.0]], 'V+Jets': [[0.09810317004334954, 0.0987340013013674, 0.10245387658905408, 0.10237809106375455, 0.10598791899285333, 0.10457449516769708, 0.10681369313771015, 0.03443851151421318, 0.07294918890165078, 0.06783182732875304, 0.056051872555258064, 0.037127155408704524, 0.012556197995634203, 0.0, 0.0], [0.09656302149893584, 0.09777789491691936, 0.10039883058469286, 0.10281822034922027, 0.1033500404439202, 0.10539633428984513, 0.10338779203893626, 0.0335961678370141, 0.07271336912630523, 0.07106426178033483, 0.0588231789442643, 0.04137150761797474, 0.012739380571636847, 0.0, 0.0], [0.09618069059555734, 0.09993127772863424, 0.10301892816397343, 0.10465766501421543, 0.10326547778632636, 0.10645977234658961, 0.10304636166633643, 0.032782572681552075, 0.07221093148581915, 0.07108301513391589, 0.05628005779754584, 0.0390270624198895, 0.012056187179644715, 0.0, 0.0], [0.10680681613625684, 0.10551260762245762, 0.10917668940639748, 0.11161748490713201, 0.10941719560109794, 0.1138374532848857, 0.10161332797791646, 0.0335299143257606, 0.0665756499092455, 0.06202811535605133, 0.045718236205316926, 0.026004507320246093, 0.008162001947235502, 0.0, 0.0], [0.12052741638537087, 0.10846579552963456, 0.11658850567084543, 0.11192714926420477, 0.11775280491057286, 0.10941590622671524, 0.10739117633730312, 0.031503909191679544, 0.06309008040662006, 0.05076946146323644, 0.03643053178704978, 0.020305098964242832, 0.005832163862524572, 0.0, 0.0], [0.12975384284701516, 0.1267251769167847, 0.12312672165614938, 0.12411696032523022, 0.11582675418832444, 0.10965521123202573, 0.10913622385814377, 0.027345217535621948, 0.053308768731306605, 0.03841122930940112, 0.021513264049698146, 0.016549558772534407, 0.004531070577764191, 0.0, 0.0]], 'data': [[0.13787384025294147, 0.14476753226558856, 0.13740734981599545, 0.12574508889234437, 0.11584512517493392, 0.09765199813403826, 0.08806302804125848, 0.024827657699683824, 0.043020784740579486, 0.03628258954024776, 0.026227129010521953, 0.01694915254237288, 0.005338723889493599, 0.0, 0.0], [0.1466661638256147, 0.14828782621813244, 0.13784130336400663, 0.13267461155528737, 0.11491175139538391, 0.09786543973449992, 0.08451500980540051, 0.023495248152059132, 0.04122039523306682, 0.032697239402624825, 0.023721526625433698, 0.0129732991401418, 0.003130185548348167, 0.0, 0.0], [0.1528358208955224, 0.14880597014925373, 0.14751243781094528, 0.13417910447761194, 0.1172636815920398, 0.09706467661691542, 0.08373134328358209, 0.01970149253731343, 0.03691542288557214, 0.028407960199004975, 0.020597014925373133, 0.010298507462686566, 0.0026865671641791043, 0.0, 0.0], [0.1450840968138931, 0.15492957746478875, 0.1450840968138931, 0.1355121017366334, 0.12101736633392589, 0.10255709011349652, 0.0824559004512512, 0.022562559824969235, 0.03432243949131684, 0.027758785724053058, 0.017776562286339396, 0.00943525229044168, 0.0015041706549979489, 0.0, 0.0], [0.15825688073394495, 0.16834862385321103, 0.1559633027522936, 0.12385321100917432, 0.12568807339449542, 0.1018348623853211, 0.07155963302752294, 0.022018348623853212, 0.033486238532110094, 0.02018348623853211, 0.013302752293577982, 0.0045871559633027525, 0.0009174311926605505, 0.0, 0.0], [0.18628454452405324, 0.18526100307062437, 0.14943705220061412, 0.1187308085977482, 0.13715455475946775, 0.08700102354145343, 0.061412487205731836, 0.02456499488229273, 0.01842374616171955, 0.015353121801432959, 0.006141248720573183, 0.009211873080859774, 0.0010235414534288639, 0.0, 0.0]]}, 'angle_bl': {'QCD': [[0.014948806610719855, 0.040811329597561834, 0.07230211935795718, 0.09245654083596451, 0.08198826353962475, 0.07707368362629263, 0.07128824050954027, 0.07500887052363427, 0.07313950417418742, 0.06999112443841299, 0.07117100434460526, 0.06963996625573543, 0.06937435511875396, 0.06144702385913922, 0.044024700942259534, 0.015334466265610622, 0.0, 0.0, 0.0, 0.0], [0.014948806610719857, 0.04081132959756185, 0.07230211935795719, 0.09245654083596452, 0.08198826353962477, 0.07707368362629265, 0.07128824050954029, 0.07500887052363427, 0.07313950417418744, 0.069991124438413, 0.07117100434460528, 0.06963996625573544, 0.06937435511875398, 0.06144702385913922, 0.04402470094225954, 0.015334466265610623, 0.0, 0.0, 0.0, 0.0], [0.014948806610719857, 0.04081132959756185, 0.07230211935795719, 0.09245654083596452, 0.08198826353962475, 0.07707368362629265, 0.07128824050954027, 0.07500887052363427, 0.07313950417418744, 0.069991124438413, 0.07117100434460527, 0.06963996625573544, 0.06937435511875398, 0.06144702385913922, 0.04402470094225954, 0.015334466265610622, 0.0, 0.0, 0.0, 0.0], [0.014948806610719857, 0.04081132959756185, 0.0723021193579572, 0.09245654083596454, 0.08198826353962478, 0.07707368362629266, 0.07128824050954029, 0.07500887052363428, 0.07313950417418744, 0.06999112443841302, 0.07117100434460528, 0.06963996625573544, 0.06937435511875398, 0.06144702385913923, 0.044024700942259555, 0.015334466265610625, 0.0, 0.0, 0.0, 0.0], [0.014948806610719857, 0.04081132959756185, 0.07230211935795719, 0.09245654083596454, 0.08198826353962478, 0.07707368362629266, 0.07128824050954029, 0.07500887052363427, 0.07313950417418744, 0.069991124438413, 0.07117100434460527, 0.06963996625573546, 0.06937435511875398, 0.06144702385913923, 0.04402470094225954, 0.015334466265610623, 0.0, 0.0, 0.0, 0.0], [0.014948806610719853, 0.04081132959756185, 0.07230211935795718, 0.09245654083596452, 0.08198826353962477, 0.07707368362629265, 0.07128824050954029, 0.07500887052363425, 0.07313950417418742, 0.069991124438413, 0.07117100434460527, 0.06963996625573544, 0.06937435511875396, 0.06144702385913922, 0.04402470094225954, 0.015334466265610623, 0.0, 0.0, 0.0, 0.0]], 'SingleTop': [[0.0039046088803905993, 0.0468224953538969, 0.09579928482616777, 0.12595253180535548, 0.11777897388008238, 0.1498882626577888, 0.13266536894410155, 0.09526073124638967, 0.09009423712618884, 0.0581134004322832, 0.035990036883331286, 0.02499864359315429, 0.015675007743320927, 0.0064284873235083695, 0.0, 0.0006279293040401627, 0.0, 0.0, 0.0, 0.0], [0.0030043350271660306, 0.04090570271049234, 0.09921906893962014, 0.13280694993585118, 0.11890105132240404, 0.1384492036480165, 0.12061061527434254, 0.09462047674239636, 0.08625557938505997, 0.05693862407551142, 0.04573908605552821, 0.0370767712650885, 0.014202677471047753, 0.007966212352980747, 0.0033036457944943206, 0.0, 0.0, 0.0, 0.0, 0.0], [0.005305113055895024, 0.03820766486469783, 0.08859780314960239, 0.12159514179547479, 0.13532397095489504, 0.13146481946982322, 0.1233788256486948, 0.10661246024236333, 0.07947192817124155, 0.07702284821574824, 0.03915642931492725, 0.02387711180017436, 0.015647896598402714, 0.008348368058359947, 0.005421840937790337, 0.0005677777219091426, 0.0, 0.0, 0.0, 0.0], [0.005373502159378196, 0.03394559712385344, 0.10036628252312571, 0.1268301740947897, 0.132763843085672, 0.13059388443129716, 0.11898859613758431, 0.10078268593932638, 0.08387062667655523, 0.06486620067652175, 0.04499811474394459, 0.03179146606632535, 0.011515261132118149, 0.011871971411068214, 0.0014417937984399403, 0.0, 0.0, 0.0, 0.0, 0.0], [3.6236394343341215e-05, 0.022192024901051845, 0.0936171041756505, 0.12962619975448886, 0.14378709042327772, 0.12329263844201582, 0.1273403823145343, 0.12538907608746688, 0.07350118737075455, 0.062492193160663685, 0.034915248311680885, 0.040084252462314986, 0.015086722933157425, 0.00863964326859921, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.018180978013050075, 0.1271108104042842, 0.11009502410076885, 0.13029456150713759, 0.08477187366729436, 0.09856207259936148, 0.11798851074054852, 0.12113559223892216, 0.033864511687758385, 0.08447926937520527, 0.02574341736979062, 0.031744650817397045, 0.013459984855643353, 0.002568742622838117, 0.0, 0.0, 0.0, 0.0, 0.0]], 'TTJet': [[0.003480091226042866, 0.043984096758788255, 0.11452728728744802, 0.14898203136159344, 0.1560439985753794, 0.1450982592356159, 0.12262834347830495, 0.09590979119544099, 0.0655258657422941, 0.04425877017362726, 0.030056612454449502, 0.015653881802439904, 0.00878533677757391, 0.0032171636031975803, 0.001700338090636742, 0.00014813223716723204, 0.0, 0.0, 0.0, 0.0], [0.004159459158989972, 0.04706654361068396, 0.11421815935270008, 0.1563841026022785, 0.14965383121264697, 0.14007040911447977, 0.1201856061748921, 0.09338970376184354, 0.0676209523871961, 0.045655689306888764, 0.030207238850880107, 0.017986929069649365, 0.008474479846015974, 0.003634897534104121, 0.0011192912172336225, 0.00017270679951702342, 0.0, 0.0, 0.0, 0.0], [0.0032581601038781756, 0.04657526905961961, 0.11743934924960031, 0.15089669601363306, 0.15263100075767067, 0.1379052659230357, 0.11695929643988157, 0.092301719219073, 0.06907903054627627, 0.04759067177768197, 0.029020888222445335, 0.019655799243985486, 0.010834201314263448, 0.00401148110295032, 0.0014235242267248685, 0.0004176467992800951, 0.0, 0.0, 0.0, 0.0], [0.002760937104959862, 0.04880297591087044, 0.12220075782334347, 0.15160861681258872, 0.15457075138800133, 0.13363217509976422, 0.11561962756713415, 0.09006578502558703, 0.06649730974585269, 0.04651019740475168, 0.03152330279310956, 0.01715118539791801, 0.012299336965665219, 0.00473613170958992, 0.0019295894161559233, 9.131983470784158e-05, 0.0, 0.0, 0.0, 0.0], [0.0044173500599130255, 0.052517009746740964, 0.15360699943658074, 0.15050589373764617, 0.16193409864810168, 0.14142959315605183, 0.10655366091622036, 0.07874301883301783, 0.05240542264521773, 0.042610043751563915, 0.02624073455032506, 0.014945834501212655, 0.008509256675874976, 0.004748373074091724, 0.0006159125147027135, 0.00021679775273854992, 0.0, 0.0, 0.0, 0.0], [0.0035190108766115155, 0.07751477565596746, 0.16486537665477827, 0.20619457767391186, 0.1561797448906424, 0.11890125995332525, 0.09240630355471696, 0.060022237958876096, 0.04004777375781091, 0.03054078206711892, 0.023459980935669884, 0.012617602409851627, 0.005836939426081265, 0.004561216918333808, 0.0026028787684306896, 0.0007295384978730949, 0.0, 0.0, 0.0, 0.0]], 'V+Jets': [[0.005232249690924095, 0.04804504393562702, 0.08665461064850623, 0.11397685384223152, 0.10510580805725092, 0.09639128332438138, 0.10342173364229315, 0.09332936636045015, 0.09259456965073734, 0.08058673012873738, 0.06254861389416443, 0.058726208247432646, 0.029099705980963918, 0.01929873067644767, 0.004645684777564139, 0.0003428071422880995, 0.0, 0.0, 0.0, 0.0], [0.008153057569074529, 0.051270035698688925, 0.08427410766735173, 0.10196234814846003, 0.10810939436016276, 0.09373650112973582, 0.09866098791532578, 0.10491991292586804, 0.0825251934449296, 0.08118767641716787, 0.06956920693918874, 0.047840857459107176, 0.041155582300322756, 0.018617594513993613, 0.007486227105081234, 0.0005313164055415914, 0.0, 0.0, 0.0, 0.0], [0.0054733561194921085, 0.04456323225374236, 0.07592348727403073, 0.09287722886846272, 0.12044686637921556, 0.10564601306989904, 0.10295187047187623, 0.09256333027989423, 0.09998876689145801, 0.07577730959705979, 0.060838142101634886, 0.06211686282777812, 0.028783901680846664, 0.025962524091274194, 0.006087108093335067, 0.0, 0.0, 0.0, 0.0, 0.0], [0.007195744806787184, 0.029642462669177853, 0.06420621534730936, 0.11233903490589119, 0.12454477143817928, 0.08216625297431576, 0.08510506064273342, 0.09040518957328482, 0.12055247076395395, 0.08712992336665631, 0.06093727342953177, 0.05935791460681155, 0.04817501504620984, 0.018791707810709934, 0.00945096261844774, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.04458806406624592, 0.031175629763670495, 0.07809552258309761, 0.08226898864922706, 0.0934169589565704, 0.1013694079433151, 0.07734890252511513, 0.13464099347268435, 0.09485523961791913, 0.09790629756040296, 0.07536367434236739, 0.02551497295485148, 0.03759488650692585, 0.02586046105760723, 0.0, 0.0, 0.0, 0.0, 0.0], [0.00260442129680468, 0.03972848751584939, 0.02924765873510957, 0.05711568918858208, 0.08990618469918282, 0.10770822649909946, 0.10793313382185941, 0.09972141665085242, 0.1461018433967429, 0.10112523775710691, 0.0721685934724986, 0.07075104525348042, 0.05771902890600391, 0.018169032806827457, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]], 'data': [[0.005442388431037164, 0.047063701860778524, 0.10459752241745711, 0.1395843051884103, 0.14310889960089151, 0.14279790597626082, 0.11439382159332401, 0.09500855232467735, 0.07422381174519256, 0.05136578033483647, 0.034831285958637846, 0.022909863681127872, 0.01404654537915306, 0.007256517908049552, 0.0032136007878505158, 0.00015549681231534753, 0.0, 0.0, 0.0, 0.0], [0.003771307889576105, 0.04623623472620304, 0.11015990345451802, 0.1397269573087947, 0.14843867853371548, 0.13829386031075577, 0.12022929551968622, 0.09390556645044501, 0.07470960929250263, 0.05072409111479861, 0.032584100165937546, 0.02164730728616684, 0.011955046009956252, 0.0057701010710514405, 0.0016593754714134862, 0.00018856539447880525, 0.0, 0.0, 0.0, 0.0], [0.0031840796019900496, 0.04497512437810945, 0.11069651741293532, 0.1417412935323383, 0.14432835820895523, 0.13706467661691543, 0.11711442786069651, 0.09731343283582089, 0.07139303482587064, 0.05616915422885572, 0.03711442786069652, 0.021641791044776117, 0.01, 0.00527363184079602, 0.0016417910447761193, 0.00034825870646766166, 0.0, 0.0, 0.0, 0.0], [0.003692055244085875, 0.048133460959934364, 0.11951319567892794, 0.15055380828661288, 0.14344318337207712, 0.13140981813209354, 0.11773553945029401, 0.09216463831532887, 0.06645699439354574, 0.04895391768084234, 0.03404895391768085, 0.023383016545877208, 0.010665937371803639, 0.00765759606180774, 0.001914399015451935, 0.0002734855736359907, 0.0, 0.0, 0.0, 0.0], [0.005045871559633028, 0.045871559633027525, 0.12752293577981652, 0.13990825688073394, 0.17293577981651376, 0.12155963302752294, 0.11788990825688074, 0.08256880733944955, 0.06651376146788991, 0.05, 0.03256880733944954, 0.01743119266055046, 0.012385321100917432, 0.004128440366972477, 0.003211009174311927, 0.00045871559633027525, 0.0, 0.0, 0.0, 0.0], [0.0020470829068577278, 0.05322415557830092, 0.172978505629478, 0.15967246673490276, 0.15967246673490276, 0.13203684749232344, 0.09825997952917093, 0.06653019447287616, 0.05834186284544524, 0.032753326509723645, 0.016376663254861822, 0.02968270214943705, 0.009211873080859774, 0.008188331627430911, 0.0010235414534288639, 0.0, 0.0, 0.0, 0.0, 0.0]]}}
|
def expand_as_one_hot(input, C, ignore_index=None):
"""
Converts NxDxHxW label image to NxCxDxHxW, where each label gets converted to its corresponding one-hot vector
:param input: 4D input image (NxDxHxW)
:param C: number of channels/labels
:param ignore_index: ignore index to be kept during the expansion
:return: 5D output image (NxCxDxHxW)
"""
assert input.dim() == 4
# expand the input tensor to Nx1xDxHxW before scattering
input = input.unsqueeze(1)
# create result tensor shape (NxCxDxHxW)
shape = list(input.size())
shape[1] = C
if ignore_index is not None:
# create ignore_index mask for the result
mask = input.expand(shape) == ignore_index
# clone the src tensor and zero out ignore_index in the input
input = input.clone()
input[input == ignore_index] = 0
# scatter to get the one-hot tensor
result = torch.zeros(shape).to(input.device).scatter_(1, input, 1)
# bring back the ignore_index in the result
result[mask] = ignore_index
return result
else:
# scatter to get the one-hot tensor
return torch.zeros(shape).to(input.device).scatter_(1, input, 1)
|
def expand_as_one_hot(input, C, ignore_index=None):
"""
Converts NxDxHxW label image to NxCxDxHxW, where each label gets converted to its corresponding one-hot vector
:param input: 4D input image (NxDxHxW)
:param C: number of channels/labels
:param ignore_index: ignore index to be kept during the expansion
:return: 5D output image (NxCxDxHxW)
"""
assert input.dim() == 4
input = input.unsqueeze(1)
shape = list(input.size())
shape[1] = C
if ignore_index is not None:
mask = input.expand(shape) == ignore_index
input = input.clone()
input[input == ignore_index] = 0
result = torch.zeros(shape).to(input.device).scatter_(1, input, 1)
result[mask] = ignore_index
return result
else:
return torch.zeros(shape).to(input.device).scatter_(1, input, 1)
|
class HtmlWriter():
def __init__(self, filename):
self.filename = filename
self.html_file = open(self.filename, 'w')
self.html_file.write(
"""<!DOCTYPE html>\n""" + \
"""<html>\n<body>\n<table border="1" style="width:100%"> \n""")
def add_element(self, col_dict):
self.html_file.write(' <tr>\n')
for key in range(len(col_dict)):
self.html_file.write(""" <td>{}</td>\n""".format(col_dict[key]))
self.html_file.write(' </tr>\n')
def image_tag(self, image_path, height=240, width=320):
return """<img src="{}" alt="{}" height={} width={}>""".format(
image_path,image_path,height,width)
def video_tag(self, video_path, height=240, width=320, autoplay=True):
if autoplay:
autoplay_str = 'autoplay loop'
else:
autoplay_str = ''
tag = \
"""<video width="{}" height="{}" controls {}>""".format(width,height,autoplay_str) + \
""" <source src="{}" type="video/mp4">""".format(video_path) + \
""" Your browser does not support the video tag.""" + \
"""</video>"""
return tag
def colored_text(self,text,color):
return '<span style=\"color:' + color + '\">' + text + '</span>'
def bg_colored_text(self,text,bg_color,text_color='rgb(0,0,0)'):
return f'<span style=\"background-color:{bg_color}; color:{text_color}\">' + text + '</span>'
def editable_content(self,content):
return """<div contenteditable="True">{}</div>""".format(content)
def close(self):
self.html_file.write('</table>\n</body>\n</html>')
self.html_file.close()
|
class Htmlwriter:
def __init__(self, filename):
self.filename = filename
self.html_file = open(self.filename, 'w')
self.html_file.write('<!DOCTYPE html>\n' + '<html>\n<body>\n<table border="1" style="width:100%"> \n')
def add_element(self, col_dict):
self.html_file.write(' <tr>\n')
for key in range(len(col_dict)):
self.html_file.write(' <td>{}</td>\n'.format(col_dict[key]))
self.html_file.write(' </tr>\n')
def image_tag(self, image_path, height=240, width=320):
return '<img src="{}" alt="{}" height={} width={}>'.format(image_path, image_path, height, width)
def video_tag(self, video_path, height=240, width=320, autoplay=True):
if autoplay:
autoplay_str = 'autoplay loop'
else:
autoplay_str = ''
tag = '<video width="{}" height="{}" controls {}>'.format(width, height, autoplay_str) + ' <source src="{}" type="video/mp4">'.format(video_path) + ' Your browser does not support the video tag.' + '</video>'
return tag
def colored_text(self, text, color):
return '<span style="color:' + color + '">' + text + '</span>'
def bg_colored_text(self, text, bg_color, text_color='rgb(0,0,0)'):
return f'<span style="background-color:{bg_color}; color:{text_color}">' + text + '</span>'
def editable_content(self, content):
return '<div contenteditable="True">{}</div>'.format(content)
def close(self):
self.html_file.write('</table>\n</body>\n</html>')
self.html_file.close()
|
# AT Commands
MAKE = 'at+cgmi'
MODEL = 'at+cgmm'
STATUS = 'at!gstatus?'
BANDMASK = 'at!gband?'
SIGNALQ = 'at+csq'
PWRMODE = { 'reboot': 'at!reset',
'lowpower': 'at+cfun=4',
'fullpower': 'at+cfun=1'}
|
make = 'at+cgmi'
model = 'at+cgmm'
status = 'at!gstatus?'
bandmask = 'at!gband?'
signalq = 'at+csq'
pwrmode = {'reboot': 'at!reset', 'lowpower': 'at+cfun=4', 'fullpower': 'at+cfun=1'}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.