content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# MathHelper.py - Some helpful math utilities. # Created by Josh Kennedy on 18 May 2014 # # Pop a Dots # Copyright 2014 Chad Jensen and Josh Kennedy # Copyright 2015-2016 Sirkles LLC def lerp(value1, value2, amount): return value1 + ((value2 - value1) * amount) def isPowerOfTwo(value): return (value > 0) and ((value & (value - 1)) == 0) def toDegrees(radians): return radians * 57.295779513082320876798154814105 def toRadians(degrees): return degrees * 0.017453292519943295769236907684886 def clamp(value, low, high): if value < low: return low else: if value > high: return high else: return value def nextPowerOfTwo(value): return_value = 1 while return_value < value: return_value <<= 1 return return_value
def lerp(value1, value2, amount): return value1 + (value2 - value1) * amount def is_power_of_two(value): return value > 0 and value & value - 1 == 0 def to_degrees(radians): return radians * 57.29577951308232 def to_radians(degrees): return degrees * 0.017453292519943295 def clamp(value, low, high): if value < low: return low elif value > high: return high else: return value def next_power_of_two(value): return_value = 1 while return_value < value: return_value <<= 1 return return_value
# Adds testing.TestEnvironment provider if "env" attr is specified # https://bazel.build/rules/lib/testing#TestEnvironment def phase_test_environment(ctx, p): test_env = ctx.attr.env if test_env: return struct( external_providers = { "TestingEnvironment": testing.TestEnvironment(test_env), }, ) return struct()
def phase_test_environment(ctx, p): test_env = ctx.attr.env if test_env: return struct(external_providers={'TestingEnvironment': testing.TestEnvironment(test_env)}) return struct()
def keyquery(): return( set([]) ) def getval(prob): return( prob.file )
def keyquery(): return set([]) def getval(prob): return prob.file
#!/usr/bin/env python3 print('1a') print('1b') print('2a\n') print('2b\n') print('3a\r\n') print('3b\r\n') print('4a\r') print('4b\r') print('5a\n\r') print('5b\n\r')
print('1a') print('1b') print('2a\n') print('2b\n') print('3a\r\n') print('3b\r\n') print('4a\r') print('4b\r') print('5a\n\r') print('5b\n\r')
# You are given a string and your task is to swap cases. # In other words, convert all lowercase letters to uppercase letters and vice versa. def swap_case(s): return s.swapcase() if __name__ == '__main__': s = input() result = swap_case(s) print(result)
def swap_case(s): return s.swapcase() if __name__ == '__main__': s = input() result = swap_case(s) print(result)
# uncompyle6 version 3.7.2 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] # Embedded file name: extract__one_file_exe__pyinstaller\_test_file.py __author__ = 'ipetrash' def say(): print('Hello World!') if __name__ == '__main__': say()
__author__ = 'ipetrash' def say(): print('Hello World!') if __name__ == '__main__': say()
# Law of large number # How to get first line input n, m, k = map(int, input().split()) data = list(map(int, input().split())) solution = 0 count_use_max_value = 0 data.sort(reverse=True) for i in range(0, m): if count_use_max_value >= k: solution += data[1] count_use_max_value = 0 else: solution += data[0] count_use_max_value += 1 print(solution)
(n, m, k) = map(int, input().split()) data = list(map(int, input().split())) solution = 0 count_use_max_value = 0 data.sort(reverse=True) for i in range(0, m): if count_use_max_value >= k: solution += data[1] count_use_max_value = 0 else: solution += data[0] count_use_max_value += 1 print(solution)
# FIXME need to fix TWO_RIG_AX_TO_MOVE here; empirically-derived, like we did with safe trajectories # define rig_ax to be moved to achieve either min or max given that we are at designated rough home position TWO_RIG_AX_TO_MOVE = { # rough_home ax1 min max ax2 min max '+x': [('pitch', -10, +10), ('roll', -10, +10)], '-x': [('pitch', +160, +172), ('roll', -10, +10)], '+y': [('pitch', +70, +90), ('yaw', -80, -100)], '-y': [('pitch', -90, -110), ('roll', -10, +10)], '+z': [('pitch', -90, -110), ('roll', -10, +10)], '-z': [('pitch', +70, +90), ('yaw', -10, +10)], } # map axis letter to ESP axis (stage) number ESP_AX = {'roll': 1, 'pitch': 2, 'yaw': 3} # move sequence for safe trajectories -- minimal moves for rough home to rough home transitions ORIG_SAFE_TRAJ_MOVES = [ # rough_home ax1 pos1, ax2 pos2, etc. ('+x', [(2, 0)]), ('-z', [(2, 80)]), ('+y', [(3, -90)]), ('-x', [(2, 170)]), ('-y', [(2, -100), (3, -90)]), ('+z', [(3, 0)]), ] NEXT_SAFE_TRAJ_MOVES = [ # rough_home ax1 pos1, ax2 pos2, etc. ('+y', [(3, -90)]), ('-x', [(2, 170)]), ('-y', [(2, -100), (3, -90)]), ('+z', [(3, 0)]), ] SAFE_TRAJ_MOVES = [ # rough_home ax1 pos1, ax2 pos2, etc. ('+z', [(3, 0)]), ] # time to allow stage to settle (e.g. after a move, wait a short bit before querying actual position) ESP_SETTLE = 3 # seconds
two_rig_ax_to_move = {'+x': [('pitch', -10, +10), ('roll', -10, +10)], '-x': [('pitch', +160, +172), ('roll', -10, +10)], '+y': [('pitch', +70, +90), ('yaw', -80, -100)], '-y': [('pitch', -90, -110), ('roll', -10, +10)], '+z': [('pitch', -90, -110), ('roll', -10, +10)], '-z': [('pitch', +70, +90), ('yaw', -10, +10)]} esp_ax = {'roll': 1, 'pitch': 2, 'yaw': 3} orig_safe_traj_moves = [('+x', [(2, 0)]), ('-z', [(2, 80)]), ('+y', [(3, -90)]), ('-x', [(2, 170)]), ('-y', [(2, -100), (3, -90)]), ('+z', [(3, 0)])] next_safe_traj_moves = [('+y', [(3, -90)]), ('-x', [(2, 170)]), ('-y', [(2, -100), (3, -90)]), ('+z', [(3, 0)])] safe_traj_moves = [('+z', [(3, 0)])] esp_settle = 3
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def preorderTraversal(self, root: TreeNode) -> List[int]: if root == None: return [] else: curList = [ root ] while True: nextList = [] expanded = False for curRoot in curList: curRootLeft = curRoot.left curRootRight = curRoot.right curRoot.left = None curRoot.right = None nextList.append( curRoot ) if curRootLeft != None: nextList.append( curRootLeft ) expanded = True if curRootRight != None: nextList.append( curRootRight ) expanded = True if expanded: curList = nextList else: break outList = [ x.val for x in curList ] return outList
class Solution: def preorder_traversal(self, root: TreeNode) -> List[int]: if root == None: return [] else: cur_list = [root] while True: next_list = [] expanded = False for cur_root in curList: cur_root_left = curRoot.left cur_root_right = curRoot.right curRoot.left = None curRoot.right = None nextList.append(curRoot) if curRootLeft != None: nextList.append(curRootLeft) expanded = True if curRootRight != None: nextList.append(curRootRight) expanded = True if expanded: cur_list = nextList else: break out_list = [x.val for x in curList] return outList
def lambda_handler(event, context): n = int(event['number']) n = n * -1 if n < 0 else n subject = event.get('__TRIGGERFLOW_SUBJECT', None) return {'number': n, '__TRIGGERFLOW_SUBJECT': subject}
def lambda_handler(event, context): n = int(event['number']) n = n * -1 if n < 0 else n subject = event.get('__TRIGGERFLOW_SUBJECT', None) return {'number': n, '__TRIGGERFLOW_SUBJECT': subject}
load("@bazel_skylib//lib:paths.bzl", "paths") load("@bazel_skylib//lib:shell.bzl", "shell") def _addlicense_impl(ctx): out_file = ctx.actions.declare_file(ctx.label.name + ".bash") exclude_patterns_str = "" if ctx.attr.exclude_patterns: exclude_patterns = ["-not -path %s" % shell.quote(pattern) for pattern in ctx.attr.exclude_patterns] exclude_patterns_str = " ".join(exclude_patterns) substitutions = { "@@ADDLICENSE_SHORT_PATH@@": shell.quote(ctx.executable._addlicense.short_path), "@@MODE@@": shell.quote(ctx.attr.mode), "@@EXCLUDE_PATTERNS@@": exclude_patterns_str, } ctx.actions.expand_template( template = ctx.file._runner, output = out_file, substitutions = substitutions, is_executable = True, ) runfiles = ctx.runfiles(files = [ctx.executable._addlicense]) return [DefaultInfo( runfiles = runfiles, executable = out_file, )] addlicense = rule( implementation = _addlicense_impl, attrs = { "mode": attr.string( values = [ "format", "check", ], default = "format", ), "exclude_patterns": attr.string_list( allow_empty = True, doc = "A list of glob patterns passed to the find command. E.g. './vendor/*' to exclude the Go vendor directory", default = [ ".*.git/*", ".*.project/*", ".*idea/*", ], ), "_addlicense": attr.label( default = Label("@com_github_google_addlicense//:addlicense"), executable = True, cfg = "host", ), "_runner": attr.label( default = Label("//bazel/rules_addlicense:runner.bash.template"), allow_single_file = True, ), }, executable = True, )
load('@bazel_skylib//lib:paths.bzl', 'paths') load('@bazel_skylib//lib:shell.bzl', 'shell') def _addlicense_impl(ctx): out_file = ctx.actions.declare_file(ctx.label.name + '.bash') exclude_patterns_str = '' if ctx.attr.exclude_patterns: exclude_patterns = ['-not -path %s' % shell.quote(pattern) for pattern in ctx.attr.exclude_patterns] exclude_patterns_str = ' '.join(exclude_patterns) substitutions = {'@@ADDLICENSE_SHORT_PATH@@': shell.quote(ctx.executable._addlicense.short_path), '@@MODE@@': shell.quote(ctx.attr.mode), '@@EXCLUDE_PATTERNS@@': exclude_patterns_str} ctx.actions.expand_template(template=ctx.file._runner, output=out_file, substitutions=substitutions, is_executable=True) runfiles = ctx.runfiles(files=[ctx.executable._addlicense]) return [default_info(runfiles=runfiles, executable=out_file)] addlicense = rule(implementation=_addlicense_impl, attrs={'mode': attr.string(values=['format', 'check'], default='format'), 'exclude_patterns': attr.string_list(allow_empty=True, doc="A list of glob patterns passed to the find command. E.g. './vendor/*' to exclude the Go vendor directory", default=['.*.git/*', '.*.project/*', '.*idea/*']), '_addlicense': attr.label(default=label('@com_github_google_addlicense//:addlicense'), executable=True, cfg='host'), '_runner': attr.label(default=label('//bazel/rules_addlicense:runner.bash.template'), allow_single_file=True)}, executable=True)
class Solution: def findComplement(self, num: int) -> int: res =i = 0 while num: if not num & 1: res |= 1 << i num = num >> 1 i += 1 return res class Solution: def findComplement(self, num: int) -> int: i = 1 while i <= num: i = i << 1 return (i - 1) ^ num class Solution: def findComplement(self, num: int) -> int: copy = num; i = 0; while copy != 0 : copy >>= 1; num ^= (1<<i); i += 1; return num; class Solution: def findComplement(self, num: int) -> int: mask = 1 while( mask < num): mask = (mask << 1) | 1 return ~num & mask class Solution: def findComplement(self, num: int) -> int: n = 0; while (n < num): n = (n << 1) | 1; return n - num;
class Solution: def find_complement(self, num: int) -> int: res = i = 0 while num: if not num & 1: res |= 1 << i num = num >> 1 i += 1 return res class Solution: def find_complement(self, num: int) -> int: i = 1 while i <= num: i = i << 1 return i - 1 ^ num class Solution: def find_complement(self, num: int) -> int: copy = num i = 0 while copy != 0: copy >>= 1 num ^= 1 << i i += 1 return num class Solution: def find_complement(self, num: int) -> int: mask = 1 while mask < num: mask = mask << 1 | 1 return ~num & mask class Solution: def find_complement(self, num: int) -> int: n = 0 while n < num: n = n << 1 | 1 return n - num
class C: def foo(self): pass class D: def bar(self): pass class E: def baz(self): pass def f(): return 0 def g(): return x = (C(), D(), E()) a, b, c = x x[0].bar() # NO bar x[1].baz() # NO baz x[2].foo() # baz a.bar() # NO bar b.baz() # NO baz c.foo() # NO foo
class C: def foo(self): pass class D: def bar(self): pass class E: def baz(self): pass def f(): return 0 def g(): return x = (c(), d(), e()) (a, b, c) = x x[0].bar() x[1].baz() x[2].foo() a.bar() b.baz() c.foo()
# 2019-01-15 # csv file reading f = open('score.csv', 'r') lines = f.readlines() f.close() for line in lines: total = 0 count = 0 scores = line[:-1].split(',') # print(scores) for score in scores: total += int(score) count += 1 print("Total = %3d, Avg = %.2f" % (total, total / count))
f = open('score.csv', 'r') lines = f.readlines() f.close() for line in lines: total = 0 count = 0 scores = line[:-1].split(',') for score in scores: total += int(score) count += 1 print('Total = %3d, Avg = %.2f' % (total, total / count))
# # PySNMP MIB module INTEL-RSVP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/INTEL-RSVP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:43:25 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, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint") mib2ext, = mibBuilder.importSymbols("INTEL-GEN-MIB", "mib2ext") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") MibIdentifier, NotificationType, TimeTicks, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, Unsigned32, IpAddress, Integer32, Bits, ObjectIdentity, Gauge32, Counter64, iso = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "NotificationType", "TimeTicks", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "Unsigned32", "IpAddress", "Integer32", "Bits", "ObjectIdentity", "Gauge32", "Counter64", "iso") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") rsvp = MibIdentifier((1, 3, 6, 1, 4, 1, 343, 6, 33)) conf = MibIdentifier((1, 3, 6, 1, 4, 1, 343, 6, 33, 1)) confIfTable = MibTable((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1), ) if mibBuilder.loadTexts: confIfTable.setStatus('mandatory') confIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1), ).setIndexNames((0, "INTEL-RSVP-MIB", "confIfIndex")) if mibBuilder.loadTexts: confIfEntry.setStatus('mandatory') confIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: confIfIndex.setStatus('mandatory') confIfCreateObj = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(5, 5)).setFixedLength(5)).setMaxAccess("readwrite") if mibBuilder.loadTexts: confIfCreateObj.setStatus('mandatory') confIfDeleteObj = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("delete", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: confIfDeleteObj.setStatus('mandatory') confIfUdpEncap = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: confIfUdpEncap.setStatus('mandatory') confIfRsvpTotalBw = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: confIfRsvpTotalBw.setStatus('mandatory') confIfMaxBwPerFlow = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: confIfMaxBwPerFlow.setStatus('mandatory') confRsvpEnabled = MibScalar((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: confRsvpEnabled.setStatus('mandatory') confRefreshTimer = MibScalar((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: confRefreshTimer.setStatus('mandatory') confCleanupFactor = MibScalar((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: confCleanupFactor.setStatus('mandatory') mibBuilder.exportSymbols("INTEL-RSVP-MIB", rsvp=rsvp, confIfTable=confIfTable, conf=conf, confIfIndex=confIfIndex, confIfDeleteObj=confIfDeleteObj, confIfRsvpTotalBw=confIfRsvpTotalBw, confCleanupFactor=confCleanupFactor, confIfUdpEncap=confIfUdpEncap, confIfMaxBwPerFlow=confIfMaxBwPerFlow, confIfEntry=confIfEntry, confRefreshTimer=confRefreshTimer, confRsvpEnabled=confRsvpEnabled, confIfCreateObj=confIfCreateObj)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, constraints_union, value_size_constraint, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint') (mib2ext,) = mibBuilder.importSymbols('INTEL-GEN-MIB', 'mib2ext') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (mib_identifier, notification_type, time_ticks, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, unsigned32, ip_address, integer32, bits, object_identity, gauge32, counter64, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'NotificationType', 'TimeTicks', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'Unsigned32', 'IpAddress', 'Integer32', 'Bits', 'ObjectIdentity', 'Gauge32', 'Counter64', 'iso') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') rsvp = mib_identifier((1, 3, 6, 1, 4, 1, 343, 6, 33)) conf = mib_identifier((1, 3, 6, 1, 4, 1, 343, 6, 33, 1)) conf_if_table = mib_table((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1)) if mibBuilder.loadTexts: confIfTable.setStatus('mandatory') conf_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1)).setIndexNames((0, 'INTEL-RSVP-MIB', 'confIfIndex')) if mibBuilder.loadTexts: confIfEntry.setStatus('mandatory') conf_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: confIfIndex.setStatus('mandatory') conf_if_create_obj = mib_table_column((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(5, 5)).setFixedLength(5)).setMaxAccess('readwrite') if mibBuilder.loadTexts: confIfCreateObj.setStatus('mandatory') conf_if_delete_obj = mib_table_column((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('delete', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: confIfDeleteObj.setStatus('mandatory') conf_if_udp_encap = mib_table_column((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disabled', 1), ('enabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: confIfUdpEncap.setStatus('mandatory') conf_if_rsvp_total_bw = mib_table_column((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1, 5), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: confIfRsvpTotalBw.setStatus('mandatory') conf_if_max_bw_per_flow = mib_table_column((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 1, 1, 6), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: confIfMaxBwPerFlow.setStatus('mandatory') conf_rsvp_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disabled', 1), ('enabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: confRsvpEnabled.setStatus('mandatory') conf_refresh_timer = mib_scalar((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 3), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: confRefreshTimer.setStatus('mandatory') conf_cleanup_factor = mib_scalar((1, 3, 6, 1, 4, 1, 343, 6, 33, 1, 4), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: confCleanupFactor.setStatus('mandatory') mibBuilder.exportSymbols('INTEL-RSVP-MIB', rsvp=rsvp, confIfTable=confIfTable, conf=conf, confIfIndex=confIfIndex, confIfDeleteObj=confIfDeleteObj, confIfRsvpTotalBw=confIfRsvpTotalBw, confCleanupFactor=confCleanupFactor, confIfUdpEncap=confIfUdpEncap, confIfMaxBwPerFlow=confIfMaxBwPerFlow, confIfEntry=confIfEntry, confRefreshTimer=confRefreshTimer, confRsvpEnabled=confRsvpEnabled, confIfCreateObj=confIfCreateObj)
# Algorithms > Bit Manipulation > Counter game # Louise and Richard play a game, find the winner of the game. # # https://www.hackerrank.com/challenges/counter-game/problem # pow2 = [1 << i for i in range(63, -1, -1)] def counterGame(n): player = 0 while n != 1: # print( ["Louise", "Richard"][player],n) for i in pow2: if n == i: n = n // 2 if n != 1: player = 1 - player break elif n & i == i: n = n - i if n != 1: player = 1 - player break return ["Louise", "Richard"][player] if __name__ == "__main__": t = int(input().strip()) for a0 in range(t): n = int(input().strip()) result = counterGame(n) print(result)
pow2 = [1 << i for i in range(63, -1, -1)] def counter_game(n): player = 0 while n != 1: for i in pow2: if n == i: n = n // 2 if n != 1: player = 1 - player break elif n & i == i: n = n - i if n != 1: player = 1 - player break return ['Louise', 'Richard'][player] if __name__ == '__main__': t = int(input().strip()) for a0 in range(t): n = int(input().strip()) result = counter_game(n) print(result)
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- def sub_report(): print("Hey, I'm a function inside my subscript.")
def sub_report(): print("Hey, I'm a function inside my subscript.")
# -*- coding: utf-8 -*- TOTAL_SESSION_NUM = 2 REST_DURATION = 5 * 60 BLOCK_DURATION = 2 * 60 MINIMUM_PULSE_CYCLE = 0.5 MAXIMUM_PULSE_CYCLE = 1.2 PPG_SAMPLE_RATE = 200 PPG_FIR_FILTER_TAP_NUM = 200 PPG_FILTER_CUTOFF = [0.5, 5.0] PPG_SYSTOLIC_PEAK_DETECTION_THRESHOLD_COEFFICIENT = 0.5 BIOPAC_HEADER_LINES = 11 BIOPAC_MSEC_PER_SAMPLE_LINE_NUM = 2 BIOPAC_ECG_CHANNEL = 1 BIOPAC_SKIN_CONDUCTANCE_CHANNEL = 3 ECG_R_PEAK_DETECTION_THRESHOLD = 2.0 ECG_MF_HRV_CUTOFF = [0.07, 0.15] ECG_HF_HRV_CUTOFF = [0.15, 0.5] TRAINING_DATA_RATIO = 0.75
total_session_num = 2 rest_duration = 5 * 60 block_duration = 2 * 60 minimum_pulse_cycle = 0.5 maximum_pulse_cycle = 1.2 ppg_sample_rate = 200 ppg_fir_filter_tap_num = 200 ppg_filter_cutoff = [0.5, 5.0] ppg_systolic_peak_detection_threshold_coefficient = 0.5 biopac_header_lines = 11 biopac_msec_per_sample_line_num = 2 biopac_ecg_channel = 1 biopac_skin_conductance_channel = 3 ecg_r_peak_detection_threshold = 2.0 ecg_mf_hrv_cutoff = [0.07, 0.15] ecg_hf_hrv_cutoff = [0.15, 0.5] training_data_ratio = 0.75
# Link to the problem: https://www.codechef.com/problems/STACKS def binary_search(arr, x): l = 0 r = len(arr) while l < r: mid = (r + l) // 2 if x < arr[mid]: r = mid else: l = mid + 1 return l def main(): T = int(input()) while T: T -= 1 _ = int(input()) given_stack = list(map(int, input().split())) top_stacks = [] for i in given_stack: to_push = binary_search(top_stacks, i) if to_push == len(top_stacks): top_stacks.append(i) else: top_stacks[to_push] = i print(len(top_stacks), end=" ") print(" ".join([str(i) for i in top_stacks])) if __name__ == "__main__": main()
def binary_search(arr, x): l = 0 r = len(arr) while l < r: mid = (r + l) // 2 if x < arr[mid]: r = mid else: l = mid + 1 return l def main(): t = int(input()) while T: t -= 1 _ = int(input()) given_stack = list(map(int, input().split())) top_stacks = [] for i in given_stack: to_push = binary_search(top_stacks, i) if to_push == len(top_stacks): top_stacks.append(i) else: top_stacks[to_push] = i print(len(top_stacks), end=' ') print(' '.join([str(i) for i in top_stacks])) if __name__ == '__main__': main()
class CorruptedStateSpaceModelStructureException(Exception): pass class CorruptedStochasticModelStructureException(Exception): pass
class Corruptedstatespacemodelstructureexception(Exception): pass class Corruptedstochasticmodelstructureexception(Exception): pass
API_ACCESS = 'YOUR_API_ACCESS' API_SECRET = 'YOUR_API_SECRET' BTC_UNIT = 0.001 BTC_AMOUNT = BTC_UNIT CNY_UNIT = 0.01 CNY_STEP = CNY_UNIT DIFFERENCE_STEP = 2.0 MIN_SURPLUS = 0.5 NO_GOOD_SLEEP = 15 MAX_TRIAL = 3 MAX_OPEN_ORDERS = 3 TOO_MANY_OPEN_SLEEP = 10 DEBUG_MODE = True REMOVE_THRESHOLD = 20.0 REMOVE_UNREALISTIC = True CANCEL_ALL_ON_STARTUP = True GET_INFO_BEFORE_SLEEP = True
api_access = 'YOUR_API_ACCESS' api_secret = 'YOUR_API_SECRET' btc_unit = 0.001 btc_amount = BTC_UNIT cny_unit = 0.01 cny_step = CNY_UNIT difference_step = 2.0 min_surplus = 0.5 no_good_sleep = 15 max_trial = 3 max_open_orders = 3 too_many_open_sleep = 10 debug_mode = True remove_threshold = 20.0 remove_unrealistic = True cancel_all_on_startup = True get_info_before_sleep = True
''' Description: python solution of AddTwoNumbers (https://leetcode-cn.com/problems/add-two-numbers/) Author: Kotori Y Date: 2021-04-20 16:49:38 LastEditors: Kotori Y LastEditTime: 2021-04-20 16:51:04 FilePath: \LeetCode-Code\codes\LinkedList\AddTwoNumbers\AddTwoNumbers.py AuthorMail: [email protected] ''' # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode: head, tail = [None, None] carry = 0 while (l1 or l2): n1 = l1.val if l1 else 0 n2 = l2.val if l2 else 0 sum_ = n1 + n2 + carry carry = sum_ // 10 if not head: head = tail = ListNode(sum_ % 10) else: tail.next = ListNode(sum_ % 10) tail = tail.next if l1: l1 = l1.next if l2: l2 = l2.next if (carry > 0): tail.next = ListNode(carry) return head
""" Description: python solution of AddTwoNumbers (https://leetcode-cn.com/problems/add-two-numbers/) Author: Kotori Y Date: 2021-04-20 16:49:38 LastEditors: Kotori Y LastEditTime: 2021-04-20 16:51:04 FilePath: \\LeetCode-Code\\codes\\LinkedList\\AddTwoNumbers\\AddTwoNumbers.py AuthorMail: [email protected] """ class Solution: def add_two_numbers(self, l1: ListNode, l2: ListNode) -> ListNode: (head, tail) = [None, None] carry = 0 while l1 or l2: n1 = l1.val if l1 else 0 n2 = l2.val if l2 else 0 sum_ = n1 + n2 + carry carry = sum_ // 10 if not head: head = tail = list_node(sum_ % 10) else: tail.next = list_node(sum_ % 10) tail = tail.next if l1: l1 = l1.next if l2: l2 = l2.next if carry > 0: tail.next = list_node(carry) return head
class Solution: def rob(self, nums: List[int]) -> int: if len(nums) < 3: return max(nums) n = len(nums) ans1 = self.robHouse(nums[:n-1]) ans2 = self.robHouse(nums[1:]) return max(ans1, ans2) def robHouse(self, nums): prev, curr = 0, 0 for num in nums: v = max(curr, prev + num) prev = curr curr = v return curr
class Solution: def rob(self, nums: List[int]) -> int: if len(nums) < 3: return max(nums) n = len(nums) ans1 = self.robHouse(nums[:n - 1]) ans2 = self.robHouse(nums[1:]) return max(ans1, ans2) def rob_house(self, nums): (prev, curr) = (0, 0) for num in nums: v = max(curr, prev + num) prev = curr curr = v return curr
class Source: ''' this is a class that defines the source objects ''' def __init__(self,id,name,url,description): self.id = id self.name = name self.url = url self.description = description
class Source: """ this is a class that defines the source objects """ def __init__(self, id, name, url, description): self.id = id self.name = name self.url = url self.description = description
# Warning : Keep this file private # replace the values of the variables with yours ckey = 'SaMpLe-C0nSuMeR-Key' csecret = 'Y0uR-C0nSuMeR-SecRet' atoken = 'Y0Ur-@cCeSs-T0Ken' asecret = 'Y0uR-@cCesS-SeCrEt'
ckey = 'SaMpLe-C0nSuMeR-Key' csecret = 'Y0uR-C0nSuMeR-SecRet' atoken = 'Y0Ur-@cCeSs-T0Ken' asecret = 'Y0uR-@cCesS-SeCrEt'
def main(): def expand(code,times): return times * code def expandString(code): lbi = 0 rbi = 0 for i in range(len(code)): if(code[i] == "["): lbi = i if(code[i] == "]"): rbi = i break count = 1 while code[lbi-count].isdigit(): if(count == 1): mStr = code[lbi-count] else: mStr = code[lbi-count] + mStr count += 1 multiplier = int(mStr) code_inside = code[lbi + 1:rbi] code = code[0:lbi - len(mStr)] + expand(code_inside,multiplier) + code[rbi+1:] if("[" not in code): return code else: return expandString(code) coded = input() a = (expandString(coded)) print(a) main()
def main(): def expand(code, times): return times * code def expand_string(code): lbi = 0 rbi = 0 for i in range(len(code)): if code[i] == '[': lbi = i if code[i] == ']': rbi = i break count = 1 while code[lbi - count].isdigit(): if count == 1: m_str = code[lbi - count] else: m_str = code[lbi - count] + mStr count += 1 multiplier = int(mStr) code_inside = code[lbi + 1:rbi] code = code[0:lbi - len(mStr)] + expand(code_inside, multiplier) + code[rbi + 1:] if '[' not in code: return code else: return expand_string(code) coded = input() a = expand_string(coded) print(a) main()
class MyDictSubclass(dict): def __init__(self): dict.__init__(self) self.var1 = 10 self['in_dct'] = 20 def __str__(self): ret = [] for key, val in sorted(self.items()): ret.append('%s: %s' % (key, val)) ret.append('self.var1: %s' % (self.var1,)) return '{' + '; '.join(ret) + '}' __repr__ = __str__ class MyListSubclass(list): def __init__(self): list.__init__(self) self.var1 = 11 self.append('a') self.append('b') def __str__(self): ret = [] for obj in self: ret.append(repr(obj)) ret.append('self.var1: %s' % (self.var1,)) return '[' + ', '.join(ret) + ']' __repr__ = __str__ class MySetSubclass(set): def __init__(self): set.__init__(self) self.var1 = 12 self.add('a') def __str__(self): ret = [] for obj in sorted(self): ret.append(repr(obj)) ret.append('self.var1: %s' % (self.var1,)) return 'set([' + ', '.join(ret) + '])' __repr__ = __str__ class MyTupleSubclass(tuple): def __new__ (cls): return super(MyTupleSubclass, cls).__new__(cls, tuple(['a', 1])) def __init__(self): self.var1 = 13 def __str__(self): ret = [] for obj in self: ret.append(repr(obj)) ret.append('self.var1: %s' % (self.var1,)) return 'tuple(' + ', '.join(ret) + ')' __repr__ = __str__ def Call(): variable_for_test_1 = MyListSubclass() variable_for_test_2 = MySetSubclass() variable_for_test_3 = MyDictSubclass() variable_for_test_4 = MyTupleSubclass() all_vars_set = True # Break here if __name__ == '__main__': Call() print('TEST SUCEEDED!')
class Mydictsubclass(dict): def __init__(self): dict.__init__(self) self.var1 = 10 self['in_dct'] = 20 def __str__(self): ret = [] for (key, val) in sorted(self.items()): ret.append('%s: %s' % (key, val)) ret.append('self.var1: %s' % (self.var1,)) return '{' + '; '.join(ret) + '}' __repr__ = __str__ class Mylistsubclass(list): def __init__(self): list.__init__(self) self.var1 = 11 self.append('a') self.append('b') def __str__(self): ret = [] for obj in self: ret.append(repr(obj)) ret.append('self.var1: %s' % (self.var1,)) return '[' + ', '.join(ret) + ']' __repr__ = __str__ class Mysetsubclass(set): def __init__(self): set.__init__(self) self.var1 = 12 self.add('a') def __str__(self): ret = [] for obj in sorted(self): ret.append(repr(obj)) ret.append('self.var1: %s' % (self.var1,)) return 'set([' + ', '.join(ret) + '])' __repr__ = __str__ class Mytuplesubclass(tuple): def __new__(cls): return super(MyTupleSubclass, cls).__new__(cls, tuple(['a', 1])) def __init__(self): self.var1 = 13 def __str__(self): ret = [] for obj in self: ret.append(repr(obj)) ret.append('self.var1: %s' % (self.var1,)) return 'tuple(' + ', '.join(ret) + ')' __repr__ = __str__ def call(): variable_for_test_1 = my_list_subclass() variable_for_test_2 = my_set_subclass() variable_for_test_3 = my_dict_subclass() variable_for_test_4 = my_tuple_subclass() all_vars_set = True if __name__ == '__main__': call() print('TEST SUCEEDED!')
class QueryFileHandler: @staticmethod def load_queries(file_name: str): file = open(file_name, 'r') query = file.read() file.close() query_list = [s and s.strip() for s in query.split(';')] return list(filter(None, query_list))
class Queryfilehandler: @staticmethod def load_queries(file_name: str): file = open(file_name, 'r') query = file.read() file.close() query_list = [s and s.strip() for s in query.split(';')] return list(filter(None, query_list))
K = int(input()) result = 0 for A in range(1, K + 1): for B in range(1, K + 1): if A * B > K: break result += K // (A * B) print(result)
k = int(input()) result = 0 for a in range(1, K + 1): for b in range(1, K + 1): if A * B > K: break result += K // (A * B) print(result)
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. class ToscaGraph(object): '''Graph of Tosca Node Templates.''' def __init__(self, nodetemplates): self.nodetemplates = nodetemplates self.vertices = {} self._create() def _create_vertex(self, node): if node not in self.vertices: self.vertices[node.name] = node def _create_edge(self, node1, node2, relationship): if node1 not in self.vertices: self._create_vertex(node1) self.vertices[node1.name].related[node2] = relationship def vertex(self, node): if node in self.vertices: return self.vertices[node] def __iter__(self): return iter(self.vertices.values()) def _create(self): for node in self.nodetemplates: for relTpl, req, reqDef in node.relationships: for tpl in self.nodetemplates: if tpl.name == relTpl.target.name: self._create_edge(node, tpl, relTpl.type_definition) self._create_vertex(node)
class Toscagraph(object): """Graph of Tosca Node Templates.""" def __init__(self, nodetemplates): self.nodetemplates = nodetemplates self.vertices = {} self._create() def _create_vertex(self, node): if node not in self.vertices: self.vertices[node.name] = node def _create_edge(self, node1, node2, relationship): if node1 not in self.vertices: self._create_vertex(node1) self.vertices[node1.name].related[node2] = relationship def vertex(self, node): if node in self.vertices: return self.vertices[node] def __iter__(self): return iter(self.vertices.values()) def _create(self): for node in self.nodetemplates: for (rel_tpl, req, req_def) in node.relationships: for tpl in self.nodetemplates: if tpl.name == relTpl.target.name: self._create_edge(node, tpl, relTpl.type_definition) self._create_vertex(node)
# import requests # from bs4 import BeautifulSoup # with open('file:///home/shubham/fridaybeautifulsoup.html','r') # def table(a,b): # if a==1 : # return 1 # return b*table(a-1,b) # print(table(10,5)) # def pow(n) : # if n==1 : # return 2**n # return 2*pow(n-1) # # print(pow(3)) # def n(a) : # if a==0 : # return 0 # # print(a) # n(a-1) # print((a*5)) # print(n(10)) # print(100*("string\n\n")) # print() d="" # for i in (a.split(",") # for i in a : # if i.isalpha() : # d=d+i # print(d) # for i in (a.split(",")) : # d=d+i # print(type(d)) a=['saikira','bhopland','petland','bhatland'] f=[] for i in a[::-1] : f.append(i[::-1]) print(f)
d = '' a = ['saikira', 'bhopland', 'petland', 'bhatland'] f = [] for i in a[::-1]: f.append(i[::-1]) print(f)
class NetworkException(Exception): pass class SecretException(Exception): pass
class Networkexception(Exception): pass class Secretexception(Exception): pass
st=input("Enter the binary string\n") l=len(st) a=[] for i in range(l-1,-1,-1): if a==[]: a.append(st[i]) else: p=a.pop() if st[i] != p: a.append(p) a.append(st[i]) if len(a)==0: print(-1) else: for i in range(len(a)): print(a.pop(),end="")
st = input('Enter the binary string\n') l = len(st) a = [] for i in range(l - 1, -1, -1): if a == []: a.append(st[i]) else: p = a.pop() if st[i] != p: a.append(p) a.append(st[i]) if len(a) == 0: print(-1) else: for i in range(len(a)): print(a.pop(), end='')
# Project Euler #6: Sum square difference n = 1 s = 0 s2 = 0 while n <= 100: s += n s2 += n * n n += 1 print(s * s - s2)
n = 1 s = 0 s2 = 0 while n <= 100: s += n s2 += n * n n += 1 print(s * s - s2)
# https://www.hackerrank.com/challenges/ctci-queue-using-two-stacks/problem class MyQueue(object): def __init__(self): self.one = [] self.two = [] def peek(self): return self.two[-1] def pop(self): return self.two.pop() def put(self, value): self.one.append(value) def check(self): if not len(self.two): while self.one: self.two.append(self.one.pop()) queue = MyQueue() t = int(input()) for line in range(t): values = map(int, input().split()) values = list(values) queue.check() if values[0] == 1: queue.put(values[1]) elif values[0] == 2: queue.pop() else: print(queue.peek())
class Myqueue(object): def __init__(self): self.one = [] self.two = [] def peek(self): return self.two[-1] def pop(self): return self.two.pop() def put(self, value): self.one.append(value) def check(self): if not len(self.two): while self.one: self.two.append(self.one.pop()) queue = my_queue() t = int(input()) for line in range(t): values = map(int, input().split()) values = list(values) queue.check() if values[0] == 1: queue.put(values[1]) elif values[0] == 2: queue.pop() else: print(queue.peek())
line = input() while not line == "Stop": print(line) line = input()
line = input() while not line == 'Stop': print(line) line = input()
# coding=utf-8 class App: DEBUG = False TESTING = False
class App: debug = False testing = False
total_cost = input("Enter the cost of your dream house: ") total_cost = float(total_cost) annual_salary = input("Enter your annual income: ") annual_salary = float(annual_salary) portion_saved = input("Enter the percent of your income you will save: ") if portion_saved.find("%") or portion_saved.startswith("%") : portion_saved = portion_saved.replace("%", "") if float(portion_saved) >= 1 : portion_saved = float(portion_saved) portion_saved /= 100 portion_down_payment = 0.25 r = 0.04 current_savings = 0.0 down_payment = total_cost * portion_down_payment monthly_salary = annual_salary/12 months = 0 while current_savings < down_payment : current_savings += current_savings*(r/12) current_savings += monthly_salary*portion_saved months += 1 print("It will take", months, "months to save enough money for the down payment.")
total_cost = input('Enter the cost of your dream house: ') total_cost = float(total_cost) annual_salary = input('Enter your annual income: ') annual_salary = float(annual_salary) portion_saved = input('Enter the percent of your income you will save: ') if portion_saved.find('%') or portion_saved.startswith('%'): portion_saved = portion_saved.replace('%', '') if float(portion_saved) >= 1: portion_saved = float(portion_saved) portion_saved /= 100 portion_down_payment = 0.25 r = 0.04 current_savings = 0.0 down_payment = total_cost * portion_down_payment monthly_salary = annual_salary / 12 months = 0 while current_savings < down_payment: current_savings += current_savings * (r / 12) current_savings += monthly_salary * portion_saved months += 1 print('It will take', months, 'months to save enough money for the down payment.')
def metade(p): r = p / 2 return r def dobro(p): r = p * 2 return r def aumentar(p, taxa): r = p + ((p * taxa) / 100) return r def diminuir(p, taxa): r = p - ((p * taxa) / 100) return r
def metade(p): r = p / 2 return r def dobro(p): r = p * 2 return r def aumentar(p, taxa): r = p + p * taxa / 100 return r def diminuir(p, taxa): r = p - p * taxa / 100 return r
# Copyright 2009-2017 Ram Rachum. # This program is distributed under the MIT license. class ReasonedBool: ''' A variation on `bool` that also gives a `.reason`. This is useful when you want to say "This is False because... (reason.)" Unfortunately this class is not a subclass of `bool`, since Python doesn't allow subclassing `bool`. ''' def __init__(self, value, reason=None): ''' Construct the `ReasonedBool`. `reason` is the reason *why* it has a value of `True` or `False`. It is usually a string, but is allowed to be of any type. ''' self.value = bool(value) self.reason = reason def __repr__(self): if self.reason is not None: return f'<{self.value} because {repr(self.reason)}>' else: # self.reason is None return f'<{self.value} with no reason>' def __eq__(self, other): return bool(self) == other def __hash__(self): return hash(bool(self)) def __neq__(self, other): return not self.__eq__(other) def __bool__(self): return self.value
class Reasonedbool: """ A variation on `bool` that also gives a `.reason`. This is useful when you want to say "This is False because... (reason.)" Unfortunately this class is not a subclass of `bool`, since Python doesn't allow subclassing `bool`. """ def __init__(self, value, reason=None): """ Construct the `ReasonedBool`. `reason` is the reason *why* it has a value of `True` or `False`. It is usually a string, but is allowed to be of any type. """ self.value = bool(value) self.reason = reason def __repr__(self): if self.reason is not None: return f'<{self.value} because {repr(self.reason)}>' else: return f'<{self.value} with no reason>' def __eq__(self, other): return bool(self) == other def __hash__(self): return hash(bool(self)) def __neq__(self, other): return not self.__eq__(other) def __bool__(self): return self.value
form = 'form.signin' form_username = 'form.signin [name="session[username_or_email]"]' form_password = 'form.signin [name="session[password]"]' form_phone = '#challenge_response' def login(browser, username, password): browser.fill(form_username, username) # For some reason filling of the password is flaky and needs to be # repeated until the input really gets the value set while not browser.value(form_password): browser.fill(form_password, password) browser.submit(form) def verify_phone(browser, phone=None): if browser.is_visible(form_phone): if phone: browser.fill(form_phone, phone) browser.submit(form_phone) else: raise Exception('TweetDeck login prompted for phone ' 'number, but none was provided')
form = 'form.signin' form_username = 'form.signin [name="session[username_or_email]"]' form_password = 'form.signin [name="session[password]"]' form_phone = '#challenge_response' def login(browser, username, password): browser.fill(form_username, username) while not browser.value(form_password): browser.fill(form_password, password) browser.submit(form) def verify_phone(browser, phone=None): if browser.is_visible(form_phone): if phone: browser.fill(form_phone, phone) browser.submit(form_phone) else: raise exception('TweetDeck login prompted for phone number, but none was provided')
while True: try: n = int(input()) if ((n >= 0 and n < 90) or n == 360): print('Bom Dia!!') elif (n >=90 and n < 180): print('Boa Tarde!!') elif (n >= 180 and n < 270): print('Boa Noite!!') elif (n >= 270 and n < 360): print('De Madrugada!!') except EOFError: break
while True: try: n = int(input()) if n >= 0 and n < 90 or n == 360: print('Bom Dia!!') elif n >= 90 and n < 180: print('Boa Tarde!!') elif n >= 180 and n < 270: print('Boa Noite!!') elif n >= 270 and n < 360: print('De Madrugada!!') except EOFError: break
class PytraitError(RuntimeError): pass class DisallowedInitError(PytraitError): pass class NonMethodAttrError(PytraitError): pass class MultipleImplementationError(PytraitError): pass class InheritanceError(PytraitError): pass class NamingConventionError(PytraitError): pass
class Pytraiterror(RuntimeError): pass class Disallowediniterror(PytraitError): pass class Nonmethodattrerror(PytraitError): pass class Multipleimplementationerror(PytraitError): pass class Inheritanceerror(PytraitError): pass class Namingconventionerror(PytraitError): pass
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"URL": "00_downloading_pdfs.ipynb", "PDF_PATH": "00_downloading_pdfs.ipynb", "identify_links_for_pdfs": "00_downloading_pdfs.ipynb", "download_file": "00_downloading_pdfs.ipynb", "collect_multiple_files": "00_downloading_pdfs.ipynb", "get_ix": "01_parsing_roll_call_votes.ipynb", "useful_string": "01_parsing_roll_call_votes.ipynb", "SummaryParser": "01_parsing_roll_call_votes.ipynb", "VotesParser": "01_parsing_roll_call_votes.ipynb", "get_all_issues": "01_parsing_roll_call_votes.ipynb"} modules = ["download.py", "parse.py"] doc_url = "https://eschmidt42.github.io/eu_parliament/" git_url = "https://github.com/eschmidt42/eu_parliament/tree/master/" def custom_doc_links(name): return None
__all__ = ['index', 'modules', 'custom_doc_links', 'git_url'] index = {'URL': '00_downloading_pdfs.ipynb', 'PDF_PATH': '00_downloading_pdfs.ipynb', 'identify_links_for_pdfs': '00_downloading_pdfs.ipynb', 'download_file': '00_downloading_pdfs.ipynb', 'collect_multiple_files': '00_downloading_pdfs.ipynb', 'get_ix': '01_parsing_roll_call_votes.ipynb', 'useful_string': '01_parsing_roll_call_votes.ipynb', 'SummaryParser': '01_parsing_roll_call_votes.ipynb', 'VotesParser': '01_parsing_roll_call_votes.ipynb', 'get_all_issues': '01_parsing_roll_call_votes.ipynb'} modules = ['download.py', 'parse.py'] doc_url = 'https://eschmidt42.github.io/eu_parliament/' git_url = 'https://github.com/eschmidt42/eu_parliament/tree/master/' def custom_doc_links(name): return None
SD_COMMENT="This is for local development" SHELTERLUV_SECRET_TOKEN="" APP_SECRET_KEY="ASKASK" JWT_SECRET="JWTSECRET" POSTGRES_PASSWORD="thispasswordisverysecure" BASEUSER_PW="basepw" BASEEDITOR_PW="editorpw" BASEADMIN_PW="basepw" DROPBOX_APP="DBAPPPW"
sd_comment = 'This is for local development' shelterluv_secret_token = '' app_secret_key = 'ASKASK' jwt_secret = 'JWTSECRET' postgres_password = 'thispasswordisverysecure' baseuser_pw = 'basepw' baseeditor_pw = 'editorpw' baseadmin_pw = 'basepw' dropbox_app = 'DBAPPPW'
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ''' def _jupyter_server_extension_paths(): return [{ 'module':'nbtemplate' }]; def _jupyter_nbextension_paths(): return [ dict( section='notebook', src='static', # path is relative to `nbtemplate` directory dest='nbtemplate', # directory in `nbextension/` namespace require='nbtemplate/main' # _also_ in `nbextension/` namespace ), dict( section='notebook', src='static', dest='nbtemplate', require='nbtemplate/templateSelector' ), dict( section='notebook', src='static', dest='nbtemplate', require='nbtemplate/blockSelector' ) ]; def load_jupyter_server_extension(nbapp): nbapp.log.info('Loaded nbtemplate!');
""" """ def _jupyter_server_extension_paths(): return [{'module': 'nbtemplate'}] def _jupyter_nbextension_paths(): return [dict(section='notebook', src='static', dest='nbtemplate', require='nbtemplate/main'), dict(section='notebook', src='static', dest='nbtemplate', require='nbtemplate/templateSelector'), dict(section='notebook', src='static', dest='nbtemplate', require='nbtemplate/blockSelector')] def load_jupyter_server_extension(nbapp): nbapp.log.info('Loaded nbtemplate!')
S = input() T = input() i = 0 for s, t in zip(S, T): if s!=t: i += 1 print(i)
s = input() t = input() i = 0 for (s, t) in zip(S, T): if s != t: i += 1 print(i)
# Soccer field easy soccer_easy_gate_pose_dicts = [ { 'orientation': { 'w_val': 1.0, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.0}, 'position': { 'x_val': 0.0, 'y_val': 2.0, 'z_val': 2.0199999809265137}}, { 'orientation': { 'w_val': 0.9659256935119629, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.2588196396827698}, 'position': { 'x_val': 1.5999999046325684, 'y_val': 10.800000190734863, 'z_val': 2.0199999809265137}}, { 'orientation': { 'w_val': 0.8660249710083008, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.5000007152557373}, 'position': { 'x_val': 8.887084007263184, 'y_val': 18.478761672973633, 'z_val': 2.0199999809265137}}, { 'orientation': { 'w_val': 0.7071061134338379, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.7071074843406677}, 'position': { 'x_val': 18.74375343322754, 'y_val': 22.20650863647461, 'z_val': 2.0199999809265137}}, { 'orientation': { 'w_val': 0.7071061134338379, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.7071074843406677}, 'position': { 'x_val': 30.04375457763672, 'y_val': 22.20648956298828, 'z_val': 2.0199999809265137}}, { 'orientation': { 'w_val': 0.4999988079071045, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.8660261034965515}, 'position': { 'x_val': 39.04375457763672, 'y_val': 19.206478118896484, 'z_val': 2.0199999809265137}}, { 'orientation': { 'w_val': 0.17364656925201416, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.9848079681396484}, 'position': { 'x_val': 45.74375534057617, 'y_val': 11.706478118896484, 'z_val': 2.0199999809265137}}, { 'orientation': { 'w_val': 1.8477439880371094e-06, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 1.0}, 'position': { 'x_val': 45.74375534057617, 'y_val': 2.2064781188964844, 'z_val': 2.0199999809265137}}, { 'orientation': { 'w_val': 0.5000025629997253, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.8660238981246948}, 'position': { 'x_val': 40.343753814697266, 'y_val': -4.793521404266357, 'z_val': 2.0199999809265137}}, { 'orientation': { 'w_val': 0.7071094512939453, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.7071040272712708}, 'position': { 'x_val': 30.74375343322754, 'y_val': -7.893521785736084, 'z_val': 2.0199999809265137}}, { 'orientation': { 'w_val': 0.7071094512939453, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.7071040272712708}, 'position': { 'x_val': 18.54375457763672, 'y_val': -7.893521785736084, 'z_val': 2.0199999809265137}}, { 'orientation': { 'w_val': 0.8191542029380798, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.5735733509063721}, 'position': { 'x_val': 9.543754577636719, 'y_val': -5.093521595001221, 'z_val': 2.0199999809265137}}] soccer_medium_gate_pose_dicts = [ { 'orientation': { 'w_val': 0.5735755562782288, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.8191526532173157}, 'position': { 'x_val': 10.388415336608887, 'y_val': 80.77406311035156, 'z_val': -43.57999801635742}}, { 'orientation': { 'w_val': 0.34201890230178833, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.939693033695221}, 'position': { 'x_val': 18.11046600341797, 'y_val': 76.26078033447266, 'z_val': -43.57999801635742}}, { 'orientation': { 'w_val': 0.1736472249031067, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.9848079085350037}, 'position': { 'x_val': 25.433794021606445, 'y_val': 66.28687286376953, 'z_val': -43.57999801635742}}, { 'orientation': { 'w_val': 0.17364656925201416, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.9848079681396484}, 'position': { 'x_val': 30.065513610839844, 'y_val': 56.549530029296875, 'z_val': -43.57999801635742}}, { 'orientation': { 'w_val': 2.562999725341797e-06, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 1.0}, 'position': { 'x_val': 32.30064392089844, 'y_val': 45.6310920715332, 'z_val': -43.87999725341797}}, { 'orientation': { 'w_val': 0.7071093916893005, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.7071041464805603}, 'position': { 'x_val': 26.503353118896484, 'y_val': 38.19984436035156, 'z_val': -43.37999725341797}}, { 'orientation': { 'w_val': 0.7660470008850098, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.642784595489502}, 'position': { 'x_val': 3.264113664627075, 'y_val': 37.569061279296875, 'z_val': -43.57999801635742}}, { 'orientation': { 'w_val': 0.9848085641860962, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.17364364862442017}, 'position': { 'x_val': -16.862957000732422, 'y_val': 45.41843795776367, 'z_val': -46.57999801635742}}, { 'orientation': { 'w_val': 0.9848069548606873, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.17365287244319916}, 'position': { 'x_val': -15.493884086608887, 'y_val': 63.18687438964844, 'z_val': -52.07999801635742}}, { 'orientation': { 'w_val': 0.8191484212875366, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.5735815763473511}, 'position': { 'x_val': -6.320737361907959, 'y_val': 78.21236419677734, 'z_val': -55.779998779296875}}, { 'orientation': { 'w_val': 0.8191484212875366, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.5735815763473511}, 'position': { 'x_val': 5.143640041351318, 'y_val': 82.38504791259766, 'z_val': -55.779998779296875}}, { 'orientation': { 'w_val': 0.7071030139923096, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.7071105241775513}, 'position': { 'x_val': 14.558510780334473, 'y_val': 84.4320297241211, 'z_val': -55.18000030517578}}, { 'orientation': { 'w_val': 0.7071030139923096, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.7071105241775513}, 'position': { 'x_val': 23.858510971069336, 'y_val': 82.83203125, 'z_val': -32.07999801635742}}, { 'orientation': { 'w_val': 0.3420146107673645, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.9396945834159851}, 'position': { 'x_val': 38.25851058959961, 'y_val': 78.13202667236328, 'z_val': -31.3799991607666}}, { 'orientation': { 'w_val': 6.258487701416016e-06, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 1.0}, 'position': { 'x_val': 51.058509826660156, 'y_val': 52.13203048706055, 'z_val': -25.8799991607666}}, { 'orientation': { 'w_val': 0.3420267701148987, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.9396902322769165}, 'position': { 'x_val': 44.95851135253906, 'y_val': 38.932029724121094, 'z_val': -25.8799991607666}}, { 'orientation': { 'w_val': 0.7071123123168945, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.7071012258529663}, 'position': { 'x_val': 25.958515167236328, 'y_val': 26.33203125, 'z_val': -19.8799991607666}}, { 'orientation': { 'w_val': 0.7071123123168945, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.7071012258529663}, 'position': { 'x_val': 11.658514976501465, 'y_val': 26.33203125, 'z_val': -12.779999732971191}}, { 'orientation': { 'w_val': 0.5735827684402466, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.8191476464271545}, 'position': { 'x_val': -10.141484260559082, 'y_val': 22.632030487060547, 'z_val': -6.37999963760376}}, { 'orientation': { 'w_val': 0.5000063180923462, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.8660216927528381}, 'position': { 'x_val': -24.641483306884766, 'y_val': 9.132031440734863, 'z_val': 2.119999885559082}}]
soccer_easy_gate_pose_dicts = [{'orientation': {'w_val': 1.0, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.0}, 'position': {'x_val': 0.0, 'y_val': 2.0, 'z_val': 2.0199999809265137}}, {'orientation': {'w_val': 0.9659256935119629, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.2588196396827698}, 'position': {'x_val': 1.5999999046325684, 'y_val': 10.800000190734863, 'z_val': 2.0199999809265137}}, {'orientation': {'w_val': 0.8660249710083008, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.5000007152557373}, 'position': {'x_val': 8.887084007263184, 'y_val': 18.478761672973633, 'z_val': 2.0199999809265137}}, {'orientation': {'w_val': 0.7071061134338379, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.7071074843406677}, 'position': {'x_val': 18.74375343322754, 'y_val': 22.20650863647461, 'z_val': 2.0199999809265137}}, {'orientation': {'w_val': 0.7071061134338379, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.7071074843406677}, 'position': {'x_val': 30.04375457763672, 'y_val': 22.20648956298828, 'z_val': 2.0199999809265137}}, {'orientation': {'w_val': 0.4999988079071045, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.8660261034965515}, 'position': {'x_val': 39.04375457763672, 'y_val': 19.206478118896484, 'z_val': 2.0199999809265137}}, {'orientation': {'w_val': 0.17364656925201416, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.9848079681396484}, 'position': {'x_val': 45.74375534057617, 'y_val': 11.706478118896484, 'z_val': 2.0199999809265137}}, {'orientation': {'w_val': 1.8477439880371094e-06, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 1.0}, 'position': {'x_val': 45.74375534057617, 'y_val': 2.2064781188964844, 'z_val': 2.0199999809265137}}, {'orientation': {'w_val': 0.5000025629997253, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.8660238981246948}, 'position': {'x_val': 40.343753814697266, 'y_val': -4.793521404266357, 'z_val': 2.0199999809265137}}, {'orientation': {'w_val': 0.7071094512939453, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.7071040272712708}, 'position': {'x_val': 30.74375343322754, 'y_val': -7.893521785736084, 'z_val': 2.0199999809265137}}, {'orientation': {'w_val': 0.7071094512939453, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.7071040272712708}, 'position': {'x_val': 18.54375457763672, 'y_val': -7.893521785736084, 'z_val': 2.0199999809265137}}, {'orientation': {'w_val': 0.8191542029380798, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.5735733509063721}, 'position': {'x_val': 9.543754577636719, 'y_val': -5.093521595001221, 'z_val': 2.0199999809265137}}] soccer_medium_gate_pose_dicts = [{'orientation': {'w_val': 0.5735755562782288, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.8191526532173157}, 'position': {'x_val': 10.388415336608887, 'y_val': 80.77406311035156, 'z_val': -43.57999801635742}}, {'orientation': {'w_val': 0.34201890230178833, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.939693033695221}, 'position': {'x_val': 18.11046600341797, 'y_val': 76.26078033447266, 'z_val': -43.57999801635742}}, {'orientation': {'w_val': 0.1736472249031067, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.9848079085350037}, 'position': {'x_val': 25.433794021606445, 'y_val': 66.28687286376953, 'z_val': -43.57999801635742}}, {'orientation': {'w_val': 0.17364656925201416, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.9848079681396484}, 'position': {'x_val': 30.065513610839844, 'y_val': 56.549530029296875, 'z_val': -43.57999801635742}}, {'orientation': {'w_val': 2.562999725341797e-06, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 1.0}, 'position': {'x_val': 32.30064392089844, 'y_val': 45.6310920715332, 'z_val': -43.87999725341797}}, {'orientation': {'w_val': 0.7071093916893005, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.7071041464805603}, 'position': {'x_val': 26.503353118896484, 'y_val': 38.19984436035156, 'z_val': -43.37999725341797}}, {'orientation': {'w_val': 0.7660470008850098, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.642784595489502}, 'position': {'x_val': 3.264113664627075, 'y_val': 37.569061279296875, 'z_val': -43.57999801635742}}, {'orientation': {'w_val': 0.9848085641860962, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.17364364862442017}, 'position': {'x_val': -16.862957000732422, 'y_val': 45.41843795776367, 'z_val': -46.57999801635742}}, {'orientation': {'w_val': 0.9848069548606873, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.17365287244319916}, 'position': {'x_val': -15.493884086608887, 'y_val': 63.18687438964844, 'z_val': -52.07999801635742}}, {'orientation': {'w_val': 0.8191484212875366, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.5735815763473511}, 'position': {'x_val': -6.320737361907959, 'y_val': 78.21236419677734, 'z_val': -55.779998779296875}}, {'orientation': {'w_val': 0.8191484212875366, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.5735815763473511}, 'position': {'x_val': 5.143640041351318, 'y_val': 82.38504791259766, 'z_val': -55.779998779296875}}, {'orientation': {'w_val': 0.7071030139923096, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.7071105241775513}, 'position': {'x_val': 14.558510780334473, 'y_val': 84.4320297241211, 'z_val': -55.18000030517578}}, {'orientation': {'w_val': 0.7071030139923096, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.7071105241775513}, 'position': {'x_val': 23.858510971069336, 'y_val': 82.83203125, 'z_val': -32.07999801635742}}, {'orientation': {'w_val': 0.3420146107673645, 'x_val': 0.0, 'y_val': -0.0, 'z_val': -0.9396945834159851}, 'position': {'x_val': 38.25851058959961, 'y_val': 78.13202667236328, 'z_val': -31.3799991607666}}, {'orientation': {'w_val': 6.258487701416016e-06, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 1.0}, 'position': {'x_val': 51.058509826660156, 'y_val': 52.13203048706055, 'z_val': -25.8799991607666}}, {'orientation': {'w_val': 0.3420267701148987, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.9396902322769165}, 'position': {'x_val': 44.95851135253906, 'y_val': 38.932029724121094, 'z_val': -25.8799991607666}}, {'orientation': {'w_val': 0.7071123123168945, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.7071012258529663}, 'position': {'x_val': 25.958515167236328, 'y_val': 26.33203125, 'z_val': -19.8799991607666}}, {'orientation': {'w_val': 0.7071123123168945, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.7071012258529663}, 'position': {'x_val': 11.658514976501465, 'y_val': 26.33203125, 'z_val': -12.779999732971191}}, {'orientation': {'w_val': 0.5735827684402466, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.8191476464271545}, 'position': {'x_val': -10.141484260559082, 'y_val': 22.632030487060547, 'z_val': -6.37999963760376}}, {'orientation': {'w_val': 0.5000063180923462, 'x_val': -0.0, 'y_val': 0.0, 'z_val': 0.8660216927528381}, 'position': {'x_val': -24.641483306884766, 'y_val': 9.132031440734863, 'z_val': 2.119999885559082}}]
print ('WELCOME TO THE COLLATZ SEQUENCER: ALWAYS NUMBER 1') print ('ENTER YOUR NUMBER AND PREPARE TO GET SEQUENCED') numberToSequence = input() def tryCollatz(numberToSequence): collatzCalled = False while(collatzCalled == False): try: numberToSequence = int(numberToSequence) collatz(numberToSequence) collatzCalled = True except: print ('Error: Value input must be an INTEGER') numberToSequence = input() def collatz(numberToSequence): while numberToSequence != 1: if numberToSequence % 2 == 0: numberToSequence = numberToSequence // 2 print (numberToSequence) elif numberToSequence % 2 == 1: numberToSequence = 3 * numberToSequence + 1 print (numberToSequence) tryCollatz(numberToSequence)
print('WELCOME TO THE COLLATZ SEQUENCER: ALWAYS NUMBER 1') print('ENTER YOUR NUMBER AND PREPARE TO GET SEQUENCED') number_to_sequence = input() def try_collatz(numberToSequence): collatz_called = False while collatzCalled == False: try: number_to_sequence = int(numberToSequence) collatz(numberToSequence) collatz_called = True except: print('Error: Value input must be an INTEGER') number_to_sequence = input() def collatz(numberToSequence): while numberToSequence != 1: if numberToSequence % 2 == 0: number_to_sequence = numberToSequence // 2 print(numberToSequence) elif numberToSequence % 2 == 1: number_to_sequence = 3 * numberToSequence + 1 print(numberToSequence) try_collatz(numberToSequence)
class Stack: def __init__(self): self.items = [] def push(self, item): self.items.append(item) def pop(self): return self.items.pop() def example(): # Computer 2 + 3 * 0.1 code = [ ('const', 2), ('const', 3), ('const', 0.1), ('mul',), ('add',), ] m = Machine()
class Stack: def __init__(self): self.items = [] def push(self, item): self.items.append(item) def pop(self): return self.items.pop() def example(): code = [('const', 2), ('const', 3), ('const', 0.1), ('mul',), ('add',)] m = machine()
def formulUygula(derece, liste): mat = [] xDeg = 0 for i in range(derece + 1): mat1 = [] for j in range(derece + 1): gecici = 0 for k in range(1, len(liste) + 1): gecici += k ** xDeg mat1.append(gecici) xDeg += 1 mat.append(mat1) xDeg -= derece mat2 = [] for i in range(derece + 1): gecici = 0 for j in range(len(liste)): gecici += liste[j] * (j + 1) ** i mat2.append(gecici) for i in range(derece + 1): gecici1 = mat[i][i] for j in range(i + 1, derece + 1): ort = gecici1 / mat[j][i] mat2[j] = mat2[j] * ort - mat2[i] for k in range(derece + 1): mat[j][k] = mat[j][k] * ort - mat[i][k] for i in range(derece, -1, -1): gecici1 = mat[i][i] for j in range(i - 1, -1, -1): ort = gecici1 / mat[j][i] mat2[j] = mat2[j] * ort - mat2[i] for k in range(derece + 1): mat[j][k] = mat[j][k] * ort - mat[i][k] for i in range(derece + 1): mat2[i] = mat2[i] / mat[i][i] yDeg = 0 for i in range(len(liste)): yDeg += liste[i] yDeg = yDeg / len(liste) stn = 0 str = 0 for i in range(len(liste)): xDeg = liste[i] stn += (liste[i] - yDeg) ** 2 for j in range(len(mat2)): xDeg -= mat2[j] * (i + 1) ** j xDeg = xDeg ** 2 str += xDeg a = ((stn - str) / stn) ** (1 / 2) return mat2, a def katsayi(r1, r2, r3, r4, r5, r6, dosya2): dosya2.write("<----------------------------------------->\n") dosya2.write("r1 = " + str(r1) + " r2 = " + str(r2) + " r 3 = " + str(r3) + "r4 = " + str(r4) + " r5 = " + str( r5) + " r6 = " + str(r6) + "\n") dizi = [r1, r2, r3, r4, r5, r6] for i in range(len(dizi)): if dizi[i] == max(dizi): dosya2.write("r=" + str(dizi[i]) + " " + str(i + 1) + ".\n") def katsayiHes(pol1, pol2, pol3, pol4, pol5, pol6, dosya2, a1, a2): dosya2.write(" \n" + " \n" + " \n" + "polinomlarin katsayilari " + str(a1) + " ---- " + str(a2) + " \n") a1 = a1 + 10 a2 = a2 + 10 dosya2.write("1.dereceden katsayilar \nk1 = " + str(pol1[0]) + " k1 = " + str(pol1[1]) + "\n") dosya2.write( "2.dereceden katsayilar \nk0 = " + str(pol2[0]) + " k1 = " + str(pol2[1]) + " k2 =" + str(pol2[2]) + "\n") dosya2.write("3.dereceden katsayilar \nk0 = " + str(pol3[0]) + " k1 = " + str(pol3[1]) + " k2 =" + str( pol3[2]) + " k3 = " + str(pol3[3]) + "\n") dosya2.write("4.dereceden katsayilar \nk0 = " + str(pol4[0]) + " k1 = " + str(pol4[1]) + " k2 =" + str( pol4[2]) + " k3 = " + str(pol4[3]) + " k4 = " + str(pol4[4]) + "\n") dosya2.write("5.dereceden katsayilar \nk0 = " + str(pol5[0]) + " k1 = " + str(pol5[1]) + " k2 =" + str( pol5[2]) + " k3 = " + str(pol5[3]) + " k4 = " + str(pol5[4]) + " k5 = " + str(pol5[5]) + "\n") dosya2.write("6.dereceden katsayilar \nk0 = " + str(pol6[0]) + " k1 = " + str(pol6[1]) + " k2 =" + str( pol6[2]) + " k3 = " + str(pol6[3]) + " k4 = " + str(pol6[4]) + " k5 = " + str(pol6[5]) + " k6 = " + str( pol6[6]) + "\n") return a1,a2 a1=1 a2=10 dosya = open("veriler.txt", "r") liste = dosya.readlines() for i in range(len(liste)): liste[i] = int(liste[i]) pol_1, r1 = formulUygula(1, liste) pol_2, r2 = formulUygula(2, liste) pol_3, r3 = formulUygula(3, liste) pol_4, r4 = formulUygula(4, liste) pol_5, r5 = formulUygula(5, liste) pol_6, r6 = formulUygula(6, liste) dosya.close() dosya2 = open("sonuc.txt", "w") a1,a2=katsayiHes(pol_1, pol_2, pol_3, pol_4, pol_5, pol_6, dosya2, a1, a2) katsayi(r1, r2, r3, r4, r5, r6, dosya2) for i in range(len(liste) // 10): onlu = [] for j in range(10): onlu.append(liste[10 * i + j]) pol_1, r1 = formulUygula(1, onlu) pol_2, r2 = formulUygula(2, onlu) pol_3, r3 = formulUygula(3, onlu) pol_4, r4 = formulUygula(4, onlu) pol_5, r5 = formulUygula(5, onlu) pol_6, r6 = formulUygula(6, onlu) a1,a2=katsayiHes(pol_1, pol_2, pol_3, pol_4, pol_5, pol_6, dosya2, a1, a2) katsayi(r1, r2, r3, r4, r5, r6, dosya2) dosya2.close()
def formul_uygula(derece, liste): mat = [] x_deg = 0 for i in range(derece + 1): mat1 = [] for j in range(derece + 1): gecici = 0 for k in range(1, len(liste) + 1): gecici += k ** xDeg mat1.append(gecici) x_deg += 1 mat.append(mat1) x_deg -= derece mat2 = [] for i in range(derece + 1): gecici = 0 for j in range(len(liste)): gecici += liste[j] * (j + 1) ** i mat2.append(gecici) for i in range(derece + 1): gecici1 = mat[i][i] for j in range(i + 1, derece + 1): ort = gecici1 / mat[j][i] mat2[j] = mat2[j] * ort - mat2[i] for k in range(derece + 1): mat[j][k] = mat[j][k] * ort - mat[i][k] for i in range(derece, -1, -1): gecici1 = mat[i][i] for j in range(i - 1, -1, -1): ort = gecici1 / mat[j][i] mat2[j] = mat2[j] * ort - mat2[i] for k in range(derece + 1): mat[j][k] = mat[j][k] * ort - mat[i][k] for i in range(derece + 1): mat2[i] = mat2[i] / mat[i][i] y_deg = 0 for i in range(len(liste)): y_deg += liste[i] y_deg = yDeg / len(liste) stn = 0 str = 0 for i in range(len(liste)): x_deg = liste[i] stn += (liste[i] - yDeg) ** 2 for j in range(len(mat2)): x_deg -= mat2[j] * (i + 1) ** j x_deg = xDeg ** 2 str += xDeg a = ((stn - str) / stn) ** (1 / 2) return (mat2, a) def katsayi(r1, r2, r3, r4, r5, r6, dosya2): dosya2.write('<----------------------------------------->\n') dosya2.write('r1 = ' + str(r1) + ' r2 = ' + str(r2) + ' r 3 = ' + str(r3) + 'r4 = ' + str(r4) + ' r5 = ' + str(r5) + ' r6 = ' + str(r6) + '\n') dizi = [r1, r2, r3, r4, r5, r6] for i in range(len(dizi)): if dizi[i] == max(dizi): dosya2.write('r=' + str(dizi[i]) + ' ' + str(i + 1) + '.\n') def katsayi_hes(pol1, pol2, pol3, pol4, pol5, pol6, dosya2, a1, a2): dosya2.write(' \n' + ' \n' + ' \n' + 'polinomlarin katsayilari ' + str(a1) + ' ---- ' + str(a2) + ' \n') a1 = a1 + 10 a2 = a2 + 10 dosya2.write('1.dereceden katsayilar \nk1 = ' + str(pol1[0]) + ' k1 = ' + str(pol1[1]) + '\n') dosya2.write('2.dereceden katsayilar \nk0 = ' + str(pol2[0]) + ' k1 = ' + str(pol2[1]) + ' k2 =' + str(pol2[2]) + '\n') dosya2.write('3.dereceden katsayilar \nk0 = ' + str(pol3[0]) + ' k1 = ' + str(pol3[1]) + ' k2 =' + str(pol3[2]) + ' k3 = ' + str(pol3[3]) + '\n') dosya2.write('4.dereceden katsayilar \nk0 = ' + str(pol4[0]) + ' k1 = ' + str(pol4[1]) + ' k2 =' + str(pol4[2]) + ' k3 = ' + str(pol4[3]) + ' k4 = ' + str(pol4[4]) + '\n') dosya2.write('5.dereceden katsayilar \nk0 = ' + str(pol5[0]) + ' k1 = ' + str(pol5[1]) + ' k2 =' + str(pol5[2]) + ' k3 = ' + str(pol5[3]) + ' k4 = ' + str(pol5[4]) + ' k5 = ' + str(pol5[5]) + '\n') dosya2.write('6.dereceden katsayilar \nk0 = ' + str(pol6[0]) + ' k1 = ' + str(pol6[1]) + ' k2 =' + str(pol6[2]) + ' k3 = ' + str(pol6[3]) + ' k4 = ' + str(pol6[4]) + ' k5 = ' + str(pol6[5]) + ' k6 = ' + str(pol6[6]) + '\n') return (a1, a2) a1 = 1 a2 = 10 dosya = open('veriler.txt', 'r') liste = dosya.readlines() for i in range(len(liste)): liste[i] = int(liste[i]) (pol_1, r1) = formul_uygula(1, liste) (pol_2, r2) = formul_uygula(2, liste) (pol_3, r3) = formul_uygula(3, liste) (pol_4, r4) = formul_uygula(4, liste) (pol_5, r5) = formul_uygula(5, liste) (pol_6, r6) = formul_uygula(6, liste) dosya.close() dosya2 = open('sonuc.txt', 'w') (a1, a2) = katsayi_hes(pol_1, pol_2, pol_3, pol_4, pol_5, pol_6, dosya2, a1, a2) katsayi(r1, r2, r3, r4, r5, r6, dosya2) for i in range(len(liste) // 10): onlu = [] for j in range(10): onlu.append(liste[10 * i + j]) (pol_1, r1) = formul_uygula(1, onlu) (pol_2, r2) = formul_uygula(2, onlu) (pol_3, r3) = formul_uygula(3, onlu) (pol_4, r4) = formul_uygula(4, onlu) (pol_5, r5) = formul_uygula(5, onlu) (pol_6, r6) = formul_uygula(6, onlu) (a1, a2) = katsayi_hes(pol_1, pol_2, pol_3, pol_4, pol_5, pol_6, dosya2, a1, a2) katsayi(r1, r2, r3, r4, r5, r6, dosya2) dosya2.close()
def LeiaDinheiro(msg): valido = False while not valido: mens = str(input(msg)).replace(',', '.') if mens.isalpha() or mens.strip() == '': print("\033[31mERRO! tente algo valido\033[m") else: valido = True return float(mens)
def leia_dinheiro(msg): valido = False while not valido: mens = str(input(msg)).replace(',', '.') if mens.isalpha() or mens.strip() == '': print('\x1b[31mERRO! tente algo valido\x1b[m') else: valido = True return float(mens)
# # PySNMP MIB module AT-DS3-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AT-DS3-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:13:43 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, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint") DisplayStringUnsized, modules = mibBuilder.importSymbols("AT-SMI-MIB", "DisplayStringUnsized", "modules") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Counter32, ModuleIdentity, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, MibIdentifier, NotificationType, Counter64, iso, ObjectIdentity, Integer32, Unsigned32, Bits, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "ModuleIdentity", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "MibIdentifier", "NotificationType", "Counter64", "iso", "ObjectIdentity", "Integer32", "Unsigned32", "Bits", "Gauge32") TruthValue, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "DisplayString", "TextualConvention") ds3 = ModuleIdentity((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109)) ds3.setRevisions(('2006-06-28 12:22',)) if mibBuilder.loadTexts: ds3.setLastUpdated('200606281222Z') if mibBuilder.loadTexts: ds3.setOrganization('Allied Telesis, Inc') ds3TrapTable = MibTable((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 1), ) if mibBuilder.loadTexts: ds3TrapTable.setStatus('current') ds3TrapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: ds3TrapEntry.setStatus('current') ds3TcaTrapEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ds3TcaTrapEnable.setStatus('current') ds3TrapError = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("ds3NoError", 1), ("ds3PES", 2), ("ds3PSES", 3), ("ds3SEFs", 4), ("ds3UAS", 5), ("ds3LCVs", 6), ("ds3PCVs", 7), ("ds3LESs", 8), ("ds3CCVs", 9), ("ds3CESs", 10), ("ds3CSESs", 11))).clone('ds3NoError')).setMaxAccess("readonly") if mibBuilder.loadTexts: ds3TrapError.setStatus('current') ds3TrapLoc = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("ds3NoLoc", 1), ("ds3Near", 2), ("ds3Far", 3))).clone('ds3NoLoc')).setMaxAccess("readonly") if mibBuilder.loadTexts: ds3TrapLoc.setStatus('current') ds3TrapInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("ds3NoInt", 1), ("ds3Fifteen", 2), ("ds3Twentyfour", 3))).clone('ds3NoInt')).setMaxAccess("readonly") if mibBuilder.loadTexts: ds3TrapInterval.setStatus('current') ds3Traps = MibIdentifier((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 0)) tcaTrap = NotificationType((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 0, 1)).setObjects(("AT-DS3-MIB", "ds3TrapError"), ("AT-DS3-MIB", "ds3TrapLoc"), ("AT-DS3-MIB", "ds3TrapInterval")) if mibBuilder.loadTexts: tcaTrap.setStatus('current') mibBuilder.exportSymbols("AT-DS3-MIB", ds3TrapTable=ds3TrapTable, PYSNMP_MODULE_ID=ds3, tcaTrap=tcaTrap, ds3Traps=ds3Traps, ds3=ds3, ds3TrapInterval=ds3TrapInterval, ds3TrapLoc=ds3TrapLoc, ds3TrapEntry=ds3TrapEntry, ds3TrapError=ds3TrapError, ds3TcaTrapEnable=ds3TcaTrapEnable)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, single_value_constraint, value_range_constraint, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint') (display_string_unsized, modules) = mibBuilder.importSymbols('AT-SMI-MIB', 'DisplayStringUnsized', 'modules') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (counter32, module_identity, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, mib_identifier, notification_type, counter64, iso, object_identity, integer32, unsigned32, bits, gauge32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'ModuleIdentity', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'MibIdentifier', 'NotificationType', 'Counter64', 'iso', 'ObjectIdentity', 'Integer32', 'Unsigned32', 'Bits', 'Gauge32') (truth_value, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'DisplayString', 'TextualConvention') ds3 = module_identity((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109)) ds3.setRevisions(('2006-06-28 12:22',)) if mibBuilder.loadTexts: ds3.setLastUpdated('200606281222Z') if mibBuilder.loadTexts: ds3.setOrganization('Allied Telesis, Inc') ds3_trap_table = mib_table((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 1)) if mibBuilder.loadTexts: ds3TrapTable.setStatus('current') ds3_trap_entry = mib_table_row((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: ds3TrapEntry.setStatus('current') ds3_tca_trap_enable = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ds3TcaTrapEnable.setStatus('current') ds3_trap_error = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=named_values(('ds3NoError', 1), ('ds3PES', 2), ('ds3PSES', 3), ('ds3SEFs', 4), ('ds3UAS', 5), ('ds3LCVs', 6), ('ds3PCVs', 7), ('ds3LESs', 8), ('ds3CCVs', 9), ('ds3CESs', 10), ('ds3CSESs', 11))).clone('ds3NoError')).setMaxAccess('readonly') if mibBuilder.loadTexts: ds3TrapError.setStatus('current') ds3_trap_loc = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('ds3NoLoc', 1), ('ds3Near', 2), ('ds3Far', 3))).clone('ds3NoLoc')).setMaxAccess('readonly') if mibBuilder.loadTexts: ds3TrapLoc.setStatus('current') ds3_trap_interval = mib_table_column((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('ds3NoInt', 1), ('ds3Fifteen', 2), ('ds3Twentyfour', 3))).clone('ds3NoInt')).setMaxAccess('readonly') if mibBuilder.loadTexts: ds3TrapInterval.setStatus('current') ds3_traps = mib_identifier((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 0)) tca_trap = notification_type((1, 3, 6, 1, 4, 1, 207, 8, 4, 4, 4, 109, 0, 1)).setObjects(('AT-DS3-MIB', 'ds3TrapError'), ('AT-DS3-MIB', 'ds3TrapLoc'), ('AT-DS3-MIB', 'ds3TrapInterval')) if mibBuilder.loadTexts: tcaTrap.setStatus('current') mibBuilder.exportSymbols('AT-DS3-MIB', ds3TrapTable=ds3TrapTable, PYSNMP_MODULE_ID=ds3, tcaTrap=tcaTrap, ds3Traps=ds3Traps, ds3=ds3, ds3TrapInterval=ds3TrapInterval, ds3TrapLoc=ds3TrapLoc, ds3TrapEntry=ds3TrapEntry, ds3TrapError=ds3TrapError, ds3TcaTrapEnable=ds3TcaTrapEnable)
# closures def make_averagr(): series = [] def averager(new_value): series.append(new_value) # free variable total = sum(series) / len(series) return total return averager # print(locals()) av = make_averagr() print(av(10)) print(av(11)) print(av.__code__.co_varnames) # ('new_value', 'total') print(av.__code__.co_freevars) # ('series',) # print(type(av.__code__)) print(av.__closure__, type(av.__closure__)) print(av.__closure__[0].cell_contents, type(av.__closure__)) # The nonlocal Declaration count = 1000 total = 10000 def make_Averager(): count = 0 total = 0 def averager(new_value): # count = count + 1 which is local scope and undefined hence add non local # global count, total nonlocal count, total count += 1 print(total) print(count) total += new_value return total / count return averager # UnboundLocalError: local variable 'count' referenced before assignment # av1 = make_Averager() print(av1(100))
def make_averagr(): series = [] def averager(new_value): series.append(new_value) total = sum(series) / len(series) return total return averager av = make_averagr() print(av(10)) print(av(11)) print(av.__code__.co_varnames) print(av.__code__.co_freevars) print(av.__closure__, type(av.__closure__)) print(av.__closure__[0].cell_contents, type(av.__closure__)) count = 1000 total = 10000 def make__averager(): count = 0 total = 0 def averager(new_value): nonlocal count, total count += 1 print(total) print(count) total += new_value return total / count return averager av1 = make__averager() print(av1(100))
# Public Key PK = "fubotong" # Push request actively PUSH = 0 # Secret Key SK = "(*^%]@XUNLEI`12f&amp;^" # procotol type HTTP = 1 ED2K = 2 BT = 3 TASK_SERVER = "http://open.lixian.vip.xunlei.com/download_to_clouds" #TASK_SERVER = "http://t33093.sandai.net:8028/download_to_clouds" CREATE_SERVER = "%s/create" % TASK_SERVER CREATE_BT_SERVER = "%s/create_bt" % TASK_SERVER CREATE_ED2K_SERVER = "%s/create_ed2k" % TASK_SERVER QUERY_SERVER = "%s/query" % TASK_SERVER UPLOAD_BT_SERVER = "%s/upload_torrent" % TASK_SERVER QUERY_BT_SERVER = "%s/torrent_info" % TASK_SERVER #NEW_URL_SERVER = "http://180.97.151.98:80" NEW_URL_SERVER = "http://gdl.lixian.vip.xunlei.com" # using gen new url MID = 666 AK = "9:0:999:0" THRESHOLD = 150 SRCID = 6 VERNO = 1 UI = 'hzfubotong' FID_LEN = 64 FID_DECODED_LEN = FID_LEN / 4 * 3 # define error code OFFLINE_TIMEOUT = -1 OFFLINE_HTTP_ERROR = -2 OFFLINE_STATUS_ERROR = -3 OFFLINE_DOWNLOAD_ERROR = -4 OFFLINE_GENURL_ERROR = -5 OFFLINE_UNKNOWN_ERROR = -6 #pk fubotong #appkey hzfubotong #sk (*^%]@XUNLEI`12f&amp;^ #ak 9:0:999:0
pk = 'fubotong' push = 0 sk = '(*^%]@XUNLEI`12f&amp;^' http = 1 ed2_k = 2 bt = 3 task_server = 'http://open.lixian.vip.xunlei.com/download_to_clouds' create_server = '%s/create' % TASK_SERVER create_bt_server = '%s/create_bt' % TASK_SERVER create_ed2_k_server = '%s/create_ed2k' % TASK_SERVER query_server = '%s/query' % TASK_SERVER upload_bt_server = '%s/upload_torrent' % TASK_SERVER query_bt_server = '%s/torrent_info' % TASK_SERVER new_url_server = 'http://gdl.lixian.vip.xunlei.com' mid = 666 ak = '9:0:999:0' threshold = 150 srcid = 6 verno = 1 ui = 'hzfubotong' fid_len = 64 fid_decoded_len = FID_LEN / 4 * 3 offline_timeout = -1 offline_http_error = -2 offline_status_error = -3 offline_download_error = -4 offline_genurl_error = -5 offline_unknown_error = -6
def kth_common_divisor(a, b, k): min_ = min(a, b) divisors = [] for i in range(1, min_+1): if a % i == 0 and b % i == 0: divisors.append(i) return divisors[-k] if __name__ == "__main__": a, b, k = map(int, input().split()) print(kth_common_divisor(a, b, k))
def kth_common_divisor(a, b, k): min_ = min(a, b) divisors = [] for i in range(1, min_ + 1): if a % i == 0 and b % i == 0: divisors.append(i) return divisors[-k] if __name__ == '__main__': (a, b, k) = map(int, input().split()) print(kth_common_divisor(a, b, k))
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. class Foo: def __init__(self, arg1: str, arg2: int) -> None: self.arg1 = arg1 self.arg2 = arg2
class Foo: def __init__(self, arg1: str, arg2: int) -> None: self.arg1 = arg1 self.arg2 = arg2
class Solution: def sequentialDigits(self, low: int, high: int) -> List[int]: nlow, nhigh = len(str(low)), len(str(high)) s = '123456789' result = [] for n in range(nlow, nhigh+1): for i in range(9-n+1): num = int(s[i:i+n]) if num < low: continue if num > high: break result.append(num) return result
class Solution: def sequential_digits(self, low: int, high: int) -> List[int]: (nlow, nhigh) = (len(str(low)), len(str(high))) s = '123456789' result = [] for n in range(nlow, nhigh + 1): for i in range(9 - n + 1): num = int(s[i:i + n]) if num < low: continue if num > high: break result.append(num) return result
no = int(input('How many Natural Numbers do You Want?? ')) output = 0 i = 0 while i <= no: output = output + i*i i += 1 print(output)
no = int(input('How many Natural Numbers do You Want?? ')) output = 0 i = 0 while i <= no: output = output + i * i i += 1 print(output)
class Log(): def log(self,text): pass def force_p(self,text): print(text) class Print(Log): def log(self,text): print(text) class NoLog(Log) : def log(self,text): pass class MessageLog(Log): def set_channel(self,channel): self.channel = channel async def log(self,text): await self.channel.send(text)
class Log: def log(self, text): pass def force_p(self, text): print(text) class Print(Log): def log(self, text): print(text) class Nolog(Log): def log(self, text): pass class Messagelog(Log): def set_channel(self, channel): self.channel = channel async def log(self, text): await self.channel.send(text)
class Solution(object): def update(self, board, row, col): living = 0 for i in range(max(row-1, 0), min(row+2, len(board))): for j in range(max(col-1, 0), min(col+2, len(board[0]))): living += board[i][j] & 1 if living == 3 or (living == 4 and board[row][col]): board[row][col]+=2 def gameOfLife(self, board): for row in range(len(board)): for col in range(len(board[row])): self.update(board, row, col) for row in range(len(board)): for col in range(len(board[row])): board[row][col] >>= 1 a = Solution() b = [ [0,1,0], [0,0,1], [1,1,1], [0,0,0] ] a.gameOfLife(b) print(b)
class Solution(object): def update(self, board, row, col): living = 0 for i in range(max(row - 1, 0), min(row + 2, len(board))): for j in range(max(col - 1, 0), min(col + 2, len(board[0]))): living += board[i][j] & 1 if living == 3 or (living == 4 and board[row][col]): board[row][col] += 2 def game_of_life(self, board): for row in range(len(board)): for col in range(len(board[row])): self.update(board, row, col) for row in range(len(board)): for col in range(len(board[row])): board[row][col] >>= 1 a = solution() b = [[0, 1, 0], [0, 0, 1], [1, 1, 1], [0, 0, 0]] a.gameOfLife(b) print(b)
__all__ = ["State"] class State: def __init__(self, value: str): self.value = value def __eq__(self, other): if not isinstance(other, State): return False else: return self.value == other.value def __hash__(self): return hash(self.value)
__all__ = ['State'] class State: def __init__(self, value: str): self.value = value def __eq__(self, other): if not isinstance(other, State): return False else: return self.value == other.value def __hash__(self): return hash(self.value)
counts = { "FAMILY|ID": 3, "PARTICIPANT|ID": 3, "BIOSPECIMEN|ID": 3, "GENOMIC_FILE|URL_LIST": 3, } validation = {}
counts = {'FAMILY|ID': 3, 'PARTICIPANT|ID': 3, 'BIOSPECIMEN|ID': 3, 'GENOMIC_FILE|URL_LIST': 3} validation = {}
# Create a global variable. my_value = 10 # The show_value function prints # the value of the global variable. def show_value(): print(my_value) # Call the show_value function show_value()
my_value = 10 def show_value(): print(my_value) show_value()
N = int(input()) h = N // 3600 % 24 min = N % 3600 // 60 sec = N % 60 print(h, '%02d' % (min), '%02d' % (sec), sep=':')
n = int(input()) h = N // 3600 % 24 min = N % 3600 // 60 sec = N % 60 print(h, '%02d' % min, '%02d' % sec, sep=':')
# # PySNMP MIB module CTRON-SFPS-PATH-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CTRON-SFPS-PATH-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:31:03 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection") sfpsPathAPI, sfpsSwitchPathStats, sfpsStaticPath, sfpsPathMaskObj, sfpsChassisRIPPath, sfpsSwitchPathAPI, sfpsSwitchPath, sfpsISPSwitchPath = mibBuilder.importSymbols("CTRON-SFPS-INCLUDE-MIB", "sfpsPathAPI", "sfpsSwitchPathStats", "sfpsStaticPath", "sfpsPathMaskObj", "sfpsChassisRIPPath", "sfpsSwitchPathAPI", "sfpsSwitchPath", "sfpsISPSwitchPath") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Integer32, iso, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, TimeTicks, Bits, Unsigned32, ModuleIdentity, Gauge32, MibIdentifier, IpAddress, ObjectIdentity, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "iso", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "TimeTicks", "Bits", "Unsigned32", "ModuleIdentity", "Gauge32", "MibIdentifier", "IpAddress", "ObjectIdentity", "Counter32") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") class SfpsAddress(OctetString): subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(6, 6) fixedLength = 6 class HexInteger(Integer32): pass sfpsServiceCenterPathTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1), ) if mibBuilder.loadTexts: sfpsServiceCenterPathTable.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathTable.setDescription('This table gives path semantics to call processing.') sfpsServiceCenterPathEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1), ).setIndexNames((0, "CTRON-SFPS-PATH-MIB", "sfpsServiceCenterPathHashLeaf")) if mibBuilder.loadTexts: sfpsServiceCenterPathEntry.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathEntry.setDescription('Each entry contains the configuration of the Path Entry.') sfpsServiceCenterPathHashLeaf = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 1), HexInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsServiceCenterPathHashLeaf.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathHashLeaf.setDescription('Server hash, part of instance key.') sfpsServiceCenterPathMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsServiceCenterPathMetric.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathMetric.setDescription('Defines order servers are called low to high.') sfpsServiceCenterPathName = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsServiceCenterPathName.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathName.setDescription('Server name.') sfpsServiceCenterPathOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("kStatusRunning", 1), ("kStatusHalted", 2), ("kStatusPending", 3), ("kStatusFaulted", 4), ("kStatusNotStarted", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsServiceCenterPathOperStatus.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathOperStatus.setDescription('Operational state of entry.') sfpsServiceCenterPathAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disable", 2), ("enable", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsServiceCenterPathAdminStatus.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathAdminStatus.setDescription('Administrative State of Entry.') sfpsServiceCenterPathStatusTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 6), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsServiceCenterPathStatusTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathStatusTime.setDescription('Time Tick of last operStatus change.') sfpsServiceCenterPathRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsServiceCenterPathRequests.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathRequests.setDescription('Requests made to server.') sfpsServiceCenterPathResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsServiceCenterPathResponses.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathResponses.setDescription('GOOD replies by server.') sfpsPathAPIVerb = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("other", 1), ("add", 2), ("delete", 3), ("uplink", 4), ("downlink", 5), ("diameter", 6), ("flood-add", 7), ("flood-delete", 8), ("force-idle-traffic", 9), ("remove-traffic-cnx", 10)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsPathAPIVerb.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPIVerb.setDescription('') sfpsPathAPISwitchMac = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 2), SfpsAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsPathAPISwitchMac.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPISwitchMac.setDescription('') sfpsPathAPIPortName = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsPathAPIPortName.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPIPortName.setDescription('') sfpsPathAPICost = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsPathAPICost.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPICost.setDescription('') sfpsPathAPIHop = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsPathAPIHop.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPIHop.setDescription('') sfpsPathAPIID = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsPathAPIID.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPIID.setDescription('') sfpsPathAPIInPort = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 7), SfpsAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsPathAPIInPort.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPIInPort.setDescription('') sfpsPathAPISrcMac = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 8), SfpsAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsPathAPISrcMac.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPISrcMac.setDescription('') sfpsPathAPIDstMac = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 9), SfpsAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsPathAPIDstMac.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPIDstMac.setDescription('') sfpsStaticPathTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 4, 1), ) if mibBuilder.loadTexts: sfpsStaticPathTable.setStatus('mandatory') if mibBuilder.loadTexts: sfpsStaticPathTable.setDescription('') sfpsStaticPathEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 4, 1, 1), ).setIndexNames((0, "CTRON-SFPS-PATH-MIB", "sfpsStaticPathPort")) if mibBuilder.loadTexts: sfpsStaticPathEntry.setStatus('mandatory') if mibBuilder.loadTexts: sfpsStaticPathEntry.setDescription('') sfpsStaticPathPort = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 4, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsStaticPathPort.setStatus('mandatory') if mibBuilder.loadTexts: sfpsStaticPathPort.setDescription('') sfpsStaticPathFloodEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 3))).clone(namedValues=NamedValues(("disabled", 2), ("enabled", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsStaticPathFloodEnabled.setStatus('mandatory') if mibBuilder.loadTexts: sfpsStaticPathFloodEnabled.setDescription('') sfpsStaticPathUplinkEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 3))).clone(namedValues=NamedValues(("disabled", 2), ("enabled", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsStaticPathUplinkEnabled.setStatus('mandatory') if mibBuilder.loadTexts: sfpsStaticPathUplinkEnabled.setDescription('') sfpsStaticPathDownlinkEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 3))).clone(namedValues=NamedValues(("disabled", 2), ("enabled", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsStaticPathDownlinkEnabled.setStatus('mandatory') if mibBuilder.loadTexts: sfpsStaticPathDownlinkEnabled.setDescription('') sfpsPathMaskObjLogPortMask = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjLogPortMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjLogPortMask.setDescription('') sfpsPathMaskObjPhysPortMask = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjPhysPortMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPhysPortMask.setDescription('') sfpsPathMaskObjLogResolveMask = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjLogResolveMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjLogResolveMask.setDescription('') sfpsPathMaskObjLogFloodNoINB = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjLogFloodNoINB.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjLogFloodNoINB.setDescription('') sfpsPathMaskObjPhysResolveMask = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjPhysResolveMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPhysResolveMask.setDescription('') sfpsPathMaskObjPhysFloodNoINB = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjPhysFloodNoINB.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPhysFloodNoINB.setDescription('') sfpsPathMaskObjOldLogPortMask = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjOldLogPortMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjOldLogPortMask.setDescription('') sfpsPathMaskObjPathChangeEvent = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsPathMaskObjPathChangeEvent.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPathChangeEvent.setDescription('') sfpsPathMaskObjPathChangeCounter = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjPathChangeCounter.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPathChangeCounter.setDescription('') sfpsPathMaskObjLastChangeTime = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 10), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjLastChangeTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjLastChangeTime.setDescription('') sfpsPathMaskObjPathCounterReset = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 11), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsPathMaskObjPathCounterReset.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPathCounterReset.setDescription('') sfpsPathMaskObjIsolatedSwitchMask = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 12), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjIsolatedSwitchMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjIsolatedSwitchMask.setDescription('') sfpsPathMaskObjPyhsIsolatedSwitchMask = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 13), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjPyhsIsolatedSwitchMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPyhsIsolatedSwitchMask.setDescription('') sfpsPathMaskObjLogDownlinkMask = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 14), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjLogDownlinkMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjLogDownlinkMask.setDescription('') sfpsPathMaskObjCoreUplinkMask = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 15), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjCoreUplinkMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjCoreUplinkMask.setDescription('') sfpsPathMaskObjOverrideFloodMask = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("disable", 2), ("enable", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsPathMaskObjOverrideFloodMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjOverrideFloodMask.setDescription('') sfpsSwitchPathStatsNumEntries = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsNumEntries.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsNumEntries.setDescription('') sfpsSwitchPathStatsMaxEntries = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsMaxEntries.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsMaxEntries.setDescription('') sfpsSwitchPathStatsTableSize = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsTableSize.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsTableSize.setDescription('') sfpsSwitchPathStatsMemUsage = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsMemUsage.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsMemUsage.setDescription('') sfpsSwitchPathStatsActiveLocal = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsActiveLocal.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsActiveLocal.setDescription('') sfpsSwitchPathStatsActiveRemote = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsActiveRemote.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsActiveRemote.setDescription('') sfpsSwitchPathStatsStaticRemote = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsStaticRemote.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsStaticRemote.setDescription('') sfpsSwitchPathStatsDeadLocal = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsDeadLocal.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsDeadLocal.setDescription('') sfpsSwitchPathStatsDeadRemote = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsDeadRemote.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsDeadRemote.setDescription('') sfpsSwitchPathStatsReapReady = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsReapReady.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsReapReady.setDescription('') sfpsSwitchPathStatsReapAt = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsReapAt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsReapAt.setDescription('') sfpsSwitchPathStatsReapCount = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsReapCount.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsReapCount.setDescription('') sfpsSwitchPathStatsPathReq = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsPathReq.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsPathReq.setDescription('') sfpsSwitchPathStatsPathAck = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsPathAck.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsPathAck.setDescription('') sfpsSwitchPathStatsPathNak = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsPathNak.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsPathNak.setDescription('') sfpsSwitchPathStatsPathUnk = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 16), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsPathUnk.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsPathUnk.setDescription('') sfpsSwitchPathStatsLocateReq = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 17), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateReq.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateReq.setDescription('') sfpsSwitchPathStatsLocateAck = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateAck.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateAck.setDescription('') sfpsSwitchPathStatsLocateNak = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 19), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateNak.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateNak.setDescription('') sfpsSwitchPathStatsLocateUnk = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 20), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateUnk.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateUnk.setDescription('') sfpsSwitchPathStatsSndDblBack = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 21), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsSndDblBack.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsSndDblBack.setDescription('') sfpsSwitchPathStatsRcdDblBack = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 22), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathStatsRcdDblBack.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsRcdDblBack.setDescription('') sfpsSwitchPathAPIVerb = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("other", 1), ("addFind", 2), ("lose", 3), ("delete", 4), ("clearTable", 5), ("resetStats", 6), ("setReapAt", 7), ("setMaxRcvDblBck", 8)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsSwitchPathAPIVerb.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathAPIVerb.setDescription('') sfpsSwitchPathAPIPort = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 2, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsSwitchPathAPIPort.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathAPIPort.setDescription('') sfpsSwitchPathAPIBaseMAC = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 2, 3), SfpsAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsSwitchPathAPIBaseMAC.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathAPIBaseMAC.setDescription('') sfpsSwitchPathAPIReapAt = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 2, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsSwitchPathAPIReapAt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathAPIReapAt.setDescription('') sfpsSwitchPathAPIMaxRcvDblBack = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 2, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sfpsSwitchPathAPIMaxRcvDblBack.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathAPIMaxRcvDblBack.setDescription('') sfpsSwitchPathTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3), ) if mibBuilder.loadTexts: sfpsSwitchPathTable.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTable.setDescription('') sfpsSwitchPathTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1), ).setIndexNames((0, "CTRON-SFPS-PATH-MIB", "sfpsSwitchPathTableSwitchMAC"), (0, "CTRON-SFPS-PATH-MIB", "sfpsSwitchPathTablePort")) if mibBuilder.loadTexts: sfpsSwitchPathTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableEntry.setDescription('.') sfpsSwitchPathTableSwitchMAC = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 1), SfpsAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableSwitchMAC.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableSwitchMAC.setDescription('') sfpsSwitchPathTablePort = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTablePort.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTablePort.setDescription('') sfpsSwitchPathTableIsActive = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableIsActive.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableIsActive.setDescription('') sfpsSwitchPathTableIsStatic = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableIsStatic.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableIsStatic.setDescription('') sfpsSwitchPathTableIsLocal = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableIsLocal.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableIsLocal.setDescription('') sfpsSwitchPathTableRefCnt = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableRefCnt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableRefCnt.setDescription('') sfpsSwitchPathTableRefTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 7), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableRefTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableRefTime.setDescription('') sfpsSwitchPathTableFoundCnt = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableFoundCnt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableFoundCnt.setDescription('') sfpsSwitchPathTableFoundTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 9), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableFoundTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableFoundTime.setDescription('') sfpsSwitchPathTableLostCnt = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableLostCnt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableLostCnt.setDescription('') sfpsSwitchPathTableLostTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 11), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableLostTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableLostTime.setDescription('') sfpsSwitchPathTableSrcDblBackCnt = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableSrcDblBackCnt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableSrcDblBackCnt.setDescription('') sfpsSwitchPathTableSrcDblBackTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 13), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableSrcDblBackTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableSrcDblBackTime.setDescription('') sfpsSwitchPathTableRcvDblBackCnt = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableRcvDblBackCnt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableRcvDblBackCnt.setDescription('') sfpsSwitchPathTableRcvDblBackTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 15), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableRcvDblBackTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableRcvDblBackTime.setDescription('') sfpsSwitchPathTableDirReapCnt = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 16), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableDirReapCnt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableDirReapCnt.setDescription('') sfpsSwitchPathTableDirReapTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 17), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsSwitchPathTableDirReapTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableDirReapTime.setDescription('') sfpsChassisRIPPathNumInTable = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 12, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsChassisRIPPathNumInTable.setStatus('mandatory') if mibBuilder.loadTexts: sfpsChassisRIPPathNumInTable.setDescription('') sfpsChassisRIPPathNumRequests = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 12, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsChassisRIPPathNumRequests.setStatus('mandatory') if mibBuilder.loadTexts: sfpsChassisRIPPathNumRequests.setDescription('') sfpsChassisRIPPathNumReplyAck = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 12, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsChassisRIPPathNumReplyAck.setStatus('mandatory') if mibBuilder.loadTexts: sfpsChassisRIPPathNumReplyAck.setDescription('') sfpsChassisRIPPathNumReplyUnk = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 12, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sfpsChassisRIPPathNumReplyUnk.setStatus('mandatory') if mibBuilder.loadTexts: sfpsChassisRIPPathNumReplyUnk.setDescription('') mibBuilder.exportSymbols("CTRON-SFPS-PATH-MIB", sfpsStaticPathTable=sfpsStaticPathTable, sfpsSwitchPathTableSrcDblBackTime=sfpsSwitchPathTableSrcDblBackTime, sfpsStaticPathDownlinkEnabled=sfpsStaticPathDownlinkEnabled, sfpsPathAPISwitchMac=sfpsPathAPISwitchMac, sfpsSwitchPathAPIVerb=sfpsSwitchPathAPIVerb, sfpsSwitchPathStatsDeadRemote=sfpsSwitchPathStatsDeadRemote, sfpsPathMaskObjCoreUplinkMask=sfpsPathMaskObjCoreUplinkMask, sfpsSwitchPathTableEntry=sfpsSwitchPathTableEntry, sfpsSwitchPathTableRefTime=sfpsSwitchPathTableRefTime, sfpsSwitchPathStatsReapCount=sfpsSwitchPathStatsReapCount, HexInteger=HexInteger, sfpsChassisRIPPathNumReplyUnk=sfpsChassisRIPPathNumReplyUnk, sfpsPathMaskObjLastChangeTime=sfpsPathMaskObjLastChangeTime, sfpsSwitchPathStatsLocateNak=sfpsSwitchPathStatsLocateNak, sfpsPathMaskObjPyhsIsolatedSwitchMask=sfpsPathMaskObjPyhsIsolatedSwitchMask, sfpsSwitchPathTableLostTime=sfpsSwitchPathTableLostTime, sfpsSwitchPathStatsPathNak=sfpsSwitchPathStatsPathNak, sfpsSwitchPathTableRcvDblBackTime=sfpsSwitchPathTableRcvDblBackTime, sfpsPathAPICost=sfpsPathAPICost, sfpsPathAPISrcMac=sfpsPathAPISrcMac, sfpsSwitchPathAPIBaseMAC=sfpsSwitchPathAPIBaseMAC, sfpsSwitchPathTableSrcDblBackCnt=sfpsSwitchPathTableSrcDblBackCnt, sfpsServiceCenterPathName=sfpsServiceCenterPathName, sfpsChassisRIPPathNumRequests=sfpsChassisRIPPathNumRequests, sfpsSwitchPathTable=sfpsSwitchPathTable, sfpsStaticPathFloodEnabled=sfpsStaticPathFloodEnabled, sfpsPathAPIID=sfpsPathAPIID, sfpsSwitchPathStatsRcdDblBack=sfpsSwitchPathStatsRcdDblBack, sfpsStaticPathPort=sfpsStaticPathPort, sfpsSwitchPathStatsActiveRemote=sfpsSwitchPathStatsActiveRemote, sfpsServiceCenterPathOperStatus=sfpsServiceCenterPathOperStatus, sfpsSwitchPathTableFoundCnt=sfpsSwitchPathTableFoundCnt, sfpsPathMaskObjPhysFloodNoINB=sfpsPathMaskObjPhysFloodNoINB, sfpsSwitchPathStatsLocateAck=sfpsSwitchPathStatsLocateAck, sfpsServiceCenterPathResponses=sfpsServiceCenterPathResponses, sfpsServiceCenterPathAdminStatus=sfpsServiceCenterPathAdminStatus, sfpsStaticPathEntry=sfpsStaticPathEntry, sfpsSwitchPathAPIPort=sfpsSwitchPathAPIPort, sfpsStaticPathUplinkEnabled=sfpsStaticPathUplinkEnabled, sfpsSwitchPathStatsMaxEntries=sfpsSwitchPathStatsMaxEntries, sfpsSwitchPathTableDirReapTime=sfpsSwitchPathTableDirReapTime, sfpsChassisRIPPathNumInTable=sfpsChassisRIPPathNumInTable, SfpsAddress=SfpsAddress, sfpsPathAPIInPort=sfpsPathAPIInPort, sfpsSwitchPathStatsReapAt=sfpsSwitchPathStatsReapAt, sfpsPathMaskObjPathChangeCounter=sfpsPathMaskObjPathChangeCounter, sfpsPathMaskObjOverrideFloodMask=sfpsPathMaskObjOverrideFloodMask, sfpsPathAPIVerb=sfpsPathAPIVerb, sfpsSwitchPathTableDirReapCnt=sfpsSwitchPathTableDirReapCnt, sfpsSwitchPathStatsMemUsage=sfpsSwitchPathStatsMemUsage, sfpsServiceCenterPathStatusTime=sfpsServiceCenterPathStatusTime, sfpsSwitchPathStatsLocateReq=sfpsSwitchPathStatsLocateReq, sfpsSwitchPathAPIReapAt=sfpsSwitchPathAPIReapAt, sfpsPathMaskObjLogFloodNoINB=sfpsPathMaskObjLogFloodNoINB, sfpsSwitchPathStatsPathReq=sfpsSwitchPathStatsPathReq, sfpsSwitchPathStatsActiveLocal=sfpsSwitchPathStatsActiveLocal, sfpsSwitchPathTableIsActive=sfpsSwitchPathTableIsActive, sfpsPathMaskObjLogPortMask=sfpsPathMaskObjLogPortMask, sfpsSwitchPathStatsTableSize=sfpsSwitchPathStatsTableSize, sfpsPathMaskObjPathChangeEvent=sfpsPathMaskObjPathChangeEvent, sfpsSwitchPathStatsDeadLocal=sfpsSwitchPathStatsDeadLocal, sfpsChassisRIPPathNumReplyAck=sfpsChassisRIPPathNumReplyAck, sfpsPathAPIPortName=sfpsPathAPIPortName, sfpsSwitchPathTableIsLocal=sfpsSwitchPathTableIsLocal, sfpsPathMaskObjLogDownlinkMask=sfpsPathMaskObjLogDownlinkMask, sfpsSwitchPathStatsStaticRemote=sfpsSwitchPathStatsStaticRemote, sfpsSwitchPathStatsPathUnk=sfpsSwitchPathStatsPathUnk, sfpsSwitchPathTableRefCnt=sfpsSwitchPathTableRefCnt, sfpsPathAPIHop=sfpsPathAPIHop, sfpsSwitchPathTableSwitchMAC=sfpsSwitchPathTableSwitchMAC, sfpsServiceCenterPathRequests=sfpsServiceCenterPathRequests, sfpsSwitchPathTableLostCnt=sfpsSwitchPathTableLostCnt, sfpsSwitchPathTableRcvDblBackCnt=sfpsSwitchPathTableRcvDblBackCnt, sfpsServiceCenterPathHashLeaf=sfpsServiceCenterPathHashLeaf, sfpsSwitchPathTableIsStatic=sfpsSwitchPathTableIsStatic, sfpsPathMaskObjPhysPortMask=sfpsPathMaskObjPhysPortMask, sfpsPathMaskObjLogResolveMask=sfpsPathMaskObjLogResolveMask, sfpsSwitchPathTablePort=sfpsSwitchPathTablePort, sfpsSwitchPathStatsNumEntries=sfpsSwitchPathStatsNumEntries, sfpsSwitchPathStatsLocateUnk=sfpsSwitchPathStatsLocateUnk, sfpsServiceCenterPathEntry=sfpsServiceCenterPathEntry, sfpsSwitchPathStatsSndDblBack=sfpsSwitchPathStatsSndDblBack, sfpsSwitchPathStatsPathAck=sfpsSwitchPathStatsPathAck, sfpsServiceCenterPathTable=sfpsServiceCenterPathTable, sfpsSwitchPathAPIMaxRcvDblBack=sfpsSwitchPathAPIMaxRcvDblBack, sfpsPathAPIDstMac=sfpsPathAPIDstMac, sfpsPathMaskObjPathCounterReset=sfpsPathMaskObjPathCounterReset, sfpsPathMaskObjOldLogPortMask=sfpsPathMaskObjOldLogPortMask, sfpsPathMaskObjIsolatedSwitchMask=sfpsPathMaskObjIsolatedSwitchMask, sfpsServiceCenterPathMetric=sfpsServiceCenterPathMetric, sfpsPathMaskObjPhysResolveMask=sfpsPathMaskObjPhysResolveMask, sfpsSwitchPathTableFoundTime=sfpsSwitchPathTableFoundTime, sfpsSwitchPathStatsReapReady=sfpsSwitchPathStatsReapReady)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, constraints_union, value_range_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection') (sfps_path_api, sfps_switch_path_stats, sfps_static_path, sfps_path_mask_obj, sfps_chassis_rip_path, sfps_switch_path_api, sfps_switch_path, sfps_isp_switch_path) = mibBuilder.importSymbols('CTRON-SFPS-INCLUDE-MIB', 'sfpsPathAPI', 'sfpsSwitchPathStats', 'sfpsStaticPath', 'sfpsPathMaskObj', 'sfpsChassisRIPPath', 'sfpsSwitchPathAPI', 'sfpsSwitchPath', 'sfpsISPSwitchPath') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (integer32, iso, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, time_ticks, bits, unsigned32, module_identity, gauge32, mib_identifier, ip_address, object_identity, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'iso', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'TimeTicks', 'Bits', 'Unsigned32', 'ModuleIdentity', 'Gauge32', 'MibIdentifier', 'IpAddress', 'ObjectIdentity', 'Counter32') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') class Sfpsaddress(OctetString): subtype_spec = OctetString.subtypeSpec + value_size_constraint(6, 6) fixed_length = 6 class Hexinteger(Integer32): pass sfps_service_center_path_table = mib_table((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1)) if mibBuilder.loadTexts: sfpsServiceCenterPathTable.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathTable.setDescription('This table gives path semantics to call processing.') sfps_service_center_path_entry = mib_table_row((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1)).setIndexNames((0, 'CTRON-SFPS-PATH-MIB', 'sfpsServiceCenterPathHashLeaf')) if mibBuilder.loadTexts: sfpsServiceCenterPathEntry.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathEntry.setDescription('Each entry contains the configuration of the Path Entry.') sfps_service_center_path_hash_leaf = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 1), hex_integer()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsServiceCenterPathHashLeaf.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathHashLeaf.setDescription('Server hash, part of instance key.') sfps_service_center_path_metric = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsServiceCenterPathMetric.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathMetric.setDescription('Defines order servers are called low to high.') sfps_service_center_path_name = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 3), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsServiceCenterPathName.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathName.setDescription('Server name.') sfps_service_center_path_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('kStatusRunning', 1), ('kStatusHalted', 2), ('kStatusPending', 3), ('kStatusFaulted', 4), ('kStatusNotStarted', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsServiceCenterPathOperStatus.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathOperStatus.setDescription('Operational state of entry.') sfps_service_center_path_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('disable', 2), ('enable', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsServiceCenterPathAdminStatus.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathAdminStatus.setDescription('Administrative State of Entry.') sfps_service_center_path_status_time = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 6), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsServiceCenterPathStatusTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathStatusTime.setDescription('Time Tick of last operStatus change.') sfps_service_center_path_requests = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsServiceCenterPathRequests.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathRequests.setDescription('Requests made to server.') sfps_service_center_path_responses = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 1, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsServiceCenterPathResponses.setStatus('mandatory') if mibBuilder.loadTexts: sfpsServiceCenterPathResponses.setDescription('GOOD replies by server.') sfps_path_api_verb = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=named_values(('other', 1), ('add', 2), ('delete', 3), ('uplink', 4), ('downlink', 5), ('diameter', 6), ('flood-add', 7), ('flood-delete', 8), ('force-idle-traffic', 9), ('remove-traffic-cnx', 10)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsPathAPIVerb.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPIVerb.setDescription('') sfps_path_api_switch_mac = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 2), sfps_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsPathAPISwitchMac.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPISwitchMac.setDescription('') sfps_path_api_port_name = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 3), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsPathAPIPortName.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPIPortName.setDescription('') sfps_path_api_cost = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 4), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsPathAPICost.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPICost.setDescription('') sfps_path_api_hop = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 5), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsPathAPIHop.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPIHop.setDescription('') sfps_path_apiid = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 6), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsPathAPIID.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPIID.setDescription('') sfps_path_api_in_port = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 7), sfps_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsPathAPIInPort.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPIInPort.setDescription('') sfps_path_api_src_mac = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 8), sfps_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsPathAPISrcMac.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPISrcMac.setDescription('') sfps_path_api_dst_mac = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 3, 9), sfps_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsPathAPIDstMac.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathAPIDstMac.setDescription('') sfps_static_path_table = mib_table((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 4, 1)) if mibBuilder.loadTexts: sfpsStaticPathTable.setStatus('mandatory') if mibBuilder.loadTexts: sfpsStaticPathTable.setDescription('') sfps_static_path_entry = mib_table_row((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 4, 1, 1)).setIndexNames((0, 'CTRON-SFPS-PATH-MIB', 'sfpsStaticPathPort')) if mibBuilder.loadTexts: sfpsStaticPathEntry.setStatus('mandatory') if mibBuilder.loadTexts: sfpsStaticPathEntry.setDescription('') sfps_static_path_port = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 4, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsStaticPathPort.setStatus('mandatory') if mibBuilder.loadTexts: sfpsStaticPathPort.setDescription('') sfps_static_path_flood_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 4, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2, 3))).clone(namedValues=named_values(('disabled', 2), ('enabled', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsStaticPathFloodEnabled.setStatus('mandatory') if mibBuilder.loadTexts: sfpsStaticPathFloodEnabled.setDescription('') sfps_static_path_uplink_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 4, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2, 3))).clone(namedValues=named_values(('disabled', 2), ('enabled', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsStaticPathUplinkEnabled.setStatus('mandatory') if mibBuilder.loadTexts: sfpsStaticPathUplinkEnabled.setDescription('') sfps_static_path_downlink_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 4, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2, 3))).clone(namedValues=named_values(('disabled', 2), ('enabled', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsStaticPathDownlinkEnabled.setStatus('mandatory') if mibBuilder.loadTexts: sfpsStaticPathDownlinkEnabled.setDescription('') sfps_path_mask_obj_log_port_mask = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 1), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjLogPortMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjLogPortMask.setDescription('') sfps_path_mask_obj_phys_port_mask = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjPhysPortMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPhysPortMask.setDescription('') sfps_path_mask_obj_log_resolve_mask = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 3), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjLogResolveMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjLogResolveMask.setDescription('') sfps_path_mask_obj_log_flood_no_inb = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 4), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjLogFloodNoINB.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjLogFloodNoINB.setDescription('') sfps_path_mask_obj_phys_resolve_mask = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 5), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjPhysResolveMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPhysResolveMask.setDescription('') sfps_path_mask_obj_phys_flood_no_inb = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 6), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjPhysFloodNoINB.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPhysFloodNoINB.setDescription('') sfps_path_mask_obj_old_log_port_mask = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 7), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjOldLogPortMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjOldLogPortMask.setDescription('') sfps_path_mask_obj_path_change_event = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 8), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsPathMaskObjPathChangeEvent.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPathChangeEvent.setDescription('') sfps_path_mask_obj_path_change_counter = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjPathChangeCounter.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPathChangeCounter.setDescription('') sfps_path_mask_obj_last_change_time = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 10), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjLastChangeTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjLastChangeTime.setDescription('') sfps_path_mask_obj_path_counter_reset = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 11), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsPathMaskObjPathCounterReset.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPathCounterReset.setDescription('') sfps_path_mask_obj_isolated_switch_mask = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 12), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjIsolatedSwitchMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjIsolatedSwitchMask.setDescription('') sfps_path_mask_obj_pyhs_isolated_switch_mask = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 13), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjPyhsIsolatedSwitchMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjPyhsIsolatedSwitchMask.setDescription('') sfps_path_mask_obj_log_downlink_mask = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 14), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjLogDownlinkMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjLogDownlinkMask.setDescription('') sfps_path_mask_obj_core_uplink_mask = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 15), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjCoreUplinkMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjCoreUplinkMask.setDescription('') sfps_path_mask_obj_override_flood_mask = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 5, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2, 1))).clone(namedValues=named_values(('disable', 2), ('enable', 1)))).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsPathMaskObjOverrideFloodMask.setStatus('mandatory') if mibBuilder.loadTexts: sfpsPathMaskObjOverrideFloodMask.setDescription('') sfps_switch_path_stats_num_entries = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsNumEntries.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsNumEntries.setDescription('') sfps_switch_path_stats_max_entries = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsMaxEntries.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsMaxEntries.setDescription('') sfps_switch_path_stats_table_size = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsTableSize.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsTableSize.setDescription('') sfps_switch_path_stats_mem_usage = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsMemUsage.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsMemUsage.setDescription('') sfps_switch_path_stats_active_local = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsActiveLocal.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsActiveLocal.setDescription('') sfps_switch_path_stats_active_remote = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsActiveRemote.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsActiveRemote.setDescription('') sfps_switch_path_stats_static_remote = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsStaticRemote.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsStaticRemote.setDescription('') sfps_switch_path_stats_dead_local = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsDeadLocal.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsDeadLocal.setDescription('') sfps_switch_path_stats_dead_remote = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsDeadRemote.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsDeadRemote.setDescription('') sfps_switch_path_stats_reap_ready = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsReapReady.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsReapReady.setDescription('') sfps_switch_path_stats_reap_at = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsReapAt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsReapAt.setDescription('') sfps_switch_path_stats_reap_count = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsReapCount.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsReapCount.setDescription('') sfps_switch_path_stats_path_req = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsPathReq.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsPathReq.setDescription('') sfps_switch_path_stats_path_ack = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 14), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsPathAck.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsPathAck.setDescription('') sfps_switch_path_stats_path_nak = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 15), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsPathNak.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsPathNak.setDescription('') sfps_switch_path_stats_path_unk = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 16), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsPathUnk.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsPathUnk.setDescription('') sfps_switch_path_stats_locate_req = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 17), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateReq.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateReq.setDescription('') sfps_switch_path_stats_locate_ack = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 18), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateAck.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateAck.setDescription('') sfps_switch_path_stats_locate_nak = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 19), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateNak.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateNak.setDescription('') sfps_switch_path_stats_locate_unk = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 20), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateUnk.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsLocateUnk.setDescription('') sfps_switch_path_stats_snd_dbl_back = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 21), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsSndDblBack.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsSndDblBack.setDescription('') sfps_switch_path_stats_rcd_dbl_back = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 1, 22), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathStatsRcdDblBack.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathStatsRcdDblBack.setDescription('') sfps_switch_path_api_verb = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 2, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('other', 1), ('addFind', 2), ('lose', 3), ('delete', 4), ('clearTable', 5), ('resetStats', 6), ('setReapAt', 7), ('setMaxRcvDblBck', 8)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsSwitchPathAPIVerb.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathAPIVerb.setDescription('') sfps_switch_path_api_port = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 2, 2), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsSwitchPathAPIPort.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathAPIPort.setDescription('') sfps_switch_path_api_base_mac = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 2, 3), sfps_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsSwitchPathAPIBaseMAC.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathAPIBaseMAC.setDescription('') sfps_switch_path_api_reap_at = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 2, 4), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsSwitchPathAPIReapAt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathAPIReapAt.setDescription('') sfps_switch_path_api_max_rcv_dbl_back = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 2, 5), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sfpsSwitchPathAPIMaxRcvDblBack.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathAPIMaxRcvDblBack.setDescription('') sfps_switch_path_table = mib_table((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3)) if mibBuilder.loadTexts: sfpsSwitchPathTable.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTable.setDescription('') sfps_switch_path_table_entry = mib_table_row((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1)).setIndexNames((0, 'CTRON-SFPS-PATH-MIB', 'sfpsSwitchPathTableSwitchMAC'), (0, 'CTRON-SFPS-PATH-MIB', 'sfpsSwitchPathTablePort')) if mibBuilder.loadTexts: sfpsSwitchPathTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableEntry.setDescription('.') sfps_switch_path_table_switch_mac = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 1), sfps_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableSwitchMAC.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableSwitchMAC.setDescription('') sfps_switch_path_table_port = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTablePort.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTablePort.setDescription('') sfps_switch_path_table_is_active = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableIsActive.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableIsActive.setDescription('') sfps_switch_path_table_is_static = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableIsStatic.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableIsStatic.setDescription('') sfps_switch_path_table_is_local = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableIsLocal.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableIsLocal.setDescription('') sfps_switch_path_table_ref_cnt = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableRefCnt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableRefCnt.setDescription('') sfps_switch_path_table_ref_time = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 7), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableRefTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableRefTime.setDescription('') sfps_switch_path_table_found_cnt = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableFoundCnt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableFoundCnt.setDescription('') sfps_switch_path_table_found_time = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 9), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableFoundTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableFoundTime.setDescription('') sfps_switch_path_table_lost_cnt = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableLostCnt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableLostCnt.setDescription('') sfps_switch_path_table_lost_time = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 11), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableLostTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableLostTime.setDescription('') sfps_switch_path_table_src_dbl_back_cnt = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableSrcDblBackCnt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableSrcDblBackCnt.setDescription('') sfps_switch_path_table_src_dbl_back_time = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 13), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableSrcDblBackTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableSrcDblBackTime.setDescription('') sfps_switch_path_table_rcv_dbl_back_cnt = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 14), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableRcvDblBackCnt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableRcvDblBackCnt.setDescription('') sfps_switch_path_table_rcv_dbl_back_time = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 15), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableRcvDblBackTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableRcvDblBackTime.setDescription('') sfps_switch_path_table_dir_reap_cnt = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 16), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableDirReapCnt.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableDirReapCnt.setDescription('') sfps_switch_path_table_dir_reap_time = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 7, 2, 3, 1, 17), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsSwitchPathTableDirReapTime.setStatus('mandatory') if mibBuilder.loadTexts: sfpsSwitchPathTableDirReapTime.setDescription('') sfps_chassis_rip_path_num_in_table = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 12, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsChassisRIPPathNumInTable.setStatus('mandatory') if mibBuilder.loadTexts: sfpsChassisRIPPathNumInTable.setDescription('') sfps_chassis_rip_path_num_requests = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 12, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsChassisRIPPathNumRequests.setStatus('mandatory') if mibBuilder.loadTexts: sfpsChassisRIPPathNumRequests.setDescription('') sfps_chassis_rip_path_num_reply_ack = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 12, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsChassisRIPPathNumReplyAck.setStatus('mandatory') if mibBuilder.loadTexts: sfpsChassisRIPPathNumReplyAck.setDescription('') sfps_chassis_rip_path_num_reply_unk = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 4, 2, 2, 2, 4, 5, 12, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sfpsChassisRIPPathNumReplyUnk.setStatus('mandatory') if mibBuilder.loadTexts: sfpsChassisRIPPathNumReplyUnk.setDescription('') mibBuilder.exportSymbols('CTRON-SFPS-PATH-MIB', sfpsStaticPathTable=sfpsStaticPathTable, sfpsSwitchPathTableSrcDblBackTime=sfpsSwitchPathTableSrcDblBackTime, sfpsStaticPathDownlinkEnabled=sfpsStaticPathDownlinkEnabled, sfpsPathAPISwitchMac=sfpsPathAPISwitchMac, sfpsSwitchPathAPIVerb=sfpsSwitchPathAPIVerb, sfpsSwitchPathStatsDeadRemote=sfpsSwitchPathStatsDeadRemote, sfpsPathMaskObjCoreUplinkMask=sfpsPathMaskObjCoreUplinkMask, sfpsSwitchPathTableEntry=sfpsSwitchPathTableEntry, sfpsSwitchPathTableRefTime=sfpsSwitchPathTableRefTime, sfpsSwitchPathStatsReapCount=sfpsSwitchPathStatsReapCount, HexInteger=HexInteger, sfpsChassisRIPPathNumReplyUnk=sfpsChassisRIPPathNumReplyUnk, sfpsPathMaskObjLastChangeTime=sfpsPathMaskObjLastChangeTime, sfpsSwitchPathStatsLocateNak=sfpsSwitchPathStatsLocateNak, sfpsPathMaskObjPyhsIsolatedSwitchMask=sfpsPathMaskObjPyhsIsolatedSwitchMask, sfpsSwitchPathTableLostTime=sfpsSwitchPathTableLostTime, sfpsSwitchPathStatsPathNak=sfpsSwitchPathStatsPathNak, sfpsSwitchPathTableRcvDblBackTime=sfpsSwitchPathTableRcvDblBackTime, sfpsPathAPICost=sfpsPathAPICost, sfpsPathAPISrcMac=sfpsPathAPISrcMac, sfpsSwitchPathAPIBaseMAC=sfpsSwitchPathAPIBaseMAC, sfpsSwitchPathTableSrcDblBackCnt=sfpsSwitchPathTableSrcDblBackCnt, sfpsServiceCenterPathName=sfpsServiceCenterPathName, sfpsChassisRIPPathNumRequests=sfpsChassisRIPPathNumRequests, sfpsSwitchPathTable=sfpsSwitchPathTable, sfpsStaticPathFloodEnabled=sfpsStaticPathFloodEnabled, sfpsPathAPIID=sfpsPathAPIID, sfpsSwitchPathStatsRcdDblBack=sfpsSwitchPathStatsRcdDblBack, sfpsStaticPathPort=sfpsStaticPathPort, sfpsSwitchPathStatsActiveRemote=sfpsSwitchPathStatsActiveRemote, sfpsServiceCenterPathOperStatus=sfpsServiceCenterPathOperStatus, sfpsSwitchPathTableFoundCnt=sfpsSwitchPathTableFoundCnt, sfpsPathMaskObjPhysFloodNoINB=sfpsPathMaskObjPhysFloodNoINB, sfpsSwitchPathStatsLocateAck=sfpsSwitchPathStatsLocateAck, sfpsServiceCenterPathResponses=sfpsServiceCenterPathResponses, sfpsServiceCenterPathAdminStatus=sfpsServiceCenterPathAdminStatus, sfpsStaticPathEntry=sfpsStaticPathEntry, sfpsSwitchPathAPIPort=sfpsSwitchPathAPIPort, sfpsStaticPathUplinkEnabled=sfpsStaticPathUplinkEnabled, sfpsSwitchPathStatsMaxEntries=sfpsSwitchPathStatsMaxEntries, sfpsSwitchPathTableDirReapTime=sfpsSwitchPathTableDirReapTime, sfpsChassisRIPPathNumInTable=sfpsChassisRIPPathNumInTable, SfpsAddress=SfpsAddress, sfpsPathAPIInPort=sfpsPathAPIInPort, sfpsSwitchPathStatsReapAt=sfpsSwitchPathStatsReapAt, sfpsPathMaskObjPathChangeCounter=sfpsPathMaskObjPathChangeCounter, sfpsPathMaskObjOverrideFloodMask=sfpsPathMaskObjOverrideFloodMask, sfpsPathAPIVerb=sfpsPathAPIVerb, sfpsSwitchPathTableDirReapCnt=sfpsSwitchPathTableDirReapCnt, sfpsSwitchPathStatsMemUsage=sfpsSwitchPathStatsMemUsage, sfpsServiceCenterPathStatusTime=sfpsServiceCenterPathStatusTime, sfpsSwitchPathStatsLocateReq=sfpsSwitchPathStatsLocateReq, sfpsSwitchPathAPIReapAt=sfpsSwitchPathAPIReapAt, sfpsPathMaskObjLogFloodNoINB=sfpsPathMaskObjLogFloodNoINB, sfpsSwitchPathStatsPathReq=sfpsSwitchPathStatsPathReq, sfpsSwitchPathStatsActiveLocal=sfpsSwitchPathStatsActiveLocal, sfpsSwitchPathTableIsActive=sfpsSwitchPathTableIsActive, sfpsPathMaskObjLogPortMask=sfpsPathMaskObjLogPortMask, sfpsSwitchPathStatsTableSize=sfpsSwitchPathStatsTableSize, sfpsPathMaskObjPathChangeEvent=sfpsPathMaskObjPathChangeEvent, sfpsSwitchPathStatsDeadLocal=sfpsSwitchPathStatsDeadLocal, sfpsChassisRIPPathNumReplyAck=sfpsChassisRIPPathNumReplyAck, sfpsPathAPIPortName=sfpsPathAPIPortName, sfpsSwitchPathTableIsLocal=sfpsSwitchPathTableIsLocal, sfpsPathMaskObjLogDownlinkMask=sfpsPathMaskObjLogDownlinkMask, sfpsSwitchPathStatsStaticRemote=sfpsSwitchPathStatsStaticRemote, sfpsSwitchPathStatsPathUnk=sfpsSwitchPathStatsPathUnk, sfpsSwitchPathTableRefCnt=sfpsSwitchPathTableRefCnt, sfpsPathAPIHop=sfpsPathAPIHop, sfpsSwitchPathTableSwitchMAC=sfpsSwitchPathTableSwitchMAC, sfpsServiceCenterPathRequests=sfpsServiceCenterPathRequests, sfpsSwitchPathTableLostCnt=sfpsSwitchPathTableLostCnt, sfpsSwitchPathTableRcvDblBackCnt=sfpsSwitchPathTableRcvDblBackCnt, sfpsServiceCenterPathHashLeaf=sfpsServiceCenterPathHashLeaf, sfpsSwitchPathTableIsStatic=sfpsSwitchPathTableIsStatic, sfpsPathMaskObjPhysPortMask=sfpsPathMaskObjPhysPortMask, sfpsPathMaskObjLogResolveMask=sfpsPathMaskObjLogResolveMask, sfpsSwitchPathTablePort=sfpsSwitchPathTablePort, sfpsSwitchPathStatsNumEntries=sfpsSwitchPathStatsNumEntries, sfpsSwitchPathStatsLocateUnk=sfpsSwitchPathStatsLocateUnk, sfpsServiceCenterPathEntry=sfpsServiceCenterPathEntry, sfpsSwitchPathStatsSndDblBack=sfpsSwitchPathStatsSndDblBack, sfpsSwitchPathStatsPathAck=sfpsSwitchPathStatsPathAck, sfpsServiceCenterPathTable=sfpsServiceCenterPathTable, sfpsSwitchPathAPIMaxRcvDblBack=sfpsSwitchPathAPIMaxRcvDblBack, sfpsPathAPIDstMac=sfpsPathAPIDstMac, sfpsPathMaskObjPathCounterReset=sfpsPathMaskObjPathCounterReset, sfpsPathMaskObjOldLogPortMask=sfpsPathMaskObjOldLogPortMask, sfpsPathMaskObjIsolatedSwitchMask=sfpsPathMaskObjIsolatedSwitchMask, sfpsServiceCenterPathMetric=sfpsServiceCenterPathMetric, sfpsPathMaskObjPhysResolveMask=sfpsPathMaskObjPhysResolveMask, sfpsSwitchPathTableFoundTime=sfpsSwitchPathTableFoundTime, sfpsSwitchPathStatsReapReady=sfpsSwitchPathStatsReapReady)
spec = { 'name' : "a 4-node liberty cluster", # 'external network name' : "exnet3", 'keypair' : "openstack_rsa", 'controller' : "r720", 'dns' : "10.30.65.200", 'credentials' : { 'user' : "nic", 'password' : "nic", 'project' : "nic" }, 'Networks' : [ # { 'name' : "liberty" , "start": "192.168.0.2", "end": "192.168.0.254", "subnet" :" 192.168.0.0/24", "gateway": "192.168.0.1" }, { 'name' : "liberty-dataplane" , "subnet" :" 172.16.0.0/24" }, { 'name' : "liberty-provider" , "subnet" :" 172.16.1.0/24","start": "172.16.1.3", "end": "172.16.1.127", "gateway": "172.16.1.1" }, ], # Hint: list explicity required external IPs first to avoid them being claimed by hosts that don't care... 'Hosts' : [ { 'name' : "liberty-controller" , 'image' : "centos1602" , 'flavor':"m1.large" , 'net' : [ ("routed-net" , "liberty-controller"), ] }, { 'name' : "liberty-network" , 'image' : "centos1602" , 'flavor':"m1.xlarge" , 'net' : [ ("routed-net" ,"liberty-network"), ("liberty-dataplane"), ("liberty-provider","*") ] }, { 'name' : "liberty-compute1" , 'image' : "centos1602" , 'flavor':"m1.xlarge" , 'net' : [ ("routed-net" ,"liberty-compute1"), ("liberty-dataplane"), ("liberty-provider","*") ] }, { 'name' : "liberty-compute2" , 'image' : "centos1602" , 'flavor':"m1.xlarge" , 'net' : [ ("routed-net" ,"liberty-compute2"), ("liberty-dataplane"), ("liberty-provider","*") ] }, { 'name' : "liberty-compute3" , 'image' : "centos1602" , 'flavor':"m1.xlarge" , 'net' : [ ("routed-net" ,"liberty-compute3"), ("liberty-dataplane"), ("liberty-provider","*") ] }, { 'name' : "liberty-cloudify" , 'image' : "centos1602" , 'flavor':"m1.medium" , 'net' : [ ("routed-net" , "liberty-cloudify"), ("liberty-provider","*") ] }, ] }
spec = {'name': 'a 4-node liberty cluster', 'keypair': 'openstack_rsa', 'controller': 'r720', 'dns': '10.30.65.200', 'credentials': {'user': 'nic', 'password': 'nic', 'project': 'nic'}, 'Networks': [{'name': 'liberty-dataplane', 'subnet': ' 172.16.0.0/24'}, {'name': 'liberty-provider', 'subnet': ' 172.16.1.0/24', 'start': '172.16.1.3', 'end': '172.16.1.127', 'gateway': '172.16.1.1'}], 'Hosts': [{'name': 'liberty-controller', 'image': 'centos1602', 'flavor': 'm1.large', 'net': [('routed-net', 'liberty-controller')]}, {'name': 'liberty-network', 'image': 'centos1602', 'flavor': 'm1.xlarge', 'net': [('routed-net', 'liberty-network'), 'liberty-dataplane', ('liberty-provider', '*')]}, {'name': 'liberty-compute1', 'image': 'centos1602', 'flavor': 'm1.xlarge', 'net': [('routed-net', 'liberty-compute1'), 'liberty-dataplane', ('liberty-provider', '*')]}, {'name': 'liberty-compute2', 'image': 'centos1602', 'flavor': 'm1.xlarge', 'net': [('routed-net', 'liberty-compute2'), 'liberty-dataplane', ('liberty-provider', '*')]}, {'name': 'liberty-compute3', 'image': 'centos1602', 'flavor': 'm1.xlarge', 'net': [('routed-net', 'liberty-compute3'), 'liberty-dataplane', ('liberty-provider', '*')]}, {'name': 'liberty-cloudify', 'image': 'centos1602', 'flavor': 'm1.medium', 'net': [('routed-net', 'liberty-cloudify'), ('liberty-provider', '*')]}]}
COM_SLEEP = 0x00 COM_QUIT = 0x01 COM_INIT_DB = 0x02 COM_QUERY = 0x03 COM_FIELD_LIST = 0x04 COM_CREATE_DB = 0x05 COM_DROP_DB = 0x06 COM_REFRESH = 0x07 COM_SHUTDOWN = 0x08 COM_STATISTICS = 0x09 COM_PROCESS_INFO = 0x0a COM_CONNECT = 0x0b COM_PROCESS_KILL = 0x0c COM_DEBUG = 0x0d COM_PING = 0x0e COM_TIME = 0x0f COM_DELAYED_INSERT = 0x10 COM_CHANGE_USER = 0x11 COM_BINLOG_DUMP = 0x12 COM_TABLE_DUMP = 0x13 COM_CONNECT_OUT = 0x14 COM_REGISTER_SLAVE = 0x15 COM_STMT_PREPARE = 0x16 COM_STMT_EXECUTE = 0x17 COM_STMT_SEND_LONG_DATA = 0x18 COM_STMT_CLOSE = 0x19 COM_STMT_RESET = 0x1a COM_SET_OPTION = 0x1b COM_STMT_FETCH = 0x1c COM_DAEMON = 0x1d COM_BINLOG_DUMP_GTID = 0x1e COM_END = 0x1f local_vars = locals() def com_type_name(val): for _var in local_vars: if "COM_" in _var: if local_vars[_var] == val: return _var
com_sleep = 0 com_quit = 1 com_init_db = 2 com_query = 3 com_field_list = 4 com_create_db = 5 com_drop_db = 6 com_refresh = 7 com_shutdown = 8 com_statistics = 9 com_process_info = 10 com_connect = 11 com_process_kill = 12 com_debug = 13 com_ping = 14 com_time = 15 com_delayed_insert = 16 com_change_user = 17 com_binlog_dump = 18 com_table_dump = 19 com_connect_out = 20 com_register_slave = 21 com_stmt_prepare = 22 com_stmt_execute = 23 com_stmt_send_long_data = 24 com_stmt_close = 25 com_stmt_reset = 26 com_set_option = 27 com_stmt_fetch = 28 com_daemon = 29 com_binlog_dump_gtid = 30 com_end = 31 local_vars = locals() def com_type_name(val): for _var in local_vars: if 'COM_' in _var: if local_vars[_var] == val: return _var
name, age = "Sharwan27", 16 username = "Sharwan27" print ('Hello!') print("Name: {}\nAge: {}\nUsername: {}".format(name, age, username))
(name, age) = ('Sharwan27', 16) username = 'Sharwan27' print('Hello!') print('Name: {}\nAge: {}\nUsername: {}'.format(name, age, username))
# count = 10 # while count>0: # print("Sandip") # count-=1 # name="Sandip" # for char in name: # print(char) # for item in name: # print(item, end=" ") # print("") # print("My name is",name) # print("My name is",name,sep="=") # for item in range(5): # print(item,end=" ") # print("") # for item in range(1,11,2): # print(item,end=" ") # print() # for i in range(2,11): # for j in range(1,11): # print(i,'X',j,'=',(i*j)) # print() # for i in range(1,6): # if(i==4): # continue # print(i) #String name = "Sandip Dhakal!" lenth=len(name) # print(str(lenth)+" Sabd") # print(name[lenth-1]) # name = name+'Sand' # name="Prajwol "*2 # print(name) # name[0]="T" this is not permisible as string is immuatable collection # print(name[7:]) # print(name[:7]) # print(name[::2]) # print(name[::-1]) # print(name[5:2:-1]) # print(name[5::-2]) print("Wo'w'") print('Wo"w"') print('Wo\'w\'') print('San\\dip\\') print("sand\ndip") print("sand\tdip") print("sand\bdip") check = "H" not in name print(check) print(type(check))
name = 'Sandip Dhakal!' lenth = len(name) print("Wo'w'") print('Wo"w"') print("Wo'w'") print('San\\dip\\') print('sand\ndip') print('sand\tdip') print('sand\x08dip') check = 'H' not in name print(check) print(type(check))
def potencia(base, inicio=1, fin=10): while inicio < fin: resul=base**inicio yield resul inicio=inicio+1 print(list(potencia(3,1,50)))
def potencia(base, inicio=1, fin=10): while inicio < fin: resul = base ** inicio yield resul inicio = inicio + 1 print(list(potencia(3, 1, 50)))
N_L = input().split() Number_lights = int(N_L[0]) Length = int(N_L[1]) time = 0 last_distance = 0 for x in range(Number_lights): information = input().split() time += int(information[0]) - last_distance remainder = time % (int(information[1]) + int(information[2])) if remainder < int(information[1]): time += int(information[1]) - remainder last_distance = int(information[0]) time += Length - last_distance print(time)
n_l = input().split() number_lights = int(N_L[0]) length = int(N_L[1]) time = 0 last_distance = 0 for x in range(Number_lights): information = input().split() time += int(information[0]) - last_distance remainder = time % (int(information[1]) + int(information[2])) if remainder < int(information[1]): time += int(information[1]) - remainder last_distance = int(information[0]) time += Length - last_distance print(time)
PATH_TO_STANFORD_CORENLP = '/local/cfwelch/stanford-corenlp-full-2018-02-27/*' NUM_SPLITS = 1 TRAIN_SIZE = 0.67 # two thirds of the total data # Define entity types here # Each type must have a list of identifiers that do not contain the '_' token # Example of an annotation: # # Kathe Halverson was the only aspect of EECS 555 Parallel Computing that I liked # <instructor # name=Kathe Halverson # sentiment=positive> # <class # id=555 # name=Parallel Computing # sentiment=negative> ENT_TYPES = {'instructor': ['name'], \ 'class': ['name', 'department', 'id'] \ } # Shortcut for checking ids ALL_IDS = list(set([i for j in ENT_TYPES for i in ENT_TYPES[j]]))
path_to_stanford_corenlp = '/local/cfwelch/stanford-corenlp-full-2018-02-27/*' num_splits = 1 train_size = 0.67 ent_types = {'instructor': ['name'], 'class': ['name', 'department', 'id']} all_ids = list(set([i for j in ENT_TYPES for i in ENT_TYPES[j]]))
#!/usr/bin/env python #=================================================================================== #description : Methods for features exploration = #author : Shashi Narayan, shashi.narayan(at){ed.ac.uk,loria.fr,gmail.com})= #date : Created in 2014, Later revised in April 2016. = #version : 0.1 = #=================================================================================== class Feature_Nov27: def get_split_feature(self, split_tuple, parent_sentence, children_sentence_list, boxer_graph): # Calculating iLength #iLength = boxer_graph.calculate_iLength(parent_sentence, children_sentence_list) # Get split tuple pattern split_pattern = boxer_graph.get_pattern_4_split_candidate(split_tuple) #split_feature = split_pattern+"_"+str(iLength) split_feature = split_pattern return split_feature def get_drop_ood_feature(self, ood_node, nodeset, main_sent_dict, boxer_graph): ood_word = boxer_graph.extract_oodword(ood_node, main_sent_dict) ood_position = boxer_graph.nodes[ood_node]["positions"][0] # length of positions is one span = boxer_graph.extract_span_min_max(nodeset) boundaryVal = "false" if ood_position <= span[0] or ood_position >= span[1]: boundaryVal = "true" drop_ood_feature = ood_word+"_"+boundaryVal return drop_ood_feature def get_drop_rel_feature(self, rel_node, nodeset, main_sent_dict, boxer_graph): rel_word = boxer_graph.relations[rel_node]["predicates"] rel_span = boxer_graph.extract_span_for_nodeset_with_rel(rel_node, nodeset) drop_rel_feature = rel_word+"_" if len(rel_span) <= 2: drop_rel_feature += "0-2" elif len(rel_span) <= 5: drop_rel_feature += "2-5" elif len(rel_span) <= 10: drop_rel_feature += "5-10" elif len(rel_span) <= 15: drop_rel_feature += "10-15" else: drop_rel_feature += "gt15" return drop_rel_feature def get_drop_mod_feature(self, mod_cand, main_sent_dict, boxer_graph): mod_pos = int(mod_cand[0]) mod_word = main_sent_dict[mod_pos][0] #mod_node = mod_cand[1] drop_mod_feature = mod_word return drop_mod_feature class Feature_Init: def get_split_feature(self, split_tuple, parent_sentence, children_sentence_list, boxer_graph): # Calculating iLength iLength = boxer_graph.calculate_iLength(parent_sentence, children_sentence_list) # Get split tuple pattern split_pattern = boxer_graph.get_pattern_4_split_candidate(split_tuple) split_feature = split_pattern+"_"+str(iLength) return split_feature def get_drop_ood_feature(self, ood_node, nodeset, main_sent_dict, boxer_graph): ood_word = boxer_graph.extract_oodword(ood_node, main_sent_dict) ood_position = boxer_graph.nodes[ood_node]["positions"][0] # length of positions is one span = boxer_graph.extract_span_min_max(nodeset) boundaryVal = "false" if ood_position <= span[0] or ood_position >= span[1]: boundaryVal = "true" drop_ood_feature = ood_word+"_"+boundaryVal return drop_ood_feature def get_drop_rel_feature(self, rel_node, nodeset, main_sent_dict, boxer_graph): rel_word = boxer_graph.relations[rel_node]["predicates"] rel_span = boxer_graph.extract_span_for_nodeset_with_rel(rel_node, nodeset) drop_rel_feature = rel_word+"_"+str(len(rel_span)) return drop_rel_feature def get_drop_mod_feature(self, mod_cand, main_sent_dict, boxer_graph): mod_pos = int(mod_cand[0]) mod_word = main_sent_dict[mod_pos][0] #mod_node = mod_cand[1] drop_mod_feature = mod_word return drop_mod_feature
class Feature_Nov27: def get_split_feature(self, split_tuple, parent_sentence, children_sentence_list, boxer_graph): split_pattern = boxer_graph.get_pattern_4_split_candidate(split_tuple) split_feature = split_pattern return split_feature def get_drop_ood_feature(self, ood_node, nodeset, main_sent_dict, boxer_graph): ood_word = boxer_graph.extract_oodword(ood_node, main_sent_dict) ood_position = boxer_graph.nodes[ood_node]['positions'][0] span = boxer_graph.extract_span_min_max(nodeset) boundary_val = 'false' if ood_position <= span[0] or ood_position >= span[1]: boundary_val = 'true' drop_ood_feature = ood_word + '_' + boundaryVal return drop_ood_feature def get_drop_rel_feature(self, rel_node, nodeset, main_sent_dict, boxer_graph): rel_word = boxer_graph.relations[rel_node]['predicates'] rel_span = boxer_graph.extract_span_for_nodeset_with_rel(rel_node, nodeset) drop_rel_feature = rel_word + '_' if len(rel_span) <= 2: drop_rel_feature += '0-2' elif len(rel_span) <= 5: drop_rel_feature += '2-5' elif len(rel_span) <= 10: drop_rel_feature += '5-10' elif len(rel_span) <= 15: drop_rel_feature += '10-15' else: drop_rel_feature += 'gt15' return drop_rel_feature def get_drop_mod_feature(self, mod_cand, main_sent_dict, boxer_graph): mod_pos = int(mod_cand[0]) mod_word = main_sent_dict[mod_pos][0] drop_mod_feature = mod_word return drop_mod_feature class Feature_Init: def get_split_feature(self, split_tuple, parent_sentence, children_sentence_list, boxer_graph): i_length = boxer_graph.calculate_iLength(parent_sentence, children_sentence_list) split_pattern = boxer_graph.get_pattern_4_split_candidate(split_tuple) split_feature = split_pattern + '_' + str(iLength) return split_feature def get_drop_ood_feature(self, ood_node, nodeset, main_sent_dict, boxer_graph): ood_word = boxer_graph.extract_oodword(ood_node, main_sent_dict) ood_position = boxer_graph.nodes[ood_node]['positions'][0] span = boxer_graph.extract_span_min_max(nodeset) boundary_val = 'false' if ood_position <= span[0] or ood_position >= span[1]: boundary_val = 'true' drop_ood_feature = ood_word + '_' + boundaryVal return drop_ood_feature def get_drop_rel_feature(self, rel_node, nodeset, main_sent_dict, boxer_graph): rel_word = boxer_graph.relations[rel_node]['predicates'] rel_span = boxer_graph.extract_span_for_nodeset_with_rel(rel_node, nodeset) drop_rel_feature = rel_word + '_' + str(len(rel_span)) return drop_rel_feature def get_drop_mod_feature(self, mod_cand, main_sent_dict, boxer_graph): mod_pos = int(mod_cand[0]) mod_word = main_sent_dict[mod_pos][0] drop_mod_feature = mod_word return drop_mod_feature
n = int(input()) while(n > 0): n -= 1 a, b = input().split() if(len(a) < len(b)): print('nao encaixa') else: if(a[len(a)-len(b)::] == b): print('encaixa') else: print('nao encaixa')
n = int(input()) while n > 0: n -= 1 (a, b) = input().split() if len(a) < len(b): print('nao encaixa') elif a[len(a) - len(b):] == b: print('encaixa') else: print('nao encaixa')
#1) Multiples of 3 and 5 #If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. #Find the sum of all the multiples of 3 or 5 below 1000. # Solution A def multiples(n): num = 1 while num < n: if num % 3 == 0 or num % 5 == 0: yield num num += 1 sum(multiples(1000)) # Solution B sum([x for x in range(1000) if x % 3 == 0 or x % 5 == 0])
def multiples(n): num = 1 while num < n: if num % 3 == 0 or num % 5 == 0: yield num num += 1 sum(multiples(1000)) sum([x for x in range(1000) if x % 3 == 0 or x % 5 == 0])
class Kettle(object): def __init__(self, make, price): self.make = make self.price = price self.on = False kenwood = Kettle("kenwood", 8.99) print(kenwood.make) print(kenwood.price) kenwood.price = 12.75 print(kenwood.price) hamilton = Kettle("hamilton", 14.00) print(hamilton.price)
class Kettle(object): def __init__(self, make, price): self.make = make self.price = price self.on = False kenwood = kettle('kenwood', 8.99) print(kenwood.make) print(kenwood.price) kenwood.price = 12.75 print(kenwood.price) hamilton = kettle('hamilton', 14.0) print(hamilton.price)
# Calculate paycheck xh = input("Enter Hors: ") xr = input("Enter Rate: ") xp = float(xh) * float(xr) print("Pay:", xp)
xh = input('Enter Hors: ') xr = input('Enter Rate: ') xp = float(xh) * float(xr) print('Pay:', xp)
input_s = ['3[abc]4[ab]c', '2[3[a]b]c'] # if '[' not in comp[l+1:r]: # return int(comp[0:l]) * comp[l+1:r] a = '10[a]b' b = '2[2[3[a]b]c]' c = '3[abc]4[ab]c' def findnth(haystack, needle, n): parts= haystack.split(needle, n+1) if len(parts)<=n+1: return -1 return len(haystack)-len(parts[-1])-len(needle) def decomp(comp): l = comp.find('[') r = comp.find(']') mul =int(comp[0:l]) # Find how left brackets many are in between extra_l = comp[l+1:r].count('[') if extra_l == 0: return mul * comp[l+1:r] + comp[r+1:] else: # Find the nth right bracket nth_idx = findnth(comp, ']', extra_l) subset = comp[l+1: nth_idx] new_set = comp[:l+1] + decomp(subset) + comp[nth_idx:] return decomp(new_set) def splitter(comp): comp_list = [] alt = 0 last_cut = 0 new_alt = 0 for idx, char in enumerate(comp): if char == '[': alt += 1 risen = True if char == ']': alt -= 1 if alt == 0 and idx != 0 and risen: comp_list.append(comp[last_cut:idx+1]) last_cut = idx+1 risen = False return comp_list for comp in splitter(c): print(decomp(comp), end='')
input_s = ['3[abc]4[ab]c', '2[3[a]b]c'] a = '10[a]b' b = '2[2[3[a]b]c]' c = '3[abc]4[ab]c' def findnth(haystack, needle, n): parts = haystack.split(needle, n + 1) if len(parts) <= n + 1: return -1 return len(haystack) - len(parts[-1]) - len(needle) def decomp(comp): l = comp.find('[') r = comp.find(']') mul = int(comp[0:l]) extra_l = comp[l + 1:r].count('[') if extra_l == 0: return mul * comp[l + 1:r] + comp[r + 1:] else: nth_idx = findnth(comp, ']', extra_l) subset = comp[l + 1:nth_idx] new_set = comp[:l + 1] + decomp(subset) + comp[nth_idx:] return decomp(new_set) def splitter(comp): comp_list = [] alt = 0 last_cut = 0 new_alt = 0 for (idx, char) in enumerate(comp): if char == '[': alt += 1 risen = True if char == ']': alt -= 1 if alt == 0 and idx != 0 and risen: comp_list.append(comp[last_cut:idx + 1]) last_cut = idx + 1 risen = False return comp_list for comp in splitter(c): print(decomp(comp), end='')
class CodegenError(Exception): pass class NoOperationProvidedError(CodegenError): pass class NoOperationNameProvidedError(CodegenError): pass class MultipleOperationsProvidedError(CodegenError): pass
class Codegenerror(Exception): pass class Nooperationprovidederror(CodegenError): pass class Nooperationnameprovidederror(CodegenError): pass class Multipleoperationsprovidederror(CodegenError): pass
# coding: utf-8 class Item(object): def __init__(self, name, price, description, image_url, major, minor, priority): self.name = name self.price = price self.description = description self.image_url = image_url self.minor = minor self.major = major self.priority = priority def to_dict(self): return { "name": self.name, "price": self.price, "description": self.description, "image_url": self.image_url, "minor": self.minor, "major": self.major, "priority": self.priority, } @classmethod def from_dict(cls, json_data): name = json_data["name"] price = int(json_data["price"]) description = json_data["description"] image_url = json_data["image_url"] minor = int(json_data["minor"]) major = int(json_data["major"]) priority = int(json_data["priority"]) return cls(name, price, description, image_url, major, minor, priority)
class Item(object): def __init__(self, name, price, description, image_url, major, minor, priority): self.name = name self.price = price self.description = description self.image_url = image_url self.minor = minor self.major = major self.priority = priority def to_dict(self): return {'name': self.name, 'price': self.price, 'description': self.description, 'image_url': self.image_url, 'minor': self.minor, 'major': self.major, 'priority': self.priority} @classmethod def from_dict(cls, json_data): name = json_data['name'] price = int(json_data['price']) description = json_data['description'] image_url = json_data['image_url'] minor = int(json_data['minor']) major = int(json_data['major']) priority = int(json_data['priority']) return cls(name, price, description, image_url, major, minor, priority)
# class and object (oops concept) class class_8: print() name = 'amar' # class class_9: # name = 'rahul' # age = 23 # def welcome(self): # print("welcome to teckat") # # a = class_9() # create object of class abc # # b = class_8() # # c = class_9() # # # print(abc.name) # accessing attribute through class # # print(a.name) # accessing through object of the class # # print(b.name) # # print(c.age) # a = class_9() # a.welcome() # constructor __init__ # class student: # def __init__(self, name, age): # print("hello") # self.name = name # self.age = age # def modify_name(self, name): # self.name = name # a = student('amar', 12) # print("before modifying", a.name, a.age) # a.modify_name('john') # print("after modifying", a.name, a.age) class student: def __init__(self): self.name = '' self.age = 0 def input_details(self): self.name = input('Enter name') self.num1 = int(input('Enter 1st marks')) self.num2 = int(input('Enter 2nd marks')) def add(self): self.total = self.num1+self.num2 def print_details(self): print("name = ", self.name) print("totla marks = ", self.total) a = student() a.input_details() a.add() a.print_details() # special attributes # 1. getattr() # accessing attributes usin getattr() print("name (getattr) = ", getattr(a, 'name')) # 2. hasattr() print("hasattr(age) = ", hasattr(a, 'age')) print("hasattr(salary) = ", hasattr(a, 'salary')) # 3. setattr() setattr(a, 'name', 'amar') print("setattr(name=amar) = ", a.name) # 4. delattr() delattr(a, 'name') print("delattr(name) = ", a.name)
class Class_8: print() name = 'amar' class Student: def __init__(self): self.name = '' self.age = 0 def input_details(self): self.name = input('Enter name') self.num1 = int(input('Enter 1st marks')) self.num2 = int(input('Enter 2nd marks')) def add(self): self.total = self.num1 + self.num2 def print_details(self): print('name = ', self.name) print('totla marks = ', self.total) a = student() a.input_details() a.add() a.print_details() print('name (getattr) = ', getattr(a, 'name')) print('hasattr(age) = ', hasattr(a, 'age')) print('hasattr(salary) = ', hasattr(a, 'salary')) setattr(a, 'name', 'amar') print('setattr(name=amar) = ', a.name) delattr(a, 'name') print('delattr(name) = ', a.name)
with open('iso_list/valid_list.txt') as i: names = i.readlines() with open('iso_list/valid.prediction') as i: p = i.readlines() out = open('iso_list/valid_prediction.txt', 'w') assert len(names) == len(p) for i, n in enumerate(names): n = n[:-1] result = n + ' ' + p[i] out.write(result)
with open('iso_list/valid_list.txt') as i: names = i.readlines() with open('iso_list/valid.prediction') as i: p = i.readlines() out = open('iso_list/valid_prediction.txt', 'w') assert len(names) == len(p) for (i, n) in enumerate(names): n = n[:-1] result = n + ' ' + p[i] out.write(result)
# ''' # Linked List hash table key/value pair # ''' class LinkedPair: def __init__(self, key, value): self.key = key self.value = value self.next = None # ''' # Resizing hash table # ''' class HashTable: def __init__(self, capacity): self.capacity = capacity self.storage = [None] * capacity # ''' # Research and implement the djb2 hash function # ''' def hash(string, max): hash = 5381 for char in string: hash = ((hash << 5) + hash) + ord(char) return hash % max # ''' # Fill this in. # Hint: Used the LL handle collisions # ''' def hash_table_insert(hash_table, key, value): index = hash(key, len(hash_table.storage)) current_pair = hash_table.storage[index] last_pair = None while current_pair is not None and current_pair.key != key: last_pair = current_pair current_pair = last_pair.next if current_pair is not None: current_pair.value = value else: new_pair = LinkedPair(key, value) new_pair.next = hash_table.storage[index] hash_table.storage[index] = new_pair # ''' # Fill this in. # If you try to remove a value that isn't there, print a warning. # ''' def hash_table_remove(hash_table, key): index = hash(key, len(hash_table.storage)) current_pair = hash_table.storage[index] last_pair = None while current_pair is not None and current_pair.key != key: last_pair = current_pair current_pair = last_pair.next if current_pair is None: print("ERROR: Unable to remove entry with key " + key) else: if last_pair is None: # Removing the first element in the LL hash_table.storage[index] = current_pair.next else: last_pair.next = current_pair.next # ''' # Fill this in. # Should return None if the key is not found. # ''' def hash_table_retrieve(hash_table, key): index = hash(key, len(hash_table.storage)) current_pair = hash_table.storage[index] while current_pair is not None: if(current_pair.key == key): return current_pair.value current_pair = current_pair.next # ''' # Fill this in # ''' def hash_table_resize(hash_table): new_hash_table = HashTable(2 * len(hash_table.storage)) current_pair = None for i in range(len(hash_table.storage)): current_pair = hash_table.storage[i] while current_pair is not None: hash_table_insert(new_hash_table, current_pair.key, current_pair.value) current_pair = current_pair.next return new_hash_table
class Linkedpair: def __init__(self, key, value): self.key = key self.value = value self.next = None class Hashtable: def __init__(self, capacity): self.capacity = capacity self.storage = [None] * capacity def hash(string, max): hash = 5381 for char in string: hash = (hash << 5) + hash + ord(char) return hash % max def hash_table_insert(hash_table, key, value): index = hash(key, len(hash_table.storage)) current_pair = hash_table.storage[index] last_pair = None while current_pair is not None and current_pair.key != key: last_pair = current_pair current_pair = last_pair.next if current_pair is not None: current_pair.value = value else: new_pair = linked_pair(key, value) new_pair.next = hash_table.storage[index] hash_table.storage[index] = new_pair def hash_table_remove(hash_table, key): index = hash(key, len(hash_table.storage)) current_pair = hash_table.storage[index] last_pair = None while current_pair is not None and current_pair.key != key: last_pair = current_pair current_pair = last_pair.next if current_pair is None: print('ERROR: Unable to remove entry with key ' + key) elif last_pair is None: hash_table.storage[index] = current_pair.next else: last_pair.next = current_pair.next def hash_table_retrieve(hash_table, key): index = hash(key, len(hash_table.storage)) current_pair = hash_table.storage[index] while current_pair is not None: if current_pair.key == key: return current_pair.value current_pair = current_pair.next def hash_table_resize(hash_table): new_hash_table = hash_table(2 * len(hash_table.storage)) current_pair = None for i in range(len(hash_table.storage)): current_pair = hash_table.storage[i] while current_pair is not None: hash_table_insert(new_hash_table, current_pair.key, current_pair.value) current_pair = current_pair.next return new_hash_table
class Solution: def plusOne(self, digits): i = len(digits) - 1 while i >= 0: if digits[i] == 9: digits[i] = 0 i = i - 1 else: digits[i] += 1 break if i == -1 and digits[0] == 0: digits.append(1) return reversed(digits) return digits
class Solution: def plus_one(self, digits): i = len(digits) - 1 while i >= 0: if digits[i] == 9: digits[i] = 0 i = i - 1 else: digits[i] += 1 break if i == -1 and digits[0] == 0: digits.append(1) return reversed(digits) return digits
class A: name="Default" def __init__(self, n = None): self.name = n print(self.name) def m(self): print("m of A called") class B(A): # def m(self): # print("m of B called") pass class C(A): def m(self): print("m of C called") class D(B, C): def __init__(self): self.objB = B() self.objC = C() def m(self): self.objB.m() # def m1(self, name): # self.objB.m() # print(name) def m1(self, name=None, number=None): self.objB.m() print(name, number) # x = D() # x.m() # x.m1("Teo") # x.m1("Nhan", 20) a = A("Teo") print(A.name) print(a.name) print(D.mro())
class A: name = 'Default' def __init__(self, n=None): self.name = n print(self.name) def m(self): print('m of A called') class B(A): pass class C(A): def m(self): print('m of C called') class D(B, C): def __init__(self): self.objB = b() self.objC = c() def m(self): self.objB.m() def m1(self, name=None, number=None): self.objB.m() print(name, number) a = a('Teo') print(A.name) print(a.name) print(D.mro())
''' Created on 1.12.2016 @author: Darren '''''' Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example, Given n = 3, You should return the following matrix: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6, 5 ] ] " '''
""" Created on 1.12.2016 @author: Darren Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example, Given n = 3, You should return the following matrix: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6, 5 ] ] " """
command = '/usr/bin/gunicorn' pythonpath = '/opt/netbox/netbox' bind = '0.0.0.0:{{ .Values.service.internalPort }}' workers = 3 errorlog = '-' accesslog = '-' capture_output = False loglevel = 'debug'
command = '/usr/bin/gunicorn' pythonpath = '/opt/netbox/netbox' bind = '0.0.0.0:{{ .Values.service.internalPort }}' workers = 3 errorlog = '-' accesslog = '-' capture_output = False loglevel = 'debug'
if __name__ == '__main__': n, x = map(int, input().split()) sheet = [] [sheet.append(map(float, input().split())) for i in range(x)] for i in zip(*sheet): print(sum(i)/len(i))
if __name__ == '__main__': (n, x) = map(int, input().split()) sheet = [] [sheet.append(map(float, input().split())) for i in range(x)] for i in zip(*sheet): print(sum(i) / len(i))
class ListaProduto(object): lista_produtos = [ { "id":1, "nome":"pao sete graos" }, { "id":2, "nome":"pao original" }, { "id":3, "nome":"pao integral" }, { "id":4, "nome":"pao light" }, { "id":5, "nome":"pao recheado" }, { "id":6, "nome":"pao doce" }, { "id":7, "nome":"pao sem casca" }, { "id":8, "nome":"pao caseiro" } ]
class Listaproduto(object): lista_produtos = [{'id': 1, 'nome': 'pao sete graos'}, {'id': 2, 'nome': 'pao original'}, {'id': 3, 'nome': 'pao integral'}, {'id': 4, 'nome': 'pao light'}, {'id': 5, 'nome': 'pao recheado'}, {'id': 6, 'nome': 'pao doce'}, {'id': 7, 'nome': 'pao sem casca'}, {'id': 8, 'nome': 'pao caseiro'}]
apiAttachAvailable = u'\u0648\u0627\u062c\u0647\u0629 \u0628\u0631\u0645\u062c\u0629 \u0627\u0644\u062a\u0637\u0628\u064a\u0642 (API) \u0645\u062a\u0627\u062d\u0629' apiAttachNotAvailable = u'\u063a\u064a\u0631 \u0645\u062a\u0627\u062d' apiAttachPendingAuthorization = u'\u062a\u0639\u0644\u064a\u0642 \u0627\u0644\u062a\u0635\u0631\u064a\u062d' apiAttachRefused = u'\u0631\u0641\u0636' apiAttachSuccess = u'\u0646\u062c\u0627\u062d' apiAttachUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' budDeletedFriend = u'\u062a\u0645 \u062d\u0630\u0641\u0647 \u0645\u0646 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0623\u0635\u062f\u0642\u0627\u0621' budFriend = u'\u0635\u062f\u064a\u0642' budNeverBeenFriend = u'\u0644\u0645 \u064a\u0648\u062c\u062f \u0645\u0637\u0644\u0642\u064b\u0627 \u0641\u064a \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0623\u0635\u062f\u0642\u0627\u0621' budPendingAuthorization = u'\u062a\u0639\u0644\u064a\u0642 \u0627\u0644\u062a\u0635\u0631\u064a\u062d' budUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' cfrBlockedByRecipient = u'\u062a\u0645 \u062d\u0638\u0631 \u0627\u0644\u0645\u0643\u0627\u0644\u0645\u0629 \u0628\u0648\u0627\u0633\u0637\u0629 \u0627\u0644\u0645\u0633\u062a\u0644\u0645' cfrMiscError = u'\u062e\u0637\u0623 \u0645\u062a\u0646\u0648\u0639' cfrNoCommonCodec = u'\u0628\u0631\u0646\u0627\u0645\u062c \u062a\u0634\u0641\u064a\u0631 \u063a\u064a\u0631 \u0634\u0627\u0626\u0639' cfrNoProxyFound = u'\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0628\u0631\u0648\u0643\u0633\u064a' cfrNotAuthorizedByRecipient = u'\u0644\u0645 \u064a\u062a\u0645 \u0645\u0646\u062d \u062a\u0635\u0631\u064a\u062d \u0644\u0644\u0645\u0633\u062a\u062e\u062f\u0645 \u0627\u0644\u062d\u0627\u0644\u064a \u0628\u0648\u0627\u0633\u0637\u0629 \u0627\u0644\u0645\u0633\u062a\u0644\u0645' cfrRecipientNotFriend = u'\u0627\u0644\u0645\u0633\u062a\u0644\u0645 \u0644\u064a\u0633 \u0635\u062f\u064a\u0642\u064b\u0627' cfrRemoteDeviceError = u'\u0645\u0634\u0643\u0644\u0629 \u0641\u064a \u062c\u0647\u0627\u0632 \u0627\u0644\u0635\u0648\u062a \u0627\u0644\u0628\u0639\u064a\u062f' cfrSessionTerminated = u'\u0627\u0646\u062a\u0647\u0627\u0621 \u0627\u0644\u062c\u0644\u0633\u0629' cfrSoundIOError = u'\u062e\u0637\u0623 \u0641\u064a \u0625\u062f\u062e\u0627\u0644/\u0625\u062e\u0631\u0627\u062c \u0627\u0644\u0635\u0648\u062a' cfrSoundRecordingError = u'\u062e\u0637\u0623 \u0641\u064a \u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u0635\u0648\u062a' cfrUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' cfrUserDoesNotExist = u'\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645/\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062a\u0641 \u063a\u064a\u0631 \u0645\u0648\u062c\u0648\u062f' cfrUserIsOffline = u'\u063a\u064a\u0631 \u0645\u062a\u0651\u0635\u0644\u0629 \u0623\u0648 \u063a\u064a\u0631 \u0645\u062a\u0651\u0635\u0644' chsAllCalls = u'\u062d\u0648\u0627\u0631 \u0642\u062f\u064a\u0645' chsDialog = u'\u062d\u0648\u0627\u0631' chsIncomingCalls = u'\u064a\u062c\u0628 \u0627\u0644\u0645\u0648\u0627\u0641\u0642\u0629 \u0639\u0644\u0649 \u0627\u0644\u0645\u062d\u0627\u062f\u062b\u0629 \u0627\u0644\u062c\u0645\u0627\u0639\u064a\u0629' chsLegacyDialog = u'\u062d\u0648\u0627\u0631 \u0642\u062f\u064a\u0645' chsMissedCalls = u'\u062d\u0648\u0627\u0631' chsMultiNeedAccept = u'\u064a\u062c\u0628 \u0627\u0644\u0645\u0648\u0627\u0641\u0642\u0629 \u0639\u0644\u0649 \u0627\u0644\u0645\u062d\u0627\u062f\u062b\u0629 \u0627\u0644\u062c\u0645\u0627\u0639\u064a\u0629' chsMultiSubscribed = u'\u062a\u0645 \u0627\u0644\u0627\u0634\u062a\u0631\u0627\u0643 \u0641\u064a \u0627\u0644\u0645\u062d\u0627\u062f\u062b\u0629 \u0627\u0644\u062c\u0645\u0627\u0639\u064a\u0629' chsOutgoingCalls = u'\u062a\u0645 \u0627\u0644\u0627\u0634\u062a\u0631\u0627\u0643 \u0641\u064a \u0627\u0644\u0645\u062d\u0627\u062f\u062b\u0629 \u0627\u0644\u062c\u0645\u0627\u0639\u064a\u0629' chsUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' chsUnsubscribed = u'\u062a\u0645 \u0625\u0644\u063a\u0627\u0621 \u0627\u0644\u0627\u0634\u062a\u0631\u0627\u0643' clsBusy = u'\u0645\u0634\u063a\u0648\u0644' clsCancelled = u'\u0623\u0644\u063a\u064a' clsEarlyMedia = u'\u062a\u0634\u063a\u064a\u0644 \u0627\u0644\u0648\u0633\u0627\u0626\u0637 (Early Media)' clsFailed = u'\u0639\u0641\u0648\u0627\u064b\u060c \u062a\u0639\u0630\u0651\u0631\u062a \u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u0627\u062a\u0651\u0635\u0627\u0644!' clsFinished = u'\u0627\u0646\u062a\u0647\u0649' clsInProgress = u'\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644' clsLocalHold = u'\u0645\u0643\u0627\u0644\u0645\u0629 \u0642\u064a\u062f \u0627\u0644\u0627\u0646\u062a\u0638\u0627\u0631 \u0645\u0646 \u0637\u0631\u0641\u064a' clsMissed = u'\u0645\u0643\u0627\u0644\u0645\u0629 \u0644\u0645 \u064a\u064f\u0631\u062f \u0639\u0644\u064a\u0647\u0627' clsOnHold = u'\u0642\u064a\u062f \u0627\u0644\u0627\u0646\u062a\u0638\u0627\u0631' clsRefused = u'\u0631\u0641\u0636' clsRemoteHold = u'\u0645\u0643\u0627\u0644\u0645\u0629 \u0642\u064a\u062f \u0627\u0644\u0627\u0646\u062a\u0638\u0627\u0631 \u0645\u0646 \u0627\u0644\u0637\u0631\u0641 \u0627\u0644\u062b\u0627\u0646\u064a' clsRinging = u'\u0627\u0644\u0627\u062a\u0635\u0627\u0644' clsRouting = u'\u062a\u0648\u062c\u064a\u0647' clsTransferred = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' clsTransferring = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' clsUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' clsUnplaced = u'\u0644\u0645 \u064a\u0648\u0636\u0639 \u0645\u0637\u0644\u0642\u064b\u0627' clsVoicemailBufferingGreeting = u'\u062a\u062e\u0632\u064a\u0646 \u0627\u0644\u062a\u062d\u064a\u0629' clsVoicemailCancelled = u'\u062a\u0645 \u0625\u0644\u063a\u0627\u0621 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0635\u0648\u062a\u064a' clsVoicemailFailed = u'\u0641\u0634\u0644 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0635\u0648\u062a\u064a' clsVoicemailPlayingGreeting = u'\u062a\u0634\u063a\u064a\u0644 \u0627\u0644\u062a\u062d\u064a\u0629' clsVoicemailRecording = u'\u062a\u0633\u062c\u064a\u0644 \u0628\u0631\u064a\u062f \u0635\u0648\u062a\u064a' clsVoicemailSent = u'\u062a\u0645 \u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0635\u0648\u062a\u064a' clsVoicemailUploading = u'\u0625\u064a\u062f\u0627\u0639 \u0628\u0631\u064a\u062f \u0635\u0648\u062a\u064a' cltIncomingP2P = u'\u0645\u0643\u0627\u0644\u0645\u0629 \u0646\u0638\u064a\u0631 \u0625\u0644\u0649 \u0646\u0638\u064a\u0631 \u0648\u0627\u0631\u062f\u0629' cltIncomingPSTN = u'\u0645\u0643\u0627\u0644\u0645\u0629 \u0647\u0627\u062a\u0641\u064a\u0629 \u0648\u0627\u0631\u062f\u0629' cltOutgoingP2P = u'\u0645\u0643\u0627\u0644\u0645\u0629 \u0646\u0638\u064a\u0631 \u0625\u0644\u0649 \u0646\u0638\u064a\u0631 \u0635\u0627\u062f\u0631\u0629' cltOutgoingPSTN = u'\u0645\u0643\u0627\u0644\u0645\u0629 \u0647\u0627\u062a\u0641\u064a\u0629 \u0635\u0627\u062f\u0631\u0629' cltUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' cmeAddedMembers = u'\u0627\u0644\u0623\u0639\u0636\u0627\u0621 \u0627\u0644\u0645\u0636\u0627\u0641\u0629' cmeCreatedChatWith = u'\u0623\u0646\u0634\u0623 \u0645\u062d\u0627\u062f\u062b\u0629 \u0645\u0639' cmeEmoted = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' cmeLeft = u'\u063a\u0627\u062f\u0631' cmeSaid = u'\u0642\u0627\u0644' cmeSawMembers = u'\u0627\u0644\u0623\u0639\u0636\u0627\u0621 \u0627\u0644\u0645\u0634\u0627\u0647\u064e\u062f\u0648\u0646' cmeSetTopic = u'\u062a\u0639\u064a\u064a\u0646 \u0645\u0648\u0636\u0648\u0639' cmeUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' cmsRead = u'\u0642\u0631\u0627\u0621\u0629' cmsReceived = u'\u0645\u064f\u0633\u062a\u064e\u0644\u0645' cmsSending = u'\u062c\u0627\u0631\u064a \u0627\u0644\u0625\u0631\u0633\u0627\u0644...' cmsSent = u'\u0645\u064f\u0631\u0633\u064e\u0644' cmsUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' conConnecting = u'\u062c\u0627\u0631\u064a \u0627\u0644\u062a\u0648\u0635\u064a\u0644' conOffline = u'\u063a\u064a\u0631 \u0645\u062a\u0651\u0635\u0644' conOnline = u'\u0645\u062a\u0635\u0644' conPausing = u'\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a' conUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' cusAway = u'\u0628\u0627\u0644\u062e\u0627\u0631\u062c' cusDoNotDisturb = u'\u0645\u0645\u0646\u0648\u0639 \u0627\u0644\u0625\u0632\u0639\u0627\u062c' cusInvisible = u'\u0645\u062e\u0641\u064a' cusLoggedOut = u'\u063a\u064a\u0631 \u0645\u062a\u0651\u0635\u0644' cusNotAvailable = u'\u063a\u064a\u0631 \u0645\u062a\u0627\u062d' cusOffline = u'\u063a\u064a\u0631 \u0645\u062a\u0651\u0635\u0644' cusOnline = u'\u0645\u062a\u0635\u0644' cusSkypeMe = u'Skype Me' cusUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' cvsBothEnabled = u'\u0625\u0631\u0633\u0627\u0644 \u0648\u0627\u0633\u062a\u0644\u0627\u0645 \u0627\u0644\u0641\u064a\u062f\u064a\u0648' cvsNone = u'\u0644\u0627 \u064a\u0648\u062c\u062f \u0641\u064a\u062f\u064a\u0648' cvsReceiveEnabled = u'\u0627\u0633\u062a\u0644\u0627\u0645 \u0627\u0644\u0641\u064a\u062f\u064a\u0648' cvsSendEnabled = u'\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0641\u064a\u062f\u064a\u0648' cvsUnknown = u'' grpAllFriends = u'\u0643\u0627\u0641\u0629 \u0627\u0644\u0623\u0635\u062f\u0642\u0627\u0621' grpAllUsers = u'\u0643\u0627\u0641\u0629 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645\u064a\u0646' grpCustomGroup = u'\u0645\u062e\u0635\u0635' grpOnlineFriends = u'\u0627\u0644\u0623\u0635\u062f\u0642\u0627\u0621 \u0627\u0644\u0645\u062a\u0635\u0644\u0648\u0646' grpPendingAuthorizationFriends = u'\u062a\u0639\u0644\u064a\u0642 \u0627\u0644\u062a\u0635\u0631\u064a\u062d' grpProposedSharedGroup = u'Proposed Shared Group' grpRecentlyContactedUsers = u'\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645\u0648\u0646 \u0627\u0644\u0645\u062a\u0635\u0644\u0648\u0646 \u062d\u062f\u064a\u062b\u064b\u0627' grpSharedGroup = u'Shared Group' grpSkypeFriends = u'\u0623\u0635\u062f\u0642\u0627\u0621 Skype' grpSkypeOutFriends = u'\u0623\u0635\u062f\u0642\u0627\u0621 SkypeOut' grpUngroupedFriends = u'\u0627\u0644\u0623\u0635\u062f\u0642\u0627\u0621 \u063a\u064a\u0631 \u0627\u0644\u0645\u062c\u0645\u0639\u064a\u0646' grpUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' grpUsersAuthorizedByMe = u'\u0645\u0635\u0631\u062d \u0628\u0648\u0627\u0633\u0637\u062a\u064a' grpUsersBlockedByMe = u'\u0645\u062d\u0638\u0648\u0631 \u0628\u0648\u0627\u0633\u0637\u062a\u064a' grpUsersWaitingMyAuthorization = u'\u0641\u064a \u0627\u0646\u062a\u0638\u0627\u0631 \u0627\u0644\u062a\u0635\u0631\u064a\u062d \u0627\u0644\u062e\u0627\u0635 \u0628\u064a' leaAddDeclined = u'\u062a\u0645 \u0631\u0641\u0636 \u0627\u0644\u0625\u0636\u0627\u0641\u0629' leaAddedNotAuthorized = u'\u064a\u062c\u0628 \u0645\u0646\u062d \u062a\u0635\u0631\u064a\u062d \u0644\u0644\u0634\u062e\u0635 \u0627\u0644\u0645\u0636\u0627\u0641' leaAdderNotFriend = u'\u0627\u0644\u0634\u062e\u0635 \u0627\u0644\u0645\u0636\u064a\u0641 \u064a\u062c\u0628 \u0623\u0646 \u064a\u0643\u0648\u0646 \u0635\u062f\u064a\u0642\u064b\u0627' leaUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' leaUnsubscribe = u'\u062a\u0645 \u0625\u0644\u063a\u0627\u0621 \u0627\u0644\u0627\u0634\u062a\u0631\u0627\u0643' leaUserIncapable = u'\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645 \u063a\u064a\u0631 \u0645\u0624\u0647\u0644' leaUserNotFound = u'\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645 \u063a\u064a\u0631 \u0645\u0648\u062c\u0648\u062f' olsAway = u'\u0628\u0627\u0644\u062e\u0627\u0631\u062c' olsDoNotDisturb = u'\u0645\u0645\u0646\u0648\u0639 \u0627\u0644\u0625\u0632\u0639\u0627\u062c' olsNotAvailable = u'\u063a\u064a\u0631 \u0645\u062a\u0627\u062d' olsOffline = u'\u063a\u064a\u0631 \u0645\u062a\u0651\u0635\u0644' olsOnline = u'\u0645\u062a\u0635\u0644' olsSkypeMe = u'Skype Me' olsSkypeOut = u'SkypeOut' olsUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' smsMessageStatusComposing = u'Composing' smsMessageStatusDelivered = u'Delivered' smsMessageStatusFailed = u'Failed' smsMessageStatusRead = u'Read' smsMessageStatusReceived = u'Received' smsMessageStatusSendingToServer = u'Sending to Server' smsMessageStatusSentToServer = u'Sent to Server' smsMessageStatusSomeTargetsFailed = u'Some Targets Failed' smsMessageStatusUnknown = u'Unknown' smsMessageTypeCCRequest = u'Confirmation Code Request' smsMessageTypeCCSubmit = u'Confirmation Code Submit' smsMessageTypeIncoming = u'Incoming' smsMessageTypeOutgoing = u'Outgoing' smsMessageTypeUnknown = u'Unknown' smsTargetStatusAcceptable = u'Acceptable' smsTargetStatusAnalyzing = u'Analyzing' smsTargetStatusDeliveryFailed = u'Delivery Failed' smsTargetStatusDeliveryPending = u'Delivery Pending' smsTargetStatusDeliverySuccessful = u'Delivery Successful' smsTargetStatusNotRoutable = u'Not Routable' smsTargetStatusUndefined = u'Undefined' smsTargetStatusUnknown = u'Unknown' usexFemale = u'\u0623\u0646\u062b\u0649' usexMale = u'\u0630\u0643\u0631' usexUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' vmrConnectError = u'\u062e\u0637\u0623 \u0641\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644' vmrFileReadError = u'\u062e\u0637\u0623 \u0641\u064a \u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0645\u0644\u0641' vmrFileWriteError = u'\u062e\u0637\u0623 \u0641\u064a \u0627\u0644\u0643\u062a\u0627\u0628\u0629 \u0625\u0644\u0649 \u0627\u0644\u0645\u0644\u0641' vmrMiscError = u'\u062e\u0637\u0623 \u0645\u062a\u0646\u0648\u0639' vmrNoError = u'\u0644\u0627 \u064a\u0648\u062c\u062f \u062e\u0637\u0623' vmrNoPrivilege = u'\u0644\u0627 \u064a\u0648\u062c\u062f \u0627\u0645\u062a\u064a\u0627\u0632 \u0628\u0631\u064a\u062f \u0635\u0648\u062a\u064a' vmrNoVoicemail = u'\u0644\u0627 \u064a\u0648\u062c\u062f \u0628\u0631\u064a\u062f \u0635\u0648\u062a\u064a \u0643\u0647\u0630\u0627' vmrPlaybackError = u'\u062e\u0637\u0623 \u0641\u064a \u0627\u0644\u062a\u0634\u063a\u064a\u0644' vmrRecordingError = u'\u062e\u0637\u0623 \u0641\u064a \u0627\u0644\u062a\u0633\u062c\u064a\u0644' vmrUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' vmsBlank = u'\u0641\u0627\u0631\u063a' vmsBuffering = u'\u062a\u062e\u0632\u064a\u0646 \u0645\u0624\u0642\u062a' vmsDeleting = u'\u062c\u0627\u0631\u064a \u0627\u0644\u062d\u0630\u0641' vmsDownloading = u'\u062c\u0627\u0631\u064a \u0627\u0644\u062a\u062d\u0645\u064a\u0644' vmsFailed = u'\u0641\u0634\u0644' vmsNotDownloaded = u'\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u062a\u062d\u0645\u064a\u0644' vmsPlayed = u'\u062a\u0645 \u0627\u0644\u062a\u0634\u063a\u064a\u0644' vmsPlaying = u'\u062c\u0627\u0631\u064a \u0627\u0644\u062a\u0634\u063a\u064a\u0644' vmsRecorded = u'\u0645\u0633\u062c\u0644' vmsRecording = u'\u062a\u0633\u062c\u064a\u0644 \u0628\u0631\u064a\u062f \u0635\u0648\u062a\u064a' vmsUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' vmsUnplayed = u'\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u062a\u0634\u063a\u064a\u0644' vmsUploaded = u'\u062a\u0645 \u0627\u0644\u0625\u064a\u062f\u0627\u0639' vmsUploading = u'\u062c\u0627\u0631\u064a \u0627\u0644\u0625\u064a\u062f\u0627\u0639' vmtCustomGreeting = u'\u062a\u062d\u064a\u0629 \u0645\u062e\u0635\u0635\u0629' vmtDefaultGreeting = u'\u0627\u0644\u062a\u062d\u064a\u0629 \u0627\u0644\u0627\u0641\u062a\u0631\u0627\u0636\u064a\u0629' vmtIncoming = u'\u0628\u0631\u064a\u062f \u0635\u0648\u062a\u064a \u0642\u0627\u062f\u0645' vmtOutgoing = u'\u0635\u0627\u062f\u0631' vmtUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629' vssAvailable = u'\u0645\u062a\u0627\u062d' vssNotAvailable = u'\u063a\u064a\u0631 \u0645\u062a\u0627\u062d' vssPaused = u'\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a' vssRejected = u'\u0631\u0641\u0636' vssRunning = u'\u062a\u0634\u063a\u064a\u0644' vssStarting = u'\u0628\u062f\u0621' vssStopping = u'\u0625\u064a\u0642\u0627\u0641' vssUnknown = u'\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629'
api_attach_available = u'واجهة برمجة التطبيق (API) متاحة' api_attach_not_available = u'غير متاح' api_attach_pending_authorization = u'تعليق التصريح' api_attach_refused = u'رفض' api_attach_success = u'نجاح' api_attach_unknown = u'غير معروفة' bud_deleted_friend = u'تم حذفه من قائمة الأصدقاء' bud_friend = u'صديق' bud_never_been_friend = u'لم يوجد مطلقًا في قائمة الأصدقاء' bud_pending_authorization = u'تعليق التصريح' bud_unknown = u'غير معروفة' cfr_blocked_by_recipient = u'تم حظر المكالمة بواسطة المستلم' cfr_misc_error = u'خطأ متنوع' cfr_no_common_codec = u'برنامج تشفير غير شائع' cfr_no_proxy_found = u'لم يتم العثور على بروكسي' cfr_not_authorized_by_recipient = u'لم يتم منح تصريح للمستخدم الحالي بواسطة المستلم' cfr_recipient_not_friend = u'المستلم ليس صديقًا' cfr_remote_device_error = u'مشكلة في جهاز الصوت البعيد' cfr_session_terminated = u'انتهاء الجلسة' cfr_sound_io_error = u'خطأ في إدخال/إخراج الصوت' cfr_sound_recording_error = u'خطأ في تسجيل الصوت' cfr_unknown = u'غير معروفة' cfr_user_does_not_exist = u'المستخدم/رقم الهاتف غير موجود' cfr_user_is_offline = u'غير متّصلة أو غير متّصل' chs_all_calls = u'حوار قديم' chs_dialog = u'حوار' chs_incoming_calls = u'يجب الموافقة على المحادثة الجماعية' chs_legacy_dialog = u'حوار قديم' chs_missed_calls = u'حوار' chs_multi_need_accept = u'يجب الموافقة على المحادثة الجماعية' chs_multi_subscribed = u'تم الاشتراك في المحادثة الجماعية' chs_outgoing_calls = u'تم الاشتراك في المحادثة الجماعية' chs_unknown = u'غير معروفة' chs_unsubscribed = u'تم إلغاء الاشتراك' cls_busy = u'مشغول' cls_cancelled = u'ألغي' cls_early_media = u'تشغيل الوسائط (Early Media)' cls_failed = u'عفواً، تعذّرت عملية الاتّصال!' cls_finished = u'انتهى' cls_in_progress = u'جاري الاتصال' cls_local_hold = u'مكالمة قيد الانتظار من طرفي' cls_missed = u'مكالمة لم يُرد عليها' cls_on_hold = u'قيد الانتظار' cls_refused = u'رفض' cls_remote_hold = u'مكالمة قيد الانتظار من الطرف الثاني' cls_ringing = u'الاتصال' cls_routing = u'توجيه' cls_transferred = u'غير معروفة' cls_transferring = u'غير معروفة' cls_unknown = u'غير معروفة' cls_unplaced = u'لم يوضع مطلقًا' cls_voicemail_buffering_greeting = u'تخزين التحية' cls_voicemail_cancelled = u'تم إلغاء البريد الصوتي' cls_voicemail_failed = u'فشل البريد الصوتي' cls_voicemail_playing_greeting = u'تشغيل التحية' cls_voicemail_recording = u'تسجيل بريد صوتي' cls_voicemail_sent = u'تم إرسال البريد الصوتي' cls_voicemail_uploading = u'إيداع بريد صوتي' clt_incoming_p2_p = u'مكالمة نظير إلى نظير واردة' clt_incoming_pstn = u'مكالمة هاتفية واردة' clt_outgoing_p2_p = u'مكالمة نظير إلى نظير صادرة' clt_outgoing_pstn = u'مكالمة هاتفية صادرة' clt_unknown = u'غير معروفة' cme_added_members = u'الأعضاء المضافة' cme_created_chat_with = u'أنشأ محادثة مع' cme_emoted = u'غير معروفة' cme_left = u'غادر' cme_said = u'قال' cme_saw_members = u'الأعضاء المشاهَدون' cme_set_topic = u'تعيين موضوع' cme_unknown = u'غير معروفة' cms_read = u'قراءة' cms_received = u'مُستَلم' cms_sending = u'جاري الإرسال...' cms_sent = u'مُرسَل' cms_unknown = u'غير معروفة' con_connecting = u'جاري التوصيل' con_offline = u'غير متّصل' con_online = u'متصل' con_pausing = u'إيقاف مؤقت' con_unknown = u'غير معروفة' cus_away = u'بالخارج' cus_do_not_disturb = u'ممنوع الإزعاج' cus_invisible = u'مخفي' cus_logged_out = u'غير متّصل' cus_not_available = u'غير متاح' cus_offline = u'غير متّصل' cus_online = u'متصل' cus_skype_me = u'Skype Me' cus_unknown = u'غير معروفة' cvs_both_enabled = u'إرسال واستلام الفيديو' cvs_none = u'لا يوجد فيديو' cvs_receive_enabled = u'استلام الفيديو' cvs_send_enabled = u'إرسال الفيديو' cvs_unknown = u'' grp_all_friends = u'كافة الأصدقاء' grp_all_users = u'كافة المستخدمين' grp_custom_group = u'مخصص' grp_online_friends = u'الأصدقاء المتصلون' grp_pending_authorization_friends = u'تعليق التصريح' grp_proposed_shared_group = u'Proposed Shared Group' grp_recently_contacted_users = u'المستخدمون المتصلون حديثًا' grp_shared_group = u'Shared Group' grp_skype_friends = u'أصدقاء Skype' grp_skype_out_friends = u'أصدقاء SkypeOut' grp_ungrouped_friends = u'الأصدقاء غير المجمعين' grp_unknown = u'غير معروفة' grp_users_authorized_by_me = u'مصرح بواسطتي' grp_users_blocked_by_me = u'محظور بواسطتي' grp_users_waiting_my_authorization = u'في انتظار التصريح الخاص بي' lea_add_declined = u'تم رفض الإضافة' lea_added_not_authorized = u'يجب منح تصريح للشخص المضاف' lea_adder_not_friend = u'الشخص المضيف يجب أن يكون صديقًا' lea_unknown = u'غير معروفة' lea_unsubscribe = u'تم إلغاء الاشتراك' lea_user_incapable = u'المستخدم غير مؤهل' lea_user_not_found = u'المستخدم غير موجود' ols_away = u'بالخارج' ols_do_not_disturb = u'ممنوع الإزعاج' ols_not_available = u'غير متاح' ols_offline = u'غير متّصل' ols_online = u'متصل' ols_skype_me = u'Skype Me' ols_skype_out = u'SkypeOut' ols_unknown = u'غير معروفة' sms_message_status_composing = u'Composing' sms_message_status_delivered = u'Delivered' sms_message_status_failed = u'Failed' sms_message_status_read = u'Read' sms_message_status_received = u'Received' sms_message_status_sending_to_server = u'Sending to Server' sms_message_status_sent_to_server = u'Sent to Server' sms_message_status_some_targets_failed = u'Some Targets Failed' sms_message_status_unknown = u'Unknown' sms_message_type_cc_request = u'Confirmation Code Request' sms_message_type_cc_submit = u'Confirmation Code Submit' sms_message_type_incoming = u'Incoming' sms_message_type_outgoing = u'Outgoing' sms_message_type_unknown = u'Unknown' sms_target_status_acceptable = u'Acceptable' sms_target_status_analyzing = u'Analyzing' sms_target_status_delivery_failed = u'Delivery Failed' sms_target_status_delivery_pending = u'Delivery Pending' sms_target_status_delivery_successful = u'Delivery Successful' sms_target_status_not_routable = u'Not Routable' sms_target_status_undefined = u'Undefined' sms_target_status_unknown = u'Unknown' usex_female = u'أنثى' usex_male = u'ذكر' usex_unknown = u'غير معروفة' vmr_connect_error = u'خطأ في الاتصال' vmr_file_read_error = u'خطأ في قراءة الملف' vmr_file_write_error = u'خطأ في الكتابة إلى الملف' vmr_misc_error = u'خطأ متنوع' vmr_no_error = u'لا يوجد خطأ' vmr_no_privilege = u'لا يوجد امتياز بريد صوتي' vmr_no_voicemail = u'لا يوجد بريد صوتي كهذا' vmr_playback_error = u'خطأ في التشغيل' vmr_recording_error = u'خطأ في التسجيل' vmr_unknown = u'غير معروفة' vms_blank = u'فارغ' vms_buffering = u'تخزين مؤقت' vms_deleting = u'جاري الحذف' vms_downloading = u'جاري التحميل' vms_failed = u'فشل' vms_not_downloaded = u'لم يتم التحميل' vms_played = u'تم التشغيل' vms_playing = u'جاري التشغيل' vms_recorded = u'مسجل' vms_recording = u'تسجيل بريد صوتي' vms_unknown = u'غير معروفة' vms_unplayed = u'لم يتم التشغيل' vms_uploaded = u'تم الإيداع' vms_uploading = u'جاري الإيداع' vmt_custom_greeting = u'تحية مخصصة' vmt_default_greeting = u'التحية الافتراضية' vmt_incoming = u'بريد صوتي قادم' vmt_outgoing = u'صادر' vmt_unknown = u'غير معروفة' vss_available = u'متاح' vss_not_available = u'غير متاح' vss_paused = u'إيقاف مؤقت' vss_rejected = u'رفض' vss_running = u'تشغيل' vss_starting = u'بدء' vss_stopping = u'إيقاف' vss_unknown = u'غير معروفة'
def go(): with open('input.txt', 'r') as f: ids = [item for item in f.read().split('\n') if item] for i in range(len(ids)): for j in range(i + 1, len(ids)): diff_count = 0 for k in range(len(ids[i])): if ids[i][k] != ids[j][k]: diff_count += 1 if diff_count == 1: return ''.join([ids[i][k] for k in range(len(ids[i])) if ids[i][k] == ids[j][k]]) print(go())
def go(): with open('input.txt', 'r') as f: ids = [item for item in f.read().split('\n') if item] for i in range(len(ids)): for j in range(i + 1, len(ids)): diff_count = 0 for k in range(len(ids[i])): if ids[i][k] != ids[j][k]: diff_count += 1 if diff_count == 1: return ''.join([ids[i][k] for k in range(len(ids[i])) if ids[i][k] == ids[j][k]]) print(go())
# -*- coding: utf-8 -*- def main(): abcd = sorted([int(input()) for _ in range(4)]) ef = sorted([int(input()) for _ in range(2)]) print(sum(abcd[1:] + ef[1:])) if __name__ == '__main__': main()
def main(): abcd = sorted([int(input()) for _ in range(4)]) ef = sorted([int(input()) for _ in range(2)]) print(sum(abcd[1:] + ef[1:])) if __name__ == '__main__': main()
# This sample tests a series of nested loops containing variables # with significant dependencies. for val1 in range(10): cnt1 = 4 for val2 in range(10 - val1): cnt2 = 4 if val2 == val1: cnt2 -= 1 for val3 in range(10 - val1 - val2): cnt3 = 4 if val3 == val1: cnt3 -= 1 if val3 == val2: cnt3 -= 1 for val4 in range(10 - val1 - val2 - val3): cnt4 = 4 if val4 == val1: cnt4 -= 1 if val4 == val2: cnt4 -= 1 if val4 == val3: cnt4 -= 1 for val5 in range(10 - val1 - val2 - val3 - val4): cnt5 = 4 if val5 == val1: cnt5 -= 1 if val5 == val2: cnt5 -= 1 if val5 == val3: cnt5 -= 1 if val5 == val4: cnt5 -= 1 val6 = 10 - val1 - val2 - val3 - val4 - val5 cnt6 = 4 if val6 == val1: cnt6 -= 1 if val6 == val2: cnt6 -= 1 if val6 == val3: cnt6 -= 1 if val6 == val4: cnt6 -= 1 if val6 == val5: cnt6 -= 1
for val1 in range(10): cnt1 = 4 for val2 in range(10 - val1): cnt2 = 4 if val2 == val1: cnt2 -= 1 for val3 in range(10 - val1 - val2): cnt3 = 4 if val3 == val1: cnt3 -= 1 if val3 == val2: cnt3 -= 1 for val4 in range(10 - val1 - val2 - val3): cnt4 = 4 if val4 == val1: cnt4 -= 1 if val4 == val2: cnt4 -= 1 if val4 == val3: cnt4 -= 1 for val5 in range(10 - val1 - val2 - val3 - val4): cnt5 = 4 if val5 == val1: cnt5 -= 1 if val5 == val2: cnt5 -= 1 if val5 == val3: cnt5 -= 1 if val5 == val4: cnt5 -= 1 val6 = 10 - val1 - val2 - val3 - val4 - val5 cnt6 = 4 if val6 == val1: cnt6 -= 1 if val6 == val2: cnt6 -= 1 if val6 == val3: cnt6 -= 1 if val6 == val4: cnt6 -= 1 if val6 == val5: cnt6 -= 1
# https://app.codesignal.com/arcade/intro/level-2/bq2XnSr5kbHqpHGJC def makeArrayConsecutive2(statues): statues = sorted(statues) res = 0 # Make elements of the array be consecutive. If there's a # gap between two statues heights', then figure out how # many extra statues have to be added so that all resulting # statues increase in size by 1 unit. for i in range(1, len(statues)): res += statues[i] - statues[i-1] - 1 return res
def make_array_consecutive2(statues): statues = sorted(statues) res = 0 for i in range(1, len(statues)): res += statues[i] - statues[i - 1] - 1 return res
subdomain = 'srcc' api_version = 'v1' callback_url = 'http://localhost:4567/'
subdomain = 'srcc' api_version = 'v1' callback_url = 'http://localhost:4567/'
# Take the values C = int(input()) A = int(input()) # calculate student trips quociente = A // (C - 1) # how many students are letf resto = A % (C - 1) # if there is a student left, you have +1 trip if resto > 0: quociente += 1 # Shows the value print(quociente)
c = int(input()) a = int(input()) quociente = A // (C - 1) resto = A % (C - 1) if resto > 0: quociente += 1 print(quociente)
class TechnicalSpecs(object): def __init__(self): self.__negative_format = None self.__cinematographic_process = None self.__link = None @property def negative_format(self): return self.__negative_format @negative_format.setter def negative_format(self, negative_format): self.__negative_format = negative_format @property def cinematographic_process(self): return self.__cinematographic_process @cinematographic_process.setter def cinematographic_process(self, cinematographic_process): self.__cinematographic_process = cinematographic_process @property def link(self): return self.__link @link.setter def link (self, link): self.__link = link def __str__(self): return "{Negative format: " + str(self.negative_format) + ", Cinematographic process: " + str( self.cinematographic_process) + "}"
class Technicalspecs(object): def __init__(self): self.__negative_format = None self.__cinematographic_process = None self.__link = None @property def negative_format(self): return self.__negative_format @negative_format.setter def negative_format(self, negative_format): self.__negative_format = negative_format @property def cinematographic_process(self): return self.__cinematographic_process @cinematographic_process.setter def cinematographic_process(self, cinematographic_process): self.__cinematographic_process = cinematographic_process @property def link(self): return self.__link @link.setter def link(self, link): self.__link = link def __str__(self): return '{Negative format: ' + str(self.negative_format) + ', Cinematographic process: ' + str(self.cinematographic_process) + '}'
# package marker. __version__ = "1.1b3" __date__ = "Nov 23, 2017"
__version__ = '1.1b3' __date__ = 'Nov 23, 2017'
S=list(input()) S.reverse() N=len(S) R=[0]*N R10=[0]*N m=2019 K=0 R10[0]=1 R[0]=int(S[0])%m for i in range(1,N): R10[i]=(R10[i-1]*10)%m R[i]=(R[i-1]+int(S[i])*R10[i])%m d={} for i in range(2019): d[i]=0 for i in range(N): d[R[i]]+=1 ans=0 for i in range(2019): if i == 0: ans += d[i] ans +=d[i]*(d[i]-1)//2 else: ans +=d[i]*(d[i]-1)//2 print(ans)
s = list(input()) S.reverse() n = len(S) r = [0] * N r10 = [0] * N m = 2019 k = 0 R10[0] = 1 R[0] = int(S[0]) % m for i in range(1, N): R10[i] = R10[i - 1] * 10 % m R[i] = (R[i - 1] + int(S[i]) * R10[i]) % m d = {} for i in range(2019): d[i] = 0 for i in range(N): d[R[i]] += 1 ans = 0 for i in range(2019): if i == 0: ans += d[i] ans += d[i] * (d[i] - 1) // 2 else: ans += d[i] * (d[i] - 1) // 2 print(ans)