content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
inputText = "{{{{{{<!>!>,<o!>},<a,\"i!!!>i!!,!>,<<e<i<<>,{{{<!>},<!><!>,<!!!>!!!>!!!>{\"!>},<!!!<!>},<oi!>!,'>}}}},{{<{!!!>},<!!,!!!>!!!>!!e!a!!!!<!>},<!!!>u!>,<!>!!u!!!!!>},<!>!>,<{>}},{<\"a!!!!'!>},<!}\"!>!!<o}i!<>,<<e,<eo!a}!!\"!>,<!>!>!>,<e{\"e\">}},{{<!oi'<!o!>ue>,{<!>},<i!>,<i>,{<'>}}}},{{<\"a,!>},<!!e!>,<e!!}!!o!!!>,<',}>,{{<i!!!!o!!!>!}!!!!!>!a!!!>!>!!a!!!!,!!u!!!>,<>}}}},{{{<{i!!<!!!!e!>>}},{{<!!!>},<ei>,{}}}}}},{{{<eaieia,!{io\"{!!}eu!{{!!e'>,{<>}}},{{{{<o>},<e!!o,!>},<\"u{!>,<!>},<a{}{!u>}},{{{<!!u'ioi''!>},<\"u>},<'oa!!<,'!!\"!!!!!>!!!!!>{!!!!aa>},{{<u}\",!!i!!!>!>!!!>!>!!!>'}!o{!!{>}},{<oiau>,<!!!>!><!>!!<!!!>!!<i!a}!>},<<}a}>}},{<eeo!!}!!!>e!>,<!!!>!!<{!!<i{!>i!>,<>}},{{{},{<!!!!!>},<\"!!!>!>},<o{!>,<,ea>}},{{<},\"a\"oeie!>},<ie'!!oa!!<>}},{}}},{{{}},{{<}e<i!!!!io!>},<\"!!e\"<\">},{{<'!!{!>},<a\">}},{<u!!i!!o{>}},{{<\"oe!!!>\"o{>},{{},<!>,<!!,!}!>!!!!!>>},{}},{{{{<!!{,,}!>!>,<!>},<!{a!<e'!>,<>}},{}},{{{<!!o\"'!!!>\"i{''>},{{},{{<!!!>},<\"}<\",!>>,{{},{{}}}}}}}},{{<u}\"!!!!!!o!!\"!>,<!>,<eiu!!!>,<o>},{<!!<!!e>,<e,<<<u!'>}}}}},{{{{{{}},{}},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!!>>}}}},{{{{<\"}!>i!!o!!!>u,!>!i!!!>ii>},<!!,!>,<oai!io!!i!>},<!!!<e<e!!\"!!!>,<>},{{<!>},<<!>},<!!i!!a!\"o!!e!>u!<!'!!!>,<<>},<e!u!!!>aiu<!>!>!!!!e!!!>,<!!'e!>!!>}},{{<!><!>,<!>},<!>},<,u<,}!>},<!!!!e,o'>,{{},{<a>}}},{}},{{{{<\",<!!\"o!>>},{<o\"!!<{}',!><>}},{<!!!>'i!!!>,<i>}}}}},{{{}},{}},{{{<a}ei{o!>,<!!!!ui!'!<{!>,<!>},<!>i>},{<<!!!>,<}}ao!>},<!!!>},<!!!>>}},{{{<!{u!!!!!>!}!!'\"!>,<<\"!>,<!!!>'>},{}},{{{<!,!eu!>'u!!{!!!>e}'o!e!!!!!>o>},{<\"!!!>}!<i!!!>!'!!!uooeo!a!\"!iio!!>}},<o!!!{e\"}!!!>!u!\"{,!>!>!>},<u!'>},{<!>},<a!a}!!!>{!i!!!!auo<i>}},{<\"'!>},<{e!!!>!!uu!>,<!!a>,{<o\"o!>},<!>,<!\"}\"o!{'{,!>},<>}}}},{{{<!!{\"\"\"!!,>},<!i<<>},{{<!!o\"!e>}},{{{<e}!!!}>}},{<<!!!>!>,<!>,<!u!!!!!!,u!!!!!!!!!!!>,<'!>\"!!!>{>}}}},{}}}"
#inputText = "{{{{{{<!>!>,<o!>},<a,\"i!!!>i!!,!>,<<e<i<<>,{{{<!>}"
def value(string):
totalPoints = 0
for i in range(0, len(string)):
if (string[i] == '}'):
specificPoints = 0
for j in range(0, i):
if (string[j] == '{'):
specificPoints += 1
if (string[j] == '}'):
specificPoints -= 1
totalPoints += specificPoints
return totalPoints
cleaned = ""
inTrash = False
trashChars = 0
i = 0
while i<len(inputText):
if inTrash == False:
if (inputText[i] == '<'):
inTrash = True
else:
cleaned += inputText[i]
else:
# Else in trash and keep track of everything.
if (inputText[i] == '!'):
i += 1 # This will effectively skip the next character.
elif (inputText[i] == '>'):
inTrash = False
else:
trashChars += 1
i += 1
print(cleaned)
print("It has", trashChars, "in the trash.")
print("Worth", value(cleaned), "points.")
| input_text = '{{{{{{<!>!>,<o!>},<a,"i!!!>i!!,!>,<<e<i<<>,{{{<!>},<!><!>,<!!!>!!!>!!!>{"!>},<!!!<!>},<oi!>!,\'>}}}},{{<{!!!>},<!!,!!!>!!!>!!e!a!!!!<!>},<!!!>u!>,<!>!!u!!!!!>},<!>!>,<{>}},{<"a!!!!\'!>},<!}"!>!!<o}i!<>,<<e,<eo!a}!!"!>,<!>!>!>,<e{"e">}},{{<!oi\'<!o!>ue>,{<!>},<i!>,<i>,{<\'>}}}},{{<"a,!>},<!!e!>,<e!!}!!o!!!>,<\',}>,{{<i!!!!o!!!>!}!!!!!>!a!!!>!>!!a!!!!,!!u!!!>,<>}}}},{{{<{i!!<!!!!e!>>}},{{<!!!>},<ei>,{}}}}}},{{{<eaieia,!{io"{!!}eu!{{!!e\'>,{<>}}},{{{{<o>},<e!!o,!>},<"u{!>,<!>},<a{}{!u>}},{{{<!!u\'ioi\'\'!>},<"u>},<\'oa!!<,\'!!"!!!!!>!!!!!>{!!!!aa>},{{<u}",!!i!!!>!>!!!>!>!!!>\'}!o{!!{>}},{<oiau>,<!!!>!><!>!!<!!!>!!<i!a}!>},<<}a}>}},{<eeo!!}!!!>e!>,<!!!>!!<{!!<i{!>i!>,<>}},{{{},{<!!!!!>},<"!!!>!>},<o{!>,<,ea>}},{{<},"a"oeie!>},<ie\'!!oa!!<>}},{}}},{{{}},{{<}e<i!!!!io!>},<"!!e"<">},{{<\'!!{!>},<a">}},{<u!!i!!o{>}},{{<"oe!!!>"o{>},{{},<!>,<!!,!}!>!!!!!>>},{}},{{{{<!!{,,}!>!>,<!>},<!{a!<e\'!>,<>}},{}},{{{<!!o"\'!!!>"i{\'\'>},{{},{{<!!!>},<"}<",!>>,{{},{{}}}}}}}},{{<u}"!!!!!!o!!"!>,<!>,<eiu!!!>,<o>},{<!!<!!e>,<e,<<<u!\'>}}}}},{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{<"}!>i!!o!!!>u,!>!i!!!>ii>},<!!,!>,<oai!io!!i!>},<!!!<e<e!!"!!!>,<>},{{<!>},<<!>},<!!i!!a!"o!!e!>u!<!\'!!!>,<<>},<e!u!!!>aiu<!>!>!!!!e!!!>,<!!\'e!>!!>}},{{<!><!>,<!>},<!>},<,u<,}!>},<!!!!e,o\'>,{{},{<a>}}},{}},{{{{<",<!!"o!>>},{<o"!!<{}\',!><>}},{<!!!>\'i!!!>,<i>}}}}},{{{}},{}},{{{<a}ei{o!>,<!!!!ui!\'!<{!>,<!>},<!>i>},{<<!!!>,<}}ao!>},<!!!>},<!!!>>}},{{{<!{u!!!!!>!}!!\'"!>,<<"!>,<!!!>\'>},{}},{{{<!,!eu!>\'u!!{!!!>e}\'o!e!!!!!>o>},{<"!!!>}!<i!!!>!\'!!!uooeo!a!"!iio!!>}},<o!!!{e"}!!!>!u!"{,!>!>!>},<u!\'>},{<!>},<a!a}!!!>{!i!!!!auo<i>}},{<"\'!>},<{e!!!>!!uu!>,<!!a>,{<o"o!>},<!>,<!"}"o!{\'{,!>},<>}}}},{{{<!!{"""!!,>},<!i<<>},{{<!!o"!e>}},{{{<e}!!!}>}},{<<!!!>!>,<!>,<!u!!!!!!,u!!!!!!!!!!!>,<\'!>"!!!>{>}}}},{}}}'
def value(string):
total_points = 0
for i in range(0, len(string)):
if string[i] == '}':
specific_points = 0
for j in range(0, i):
if string[j] == '{':
specific_points += 1
if string[j] == '}':
specific_points -= 1
total_points += specificPoints
return totalPoints
cleaned = ''
in_trash = False
trash_chars = 0
i = 0
while i < len(inputText):
if inTrash == False:
if inputText[i] == '<':
in_trash = True
else:
cleaned += inputText[i]
elif inputText[i] == '!':
i += 1
elif inputText[i] == '>':
in_trash = False
else:
trash_chars += 1
i += 1
print(cleaned)
print('It has', trashChars, 'in the trash.')
print('Worth', value(cleaned), 'points.') |
bedroom_choices = {
'1': 1,
'2': 2,
'3': 3,
'4': 4,
'5': 5,
'6': 6,
'7': 7,
'8': 8,
'9': 9,
'10': 10
}
price_choices = {
'100000': 'KES100,000',
'200000': 'KES200,000',
'300000': 'KES300,000',
'400000': 'KES400,000',
'500000': 'KES500,000',
'600000': 'KES600,000',
'700000': 'KES700,000',
'800000': 'KES800,000',
'900000': 'KES900,000',
'1000000': 'KES1M+',
}
state_choices = {
'BAR': 'Baringo',
'BMT': 'Bomet',
'BGM': 'Bungoma',
'BSA': 'Busia',
'EGM': 'Elgeyo Marakwet',
'EBU': 'Embu',
'GSA': 'Garissa',
'HMA': 'Homa Bay',
'ISL': 'Isiolo',
'KAJ': 'Kajiado',
'KAK': 'Kakamega',
'KCO': 'Kericho',
'KBU': 'Kiambu',
'KLF': 'Kilifi',
'KIR': 'Kirinyaga',
'KSI': 'Kisii',
'KSM': 'Kisumu',
'KTU': 'Kitui',
'KLE': 'Kwale',
'LKP': 'Laikipia',
'LAU': 'Lamu',
'MCS': 'Machakos',
'MUE': 'Makueni',
'MDA': 'Mandera',
'MAR': 'Marsabit',
'MRU': 'Meru',
'MIG': 'Migori',
'MSA': 'Mombasa',
'MRA': "Murang'a",
'NBO': 'Nairobi',
'NKU': 'Nakuru',
'NDI': 'Nandi',
'NRK': 'Narok',
'NYI': 'Nyamira',
'NDR': 'Nyandarua',
'NER': 'Nyeri',
'SMB': 'Samburu',
'SYA': 'Siaya',
'TVT': 'Taita Taveta',
'TAN': 'Tana River',
'TNT': 'Tharaka Nithi',
'TRN': 'Trans Nzoia',
'TUR': 'Turkana',
'USG': 'Uasin Gishu',
'VHG': 'Vihiga',
'WJR': 'Wajir',
'PKT': 'West Pokot'
}
| bedroom_choices = {'1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, '10': 10}
price_choices = {'100000': 'KES100,000', '200000': 'KES200,000', '300000': 'KES300,000', '400000': 'KES400,000', '500000': 'KES500,000', '600000': 'KES600,000', '700000': 'KES700,000', '800000': 'KES800,000', '900000': 'KES900,000', '1000000': 'KES1M+'}
state_choices = {'BAR': 'Baringo', 'BMT': 'Bomet', 'BGM': 'Bungoma', 'BSA': 'Busia', 'EGM': 'Elgeyo Marakwet', 'EBU': 'Embu', 'GSA': 'Garissa', 'HMA': 'Homa Bay', 'ISL': 'Isiolo', 'KAJ': 'Kajiado', 'KAK': 'Kakamega', 'KCO': 'Kericho', 'KBU': 'Kiambu', 'KLF': 'Kilifi', 'KIR': 'Kirinyaga', 'KSI': 'Kisii', 'KSM': 'Kisumu', 'KTU': 'Kitui', 'KLE': 'Kwale', 'LKP': 'Laikipia', 'LAU': 'Lamu', 'MCS': 'Machakos', 'MUE': 'Makueni', 'MDA': 'Mandera', 'MAR': 'Marsabit', 'MRU': 'Meru', 'MIG': 'Migori', 'MSA': 'Mombasa', 'MRA': "Murang'a", 'NBO': 'Nairobi', 'NKU': 'Nakuru', 'NDI': 'Nandi', 'NRK': 'Narok', 'NYI': 'Nyamira', 'NDR': 'Nyandarua', 'NER': 'Nyeri', 'SMB': 'Samburu', 'SYA': 'Siaya', 'TVT': 'Taita Taveta', 'TAN': 'Tana River', 'TNT': 'Tharaka Nithi', 'TRN': 'Trans Nzoia', 'TUR': 'Turkana', 'USG': 'Uasin Gishu', 'VHG': 'Vihiga', 'WJR': 'Wajir', 'PKT': 'West Pokot'} |
with open("./Day_Three/input.txt") as File:
input = File.read().strip().split("\n")
class Main():
def __init__(self, input):
self.input = input
def partOne(input: str) -> int:
finalArr = [ {0:0, 1:0} for _ in range(len(input[0]))]
for row in input:
for i, v in enumerate(row):
v = int(v)
finalArr[i][v] += 1
print(finalArr)
gam = [0] * len(finalArr)
eps = [0]* len(finalArr)
for j, v in enumerate(finalArr):
gam[j] = "0" if v[0]>v[1] else "1"
eps[j] = "1" if v[0]>v[1] else "0"
def binToDec(bin):
print(bin)
dec = 0
for i in range(len(bin)):
digit = bin.pop()
if digit == '1':
dec = dec + pow(2, i)
return(dec)
powerConsumption = binToDec(gam) * binToDec(eps)
print(powerConsumption)
# Part 2
def partTwo(input: str) -> int:
arr = input
def binToDec(bin):
dec = 0
bin = [i for i in bin]
for i in range(len(bin)):
digit = bin.pop()
if digit == '1':
dec = dec + pow(2, i)
return(dec)
searchVal = 0
rowIndex = 0
charIndex = 0
finalVal = []
while rowIndex <= len(input[0])-1:
left = []
right = []
for i, row in enumerate(input):
left.append(row) if row[charIndex] == "0" else right.append(row)
# Generator Logic
if searchVal == 1:
input = right if len(right) >= len(left) else left
# Scrubber Logic
if searchVal == 0:
input = left if len(left) <= len(right) else right
rowIndex += 1
charIndex += 1
left = []
right = []
if len(input) == 1 and searchVal == 0:
print("Generator Result: ", input)
finalVal.append(binToDec(input[0]))
rowIndex = 0
charIndex = 0
searchVal = 1
input = arr
if len(input) == 1 and searchVal == 1:
print("Scrubber Result: ", input)
finalVal.append(binToDec(input[0]))
print(finalVal[0] * finalVal[1])
main = Main
# main.partOne(input)
main.partTwo(input)
| with open('./Day_Three/input.txt') as file:
input = File.read().strip().split('\n')
class Main:
def __init__(self, input):
self.input = input
def part_one(input: str) -> int:
final_arr = [{0: 0, 1: 0} for _ in range(len(input[0]))]
for row in input:
for (i, v) in enumerate(row):
v = int(v)
finalArr[i][v] += 1
print(finalArr)
gam = [0] * len(finalArr)
eps = [0] * len(finalArr)
for (j, v) in enumerate(finalArr):
gam[j] = '0' if v[0] > v[1] else '1'
eps[j] = '1' if v[0] > v[1] else '0'
def bin_to_dec(bin):
print(bin)
dec = 0
for i in range(len(bin)):
digit = bin.pop()
if digit == '1':
dec = dec + pow(2, i)
return dec
power_consumption = bin_to_dec(gam) * bin_to_dec(eps)
print(powerConsumption)
def part_two(input: str) -> int:
arr = input
def bin_to_dec(bin):
dec = 0
bin = [i for i in bin]
for i in range(len(bin)):
digit = bin.pop()
if digit == '1':
dec = dec + pow(2, i)
return dec
search_val = 0
row_index = 0
char_index = 0
final_val = []
while rowIndex <= len(input[0]) - 1:
left = []
right = []
for (i, row) in enumerate(input):
left.append(row) if row[charIndex] == '0' else right.append(row)
if searchVal == 1:
input = right if len(right) >= len(left) else left
if searchVal == 0:
input = left if len(left) <= len(right) else right
row_index += 1
char_index += 1
left = []
right = []
if len(input) == 1 and searchVal == 0:
print('Generator Result: ', input)
finalVal.append(bin_to_dec(input[0]))
row_index = 0
char_index = 0
search_val = 1
input = arr
if len(input) == 1 and searchVal == 1:
print('Scrubber Result: ', input)
finalVal.append(bin_to_dec(input[0]))
print(finalVal[0] * finalVal[1])
main = Main
main.partTwo(input) |
# Single Number
# Given a non-empty array of integers, every element appears twice except for one. Find that single one.
# Note:
# Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
# Example 1:
# Input: [2,2,1]
# Output: 1
# Example 2:
# Input: [4,1,2,1,2]
# Output: 4
def singleNumber(nums):
seen = []
for i in nums:
if i in seen:
seen.remove(i)
else:
seen.append(i)
return seen[0]
if __name__ == "__main__":
nums = list(map(int, input().split(',')))
r = singleNumber(nums)
print(r)
| def single_number(nums):
seen = []
for i in nums:
if i in seen:
seen.remove(i)
else:
seen.append(i)
return seen[0]
if __name__ == '__main__':
nums = list(map(int, input().split(',')))
r = single_number(nums)
print(r) |
n = int(input())
cod = []
tmp = False
for i in range(n):
cod.append(input())
for i in range(n):
for j in list(set(cod) - set(cod[i])):
for k in list(set(cod) - set([cod[i],j])):
if k in cod[i] + j or k in j + cod[i]:
print(k)
tmp = True
break
if tmp:
break
if tmp:
break
if not tmp:
print('ok')
| n = int(input())
cod = []
tmp = False
for i in range(n):
cod.append(input())
for i in range(n):
for j in list(set(cod) - set(cod[i])):
for k in list(set(cod) - set([cod[i], j])):
if k in cod[i] + j or k in j + cod[i]:
print(k)
tmp = True
break
if tmp:
break
if tmp:
break
if not tmp:
print('ok') |
# Leo colorizer control file for splus mode.
# This file is in the public domain.
# Properties for splus mode.
properties = {
"doubleBracketIndent": "false",
"indentCloseBrackets": "}",
"indentNextLine": "\\s*(((if|while)\\s*\\(|else\\s*|else\\s+if\\s*\\(|for\\s*\\(.*\\))[^{;]*)",
"indentOpenBrackets": "{",
"lineComment": "#",
"lineUpClosingBracket": "true",
"wordBreakChars": "_,+-=<>/?^&*",
}
# Attributes dict for splus_main ruleset.
splus_main_attributes_dict = {
"default": "null",
"digit_re": "(0x[[:xdigit:]]+[lL]?|[[:digit:]]+(e[[:digit:]]*)?[lLdDfF]?)",
"escape": "\\",
"highlight_digits": "true",
"ignore_case": "false",
"no_word_sep": "",
}
# Dictionary of attributes dictionaries for splus mode.
attributesDictDict = {
"splus_main": splus_main_attributes_dict,
}
# Keywords dict for splus_main ruleset.
splus_main_keywords_dict = {
"F": "literal2",
"T": "literal2",
"break": "keyword1",
"case": "keyword1",
"continue": "keyword1",
"default": "keyword1",
"do": "keyword1",
"else": "keyword1",
"for": "keyword1",
"function": "keyword1",
"goto": "keyword1",
"if": "keyword1",
"return": "keyword1",
"sizeof": "keyword1",
"switch": "keyword1",
"while": "keyword1",
}
# Dictionary of keywords dictionaries for splus mode.
keywordsDictDict = {
"splus_main": splus_main_keywords_dict,
}
# Rules for splus_main ruleset.
def splus_rule0(colorer, s, i):
return colorer.match_span(s, i, kind="literal1", begin="\"", end="\"",
at_line_start=False, at_whitespace_end=False, at_word_start=False,
delegate="",exclude_match=False,
no_escape=False, no_line_break=True, no_word_break=False)
def splus_rule1(colorer, s, i):
return colorer.match_span(s, i, kind="literal1", begin="'", end="'",
at_line_start=False, at_whitespace_end=False, at_word_start=False,
delegate="",exclude_match=False,
no_escape=False, no_line_break=True, no_word_break=False)
def splus_rule2(colorer, s, i):
return colorer.match_eol_span(s, i, kind="comment1", seq="#",
at_line_start=False, at_whitespace_end=False, at_word_start=False,
delegate="", exclude_match=False)
def splus_rule3(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="=",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule4(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="!",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule5(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="_",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule6(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq=">=",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule7(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="<=",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule8(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="<-",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule9(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="+",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule10(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="-",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule11(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="/",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule12(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="*",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule13(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq=">",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule14(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="<",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule15(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="%",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule16(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="&",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule17(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="|",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule18(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="^",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule19(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="~",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule20(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="}",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule21(colorer, s, i):
return colorer.match_seq(s, i, kind="operator", seq="{",
at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="")
def splus_rule22(colorer, s, i):
return colorer.match_mark_previous(s, i, kind="label", pattern=":",
at_line_start=False, at_whitespace_end=True, at_word_start=False, exclude_match=True)
def splus_rule23(colorer, s, i):
return colorer.match_mark_previous(s, i, kind="function", pattern="(",
at_line_start=False, at_whitespace_end=False, at_word_start=False, exclude_match=True)
def splus_rule24(colorer, s, i):
return colorer.match_keywords(s, i)
# Rules dict for splus_main ruleset.
rulesDict1 = {
"!": [splus_rule4,],
"\"": [splus_rule0,],
"#": [splus_rule2,],
"%": [splus_rule15,],
"&": [splus_rule16,],
"'": [splus_rule1,],
"(": [splus_rule23,],
"*": [splus_rule12,],
"+": [splus_rule9,],
"-": [splus_rule10,],
"/": [splus_rule11,],
"0": [splus_rule24,],
"1": [splus_rule24,],
"2": [splus_rule24,],
"3": [splus_rule24,],
"4": [splus_rule24,],
"5": [splus_rule24,],
"6": [splus_rule24,],
"7": [splus_rule24,],
"8": [splus_rule24,],
"9": [splus_rule24,],
":": [splus_rule22,],
"<": [splus_rule7,splus_rule8,splus_rule14,],
"=": [splus_rule3,],
">": [splus_rule6,splus_rule13,],
"@": [splus_rule24,],
"A": [splus_rule24,],
"B": [splus_rule24,],
"C": [splus_rule24,],
"D": [splus_rule24,],
"E": [splus_rule24,],
"F": [splus_rule24,],
"G": [splus_rule24,],
"H": [splus_rule24,],
"I": [splus_rule24,],
"J": [splus_rule24,],
"K": [splus_rule24,],
"L": [splus_rule24,],
"M": [splus_rule24,],
"N": [splus_rule24,],
"O": [splus_rule24,],
"P": [splus_rule24,],
"Q": [splus_rule24,],
"R": [splus_rule24,],
"S": [splus_rule24,],
"T": [splus_rule24,],
"U": [splus_rule24,],
"V": [splus_rule24,],
"W": [splus_rule24,],
"X": [splus_rule24,],
"Y": [splus_rule24,],
"Z": [splus_rule24,],
"^": [splus_rule18,],
"_": [splus_rule5,],
"a": [splus_rule24,],
"b": [splus_rule24,],
"c": [splus_rule24,],
"d": [splus_rule24,],
"e": [splus_rule24,],
"f": [splus_rule24,],
"g": [splus_rule24,],
"h": [splus_rule24,],
"i": [splus_rule24,],
"j": [splus_rule24,],
"k": [splus_rule24,],
"l": [splus_rule24,],
"m": [splus_rule24,],
"n": [splus_rule24,],
"o": [splus_rule24,],
"p": [splus_rule24,],
"q": [splus_rule24,],
"r": [splus_rule24,],
"s": [splus_rule24,],
"t": [splus_rule24,],
"u": [splus_rule24,],
"v": [splus_rule24,],
"w": [splus_rule24,],
"x": [splus_rule24,],
"y": [splus_rule24,],
"z": [splus_rule24,],
"{": [splus_rule21,],
"|": [splus_rule17,],
"}": [splus_rule20,],
"~": [splus_rule19,],
}
# x.rulesDictDict for splus mode.
rulesDictDict = {
"splus_main": rulesDict1,
}
# Import dict for splus mode.
importDict = {}
| properties = {'doubleBracketIndent': 'false', 'indentCloseBrackets': '}', 'indentNextLine': '\\s*(((if|while)\\s*\\(|else\\s*|else\\s+if\\s*\\(|for\\s*\\(.*\\))[^{;]*)', 'indentOpenBrackets': '{', 'lineComment': '#', 'lineUpClosingBracket': 'true', 'wordBreakChars': '_,+-=<>/?^&*'}
splus_main_attributes_dict = {'default': 'null', 'digit_re': '(0x[[:xdigit:]]+[lL]?|[[:digit:]]+(e[[:digit:]]*)?[lLdDfF]?)', 'escape': '\\', 'highlight_digits': 'true', 'ignore_case': 'false', 'no_word_sep': ''}
attributes_dict_dict = {'splus_main': splus_main_attributes_dict}
splus_main_keywords_dict = {'F': 'literal2', 'T': 'literal2', 'break': 'keyword1', 'case': 'keyword1', 'continue': 'keyword1', 'default': 'keyword1', 'do': 'keyword1', 'else': 'keyword1', 'for': 'keyword1', 'function': 'keyword1', 'goto': 'keyword1', 'if': 'keyword1', 'return': 'keyword1', 'sizeof': 'keyword1', 'switch': 'keyword1', 'while': 'keyword1'}
keywords_dict_dict = {'splus_main': splus_main_keywords_dict}
def splus_rule0(colorer, s, i):
return colorer.match_span(s, i, kind='literal1', begin='"', end='"', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='', exclude_match=False, no_escape=False, no_line_break=True, no_word_break=False)
def splus_rule1(colorer, s, i):
return colorer.match_span(s, i, kind='literal1', begin="'", end="'", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='', exclude_match=False, no_escape=False, no_line_break=True, no_word_break=False)
def splus_rule2(colorer, s, i):
return colorer.match_eol_span(s, i, kind='comment1', seq='#', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='', exclude_match=False)
def splus_rule3(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='=', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule4(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='!', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule5(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='_', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule6(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='>=', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule7(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='<=', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule8(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='<-', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule9(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='+', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule10(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='-', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule11(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='/', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule12(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='*', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule13(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='>', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule14(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='<', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule15(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='%', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule16(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='&', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule17(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='|', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule18(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='^', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule19(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='~', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule20(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='}', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule21(colorer, s, i):
return colorer.match_seq(s, i, kind='operator', seq='{', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='')
def splus_rule22(colorer, s, i):
return colorer.match_mark_previous(s, i, kind='label', pattern=':', at_line_start=False, at_whitespace_end=True, at_word_start=False, exclude_match=True)
def splus_rule23(colorer, s, i):
return colorer.match_mark_previous(s, i, kind='function', pattern='(', at_line_start=False, at_whitespace_end=False, at_word_start=False, exclude_match=True)
def splus_rule24(colorer, s, i):
return colorer.match_keywords(s, i)
rules_dict1 = {'!': [splus_rule4], '"': [splus_rule0], '#': [splus_rule2], '%': [splus_rule15], '&': [splus_rule16], "'": [splus_rule1], '(': [splus_rule23], '*': [splus_rule12], '+': [splus_rule9], '-': [splus_rule10], '/': [splus_rule11], '0': [splus_rule24], '1': [splus_rule24], '2': [splus_rule24], '3': [splus_rule24], '4': [splus_rule24], '5': [splus_rule24], '6': [splus_rule24], '7': [splus_rule24], '8': [splus_rule24], '9': [splus_rule24], ':': [splus_rule22], '<': [splus_rule7, splus_rule8, splus_rule14], '=': [splus_rule3], '>': [splus_rule6, splus_rule13], '@': [splus_rule24], 'A': [splus_rule24], 'B': [splus_rule24], 'C': [splus_rule24], 'D': [splus_rule24], 'E': [splus_rule24], 'F': [splus_rule24], 'G': [splus_rule24], 'H': [splus_rule24], 'I': [splus_rule24], 'J': [splus_rule24], 'K': [splus_rule24], 'L': [splus_rule24], 'M': [splus_rule24], 'N': [splus_rule24], 'O': [splus_rule24], 'P': [splus_rule24], 'Q': [splus_rule24], 'R': [splus_rule24], 'S': [splus_rule24], 'T': [splus_rule24], 'U': [splus_rule24], 'V': [splus_rule24], 'W': [splus_rule24], 'X': [splus_rule24], 'Y': [splus_rule24], 'Z': [splus_rule24], '^': [splus_rule18], '_': [splus_rule5], 'a': [splus_rule24], 'b': [splus_rule24], 'c': [splus_rule24], 'd': [splus_rule24], 'e': [splus_rule24], 'f': [splus_rule24], 'g': [splus_rule24], 'h': [splus_rule24], 'i': [splus_rule24], 'j': [splus_rule24], 'k': [splus_rule24], 'l': [splus_rule24], 'm': [splus_rule24], 'n': [splus_rule24], 'o': [splus_rule24], 'p': [splus_rule24], 'q': [splus_rule24], 'r': [splus_rule24], 's': [splus_rule24], 't': [splus_rule24], 'u': [splus_rule24], 'v': [splus_rule24], 'w': [splus_rule24], 'x': [splus_rule24], 'y': [splus_rule24], 'z': [splus_rule24], '{': [splus_rule21], '|': [splus_rule17], '}': [splus_rule20], '~': [splus_rule19]}
rules_dict_dict = {'splus_main': rulesDict1}
import_dict = {} |
class Solution(object):
def generateParenthesis(self, N):
if N == 0: return ['']
ans = []
for c in range(N):
for left in self.generateParenthesis(c):
for right in self.generateParenthesis(N-1-c):
ans.append('({}){}'.format(left, right))
return ans | class Solution(object):
def generate_parenthesis(self, N):
if N == 0:
return ['']
ans = []
for c in range(N):
for left in self.generateParenthesis(c):
for right in self.generateParenthesis(N - 1 - c):
ans.append('({}){}'.format(left, right))
return ans |
###########################################################
# Fixed parameters for speech recognition
###########################################################
# Model and feature type
model_type = 'Wav2Letter' # DeepSpeech or Wav2Letter
feature_type = 'mfcc' # rawspeech (Wav2Letter), rawframes (DeepSpeech), spectrogram, mfcc, or logmel
# Audio sampling parameters
sample_rate = 16000 # Sample rate
window_size = 0.02 # Window size for spectrogram in seconds
window_stride = 0.01 # Window stride for spectrogram in seconds
window = 'hamming' # Window type to generate spectrogram
# Audio noise parameters
noise_dir = None # directory to inject noise
noise_prob = 0.4 # probability of noise being added per sample
noise_min = 0.0 # minimum noise level to sample from (1.0 means all noise and no original signal)
noise_max = 0.5 # maximum noise level to sample from (1.0 means all noise and no original signal)
# Dataset and model save location
# Note: for ResNet50 must use pre-aligned transcription (e.g., TIMIT)
labels_path = './labels.json' #Contains all characters for prediction
train_manifest = './manifest_files_cm/libri_train_clean_360_manifest.csv' #relative path to train manifest
val_manifest = './manifest_files_cm/libri_val_clean_manifest.csv' #relative path to val manifest
model_path = 'models/deepspeech_rawspeech.pth' # Location to save best validation model
# Model parameters
hidden_size = 768 # Hidden size of RNNs
hidden_layers = 5 # Number of RNN layers
bias = True # Use biases
rnn_type = 'rnn' #Type of the RNN. rnn|gru|lstm are supported
rnn_act_type = 'relu' #Type of the activation within RNN. tanh | relu are supported
bidirectional = False # Whether or not RNN is uni- or bi-directional
# Training parameters
epochs = 70 # Number of training epochs
learning_anneal = 1.1 # Annealing applied to learning rate every epoch
lr = 0.0003 # Initial learning rate
momentum = 0.9 # Momentum
max_norm = 200 # Norm cutoff to prevent explosion of gradients
l2 = 0 # L2 regularization
batch_size = 20 # Batch size for training
augment = True # Use random tempo and gain perturbations
exit_at_acc = True # Exit at given target accuracy
num_workers = 4 # Number of workers used in data-loading
cuda = True # Use cuda to train model
| model_type = 'Wav2Letter'
feature_type = 'mfcc'
sample_rate = 16000
window_size = 0.02
window_stride = 0.01
window = 'hamming'
noise_dir = None
noise_prob = 0.4
noise_min = 0.0
noise_max = 0.5
labels_path = './labels.json'
train_manifest = './manifest_files_cm/libri_train_clean_360_manifest.csv'
val_manifest = './manifest_files_cm/libri_val_clean_manifest.csv'
model_path = 'models/deepspeech_rawspeech.pth'
hidden_size = 768
hidden_layers = 5
bias = True
rnn_type = 'rnn'
rnn_act_type = 'relu'
bidirectional = False
epochs = 70
learning_anneal = 1.1
lr = 0.0003
momentum = 0.9
max_norm = 200
l2 = 0
batch_size = 20
augment = True
exit_at_acc = True
num_workers = 4
cuda = True |
# --------------
# Code starts here
class_1=[]
class_2=[]
class_1.append('Geoffrey Hinton')
class_1.append('Andrew Ng')
class_1.append('Sebastian Raschka')
class_1.append('Yoshua Bengio')
class_2.append('Hilary Mason')
class_2.append('Carla Gentry')
class_2.append('Corinna Cortes')
new_class=class_1 + class_2
print(new_class)
new_class.append('Peter Warden')
print(new_class)
new_class.remove('Carla Gentry')
print(new_class)
# --------------
# Code starts here
courses={"Math":65,'English':70,'History':80,'French':70, 'Science':60}
total=sum(courses.values())
print(total)
percentage= (total/500) * 100
print(percentage)
# Code ends here
# --------------
# Code starts here
mathematics={'Geoffrey Hinton':78,'Andrew Ng':95,'Sebastian Raschka':65, 'Yoshua Benjio':50,'Hilary Mason':70,'Corinna Cortes':66,'Peter Warden':75}
topper=max(mathematics,key=mathematics.get)
print(topper)
# Code ends here
# --------------
# Given string
topper = 'andrew ng'
# Code starts here
first_name,last_name=list(topper.split())
full_name=last_name + " " + first_name
certificate_name=full_name.upper()
print(certificate_name)
# Code ends here
| class_1 = []
class_2 = []
class_1.append('Geoffrey Hinton')
class_1.append('Andrew Ng')
class_1.append('Sebastian Raschka')
class_1.append('Yoshua Bengio')
class_2.append('Hilary Mason')
class_2.append('Carla Gentry')
class_2.append('Corinna Cortes')
new_class = class_1 + class_2
print(new_class)
new_class.append('Peter Warden')
print(new_class)
new_class.remove('Carla Gentry')
print(new_class)
courses = {'Math': 65, 'English': 70, 'History': 80, 'French': 70, 'Science': 60}
total = sum(courses.values())
print(total)
percentage = total / 500 * 100
print(percentage)
mathematics = {'Geoffrey Hinton': 78, 'Andrew Ng': 95, 'Sebastian Raschka': 65, 'Yoshua Benjio': 50, 'Hilary Mason': 70, 'Corinna Cortes': 66, 'Peter Warden': 75}
topper = max(mathematics, key=mathematics.get)
print(topper)
topper = 'andrew ng'
(first_name, last_name) = list(topper.split())
full_name = last_name + ' ' + first_name
certificate_name = full_name.upper()
print(certificate_name) |
class ChannelBirthday:
def __init__(self, channel_id, server_id):
self.channel_id = channel_id
self.server_id = server_id
def __eq__(self, other):
return self.server_id == other.server_id
| class Channelbirthday:
def __init__(self, channel_id, server_id):
self.channel_id = channel_id
self.server_id = server_id
def __eq__(self, other):
return self.server_id == other.server_id |
# pylint: disable=R0903
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
class WafScenarioMixin(object):
profile = None
def current_subscription(self):
subs = self.cmd("az account show").get_output_in_json()
return subs['id']
| class Wafscenariomixin(object):
profile = None
def current_subscription(self):
subs = self.cmd('az account show').get_output_in_json()
return subs['id'] |
class Trie:
def __init__(self, name, isendofword = False ):
self.name = name
self.isendofword = isendofword
self.elements = dict()
def __repr__(self):
return str(
{
'name' : self.name,
'isendiftheword' : self.isendofword,
'elements' : self.elements.keys()
}
)
def search(trie,name):
new = trie
for i in name:
if i in new.elements:
new = new.elements[i]
else:
return False
return True
def printTrie(trie):
if trie:
print(trie.name)
print(trie.elements)
for node in trie.elements:
printTrie(trie.elements.get(node))
def insert(trie,name):
new = trie
for i in range(len(name)):
if name[i] in new.elements:
new = new.elements[name[i]]
if i == len(name) - 1:
new.isendofword = True
else:
node = Trie(name[i])
new.elements[name[i]] = node
new = node
new.isendofword = True
return trie
def sol(trie,name,flag=False,start=0,word = []):
root = trie
for i in range(start, len(name)):
if name[i] in root.elements:
root = root.elements[name[i]]
word.append(name[i])
if flag:
return False
k = word[:]
for j in root.elements:
k = word[:]
k.append(j)
l = checkdictionary(root.elements[j],name, flag = 1,start = i,word = k)
if l:
return l
if trie.isendofword:
return word
else:
for node in root.elements:
if root.elements[node]:
word.append(node)
break
return word
def checkdictionary(trie,name,flag = False, start = None, word = []):
root = trie
if flag ==1:
for i in range(start,len(name)):
if name[i] in root.elements:
root = root.elements[name[i]]
word.append(name[i])
else:
# if abs(len(name) - len(word)) == 1:
# return word
return False
return word
else:
for i in range(len(name)):
if name[i] in root.elements:
root = root.elements[name[i]]
word.append(name[i])
else:
k = word[:]
for j in root.elements:
k = word[:]
k.append(j)
l = checkdictionary(root.elements[j],name, flag = 1,start = i,word = k)
if l:
return l
return word
def solve():
n, q = map(int, input().split())
dictionary = []
trie = Trie(None)
for i in range(n):
name = input()
trie = insert(trie,name)
for i in range(q):
name = input()
print("".join(sol(trie,name, word = [])))
# printTrie(trie)
if __name__ == '__main__':
for t in range(int(input())):
solve() | class Trie:
def __init__(self, name, isendofword=False):
self.name = name
self.isendofword = isendofword
self.elements = dict()
def __repr__(self):
return str({'name': self.name, 'isendiftheword': self.isendofword, 'elements': self.elements.keys()})
def search(trie, name):
new = trie
for i in name:
if i in new.elements:
new = new.elements[i]
else:
return False
return True
def print_trie(trie):
if trie:
print(trie.name)
print(trie.elements)
for node in trie.elements:
print_trie(trie.elements.get(node))
def insert(trie, name):
new = trie
for i in range(len(name)):
if name[i] in new.elements:
new = new.elements[name[i]]
if i == len(name) - 1:
new.isendofword = True
else:
node = trie(name[i])
new.elements[name[i]] = node
new = node
new.isendofword = True
return trie
def sol(trie, name, flag=False, start=0, word=[]):
root = trie
for i in range(start, len(name)):
if name[i] in root.elements:
root = root.elements[name[i]]
word.append(name[i])
if flag:
return False
k = word[:]
for j in root.elements:
k = word[:]
k.append(j)
l = checkdictionary(root.elements[j], name, flag=1, start=i, word=k)
if l:
return l
if trie.isendofword:
return word
else:
for node in root.elements:
if root.elements[node]:
word.append(node)
break
return word
def checkdictionary(trie, name, flag=False, start=None, word=[]):
root = trie
if flag == 1:
for i in range(start, len(name)):
if name[i] in root.elements:
root = root.elements[name[i]]
word.append(name[i])
else:
return False
return word
else:
for i in range(len(name)):
if name[i] in root.elements:
root = root.elements[name[i]]
word.append(name[i])
else:
k = word[:]
for j in root.elements:
k = word[:]
k.append(j)
l = checkdictionary(root.elements[j], name, flag=1, start=i, word=k)
if l:
return l
return word
def solve():
(n, q) = map(int, input().split())
dictionary = []
trie = trie(None)
for i in range(n):
name = input()
trie = insert(trie, name)
for i in range(q):
name = input()
print(''.join(sol(trie, name, word=[])))
if __name__ == '__main__':
for t in range(int(input())):
solve() |
N = int(input()[-1])
if N in [2, 4, 5, 7, 9]:
print("hon")
elif N in [0, 1, 6, 8]:
print("pon")
else:
print("bon")
| n = int(input()[-1])
if N in [2, 4, 5, 7, 9]:
print('hon')
elif N in [0, 1, 6, 8]:
print('pon')
else:
print('bon') |
# https://www.hackerrank.com/challenges/python-integers-come-in-all-sizes/problem
if __name__ == '__main__':
a = int(input())
b = int(input())
c = int(input())
d = int(input())
caculation = pow(a,b) + pow(c,d)
print(caculation)
| if __name__ == '__main__':
a = int(input())
b = int(input())
c = int(input())
d = int(input())
caculation = pow(a, b) + pow(c, d)
print(caculation) |
# Union-Find with path compression and union with rank
class UF:
def __init__(self, n):
self.count = [1] * n
self.parent = [_ for _ in range(n)]
def find(self, i): # find root(i) and compress the path
if self.parent[i] != i:
self.parent[i] = self.find(self.parent[i])
return self.parent[i]
def union(self, i, j): # return True if already connected
pi, pj = self.find(i), self.find(j)
if pi != pj:
if self.count[pi] < self.count[pj]:
pi, pj = pj, pi
self.parent[pj] = pi
self.count[pi] += self.count[pj]
return False
return True
| class Uf:
def __init__(self, n):
self.count = [1] * n
self.parent = [_ for _ in range(n)]
def find(self, i):
if self.parent[i] != i:
self.parent[i] = self.find(self.parent[i])
return self.parent[i]
def union(self, i, j):
(pi, pj) = (self.find(i), self.find(j))
if pi != pj:
if self.count[pi] < self.count[pj]:
(pi, pj) = (pj, pi)
self.parent[pj] = pi
self.count[pi] += self.count[pj]
return False
return True |
# Author: BHARATHI KANNAN N - Github: https://github.com/bharathikannann, linkedin: https://linkedin.com/in/bharathikannann
#
# ## Doubly Linked List
# - A doubly linked list is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains three fields: two link fields (references to the previous and to the next node in the sequence of nodes) and one data field.
# - The two node links allow traversal of the list in either direction.
#Structure of the node for our doubly linked list
class Node(object):
#Each node has its data and two pointers which points to the next data and previous data
def __init__(self, data, next = None, prev = None):
self.data = data
self.next = next
self.prev = prev
class DoublyLinkedList(object):
# Head of the doubly linked list
def __init__(self):
self.head = None
# ------------------------------------------------------------------------------------------
# Inserting at first
def insertAtFirst(self, data):
newNode = Node(data)
# If head is none then make new node as head
if(self.head == None):
self.head = newNode
# Insert new node before head and change the head
else:
newNode.next = self.head
self.head.prev = newNode
self.head = newNode
# ------------------------------------------------------------------------------------------
# To print all the elements
def show(self):
if(self.head == None):
return
temp = self.head
# traverse till end and print each data
while(temp):
print(temp.data, end="<->")
temp = temp.next
# Last node is none and printed here for convenience
print("None")
# ------------------------------------------------------------------------------------------
# Insert node at last
def insertAtLast(self, data):
if(self.head == None):
return
temp = self.head
# Traverse till prev of last node and attach at last
while(temp.next):
temp = temp.next
newNode = Node(data)
temp.next = newNode
newNode.prev = temp
# ------------------------------------------------------------------------------------------
# Insert at a certain position
def insertAtPosition(self, data, position):
# If position is 1 then insert at start
if(position == 1):
return self.insertAtFirst(data)
newNode = Node(data)
temp = self.head
# Traverse till before the position (-2 because we already start at position 1)
for i in range(position - 2):
# If next of temp is none then we have reached till end. So we cannot insert after None so return
if(temp.next == None):
return
temp = temp.next
# Insert new node betwwen temp and next of temp
newNode.next = temp.next
newNode.prev = temp
# If next of temp is none we cannot change it prev
if(temp.next is not None):
temp.next.prev = newNode
temp.next = newNode
# ------------------------------------------------------------------------------------------
# Delete an element
def delete(self, data):
# If head is none return
if(self.head == None):
return
# If head is the element to be deleted
temp = self.head
if(temp.data == data):
# change head to next element
self.head = temp.next
temp = None
return
# Traverse till end
while(temp):
if(temp.data == data):
break
temp = temp.next
# If temp is none then we have reached till end and no data is found
if(temp == None):
return
# Connect prev node to next of temp
temp.prev.next = temp.next
# If next of temp is none the we cannot link it's prev to prev of temp
if(temp.next):
temp.next.prev = temp.prev
# Disconnect temp
temp.next = None
temp.prev = None
# ------------------------------------------------------------------------------------------
# Delete the entire doubly linked list
def deleteList(self):
self.head = None
# ------------------------------------------------------------------------------------------
# Count of nodes in our doubly linked list
def length(self):
temp = self.head
count = 0
# Traverse each time and increment the count
while(temp):
count +=1
temp = temp.next
return count
# ------------------------------------------------------------------------------------------
# Print all the elements in reverse
def reversePrint(self):
if(self.head == None):
return
temp = self.head
while(temp.next):
temp = temp.next
while(temp):
print(temp.data,end="<->")
temp = temp.prev
print()
if __name__ == "__main__":
dll = DoublyLinkedList()
dll.insertAtFirst(10)
dll.insertAtFirst(20)
dll.insertAtLast(5)
dll.insertAtLast(2)
dll.insertAtPosition(15, 5)
dll.show()
print("Delete an element")
dll.delete(15)
dll.show()
print("Length:" + str(dll.length()))
print("Print in reverse")
dll.reversePrint()
'''
Output
20<->10<->5<->2<->15<->None
Delete an element
20<->10<->5<->2<->None
Length:4
Print in reverse
2<->5<->10<->20<->
''' | class Node(object):
def __init__(self, data, next=None, prev=None):
self.data = data
self.next = next
self.prev = prev
class Doublylinkedlist(object):
def __init__(self):
self.head = None
def insert_at_first(self, data):
new_node = node(data)
if self.head == None:
self.head = newNode
else:
newNode.next = self.head
self.head.prev = newNode
self.head = newNode
def show(self):
if self.head == None:
return
temp = self.head
while temp:
print(temp.data, end='<->')
temp = temp.next
print('None')
def insert_at_last(self, data):
if self.head == None:
return
temp = self.head
while temp.next:
temp = temp.next
new_node = node(data)
temp.next = newNode
newNode.prev = temp
def insert_at_position(self, data, position):
if position == 1:
return self.insertAtFirst(data)
new_node = node(data)
temp = self.head
for i in range(position - 2):
if temp.next == None:
return
temp = temp.next
newNode.next = temp.next
newNode.prev = temp
if temp.next is not None:
temp.next.prev = newNode
temp.next = newNode
def delete(self, data):
if self.head == None:
return
temp = self.head
if temp.data == data:
self.head = temp.next
temp = None
return
while temp:
if temp.data == data:
break
temp = temp.next
if temp == None:
return
temp.prev.next = temp.next
if temp.next:
temp.next.prev = temp.prev
temp.next = None
temp.prev = None
def delete_list(self):
self.head = None
def length(self):
temp = self.head
count = 0
while temp:
count += 1
temp = temp.next
return count
def reverse_print(self):
if self.head == None:
return
temp = self.head
while temp.next:
temp = temp.next
while temp:
print(temp.data, end='<->')
temp = temp.prev
print()
if __name__ == '__main__':
dll = doubly_linked_list()
dll.insertAtFirst(10)
dll.insertAtFirst(20)
dll.insertAtLast(5)
dll.insertAtLast(2)
dll.insertAtPosition(15, 5)
dll.show()
print('Delete an element')
dll.delete(15)
dll.show()
print('Length:' + str(dll.length()))
print('Print in reverse')
dll.reversePrint()
'\n Output\n 20<->10<->5<->2<->15<->None\n Delete an element\n 20<->10<->5<->2<->None\n Length:4\n Print in reverse\n 2<->5<->10<->20<->\n ' |
class ApplicationException(Exception):
...
class NoteExists(ApplicationException):
...
class InputError(ApplicationException):
...
class ActionAborted(ApplicationException):
...
class PathIsNotDefined(ApplicationException):
def __init__(self):
super().__init__(
"Path to notes is not defined. Please add let g:kb_notes_path to your config file"
)
| class Applicationexception(Exception):
...
class Noteexists(ApplicationException):
...
class Inputerror(ApplicationException):
...
class Actionaborted(ApplicationException):
...
class Pathisnotdefined(ApplicationException):
def __init__(self):
super().__init__('Path to notes is not defined. Please add let g:kb_notes_path to your config file') |
___assertEqual(len('123'), 3)
___assertEqual(len(()), 0)
___assertEqual(len((1, 2, 3, 4)), 4)
___assertEqual(len([1, 2, 3, 4]), 4)
___assertEqual(len({}), 0)
___assertEqual(len({'a':1, 'b': 2}), 2)
| ___assert_equal(len('123'), 3)
___assert_equal(len(()), 0)
___assert_equal(len((1, 2, 3, 4)), 4)
___assert_equal(len([1, 2, 3, 4]), 4)
___assert_equal(len({}), 0)
___assert_equal(len({'a': 1, 'b': 2}), 2) |
#1. Create a greeting for your program.
print('welocme to brand name generator')
#2. Ask the user for the city that they grew up in.
city_name = input('enter your city name')
print('city name is '+city_name)
#3. Ask the user for the name of a pet.
pet_name = input('enter your pet name')
print('pet name is ' + pet_name)
#4. Combine the name of their city and pet and show them their band name.
print('my best recomodate :- '+city_name + pet_name)
#5. Make sure the input cursor shows on a new line, see the example at:
# https://band-name-generator-end.appbrewery.repl.run/ | print('welocme to brand name generator')
city_name = input('enter your city name')
print('city name is ' + city_name)
pet_name = input('enter your pet name')
print('pet name is ' + pet_name)
print('my best recomodate :- ' + city_name + pet_name) |
#Validate credit cards using Luhn's algorithm. Input should be 16 digits.
def luhn():
card_number=input("Enter the card number to be checked: ")
def digits_of(n):
return [int(d) for d in str(n)]
digits = digits_of(card_number)
odd = digits[-1::-2]
even = digits[-2::-2]
checksum = 0
checksum += sum(odd)
for d in even:
checksum += sum(digits_of(d*2))
if (checksum % 10):
print("\nThis card is INVALID.")
else:
print("This card is VALID.")
again = input("\nDo want to input another card?(y/n)")
if (str(again)).lower() == "y":
luhn()
if __name__ == "__main__":
luhn() | def luhn():
card_number = input('Enter the card number to be checked: ')
def digits_of(n):
return [int(d) for d in str(n)]
digits = digits_of(card_number)
odd = digits[-1::-2]
even = digits[-2::-2]
checksum = 0
checksum += sum(odd)
for d in even:
checksum += sum(digits_of(d * 2))
if checksum % 10:
print('\nThis card is INVALID.')
else:
print('This card is VALID.')
again = input('\nDo want to input another card?(y/n)')
if str(again).lower() == 'y':
luhn()
if __name__ == '__main__':
luhn() |
# E[0] = sum(Vi/N)
# E[k] = sum(max(Vi, E[k-1])/N)
def expectation(N, K, V, mean):
# # Recursion form fails
# if K == 0: return mean
# e = expectation(N, K-1, V, mean)
# return sum(max(v, e)/N for v in V)
ek = mean
for k in range(K):
ek = sum(max(v, ek)/N for v in V)
return ek
def solve(N, K, V):
mean = sum(V) / N
# return expectation(N, K, V, mean)
return expectation_faster(N, K, sorted(V), mean)
def expectation_faster(N, K, V, mean):
# # Recursion form fails
# if K == 0: return mean
# e = expectation_faster(N, K-1, V, mean)
# x = binary_search(V, e)
# if isinstance(x, tuple): x = x[1]
# return e * x / N + sum(v for v in V[x:]) / N
ek = mean
for k in range(K):
x = binary_search(V, ek)
if isinstance(x, tuple): x = x[1]
ek = ek * x / N + sum(v for v in V[x:]) / N
return ek
def binary_search(array, value):
lo, hi, mid = 0, len(array), 0
while lo < hi:
mid = (lo + hi) // 2
if value < array[mid]:
hi = mid
elif value > array[mid]:
lo = mid + 1
else:
return mid
lo = mid if value > array[mid] else mid - 1
hi = mid if value < array[mid] else mid + 1
return (lo, hi)
if __name__ == '__main__':
T = int(input())
for t in range(1, T+1):
N, K = map(int, input().split())
V = list(map(int, input().split()))
e = solve(N, K, V)
print('Case #{}: {:.6f}'.format(t, e)) | def expectation(N, K, V, mean):
ek = mean
for k in range(K):
ek = sum((max(v, ek) / N for v in V))
return ek
def solve(N, K, V):
mean = sum(V) / N
return expectation_faster(N, K, sorted(V), mean)
def expectation_faster(N, K, V, mean):
ek = mean
for k in range(K):
x = binary_search(V, ek)
if isinstance(x, tuple):
x = x[1]
ek = ek * x / N + sum((v for v in V[x:])) / N
return ek
def binary_search(array, value):
(lo, hi, mid) = (0, len(array), 0)
while lo < hi:
mid = (lo + hi) // 2
if value < array[mid]:
hi = mid
elif value > array[mid]:
lo = mid + 1
else:
return mid
lo = mid if value > array[mid] else mid - 1
hi = mid if value < array[mid] else mid + 1
return (lo, hi)
if __name__ == '__main__':
t = int(input())
for t in range(1, T + 1):
(n, k) = map(int, input().split())
v = list(map(int, input().split()))
e = solve(N, K, V)
print('Case #{}: {:.6f}'.format(t, e)) |
class Msg:
SERVER_BANNER = '''
##### # ###### ####### ##### # # # ##### ####### ###### # # ####### ######
# # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # ###### # # ####### # # ##### ##### ###### # # ##### ######
# ####### # # # # # ####### # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # #
##### # # # # ##### # # # # ##### ####### # # # ####### # #
'''
SERVER_RULES = '1. The server sends you a captcha and you have 5 seconds to solve it\n'
SERVER_RULES += '2. After solving a lot of captchas, we will reward you\n'
SESSION_START = 'Do you want to start a captcha solution session? (Y/N): '
EXIT = 'Close connection...\n'
SERVER_AWARD = 'Thank you for your help. This is a your award: '
SERVER_AWARD += 'Cup{a6f6f28f15b85a6d0a2a0ae4c1460d97f5326f2cfe09fc1cf9ba663285bbca37}\n'
ANSWER_MSG = '\nAnswer: '
SERVER_ANSWER_TIMEOUT = 'Time to solve is out!\n'
CORRECT_CAPTCHA = '[+] Correct!\n'
INCORRECT_CAPTHCA = "[-] Incorrect!\n" | class Msg:
server_banner = '\n ##### # ###### ####### ##### # # # ##### ####### ###### # # ####### ###### \n# # # # # # # # # # # # # # # # # # # # # # # \n# # # # # # # # # # # # # # # # # # # # \n# # # ###### # # ####### # # ##### ##### ###### # # ##### ###### \n# ####### # # # # # ####### # # # # # # # # # \n# # # # # # # # # # # # # # # # # # # # # # \n ##### # # # # ##### # # # # ##### ####### # # # ####### # # \n'
server_rules = '1. The server sends you a captcha and you have 5 seconds to solve it\n'
server_rules += '2. After solving a lot of captchas, we will reward you\n'
session_start = 'Do you want to start a captcha solution session? (Y/N): '
exit = 'Close connection...\n'
server_award = 'Thank you for your help. This is a your award: '
server_award += 'Cup{a6f6f28f15b85a6d0a2a0ae4c1460d97f5326f2cfe09fc1cf9ba663285bbca37}\n'
answer_msg = '\nAnswer: '
server_answer_timeout = 'Time to solve is out!\n'
correct_captcha = '[+] Correct!\n'
incorrect_capthca = '[-] Incorrect!\n' |
sample_request = {
'id': '91b20aa5-9ccf-498d-8944-5d3a32ab1b37',
'timestamp': '2018-02-17T11:26:58.76Z',
'lang': 'en',
'result': {
'source': 'agent',
'resolvedQuery': 'hello',
'speech': '',
'action': 'hello',
'actionIncomplete': False,
'parameters': {
},
'contexts': [
],
'metadata': {
'intentId': '6e4d06c7-bdd0-4e44-b130-a1169f2920c8',
'webhookUsed': 'true',
'webhookForSlotFillingUsed': 'false',
'intentName': 'hello'
},
'fulfillment': {
'speech': '',
'messages': [
{
'type': 0,
'speech': ''
}
]
},
'score': 1.0
},
'status': {
'code': 200,
'errorType': 'success',
'webhookTimedOut': False
},
'sessionId': '926e72d8-35ee-4640-8a69-a77c87f475f5'
}
sample_context = {
"name": "some-context",
"lifespan": 10,
"parameters": {
"key": "value"
}
}
| sample_request = {'id': '91b20aa5-9ccf-498d-8944-5d3a32ab1b37', 'timestamp': '2018-02-17T11:26:58.76Z', 'lang': 'en', 'result': {'source': 'agent', 'resolvedQuery': 'hello', 'speech': '', 'action': 'hello', 'actionIncomplete': False, 'parameters': {}, 'contexts': [], 'metadata': {'intentId': '6e4d06c7-bdd0-4e44-b130-a1169f2920c8', 'webhookUsed': 'true', 'webhookForSlotFillingUsed': 'false', 'intentName': 'hello'}, 'fulfillment': {'speech': '', 'messages': [{'type': 0, 'speech': ''}]}, 'score': 1.0}, 'status': {'code': 200, 'errorType': 'success', 'webhookTimedOut': False}, 'sessionId': '926e72d8-35ee-4640-8a69-a77c87f475f5'}
sample_context = {'name': 'some-context', 'lifespan': 10, 'parameters': {'key': 'value'}} |
n = int(input())
A = [0] + [int(i) for i in input().split()]
def maxHeapify(i):
left = 2 * i
right = 2 * i + 1
if left <= n and A[left] > A[i]:
largest = left
else:
largest = i
if right <= n and A[right] > A[largest]:
largest = right
if largest != i:
A[i], A[largest] = A[largest], A[i]
maxHeapify(largest)
for i in range(int(n/2), 0, -1):
maxHeapify(i)
print('', *A[1:])
| n = int(input())
a = [0] + [int(i) for i in input().split()]
def max_heapify(i):
left = 2 * i
right = 2 * i + 1
if left <= n and A[left] > A[i]:
largest = left
else:
largest = i
if right <= n and A[right] > A[largest]:
largest = right
if largest != i:
(A[i], A[largest]) = (A[largest], A[i])
max_heapify(largest)
for i in range(int(n / 2), 0, -1):
max_heapify(i)
print('', *A[1:]) |
class SkString:
def __init__(self, text):
self.text = text
def to_upper(self):
return self.text.upper()
def to_lower(self):
return self.text.lower()
def to_title(self):
return self.text.title() | class Skstring:
def __init__(self, text):
self.text = text
def to_upper(self):
return self.text.upper()
def to_lower(self):
return self.text.lower()
def to_title(self):
return self.text.title() |
def read_file(file_name):
data = ""
with open(file_name, "r") as file:
data = file.read()
return data
def parse_input(text):
lines = text.split("\n")
return lines
def part1():
lines = parse_input(read_file("day4_input.txt"))
good_passphrases = 0
for line in lines:
words = line.split(" ")
mapped_words = set()
is_good_passphrase = True
for word in words:
if word in mapped_words:
is_good_passphrase = False
else:
mapped_words.add(word)
if is_good_passphrase is True:
good_passphrases += 1
print(good_passphrases)
def part2():
lines = parse_input(read_file("day4_input.txt"))
good_passphrases = 0
for line in lines:
words = line.split(" ")
mapped_words = set()
is_good_passphrase = True
for word in words:
sorted_word = ''.join(sorted(word))
if sorted_word in mapped_words:
is_good_passphrase = False
else:
mapped_words.add(sorted_word)
if is_good_passphrase is True:
good_passphrases += 1
print(good_passphrases)
part1()
part2()
| def read_file(file_name):
data = ''
with open(file_name, 'r') as file:
data = file.read()
return data
def parse_input(text):
lines = text.split('\n')
return lines
def part1():
lines = parse_input(read_file('day4_input.txt'))
good_passphrases = 0
for line in lines:
words = line.split(' ')
mapped_words = set()
is_good_passphrase = True
for word in words:
if word in mapped_words:
is_good_passphrase = False
else:
mapped_words.add(word)
if is_good_passphrase is True:
good_passphrases += 1
print(good_passphrases)
def part2():
lines = parse_input(read_file('day4_input.txt'))
good_passphrases = 0
for line in lines:
words = line.split(' ')
mapped_words = set()
is_good_passphrase = True
for word in words:
sorted_word = ''.join(sorted(word))
if sorted_word in mapped_words:
is_good_passphrase = False
else:
mapped_words.add(sorted_word)
if is_good_passphrase is True:
good_passphrases += 1
print(good_passphrases)
part1()
part2() |
#This script will read 3 numbers "n", "x" and "y" and print a validation for each number in the range 1:n of whether the number is divisible by x, divisible by y or divisible by both.
def xyMultiple(n,x,y):
for i in range(1,n+1):
isDivX = False
isDivY = False
res = "Div by "
if i % x == 0:
isDivX = True
res += str(x)
if i % y == 0:
isDivY = True
res += str(y)
if isDivX or isDivY:
if isDivX and isDivY:
res = "Div by Both"
else:
res = i
print(res)
xyMultiple(2500,7,13) | def xy_multiple(n, x, y):
for i in range(1, n + 1):
is_div_x = False
is_div_y = False
res = 'Div by '
if i % x == 0:
is_div_x = True
res += str(x)
if i % y == 0:
is_div_y = True
res += str(y)
if isDivX or isDivY:
if isDivX and isDivY:
res = 'Div by Both'
else:
res = i
print(res)
xy_multiple(2500, 7, 13) |
# -*- coding: utf-8 -*-
def salpeter(m, ksi0=1.0):
return ksi0 * m ** -2.35
| def salpeter(m, ksi0=1.0):
return ksi0 * m ** (-2.35) |
sysconfig = dict(
experiment = 'Exp',
)
devices = dict(
Sample = device('nicos.devices.sample.Sample',
description = 'The currently used sample',
),
Exp = device('nicos.devices.experiment.Experiment',
description = 'experiment object',
dataroot = 'data',
sendmail = True,
serviceexp = 'p0',
sample = 'Sample',
),
)
| sysconfig = dict(experiment='Exp')
devices = dict(Sample=device('nicos.devices.sample.Sample', description='The currently used sample'), Exp=device('nicos.devices.experiment.Experiment', description='experiment object', dataroot='data', sendmail=True, serviceexp='p0', sample='Sample')) |
def order_square(a):
right = 0
while right < len(a) and a[right] < 0:
right +=1
left = right-1
output = []
while left >= 0 and right < len(a):
if a[left]**2 < a[right]**2:
output.append(a[left]**2)
left -=1
else:
output.append(a[right]**2)
right +=1
while left >=0 :
output.append(a[left]**2)
left -=1
while right < len(a):
output.append(a[right]**2)
right +=1
return output
if __name__ == "__main__":
a = [-4, -3, 1, 2, 4]
print(order_square(a)) | def order_square(a):
right = 0
while right < len(a) and a[right] < 0:
right += 1
left = right - 1
output = []
while left >= 0 and right < len(a):
if a[left] ** 2 < a[right] ** 2:
output.append(a[left] ** 2)
left -= 1
else:
output.append(a[right] ** 2)
right += 1
while left >= 0:
output.append(a[left] ** 2)
left -= 1
while right < len(a):
output.append(a[right] ** 2)
right += 1
return output
if __name__ == '__main__':
a = [-4, -3, 1, 2, 4]
print(order_square(a)) |
#
# PySNMP MIB module GENOSALARMNOTIFICATION-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/GENOSALARMNOTIFICATION-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:19:28 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
ObjectIdentity, Counter32, NotificationType, Integer32, enterprises, TimeTicks, Counter64, Bits, Unsigned32, IpAddress, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, iso, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "Counter32", "NotificationType", "Integer32", "enterprises", "TimeTicks", "Counter64", "Bits", "Unsigned32", "IpAddress", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "iso", "ModuleIdentity")
TextualConvention, TruthValue, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "TruthValue", "DisplayString")
alcatel = MibIdentifier((1, 3, 6, 1, 4, 1, 637))
nmu = MibIdentifier((1, 3, 6, 1, 4, 1, 637, 65))
genos = MibIdentifier((1, 3, 6, 1, 4, 1, 637, 65, 1))
alarmHandoff = ModuleIdentity((1, 3, 6, 1, 4, 1, 637, 65, 1, 1))
if mibBuilder.loadTexts: alarmHandoff.setLastUpdated('9807030000Z')
if mibBuilder.loadTexts: alarmHandoff.setOrganization('Alcatel GENOS Development')
if mibBuilder.loadTexts: alarmHandoff.setContactInfo('')
if mibBuilder.loadTexts: alarmHandoff.setDescription('The MIB module for GENOS alarm handoff')
alarmHandoffObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1))
unsolicitedEventsEnabled = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: unsolicitedEventsEnabled.setStatus('current')
if mibBuilder.loadTexts: unsolicitedEventsEnabled.setDescription('Status indicating if unsolicited alarm traps are to be generated')
alarmTable = MibTable((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2), )
if mibBuilder.loadTexts: alarmTable.setStatus('current')
if mibBuilder.loadTexts: alarmTable.setDescription('The list of currently raised alarms')
alarmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1), ).setIndexNames((0, "GENOSALARMNOTIFICATION-MIB", "currentAlarmId"))
if mibBuilder.loadTexts: alarmEntry.setStatus('current')
if mibBuilder.loadTexts: alarmEntry.setDescription('Each entry contains 1 alarm description')
class AlarmId(Counter32):
subtypeSpec = Counter32.subtypeSpec + ValueRangeConstraint(1, 4294967295)
currentAlarmId = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 1), AlarmId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentAlarmId.setStatus('current')
if mibBuilder.loadTexts: currentAlarmId.setDescription('A unique identifier for an alarm')
friendlyName = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: friendlyName.setStatus('current')
if mibBuilder.loadTexts: friendlyName.setDescription('The source of the alarm in a human readable form')
eventTime = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: eventTime.setStatus('current')
if mibBuilder.loadTexts: eventTime.setDescription('The time the alarm event occurred')
eventType = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: eventType.setStatus('current')
if mibBuilder.loadTexts: eventType.setDescription('A conversion of the X721 notification types to a human readable form')
probableCause = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: probableCause.setStatus('current')
if mibBuilder.loadTexts: probableCause.setDescription('A conversion of the local and global OIDs to a human readable form')
perceivedSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 6), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: perceivedSeverity.setStatus('current')
if mibBuilder.loadTexts: perceivedSeverity.setDescription('The perceived Severity of the of the alarm it will be one of: indeterminate critical major minor warning cleared')
additionalText = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: additionalText.setStatus('current')
if mibBuilder.loadTexts: additionalText.setDescription('Additional text for the alarm')
specificProblems = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: specificProblems.setStatus('current')
if mibBuilder.loadTexts: specificProblems.setDescription('Specific Problems of the alarm')
acknowledgementStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 9), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acknowledgementStatus.setStatus('current')
if mibBuilder.loadTexts: acknowledgementStatus.setDescription('The Acknowledgement Status of the alarm')
reserveStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 10), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: reserveStatus.setStatus('current')
if mibBuilder.loadTexts: reserveStatus.setDescription('The Reserve Status of the alarm')
additionalInformation = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 11), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: additionalInformation.setStatus('current')
if mibBuilder.loadTexts: additionalInformation.setDescription('The Additional Information of the alarm')
neLocationName = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 12), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: neLocationName.setStatus('current')
if mibBuilder.loadTexts: neLocationName.setDescription('The NE Location Name of the alarm')
managedobjectInstance = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 13), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: managedobjectInstance.setStatus('current')
if mibBuilder.loadTexts: managedobjectInstance.setDescription('The managed object Instance of the alarm')
acknowledgementUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 14), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acknowledgementUserName.setStatus('current')
if mibBuilder.loadTexts: acknowledgementUserName.setDescription('acknowledgement User Name')
asIdentity = MibTableColumn((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 15), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: asIdentity.setStatus('current')
if mibBuilder.loadTexts: asIdentity.setDescription('The identity of the AS')
alarmHandoffTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2))
alarmRaise = NotificationType((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 1)).setObjects(("GENOSALARMNOTIFICATION-MIB", "currentAlarmId"), ("GENOSALARMNOTIFICATION-MIB", "friendlyName"), ("GENOSALARMNOTIFICATION-MIB", "eventTime"), ("GENOSALARMNOTIFICATION-MIB", "eventType"), ("GENOSALARMNOTIFICATION-MIB", "probableCause"), ("GENOSALARMNOTIFICATION-MIB", "perceivedSeverity"), ("GENOSALARMNOTIFICATION-MIB", "additionalText"), ("GENOSALARMNOTIFICATION-MIB", "specificProblems"), ("GENOSALARMNOTIFICATION-MIB", "acknowledgementStatus"), ("GENOSALARMNOTIFICATION-MIB", "reserveStatus"), ("GENOSALARMNOTIFICATION-MIB", "additionalInformation"), ("GENOSALARMNOTIFICATION-MIB", "neLocationName"), ("GENOSALARMNOTIFICATION-MIB", "managedobjectInstance"), ("GENOSALARMNOTIFICATION-MIB", "acknowledgementUserName"), ("GENOSALARMNOTIFICATION-MIB", "asIdentity"))
if mibBuilder.loadTexts: alarmRaise.setStatus('current')
if mibBuilder.loadTexts: alarmRaise.setDescription('Notification that an alarm is currently active')
alarmClear = NotificationType((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 2)).setObjects(("GENOSALARMNOTIFICATION-MIB", "currentAlarmId"), ("GENOSALARMNOTIFICATION-MIB", "eventTime"), ("GENOSALARMNOTIFICATION-MIB", "friendlyName"), ("GENOSALARMNOTIFICATION-MIB", "probableCause"), ("GENOSALARMNOTIFICATION-MIB", "asIdentity"))
if mibBuilder.loadTexts: alarmClear.setStatus('current')
if mibBuilder.loadTexts: alarmClear.setDescription('Notification that an alarm has been cleared')
alarmAck = NotificationType((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 3)).setObjects(("GENOSALARMNOTIFICATION-MIB", "listAlarmIds"), ("GENOSALARMNOTIFICATION-MIB", "operatorName"), ("GENOSALARMNOTIFICATION-MIB", "asIdentity"))
if mibBuilder.loadTexts: alarmAck.setStatus('current')
if mibBuilder.loadTexts: alarmAck.setDescription('Notification that an alarm has been acknowledged')
alarmPurge = NotificationType((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 4)).setObjects(("GENOSALARMNOTIFICATION-MIB", "purgelistAlarmIds"), ("GENOSALARMNOTIFICATION-MIB", "asIdentity"))
if mibBuilder.loadTexts: alarmPurge.setStatus('current')
if mibBuilder.loadTexts: alarmPurge.setDescription('Notification that an alarm has been purged')
alarmReserve = NotificationType((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 5)).setObjects(("GENOSALARMNOTIFICATION-MIB", "reservelistAlarmIds"), ("GENOSALARMNOTIFICATION-MIB", "reserveoperatorName"), ("GENOSALARMNOTIFICATION-MIB", "asIdentity"))
if mibBuilder.loadTexts: alarmReserve.setStatus('current')
if mibBuilder.loadTexts: alarmReserve.setDescription('Notification that an alarm has been reserved')
alarmUnreserve = NotificationType((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 6)).setObjects(("GENOSALARMNOTIFICATION-MIB", "unreservelistAlarmIds"), ("GENOSALARMNOTIFICATION-MIB", "unreserveoperatorName"), ("GENOSALARMNOTIFICATION-MIB", "asIdentity"))
if mibBuilder.loadTexts: alarmUnreserve.setStatus('current')
if mibBuilder.loadTexts: alarmUnreserve.setDescription('Notification that an alarm has been unreserved')
asConnectionStatus = NotificationType((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 7)).setObjects(("GENOSALARMNOTIFICATION-MIB", "asconnectionstatus"), ("GENOSALARMNOTIFICATION-MIB", "asId"))
if mibBuilder.loadTexts: asConnectionStatus.setStatus('current')
if mibBuilder.loadTexts: asConnectionStatus.setDescription('Notification that an AS status is changed')
alarmUnAck = NotificationType((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 8)).setObjects(("GENOSALARMNOTIFICATION-MIB", "unacklistAlarmIds"), ("GENOSALARMNOTIFICATION-MIB", "unackoperatorName"), ("GENOSALARMNOTIFICATION-MIB", "asIdentity"))
if mibBuilder.loadTexts: alarmUnAck.setStatus('current')
if mibBuilder.loadTexts: alarmUnAck.setDescription('Notification that an alarm has been unacknowledged')
alarmHandoffAck = MibIdentifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 3))
listAlarmIds = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 3, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: listAlarmIds.setStatus('current')
if mibBuilder.loadTexts: listAlarmIds.setDescription('The list of Alarms which are acknowledged by the Operator ')
operatorName = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 3, 2), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: operatorName.setStatus('current')
if mibBuilder.loadTexts: operatorName.setDescription('The name of the Operator that performed the acknowledgement ')
ackasIdentityFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 3, 3), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ackasIdentityFilter.setStatus('current')
if mibBuilder.loadTexts: ackasIdentityFilter.setDescription('Dinamic Filter for AS Identity ')
alarmHandoffFilter = MibIdentifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4))
friendlyNameFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: friendlyNameFilter.setStatus('current')
if mibBuilder.loadTexts: friendlyNameFilter.setDescription('Dinamic Filter for Friendly name ')
eventTimeFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 2), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: eventTimeFilter.setStatus('current')
if mibBuilder.loadTexts: eventTimeFilter.setDescription('Dinamic Filter for event Time')
eventTypeFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 3), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: eventTypeFilter.setStatus('current')
if mibBuilder.loadTexts: eventTypeFilter.setDescription('Dinamic Filter for event Type')
probableCauseFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 4), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: probableCauseFilter.setStatus('current')
if mibBuilder.loadTexts: probableCauseFilter.setDescription('Dinamic Filter for probable Cause')
perceivedSeverityFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 5), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: perceivedSeverityFilter.setStatus('current')
if mibBuilder.loadTexts: perceivedSeverityFilter.setDescription('Dinamic Filter for perceived Severity')
specificProblemsFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 6), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: specificProblemsFilter.setStatus('current')
if mibBuilder.loadTexts: specificProblemsFilter.setDescription('Dinamic Filter for specific Problems')
nelocationNameFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 7), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: nelocationNameFilter.setStatus('current')
if mibBuilder.loadTexts: nelocationNameFilter.setDescription('Dinamic Filter for nelocation name ')
additionalInformationFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 8), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: additionalInformationFilter.setStatus('current')
if mibBuilder.loadTexts: additionalInformationFilter.setDescription('Dinamic Filter for additional Information ')
managedobjectInstanceFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 9), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: managedobjectInstanceFilter.setStatus('current')
if mibBuilder.loadTexts: managedobjectInstanceFilter.setDescription('Dinamic Filter for managed object Instance ')
asIdentityFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 10), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: asIdentityFilter.setStatus('current')
if mibBuilder.loadTexts: asIdentityFilter.setDescription('Dinamic Filter for AS Identity ')
alarmHandoffPurge = MibIdentifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 5))
purgelistAlarmIds = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 5, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: purgelistAlarmIds.setStatus('current')
if mibBuilder.loadTexts: purgelistAlarmIds.setDescription('The list of Alarms which are purged by the Operator ')
purgeoperatorName = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 5, 2), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: purgeoperatorName.setStatus('current')
if mibBuilder.loadTexts: purgeoperatorName.setDescription('The name of the Operator that performed the purge ')
purgeasIdentityFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 5, 3), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: purgeasIdentityFilter.setStatus('current')
if mibBuilder.loadTexts: purgeasIdentityFilter.setDescription('Dinamic Filter for AS Identity ')
alarmHandoffReserve = MibIdentifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 6))
reservelistAlarmIds = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 6, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: reservelistAlarmIds.setStatus('current')
if mibBuilder.loadTexts: reservelistAlarmIds.setDescription('The list of Alarms which are reserved by the Operator ')
reserveoperatorName = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 6, 2), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: reserveoperatorName.setStatus('current')
if mibBuilder.loadTexts: reserveoperatorName.setDescription('The name of the Operator that performed the reserved ')
reserveasIdentityFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 6, 3), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: reserveasIdentityFilter.setStatus('current')
if mibBuilder.loadTexts: reserveasIdentityFilter.setDescription('Dinamic Filter for AS Identity ')
alarmHandoffUnreserve = MibIdentifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 7))
unreservelistAlarmIds = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 7, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: unreservelistAlarmIds.setStatus('current')
if mibBuilder.loadTexts: unreservelistAlarmIds.setDescription('The list of Alarms which are unreserved by the Operator ')
unreserveoperatorName = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 7, 2), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: unreserveoperatorName.setStatus('current')
if mibBuilder.loadTexts: unreserveoperatorName.setDescription('The name of the Operator that performed the unreserved ')
unreserveasIdentityFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 7, 3), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: unreserveasIdentityFilter.setStatus('current')
if mibBuilder.loadTexts: unreserveasIdentityFilter.setDescription('Dinamic Filter for AS Identity ')
alarmHandoffasConnectionStatus = MibIdentifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 8))
asconnectionstatus = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 8, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: asconnectionstatus.setStatus('current')
if mibBuilder.loadTexts: asconnectionstatus.setDescription('The status of the AS ')
asId = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 8, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: asId.setStatus('current')
if mibBuilder.loadTexts: asId.setDescription('The identity of the AS ')
alarmHandoffUnAck = MibIdentifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 9))
unacklistAlarmIds = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 9, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: unacklistAlarmIds.setStatus('current')
if mibBuilder.loadTexts: unacklistAlarmIds.setDescription('The list of Alarms which are unacknowledged by the Operator ')
unackoperatorName = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 9, 2), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: unackoperatorName.setStatus('current')
if mibBuilder.loadTexts: unackoperatorName.setDescription('The name of the Operator that performed the unacknowledgement ')
unackasIdentityFilter = MibScalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 9, 3), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: unackasIdentityFilter.setStatus('current')
if mibBuilder.loadTexts: unackasIdentityFilter.setDescription('Dinamic Filter for AS Identity ')
mibBuilder.exportSymbols("GENOSALARMNOTIFICATION-MIB", alarmHandoffObjects=alarmHandoffObjects, eventTime=eventTime, unreserveasIdentityFilter=unreserveasIdentityFilter, friendlyName=friendlyName, genos=genos, alarmEntry=alarmEntry, alarmHandoffFilter=alarmHandoffFilter, reserveasIdentityFilter=reserveasIdentityFilter, asIdentity=asIdentity, unackoperatorName=unackoperatorName, asId=asId, eventTimeFilter=eventTimeFilter, alarmHandoffUnreserve=alarmHandoffUnreserve, alarmAck=alarmAck, asIdentityFilter=asIdentityFilter, additionalInformation=additionalInformation, reservelistAlarmIds=reservelistAlarmIds, alarmHandoffReserve=alarmHandoffReserve, alarmUnreserve=alarmUnreserve, alarmPurge=alarmPurge, probableCause=probableCause, asconnectionstatus=asconnectionstatus, PYSNMP_MODULE_ID=alarmHandoff, friendlyNameFilter=friendlyNameFilter, asConnectionStatus=asConnectionStatus, alarmHandoffUnAck=alarmHandoffUnAck, eventType=eventType, currentAlarmId=currentAlarmId, reserveStatus=reserveStatus, perceivedSeverity=perceivedSeverity, alarmTable=alarmTable, AlarmId=AlarmId, unsolicitedEventsEnabled=unsolicitedEventsEnabled, neLocationName=neLocationName, alarmRaise=alarmRaise, probableCauseFilter=probableCauseFilter, purgeoperatorName=purgeoperatorName, purgeasIdentityFilter=purgeasIdentityFilter, listAlarmIds=listAlarmIds, specificProblems=specificProblems, alarmHandoff=alarmHandoff, managedobjectInstance=managedobjectInstance, alarmHandoffasConnectionStatus=alarmHandoffasConnectionStatus, unackasIdentityFilter=unackasIdentityFilter, alcatel=alcatel, additionalText=additionalText, alarmUnAck=alarmUnAck, alarmHandoffAck=alarmHandoffAck, operatorName=operatorName, alarmHandoffPurge=alarmHandoffPurge, perceivedSeverityFilter=perceivedSeverityFilter, acknowledgementUserName=acknowledgementUserName, alarmHandoffTraps=alarmHandoffTraps, eventTypeFilter=eventTypeFilter, unreservelistAlarmIds=unreservelistAlarmIds, managedobjectInstanceFilter=managedobjectInstanceFilter, acknowledgementStatus=acknowledgementStatus, unreserveoperatorName=unreserveoperatorName, specificProblemsFilter=specificProblemsFilter, nmu=nmu, reserveoperatorName=reserveoperatorName, alarmClear=alarmClear, unacklistAlarmIds=unacklistAlarmIds, alarmReserve=alarmReserve, purgelistAlarmIds=purgelistAlarmIds, ackasIdentityFilter=ackasIdentityFilter, additionalInformationFilter=additionalInformationFilter, nelocationNameFilter=nelocationNameFilter)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_union, single_value_constraint, constraints_intersection, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(object_identity, counter32, notification_type, integer32, enterprises, time_ticks, counter64, bits, unsigned32, ip_address, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, iso, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'Counter32', 'NotificationType', 'Integer32', 'enterprises', 'TimeTicks', 'Counter64', 'Bits', 'Unsigned32', 'IpAddress', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'iso', 'ModuleIdentity')
(textual_convention, truth_value, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'TruthValue', 'DisplayString')
alcatel = mib_identifier((1, 3, 6, 1, 4, 1, 637))
nmu = mib_identifier((1, 3, 6, 1, 4, 1, 637, 65))
genos = mib_identifier((1, 3, 6, 1, 4, 1, 637, 65, 1))
alarm_handoff = module_identity((1, 3, 6, 1, 4, 1, 637, 65, 1, 1))
if mibBuilder.loadTexts:
alarmHandoff.setLastUpdated('9807030000Z')
if mibBuilder.loadTexts:
alarmHandoff.setOrganization('Alcatel GENOS Development')
if mibBuilder.loadTexts:
alarmHandoff.setContactInfo('')
if mibBuilder.loadTexts:
alarmHandoff.setDescription('The MIB module for GENOS alarm handoff')
alarm_handoff_objects = mib_identifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1))
unsolicited_events_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 1), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
unsolicitedEventsEnabled.setStatus('current')
if mibBuilder.loadTexts:
unsolicitedEventsEnabled.setDescription('Status indicating if unsolicited alarm traps are to be generated')
alarm_table = mib_table((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2))
if mibBuilder.loadTexts:
alarmTable.setStatus('current')
if mibBuilder.loadTexts:
alarmTable.setDescription('The list of currently raised alarms')
alarm_entry = mib_table_row((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1)).setIndexNames((0, 'GENOSALARMNOTIFICATION-MIB', 'currentAlarmId'))
if mibBuilder.loadTexts:
alarmEntry.setStatus('current')
if mibBuilder.loadTexts:
alarmEntry.setDescription('Each entry contains 1 alarm description')
class Alarmid(Counter32):
subtype_spec = Counter32.subtypeSpec + value_range_constraint(1, 4294967295)
current_alarm_id = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 1), alarm_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
currentAlarmId.setStatus('current')
if mibBuilder.loadTexts:
currentAlarmId.setDescription('A unique identifier for an alarm')
friendly_name = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
friendlyName.setStatus('current')
if mibBuilder.loadTexts:
friendlyName.setDescription('The source of the alarm in a human readable form')
event_time = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
eventTime.setStatus('current')
if mibBuilder.loadTexts:
eventTime.setDescription('The time the alarm event occurred')
event_type = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
eventType.setStatus('current')
if mibBuilder.loadTexts:
eventType.setDescription('A conversion of the X721 notification types to a human readable form')
probable_cause = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
probableCause.setStatus('current')
if mibBuilder.loadTexts:
probableCause.setDescription('A conversion of the local and global OIDs to a human readable form')
perceived_severity = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 6), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
perceivedSeverity.setStatus('current')
if mibBuilder.loadTexts:
perceivedSeverity.setDescription('The perceived Severity of the of the alarm it will be one of: indeterminate critical major minor warning cleared')
additional_text = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
additionalText.setStatus('current')
if mibBuilder.loadTexts:
additionalText.setDescription('Additional text for the alarm')
specific_problems = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
specificProblems.setStatus('current')
if mibBuilder.loadTexts:
specificProblems.setDescription('Specific Problems of the alarm')
acknowledgement_status = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 9), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acknowledgementStatus.setStatus('current')
if mibBuilder.loadTexts:
acknowledgementStatus.setDescription('The Acknowledgement Status of the alarm')
reserve_status = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 10), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
reserveStatus.setStatus('current')
if mibBuilder.loadTexts:
reserveStatus.setDescription('The Reserve Status of the alarm')
additional_information = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 11), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
additionalInformation.setStatus('current')
if mibBuilder.loadTexts:
additionalInformation.setDescription('The Additional Information of the alarm')
ne_location_name = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 12), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
neLocationName.setStatus('current')
if mibBuilder.loadTexts:
neLocationName.setDescription('The NE Location Name of the alarm')
managedobject_instance = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 13), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
managedobjectInstance.setStatus('current')
if mibBuilder.loadTexts:
managedobjectInstance.setDescription('The managed object Instance of the alarm')
acknowledgement_user_name = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 14), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acknowledgementUserName.setStatus('current')
if mibBuilder.loadTexts:
acknowledgementUserName.setDescription('acknowledgement User Name')
as_identity = mib_table_column((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 1, 2, 1, 15), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
asIdentity.setStatus('current')
if mibBuilder.loadTexts:
asIdentity.setDescription('The identity of the AS')
alarm_handoff_traps = mib_identifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2))
alarm_raise = notification_type((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 1)).setObjects(('GENOSALARMNOTIFICATION-MIB', 'currentAlarmId'), ('GENOSALARMNOTIFICATION-MIB', 'friendlyName'), ('GENOSALARMNOTIFICATION-MIB', 'eventTime'), ('GENOSALARMNOTIFICATION-MIB', 'eventType'), ('GENOSALARMNOTIFICATION-MIB', 'probableCause'), ('GENOSALARMNOTIFICATION-MIB', 'perceivedSeverity'), ('GENOSALARMNOTIFICATION-MIB', 'additionalText'), ('GENOSALARMNOTIFICATION-MIB', 'specificProblems'), ('GENOSALARMNOTIFICATION-MIB', 'acknowledgementStatus'), ('GENOSALARMNOTIFICATION-MIB', 'reserveStatus'), ('GENOSALARMNOTIFICATION-MIB', 'additionalInformation'), ('GENOSALARMNOTIFICATION-MIB', 'neLocationName'), ('GENOSALARMNOTIFICATION-MIB', 'managedobjectInstance'), ('GENOSALARMNOTIFICATION-MIB', 'acknowledgementUserName'), ('GENOSALARMNOTIFICATION-MIB', 'asIdentity'))
if mibBuilder.loadTexts:
alarmRaise.setStatus('current')
if mibBuilder.loadTexts:
alarmRaise.setDescription('Notification that an alarm is currently active')
alarm_clear = notification_type((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 2)).setObjects(('GENOSALARMNOTIFICATION-MIB', 'currentAlarmId'), ('GENOSALARMNOTIFICATION-MIB', 'eventTime'), ('GENOSALARMNOTIFICATION-MIB', 'friendlyName'), ('GENOSALARMNOTIFICATION-MIB', 'probableCause'), ('GENOSALARMNOTIFICATION-MIB', 'asIdentity'))
if mibBuilder.loadTexts:
alarmClear.setStatus('current')
if mibBuilder.loadTexts:
alarmClear.setDescription('Notification that an alarm has been cleared')
alarm_ack = notification_type((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 3)).setObjects(('GENOSALARMNOTIFICATION-MIB', 'listAlarmIds'), ('GENOSALARMNOTIFICATION-MIB', 'operatorName'), ('GENOSALARMNOTIFICATION-MIB', 'asIdentity'))
if mibBuilder.loadTexts:
alarmAck.setStatus('current')
if mibBuilder.loadTexts:
alarmAck.setDescription('Notification that an alarm has been acknowledged')
alarm_purge = notification_type((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 4)).setObjects(('GENOSALARMNOTIFICATION-MIB', 'purgelistAlarmIds'), ('GENOSALARMNOTIFICATION-MIB', 'asIdentity'))
if mibBuilder.loadTexts:
alarmPurge.setStatus('current')
if mibBuilder.loadTexts:
alarmPurge.setDescription('Notification that an alarm has been purged')
alarm_reserve = notification_type((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 5)).setObjects(('GENOSALARMNOTIFICATION-MIB', 'reservelistAlarmIds'), ('GENOSALARMNOTIFICATION-MIB', 'reserveoperatorName'), ('GENOSALARMNOTIFICATION-MIB', 'asIdentity'))
if mibBuilder.loadTexts:
alarmReserve.setStatus('current')
if mibBuilder.loadTexts:
alarmReserve.setDescription('Notification that an alarm has been reserved')
alarm_unreserve = notification_type((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 6)).setObjects(('GENOSALARMNOTIFICATION-MIB', 'unreservelistAlarmIds'), ('GENOSALARMNOTIFICATION-MIB', 'unreserveoperatorName'), ('GENOSALARMNOTIFICATION-MIB', 'asIdentity'))
if mibBuilder.loadTexts:
alarmUnreserve.setStatus('current')
if mibBuilder.loadTexts:
alarmUnreserve.setDescription('Notification that an alarm has been unreserved')
as_connection_status = notification_type((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 7)).setObjects(('GENOSALARMNOTIFICATION-MIB', 'asconnectionstatus'), ('GENOSALARMNOTIFICATION-MIB', 'asId'))
if mibBuilder.loadTexts:
asConnectionStatus.setStatus('current')
if mibBuilder.loadTexts:
asConnectionStatus.setDescription('Notification that an AS status is changed')
alarm_un_ack = notification_type((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 2, 8)).setObjects(('GENOSALARMNOTIFICATION-MIB', 'unacklistAlarmIds'), ('GENOSALARMNOTIFICATION-MIB', 'unackoperatorName'), ('GENOSALARMNOTIFICATION-MIB', 'asIdentity'))
if mibBuilder.loadTexts:
alarmUnAck.setStatus('current')
if mibBuilder.loadTexts:
alarmUnAck.setDescription('Notification that an alarm has been unacknowledged')
alarm_handoff_ack = mib_identifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 3))
list_alarm_ids = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 3, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
listAlarmIds.setStatus('current')
if mibBuilder.loadTexts:
listAlarmIds.setDescription('The list of Alarms which are acknowledged by the Operator ')
operator_name = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 3, 2), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
operatorName.setStatus('current')
if mibBuilder.loadTexts:
operatorName.setDescription('The name of the Operator that performed the acknowledgement ')
ackas_identity_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 3, 3), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ackasIdentityFilter.setStatus('current')
if mibBuilder.loadTexts:
ackasIdentityFilter.setDescription('Dinamic Filter for AS Identity ')
alarm_handoff_filter = mib_identifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4))
friendly_name_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
friendlyNameFilter.setStatus('current')
if mibBuilder.loadTexts:
friendlyNameFilter.setDescription('Dinamic Filter for Friendly name ')
event_time_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 2), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
eventTimeFilter.setStatus('current')
if mibBuilder.loadTexts:
eventTimeFilter.setDescription('Dinamic Filter for event Time')
event_type_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 3), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
eventTypeFilter.setStatus('current')
if mibBuilder.loadTexts:
eventTypeFilter.setDescription('Dinamic Filter for event Type')
probable_cause_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 4), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
probableCauseFilter.setStatus('current')
if mibBuilder.loadTexts:
probableCauseFilter.setDescription('Dinamic Filter for probable Cause')
perceived_severity_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 5), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
perceivedSeverityFilter.setStatus('current')
if mibBuilder.loadTexts:
perceivedSeverityFilter.setDescription('Dinamic Filter for perceived Severity')
specific_problems_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 6), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
specificProblemsFilter.setStatus('current')
if mibBuilder.loadTexts:
specificProblemsFilter.setDescription('Dinamic Filter for specific Problems')
nelocation_name_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 7), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
nelocationNameFilter.setStatus('current')
if mibBuilder.loadTexts:
nelocationNameFilter.setDescription('Dinamic Filter for nelocation name ')
additional_information_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 8), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
additionalInformationFilter.setStatus('current')
if mibBuilder.loadTexts:
additionalInformationFilter.setDescription('Dinamic Filter for additional Information ')
managedobject_instance_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 9), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
managedobjectInstanceFilter.setStatus('current')
if mibBuilder.loadTexts:
managedobjectInstanceFilter.setDescription('Dinamic Filter for managed object Instance ')
as_identity_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 4, 10), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
asIdentityFilter.setStatus('current')
if mibBuilder.loadTexts:
asIdentityFilter.setDescription('Dinamic Filter for AS Identity ')
alarm_handoff_purge = mib_identifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 5))
purgelist_alarm_ids = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 5, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
purgelistAlarmIds.setStatus('current')
if mibBuilder.loadTexts:
purgelistAlarmIds.setDescription('The list of Alarms which are purged by the Operator ')
purgeoperator_name = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 5, 2), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
purgeoperatorName.setStatus('current')
if mibBuilder.loadTexts:
purgeoperatorName.setDescription('The name of the Operator that performed the purge ')
purgeas_identity_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 5, 3), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
purgeasIdentityFilter.setStatus('current')
if mibBuilder.loadTexts:
purgeasIdentityFilter.setDescription('Dinamic Filter for AS Identity ')
alarm_handoff_reserve = mib_identifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 6))
reservelist_alarm_ids = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 6, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
reservelistAlarmIds.setStatus('current')
if mibBuilder.loadTexts:
reservelistAlarmIds.setDescription('The list of Alarms which are reserved by the Operator ')
reserveoperator_name = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 6, 2), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
reserveoperatorName.setStatus('current')
if mibBuilder.loadTexts:
reserveoperatorName.setDescription('The name of the Operator that performed the reserved ')
reserveas_identity_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 6, 3), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
reserveasIdentityFilter.setStatus('current')
if mibBuilder.loadTexts:
reserveasIdentityFilter.setDescription('Dinamic Filter for AS Identity ')
alarm_handoff_unreserve = mib_identifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 7))
unreservelist_alarm_ids = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 7, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
unreservelistAlarmIds.setStatus('current')
if mibBuilder.loadTexts:
unreservelistAlarmIds.setDescription('The list of Alarms which are unreserved by the Operator ')
unreserveoperator_name = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 7, 2), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
unreserveoperatorName.setStatus('current')
if mibBuilder.loadTexts:
unreserveoperatorName.setDescription('The name of the Operator that performed the unreserved ')
unreserveas_identity_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 7, 3), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
unreserveasIdentityFilter.setStatus('current')
if mibBuilder.loadTexts:
unreserveasIdentityFilter.setDescription('Dinamic Filter for AS Identity ')
alarm_handoffas_connection_status = mib_identifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 8))
asconnectionstatus = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 8, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
asconnectionstatus.setStatus('current')
if mibBuilder.loadTexts:
asconnectionstatus.setDescription('The status of the AS ')
as_id = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 8, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
asId.setStatus('current')
if mibBuilder.loadTexts:
asId.setDescription('The identity of the AS ')
alarm_handoff_un_ack = mib_identifier((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 9))
unacklist_alarm_ids = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 9, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
unacklistAlarmIds.setStatus('current')
if mibBuilder.loadTexts:
unacklistAlarmIds.setDescription('The list of Alarms which are unacknowledged by the Operator ')
unackoperator_name = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 9, 2), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
unackoperatorName.setStatus('current')
if mibBuilder.loadTexts:
unackoperatorName.setDescription('The name of the Operator that performed the unacknowledgement ')
unackas_identity_filter = mib_scalar((1, 3, 6, 1, 4, 1, 637, 65, 1, 1, 9, 3), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
unackasIdentityFilter.setStatus('current')
if mibBuilder.loadTexts:
unackasIdentityFilter.setDescription('Dinamic Filter for AS Identity ')
mibBuilder.exportSymbols('GENOSALARMNOTIFICATION-MIB', alarmHandoffObjects=alarmHandoffObjects, eventTime=eventTime, unreserveasIdentityFilter=unreserveasIdentityFilter, friendlyName=friendlyName, genos=genos, alarmEntry=alarmEntry, alarmHandoffFilter=alarmHandoffFilter, reserveasIdentityFilter=reserveasIdentityFilter, asIdentity=asIdentity, unackoperatorName=unackoperatorName, asId=asId, eventTimeFilter=eventTimeFilter, alarmHandoffUnreserve=alarmHandoffUnreserve, alarmAck=alarmAck, asIdentityFilter=asIdentityFilter, additionalInformation=additionalInformation, reservelistAlarmIds=reservelistAlarmIds, alarmHandoffReserve=alarmHandoffReserve, alarmUnreserve=alarmUnreserve, alarmPurge=alarmPurge, probableCause=probableCause, asconnectionstatus=asconnectionstatus, PYSNMP_MODULE_ID=alarmHandoff, friendlyNameFilter=friendlyNameFilter, asConnectionStatus=asConnectionStatus, alarmHandoffUnAck=alarmHandoffUnAck, eventType=eventType, currentAlarmId=currentAlarmId, reserveStatus=reserveStatus, perceivedSeverity=perceivedSeverity, alarmTable=alarmTable, AlarmId=AlarmId, unsolicitedEventsEnabled=unsolicitedEventsEnabled, neLocationName=neLocationName, alarmRaise=alarmRaise, probableCauseFilter=probableCauseFilter, purgeoperatorName=purgeoperatorName, purgeasIdentityFilter=purgeasIdentityFilter, listAlarmIds=listAlarmIds, specificProblems=specificProblems, alarmHandoff=alarmHandoff, managedobjectInstance=managedobjectInstance, alarmHandoffasConnectionStatus=alarmHandoffasConnectionStatus, unackasIdentityFilter=unackasIdentityFilter, alcatel=alcatel, additionalText=additionalText, alarmUnAck=alarmUnAck, alarmHandoffAck=alarmHandoffAck, operatorName=operatorName, alarmHandoffPurge=alarmHandoffPurge, perceivedSeverityFilter=perceivedSeverityFilter, acknowledgementUserName=acknowledgementUserName, alarmHandoffTraps=alarmHandoffTraps, eventTypeFilter=eventTypeFilter, unreservelistAlarmIds=unreservelistAlarmIds, managedobjectInstanceFilter=managedobjectInstanceFilter, acknowledgementStatus=acknowledgementStatus, unreserveoperatorName=unreserveoperatorName, specificProblemsFilter=specificProblemsFilter, nmu=nmu, reserveoperatorName=reserveoperatorName, alarmClear=alarmClear, unacklistAlarmIds=unacklistAlarmIds, alarmReserve=alarmReserve, purgelistAlarmIds=purgelistAlarmIds, ackasIdentityFilter=ackasIdentityFilter, additionalInformationFilter=additionalInformationFilter, nelocationNameFilter=nelocationNameFilter) |
def array123(arr):
myarr = [1,2,3]
for i in range(len(arr)):
if arr[i: (i+3)] == myarr:
return True
return False
result = array123([1, 1, 2, 3, 1])
print(result)
result = array123([1, 1, 2, 4, 1])
print(result)
result = array123([1, 1, 2, 1, 2, 3])
print(result) | def array123(arr):
myarr = [1, 2, 3]
for i in range(len(arr)):
if arr[i:i + 3] == myarr:
return True
return False
result = array123([1, 1, 2, 3, 1])
print(result)
result = array123([1, 1, 2, 4, 1])
print(result)
result = array123([1, 1, 2, 1, 2, 3])
print(result) |
def getListInFile(fileName):
'''
DOCSTRING : Gets and reads a file in args
INPUT : name of file to open
OUTPUT : return list of colours
'''
with open(fileName, mode='r') as cFile:
listOfColours = cFile.readlines()
return listOfColours
cFile.close() | def get_list_in_file(fileName):
"""
DOCSTRING : Gets and reads a file in args
INPUT : name of file to open
OUTPUT : return list of colours
"""
with open(fileName, mode='r') as c_file:
list_of_colours = cFile.readlines()
return listOfColours
cFile.close() |
class DictAsObject(dict):
def __getattr__(self, name):
return self.__getitem__(name)
def __getitem__(self, name):
value = dict.__getitem__(self, name)
if isinstance(value, dict) and not isinstance(value, DictAsObject):
value = DictAsObject(value)
dict.__setitem__(self, name, value)
return value
def __setattr__(self, name, value):
if isinstance(value, dict) and not isinstance(value, DictAsObject):
value = DictAsObject(value)
dict.__setitem__(self, name, value)
def __delattr__(self, name):
return self.__delitem__(name)
| class Dictasobject(dict):
def __getattr__(self, name):
return self.__getitem__(name)
def __getitem__(self, name):
value = dict.__getitem__(self, name)
if isinstance(value, dict) and (not isinstance(value, DictAsObject)):
value = dict_as_object(value)
dict.__setitem__(self, name, value)
return value
def __setattr__(self, name, value):
if isinstance(value, dict) and (not isinstance(value, DictAsObject)):
value = dict_as_object(value)
dict.__setitem__(self, name, value)
def __delattr__(self, name):
return self.__delitem__(name) |
def find_median(Arr, start, size):
myList = []
for i in range(start, start + size):
myList.append(Arr[i])
myList.sort()
return myList[size // 2]
def fastSelect(array, k):
n = len(array)
if 0 < k <= n:
setOfMedians = []
arr_less_P = []
arr_equal_P = []
arr_more_P = []
i = 0
while i < n // 5:
median = find_median(array, 5 * i, 5)
setOfMedians.append(median)
i += 1
if 5 * i < n:
median = find_median(array, 5 * i, n % 5)
setOfMedians.append(median)
if len(setOfMedians) == 1:
pivot = setOfMedians[0]
elif len(setOfMedians) > 1:
pivot = fastSelect(setOfMedians, len(setOfMedians) // 2)
for element in array:
if element < pivot:
arr_less_P.append(element)
elif element > pivot:
arr_more_P.append(element)
else:
arr_equal_P.append(element)
if k <= len(arr_less_P):
return fastSelect(arr_less_P, k)
elif k > (len(arr_less_P) + len(arr_equal_P)):
return fastSelect(arr_more_P, (k - len(arr_less_P) - len(arr_equal_P)))
else:
return pivot
if __name__ == '__main__':
Arr = [6, 80, 36, 8, 23, 7, 10, 12, 42]
k = 5
print(fastSelect(Arr, k)) # Outputs 12
Arr = [5, 2, 20, 17, 11, 13, 8, 9, 11]
k = 5
print(fastSelect(Arr, k)) # Outputs 11
Arr = [6, 80, 36, 8, 23, 7, 10, 12, 42, 99]
k = 10
print(fastSelect(Arr, k)) # Outputs 99
| def find_median(Arr, start, size):
my_list = []
for i in range(start, start + size):
myList.append(Arr[i])
myList.sort()
return myList[size // 2]
def fast_select(array, k):
n = len(array)
if 0 < k <= n:
set_of_medians = []
arr_less_p = []
arr_equal_p = []
arr_more_p = []
i = 0
while i < n // 5:
median = find_median(array, 5 * i, 5)
setOfMedians.append(median)
i += 1
if 5 * i < n:
median = find_median(array, 5 * i, n % 5)
setOfMedians.append(median)
if len(setOfMedians) == 1:
pivot = setOfMedians[0]
elif len(setOfMedians) > 1:
pivot = fast_select(setOfMedians, len(setOfMedians) // 2)
for element in array:
if element < pivot:
arr_less_P.append(element)
elif element > pivot:
arr_more_P.append(element)
else:
arr_equal_P.append(element)
if k <= len(arr_less_P):
return fast_select(arr_less_P, k)
elif k > len(arr_less_P) + len(arr_equal_P):
return fast_select(arr_more_P, k - len(arr_less_P) - len(arr_equal_P))
else:
return pivot
if __name__ == '__main__':
arr = [6, 80, 36, 8, 23, 7, 10, 12, 42]
k = 5
print(fast_select(Arr, k))
arr = [5, 2, 20, 17, 11, 13, 8, 9, 11]
k = 5
print(fast_select(Arr, k))
arr = [6, 80, 36, 8, 23, 7, 10, 12, 42, 99]
k = 10
print(fast_select(Arr, k)) |
def BiRNN(x, weights, biases):
lstm_fw_cell = rnn_cell.BasicLSTMCell(n_hidden, forget_bias=1.0)
lstm_bw_cell = rnn_cell.BasicLSTMCell(n_hidden, forget_bias=1.0)
outputs = rnn.bidirectional_rnn(lstm_fw_cell, lstm_bw_cell, x, dtype=tf.float32)
return tf.matmul(outputs[-1], weights['out']) + biases['out'] | def bi_rnn(x, weights, biases):
lstm_fw_cell = rnn_cell.BasicLSTMCell(n_hidden, forget_bias=1.0)
lstm_bw_cell = rnn_cell.BasicLSTMCell(n_hidden, forget_bias=1.0)
outputs = rnn.bidirectional_rnn(lstm_fw_cell, lstm_bw_cell, x, dtype=tf.float32)
return tf.matmul(outputs[-1], weights['out']) + biases['out'] |
# https://app.codesignal.com/arcade/code-arcade/mirror-lake/rNrF4v5etMdFNKD3s
def isSubstitutionCipher(string1, string2):
# Is one string able to be made with a substitution cipher?
# We don't know what it is, but we can start comparing both
# and inferring what a candidate substitution may be. Then,
# this substitution has to hold on onwards for it to be valid.
cipher = {}
used = {}
for i in range(len(string1)):
char1, char2 = string1[i], string2[i]
# Character found has not been substituted so far.
if not(char1 in cipher):
# But we have to find out if the characters that will
# be used for substitution hasn't been used elsewhere.
if char2 in used:
return False
cipher[char1] = char2
used[char2] = 1
# The cipher is not consistent with previous substitutions.
elif cipher[char1] != char2:
return False
# The substitutions were consistent all along.
return True
| def is_substitution_cipher(string1, string2):
cipher = {}
used = {}
for i in range(len(string1)):
(char1, char2) = (string1[i], string2[i])
if not char1 in cipher:
if char2 in used:
return False
cipher[char1] = char2
used[char2] = 1
elif cipher[char1] != char2:
return False
return True |
class humano:
def __init__(self, nombre, armadura, nivel, ataque, ojos=2, piernas=2, dientes=32,salud=100):
self.ojos=ojos
self.piernas=piernas
self.dientes=dientes
self.nombre=nombre
self.armadura=armadura
self.nivel=nivel
self.ataque=ataque
self.salud=salud
def atacar_humano(self,orco):
orco.salud=orco.salud-(self.ataque-orco.armadura)
print(orco.salud)
return(orco.salud)
def no_vivo_humano(self):
if self.salud<=0:
return(True)
else:
return(False)
def todos_atributos_humano(self):
print(f"ojos:{self.ojos} | piernas: {self.piernas} | dientes:{self.dientes} |\
nombre:{self.nombre} | armadura:{self.armadura} | nivel:{self.nivel} |\
ataque:{self.ataque} | salud:{self.salud}") | class Humano:
def __init__(self, nombre, armadura, nivel, ataque, ojos=2, piernas=2, dientes=32, salud=100):
self.ojos = ojos
self.piernas = piernas
self.dientes = dientes
self.nombre = nombre
self.armadura = armadura
self.nivel = nivel
self.ataque = ataque
self.salud = salud
def atacar_humano(self, orco):
orco.salud = orco.salud - (self.ataque - orco.armadura)
print(orco.salud)
return orco.salud
def no_vivo_humano(self):
if self.salud <= 0:
return True
else:
return False
def todos_atributos_humano(self):
print(f'ojos:{self.ojos} | piernas: {self.piernas} | dientes:{self.dientes} | nombre:{self.nombre} | armadura:{self.armadura} | nivel:{self.nivel} | ataque:{self.ataque} | salud:{self.salud}') |
for _ in range(int(input())):
c = [int(n) for n in input()]
i_t = (c[3] ^ c[4] ^ c[5] ^ c[6]) << 2 | (c[1] ^ c[2] ^ c[5] ^ c[6]) << 1 | (c[0] ^ c[2] ^ c[4] ^ c[6])
if i_t: c[i_t - 1] ^= 1
print(''.join(map(str, [c[2], c[4], c[5], c[6]])))
| for _ in range(int(input())):
c = [int(n) for n in input()]
i_t = (c[3] ^ c[4] ^ c[5] ^ c[6]) << 2 | (c[1] ^ c[2] ^ c[5] ^ c[6]) << 1 | c[0] ^ c[2] ^ c[4] ^ c[6]
if i_t:
c[i_t - 1] ^= 1
print(''.join(map(str, [c[2], c[4], c[5], c[6]]))) |
class Config:
batch_size = 100
n_epochs = 50
init_lr = 1e-2 # this would not take effect as using cyclic lr
momentum = 0.0
weight_decay = 5e-4
eta_min = 1e-5
eta_max = 1e-2
shuffle = False
part_labeled = 0.3 # the percentage of labeled data
n_features = 39
n_classes = 48
n_hidden_nodes = n_classes*2
temp = 1
teacher_tar_fmt = 'teacher_plbl{plbl}.tar'
baseline_tar_fmt = 'baseline_plbl{plbl}.tar'
student_tar_fmt = 'student_plbl{plbl}_T{temp}.tar'
cmp_tar_fmt = "cmp_optim_{optim}_plbl{plbl}.tar" | class Config:
batch_size = 100
n_epochs = 50
init_lr = 0.01
momentum = 0.0
weight_decay = 0.0005
eta_min = 1e-05
eta_max = 0.01
shuffle = False
part_labeled = 0.3
n_features = 39
n_classes = 48
n_hidden_nodes = n_classes * 2
temp = 1
teacher_tar_fmt = 'teacher_plbl{plbl}.tar'
baseline_tar_fmt = 'baseline_plbl{plbl}.tar'
student_tar_fmt = 'student_plbl{plbl}_T{temp}.tar'
cmp_tar_fmt = 'cmp_optim_{optim}_plbl{plbl}.tar' |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
name = "popcorntime"
source = "https://aur.archlinux.org/popcorntime-bin.git"
def pre_build():
for line in edit_file("PKGBUILD"):
if line.startswith("pkgname="):
print("pkgname=popcorntime")
else:
print(line)
| name = 'popcorntime'
source = 'https://aur.archlinux.org/popcorntime-bin.git'
def pre_build():
for line in edit_file('PKGBUILD'):
if line.startswith('pkgname='):
print('pkgname=popcorntime')
else:
print(line) |
# 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 isValidBST(self, root: TreeNode) -> bool:
return self.scanTree(root, None, None)
def scanTree(self, root, minEnd, maxEnd):
outcome = True
if root.left != None:
if root.left.val >= root.val:
outcome = False
if minEnd != None and root.left.val <= minEnd:
outcome = False
if maxEnd != None and root.left.val >= maxEnd:
outcome = False
if not self.scanTree(root.left, minEnd, root.val):
outcome = False
if outcome == True and root.right != None:
if root.right.val <= root.val:
outcome = False
if minEnd != None and root.right.val <= minEnd:
outcome = False
if maxEnd != None and root.right.val >= maxEnd:
outcome = False
if not self.scanTree(root.right, root.val, maxEnd):
outcome = False
return outcome
| class Solution:
def is_valid_bst(self, root: TreeNode) -> bool:
return self.scanTree(root, None, None)
def scan_tree(self, root, minEnd, maxEnd):
outcome = True
if root.left != None:
if root.left.val >= root.val:
outcome = False
if minEnd != None and root.left.val <= minEnd:
outcome = False
if maxEnd != None and root.left.val >= maxEnd:
outcome = False
if not self.scanTree(root.left, minEnd, root.val):
outcome = False
if outcome == True and root.right != None:
if root.right.val <= root.val:
outcome = False
if minEnd != None and root.right.val <= minEnd:
outcome = False
if maxEnd != None and root.right.val >= maxEnd:
outcome = False
if not self.scanTree(root.right, root.val, maxEnd):
outcome = False
return outcome |
for c in range(10, -1, -1):
print(c)
print('FOGOOOOOS !!!')
| for c in range(10, -1, -1):
print(c)
print('FOGOOOOOS !!!') |
class Animal:
def __init__(self,*args,**kwargs):
animalArgs = args[0]
animalArgs.update(kwargs)
self.__dict__.update(animalArgs)
def update(self,val):
self.__dict__.update(val)
def get(self):
print(self)
return vars(self)
def addSponsor(self,sponsor):
self.sponsor = sponsor
@classmethod
def fromDict(cls,inst,animDict):
if "_id" in animDict:
_id = animDict['_id']
del animDict["_id"]
anim = inst(*animDict.values())
anim._id = _id
return anim
| class Animal:
def __init__(self, *args, **kwargs):
animal_args = args[0]
animalArgs.update(kwargs)
self.__dict__.update(animalArgs)
def update(self, val):
self.__dict__.update(val)
def get(self):
print(self)
return vars(self)
def add_sponsor(self, sponsor):
self.sponsor = sponsor
@classmethod
def from_dict(cls, inst, animDict):
if '_id' in animDict:
_id = animDict['_id']
del animDict['_id']
anim = inst(*animDict.values())
anim._id = _id
return anim |
# Copyright (c) 2015-2019 Patricio Cubillos and contributors.
# MC3 is open-source software under the MIT license (see LICENSE).
# MC3 Version:
MC3_VER = 3 # Major version
MC3_MIN = 0 # Minor version
MC3_REV = 0 # Revision
__version__ = '{}.{}.{}'.format(MC3_VER, MC3_MIN, MC3_REV)
| mc3_ver = 3
mc3_min = 0
mc3_rev = 0
__version__ = '{}.{}.{}'.format(MC3_VER, MC3_MIN, MC3_REV) |
class FactorUniverseSelectionModel():
def __init__(self, algorithm):
self.algorithm = algorithm
def SelectCoarse(self, coarse):
# self.algorithm.Log("Generating universe...")
universe = self.FilterDollarPriceVolume(coarse)
return [c.Symbol for c in universe]
def SelectFine(self, fine):
universe = self.FilterFactor(self.FilterFinancials(fine))
# self.algorithm.Log(f"Universe consists of {len(universe)} securities")
self.algorithm.securities = universe
return [f.Symbol for f in universe]
def FilterDollarPriceVolume(self, coarse):
filter_dollar_price = [c for c in coarse if c.Price > 1]
sorted_dollar_volume = sorted([c for c in filter_dollar_price if c.HasFundamentalData], key=lambda c: c.DollarVolume, reverse=True)
return sorted_dollar_volume[:1000]
def FilterFinancials(self, fine):
filter_financials = [f for f in fine if f.AssetClassification.MorningstarSectorCode != MorningstarSectorCode.FinancialServices]
return filter_financials
def FilterFactor(self, fine):
filter_factor = sorted(fine, key=lambda f: f.ValuationRatios.CashReturn, reverse=True)
return filter_factor[:50] + filter_factor[-50:] | class Factoruniverseselectionmodel:
def __init__(self, algorithm):
self.algorithm = algorithm
def select_coarse(self, coarse):
universe = self.FilterDollarPriceVolume(coarse)
return [c.Symbol for c in universe]
def select_fine(self, fine):
universe = self.FilterFactor(self.FilterFinancials(fine))
self.algorithm.securities = universe
return [f.Symbol for f in universe]
def filter_dollar_price_volume(self, coarse):
filter_dollar_price = [c for c in coarse if c.Price > 1]
sorted_dollar_volume = sorted([c for c in filter_dollar_price if c.HasFundamentalData], key=lambda c: c.DollarVolume, reverse=True)
return sorted_dollar_volume[:1000]
def filter_financials(self, fine):
filter_financials = [f for f in fine if f.AssetClassification.MorningstarSectorCode != MorningstarSectorCode.FinancialServices]
return filter_financials
def filter_factor(self, fine):
filter_factor = sorted(fine, key=lambda f: f.ValuationRatios.CashReturn, reverse=True)
return filter_factor[:50] + filter_factor[-50:] |
#
# PySNMP MIB module MITEL-IPFILTER-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MITEL-IPFILTER-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:03:00 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Integer32, IpAddress, MibIdentifier, Bits, TimeTicks, Unsigned32, enterprises, NotificationType, iso, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Counter64, Counter32, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "IpAddress", "MibIdentifier", "Bits", "TimeTicks", "Unsigned32", "enterprises", "NotificationType", "iso", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Counter64", "Counter32", "ModuleIdentity")
TextualConvention, DisplayString, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "RowStatus")
mitelIpGrpFilterGroup = ModuleIdentity((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1))
mitelIpGrpFilterGroup.setRevisions(('2003-03-24 09:25', '1999-03-01 00:00',))
if mibBuilder.loadTexts: mitelIpGrpFilterGroup.setLastUpdated('200303240925Z')
if mibBuilder.loadTexts: mitelIpGrpFilterGroup.setOrganization('MITEL Corporation')
mitel = MibIdentifier((1, 3, 6, 1, 4, 1, 1027))
mitelProprietary = MibIdentifier((1, 3, 6, 1, 4, 1, 1027, 4))
mitelPropIpNetworking = MibIdentifier((1, 3, 6, 1, 4, 1, 1027, 4, 8))
mitelIpNetRouter = MibIdentifier((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1))
mitelRouterIpGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1))
mitelIdentification = MibIdentifier((1, 3, 6, 1, 4, 1, 1027, 1))
mitelIdCallServers = MibIdentifier((1, 3, 6, 1, 4, 1, 1027, 1, 2))
mitelIdCsIpera1000 = MibIdentifier((1, 3, 6, 1, 4, 1, 1027, 1, 2, 4))
mitelFltGrpAccessRestrictEnable = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelFltGrpAccessRestrictEnable.setStatus('current')
mitelFltGrpLogicalTable = MibTable((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 2), )
if mibBuilder.loadTexts: mitelFltGrpLogicalTable.setStatus('current')
mitelFltGrpLogicalEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: mitelFltGrpLogicalEntry.setStatus('current')
mitelLogTableAccessDef = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("filter", 1), ("forward", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelLogTableAccessDef.setStatus('current')
mitelLogTableAllowSrcRouting = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelLogTableAllowSrcRouting.setStatus('current')
mitelFltGrpAccessRestrictTable = MibTable((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3), )
if mibBuilder.loadTexts: mitelFltGrpAccessRestrictTable.setStatus('current')
mitelFltGrpAccessRestrictEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1), ).setIndexNames((0, "MITEL-IPFILTER-MIB", "mitelAccResTableIfIndex"), (0, "MITEL-IPFILTER-MIB", "mitelAccResTableOrder"))
if mibBuilder.loadTexts: mitelFltGrpAccessRestrictEntry.setStatus('current')
mitelAccResTableIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelAccResTableIfIndex.setStatus('current')
mitelAccResTableOrder = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelAccResTableOrder.setStatus('current')
mitelAccResTableType = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("filter", 1), ("forward", 2), ("neither", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableType.setStatus('current')
mitelAccResTableSrcAddrFrom = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 4), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableSrcAddrFrom.setStatus('current')
mitelAccResTableSrcAddrTo = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 5), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableSrcAddrTo.setStatus('current')
mitelAccResTableSrcAddrOutsideRange = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableSrcAddrOutsideRange.setStatus('current')
mitelAccResTableDstAddrFrom = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 7), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableDstAddrFrom.setStatus('current')
mitelAccResTableDstAddrTo = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 8), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableDstAddrTo.setStatus('current')
mitelAccResTableDstAddrOutsideRange = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableDstAddrOutsideRange.setStatus('current')
mitelAccResTableProtocolFrom = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableProtocolFrom.setStatus('current')
mitelAccResTableProtocolTo = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableProtocolTo.setStatus('current')
mitelAccResTableProtocolOutsideRange = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableProtocolOutsideRange.setStatus('current')
mitelAccResTableSrcPortFrom = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableSrcPortFrom.setStatus('current')
mitelAccResTableSrcPortTo = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableSrcPortTo.setStatus('current')
mitelAccResTableSrcPortOutsideRange = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableSrcPortOutsideRange.setStatus('current')
mitelAccResTableDstPortFrom = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableDstPortFrom.setStatus('current')
mitelAccResTableDstPortTo = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableDstPortTo.setStatus('current')
mitelAccResTableDstPortOutsideRange = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableDstPortOutsideRange.setStatus('current')
mitelAccResTableTcpSyn = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("any", 1), ("zero", 2), ("one", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableTcpSyn.setStatus('current')
mitelAccResTableTcpAck = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("any", 1), ("zero", 2), ("one", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableTcpAck.setStatus('current')
mitelAccResTableTcpFin = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("any", 1), ("zero", 2), ("one", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableTcpFin.setStatus('current')
mitelAccResTableTcpRst = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("any", 1), ("zero", 2), ("one", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableTcpRst.setStatus('current')
mitelAccResTableMatchIn = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableMatchIn.setStatus('current')
mitelAccResTableMatchOut = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableMatchOut.setStatus('current')
mitelAccResTableLog = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableLog.setStatus('current')
mitelAccResTableTrap = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelAccResTableTrap.setStatus('current')
mitelAccResTableStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 27), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: mitelAccResTableStatus.setStatus('current')
mitelAccResTableCount = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 28), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelAccResTableCount.setStatus('current')
mitelIpera1000Notifications = NotificationGroup((1, 3, 6, 1, 4, 1, 1027, 1, 2, 4, 0)).setObjects(("MITEL-IPFILTER-MIB", "mitelAccResTableTrapped"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
mitelIpera1000Notifications = mitelIpera1000Notifications.setStatus('current')
mitelAccResTableTrapped = NotificationType((1, 3, 6, 1, 4, 1, 1027, 1, 2, 4, 0, 402)).setObjects(("MITEL-IPFILTER-MIB", "mitelAccResTableIfIndex"), ("MITEL-IPFILTER-MIB", "mitelAccResTableOrder"))
if mibBuilder.loadTexts: mitelAccResTableTrapped.setStatus('current')
mibBuilder.exportSymbols("MITEL-IPFILTER-MIB", mitelAccResTableDstPortOutsideRange=mitelAccResTableDstPortOutsideRange, mitelIdCsIpera1000=mitelIdCsIpera1000, mitelAccResTableMatchIn=mitelAccResTableMatchIn, mitelAccResTableProtocolOutsideRange=mitelAccResTableProtocolOutsideRange, mitelAccResTableDstPortFrom=mitelAccResTableDstPortFrom, mitelAccResTableDstAddrFrom=mitelAccResTableDstAddrFrom, mitelAccResTableTrap=mitelAccResTableTrap, mitelAccResTableTcpSyn=mitelAccResTableTcpSyn, mitelFltGrpLogicalTable=mitelFltGrpLogicalTable, mitelAccResTableOrder=mitelAccResTableOrder, mitelAccResTableTrapped=mitelAccResTableTrapped, mitelAccResTableDstAddrTo=mitelAccResTableDstAddrTo, mitelAccResTableCount=mitelAccResTableCount, mitel=mitel, mitelIpNetRouter=mitelIpNetRouter, mitelAccResTableIfIndex=mitelAccResTableIfIndex, mitelAccResTableProtocolFrom=mitelAccResTableProtocolFrom, mitelAccResTableTcpRst=mitelAccResTableTcpRst, mitelPropIpNetworking=mitelPropIpNetworking, PYSNMP_MODULE_ID=mitelIpGrpFilterGroup, mitelIdCallServers=mitelIdCallServers, mitelAccResTableSrcPortTo=mitelAccResTableSrcPortTo, mitelAccResTableDstPortTo=mitelAccResTableDstPortTo, mitelProprietary=mitelProprietary, mitelAccResTableStatus=mitelAccResTableStatus, mitelFltGrpAccessRestrictEntry=mitelFltGrpAccessRestrictEntry, mitelAccResTableProtocolTo=mitelAccResTableProtocolTo, mitelFltGrpAccessRestrictTable=mitelFltGrpAccessRestrictTable, mitelAccResTableTcpFin=mitelAccResTableTcpFin, mitelAccResTableDstAddrOutsideRange=mitelAccResTableDstAddrOutsideRange, mitelAccResTableType=mitelAccResTableType, mitelFltGrpLogicalEntry=mitelFltGrpLogicalEntry, mitelLogTableAccessDef=mitelLogTableAccessDef, mitelRouterIpGroup=mitelRouterIpGroup, mitelAccResTableTcpAck=mitelAccResTableTcpAck, mitelIpera1000Notifications=mitelIpera1000Notifications, mitelAccResTableSrcAddrOutsideRange=mitelAccResTableSrcAddrOutsideRange, mitelIpGrpFilterGroup=mitelIpGrpFilterGroup, mitelAccResTableSrcAddrTo=mitelAccResTableSrcAddrTo, mitelAccResTableMatchOut=mitelAccResTableMatchOut, mitelLogTableAllowSrcRouting=mitelLogTableAllowSrcRouting, mitelAccResTableLog=mitelAccResTableLog, mitelAccResTableSrcPortFrom=mitelAccResTableSrcPortFrom, mitelAccResTableSrcAddrFrom=mitelAccResTableSrcAddrFrom, mitelAccResTableSrcPortOutsideRange=mitelAccResTableSrcPortOutsideRange, mitelIdentification=mitelIdentification, mitelFltGrpAccessRestrictEnable=mitelFltGrpAccessRestrictEnable)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, value_range_constraint, constraints_intersection, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ConstraintsUnion')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(integer32, ip_address, mib_identifier, bits, time_ticks, unsigned32, enterprises, notification_type, iso, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, counter64, counter32, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'IpAddress', 'MibIdentifier', 'Bits', 'TimeTicks', 'Unsigned32', 'enterprises', 'NotificationType', 'iso', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'Counter64', 'Counter32', 'ModuleIdentity')
(textual_convention, display_string, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'RowStatus')
mitel_ip_grp_filter_group = module_identity((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1))
mitelIpGrpFilterGroup.setRevisions(('2003-03-24 09:25', '1999-03-01 00:00'))
if mibBuilder.loadTexts:
mitelIpGrpFilterGroup.setLastUpdated('200303240925Z')
if mibBuilder.loadTexts:
mitelIpGrpFilterGroup.setOrganization('MITEL Corporation')
mitel = mib_identifier((1, 3, 6, 1, 4, 1, 1027))
mitel_proprietary = mib_identifier((1, 3, 6, 1, 4, 1, 1027, 4))
mitel_prop_ip_networking = mib_identifier((1, 3, 6, 1, 4, 1, 1027, 4, 8))
mitel_ip_net_router = mib_identifier((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1))
mitel_router_ip_group = mib_identifier((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1))
mitel_identification = mib_identifier((1, 3, 6, 1, 4, 1, 1027, 1))
mitel_id_call_servers = mib_identifier((1, 3, 6, 1, 4, 1, 1027, 1, 2))
mitel_id_cs_ipera1000 = mib_identifier((1, 3, 6, 1, 4, 1, 1027, 1, 2, 4))
mitel_flt_grp_access_restrict_enable = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelFltGrpAccessRestrictEnable.setStatus('current')
mitel_flt_grp_logical_table = mib_table((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 2))
if mibBuilder.loadTexts:
mitelFltGrpLogicalTable.setStatus('current')
mitel_flt_grp_logical_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
mitelFltGrpLogicalEntry.setStatus('current')
mitel_log_table_access_def = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('filter', 1), ('forward', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelLogTableAccessDef.setStatus('current')
mitel_log_table_allow_src_routing = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone(2)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelLogTableAllowSrcRouting.setStatus('current')
mitel_flt_grp_access_restrict_table = mib_table((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3))
if mibBuilder.loadTexts:
mitelFltGrpAccessRestrictTable.setStatus('current')
mitel_flt_grp_access_restrict_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1)).setIndexNames((0, 'MITEL-IPFILTER-MIB', 'mitelAccResTableIfIndex'), (0, 'MITEL-IPFILTER-MIB', 'mitelAccResTableOrder'))
if mibBuilder.loadTexts:
mitelFltGrpAccessRestrictEntry.setStatus('current')
mitel_acc_res_table_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelAccResTableIfIndex.setStatus('current')
mitel_acc_res_table_order = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelAccResTableOrder.setStatus('current')
mitel_acc_res_table_type = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('filter', 1), ('forward', 2), ('neither', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableType.setStatus('current')
mitel_acc_res_table_src_addr_from = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 4), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableSrcAddrFrom.setStatus('current')
mitel_acc_res_table_src_addr_to = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 5), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableSrcAddrTo.setStatus('current')
mitel_acc_res_table_src_addr_outside_range = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone(2)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableSrcAddrOutsideRange.setStatus('current')
mitel_acc_res_table_dst_addr_from = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 7), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableDstAddrFrom.setStatus('current')
mitel_acc_res_table_dst_addr_to = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 8), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableDstAddrTo.setStatus('current')
mitel_acc_res_table_dst_addr_outside_range = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone(2)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableDstAddrOutsideRange.setStatus('current')
mitel_acc_res_table_protocol_from = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableProtocolFrom.setStatus('current')
mitel_acc_res_table_protocol_to = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableProtocolTo.setStatus('current')
mitel_acc_res_table_protocol_outside_range = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone(2)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableProtocolOutsideRange.setStatus('current')
mitel_acc_res_table_src_port_from = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableSrcPortFrom.setStatus('current')
mitel_acc_res_table_src_port_to = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableSrcPortTo.setStatus('current')
mitel_acc_res_table_src_port_outside_range = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone(2)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableSrcPortOutsideRange.setStatus('current')
mitel_acc_res_table_dst_port_from = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableDstPortFrom.setStatus('current')
mitel_acc_res_table_dst_port_to = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableDstPortTo.setStatus('current')
mitel_acc_res_table_dst_port_outside_range = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone(2)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableDstPortOutsideRange.setStatus('current')
mitel_acc_res_table_tcp_syn = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('any', 1), ('zero', 2), ('one', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableTcpSyn.setStatus('current')
mitel_acc_res_table_tcp_ack = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('any', 1), ('zero', 2), ('one', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableTcpAck.setStatus('current')
mitel_acc_res_table_tcp_fin = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 21), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('any', 1), ('zero', 2), ('one', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableTcpFin.setStatus('current')
mitel_acc_res_table_tcp_rst = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('any', 1), ('zero', 2), ('one', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableTcpRst.setStatus('current')
mitel_acc_res_table_match_in = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 23), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableMatchIn.setStatus('current')
mitel_acc_res_table_match_out = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 24), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableMatchOut.setStatus('current')
mitel_acc_res_table_log = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableLog.setStatus('current')
mitel_acc_res_table_trap = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 26), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelAccResTableTrap.setStatus('current')
mitel_acc_res_table_status = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 27), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
mitelAccResTableStatus.setStatus('current')
mitel_acc_res_table_count = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 1, 1, 3, 1, 28), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelAccResTableCount.setStatus('current')
mitel_ipera1000_notifications = notification_group((1, 3, 6, 1, 4, 1, 1027, 1, 2, 4, 0)).setObjects(('MITEL-IPFILTER-MIB', 'mitelAccResTableTrapped'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
mitel_ipera1000_notifications = mitelIpera1000Notifications.setStatus('current')
mitel_acc_res_table_trapped = notification_type((1, 3, 6, 1, 4, 1, 1027, 1, 2, 4, 0, 402)).setObjects(('MITEL-IPFILTER-MIB', 'mitelAccResTableIfIndex'), ('MITEL-IPFILTER-MIB', 'mitelAccResTableOrder'))
if mibBuilder.loadTexts:
mitelAccResTableTrapped.setStatus('current')
mibBuilder.exportSymbols('MITEL-IPFILTER-MIB', mitelAccResTableDstPortOutsideRange=mitelAccResTableDstPortOutsideRange, mitelIdCsIpera1000=mitelIdCsIpera1000, mitelAccResTableMatchIn=mitelAccResTableMatchIn, mitelAccResTableProtocolOutsideRange=mitelAccResTableProtocolOutsideRange, mitelAccResTableDstPortFrom=mitelAccResTableDstPortFrom, mitelAccResTableDstAddrFrom=mitelAccResTableDstAddrFrom, mitelAccResTableTrap=mitelAccResTableTrap, mitelAccResTableTcpSyn=mitelAccResTableTcpSyn, mitelFltGrpLogicalTable=mitelFltGrpLogicalTable, mitelAccResTableOrder=mitelAccResTableOrder, mitelAccResTableTrapped=mitelAccResTableTrapped, mitelAccResTableDstAddrTo=mitelAccResTableDstAddrTo, mitelAccResTableCount=mitelAccResTableCount, mitel=mitel, mitelIpNetRouter=mitelIpNetRouter, mitelAccResTableIfIndex=mitelAccResTableIfIndex, mitelAccResTableProtocolFrom=mitelAccResTableProtocolFrom, mitelAccResTableTcpRst=mitelAccResTableTcpRst, mitelPropIpNetworking=mitelPropIpNetworking, PYSNMP_MODULE_ID=mitelIpGrpFilterGroup, mitelIdCallServers=mitelIdCallServers, mitelAccResTableSrcPortTo=mitelAccResTableSrcPortTo, mitelAccResTableDstPortTo=mitelAccResTableDstPortTo, mitelProprietary=mitelProprietary, mitelAccResTableStatus=mitelAccResTableStatus, mitelFltGrpAccessRestrictEntry=mitelFltGrpAccessRestrictEntry, mitelAccResTableProtocolTo=mitelAccResTableProtocolTo, mitelFltGrpAccessRestrictTable=mitelFltGrpAccessRestrictTable, mitelAccResTableTcpFin=mitelAccResTableTcpFin, mitelAccResTableDstAddrOutsideRange=mitelAccResTableDstAddrOutsideRange, mitelAccResTableType=mitelAccResTableType, mitelFltGrpLogicalEntry=mitelFltGrpLogicalEntry, mitelLogTableAccessDef=mitelLogTableAccessDef, mitelRouterIpGroup=mitelRouterIpGroup, mitelAccResTableTcpAck=mitelAccResTableTcpAck, mitelIpera1000Notifications=mitelIpera1000Notifications, mitelAccResTableSrcAddrOutsideRange=mitelAccResTableSrcAddrOutsideRange, mitelIpGrpFilterGroup=mitelIpGrpFilterGroup, mitelAccResTableSrcAddrTo=mitelAccResTableSrcAddrTo, mitelAccResTableMatchOut=mitelAccResTableMatchOut, mitelLogTableAllowSrcRouting=mitelLogTableAllowSrcRouting, mitelAccResTableLog=mitelAccResTableLog, mitelAccResTableSrcPortFrom=mitelAccResTableSrcPortFrom, mitelAccResTableSrcAddrFrom=mitelAccResTableSrcAddrFrom, mitelAccResTableSrcPortOutsideRange=mitelAccResTableSrcPortOutsideRange, mitelIdentification=mitelIdentification, mitelFltGrpAccessRestrictEnable=mitelFltGrpAccessRestrictEnable) |
# Name: Yahya Eldarieby
# Course: CS30
# Date: 01/10/2019
# Description: RPG Pseudocode
# A text based game following the demo at: https://www.youtube.com/watch?v=higMRrO5AkU
# Start
# Display a welcoming branding image
# Pick an intial location for snake
# Pick an initial location for fruits and obstacles
# Forever Loop
# x = Get user input
# if(x) = Key A then press enter then the snake will move left
# if(x) = Key D then press enter then the snake will move right
# if(x) = Key W then press enter then the snake will move up
# if(x) = Key S then press enter then the snake will move down
# if(x) = Key Q then press enter to quit the whole system
# if(x) = Key H then press enter to restart the whole game
# If new location has a fruit, then score increases by 10
# If new location has a obstacle, then the snake dies and the system quits the whole game.
# End of forever loop
# End of program
# The following is a description of the game rules to be displayed at the start of the game
print ("# Explanation of game")
print ("The game works by you being a snake and that same snake has to eat fruits to increase your score and there will be obstacles in your way to make you lose.")
print ("# How will you survive")
print ("You will survive the game by avoiding the obstacles and by avoiding hitting the boarders.")
print ("# How to play the game")
print ("You simply just use the keys W, A, S, D to move up, down, right and left.")
print ("# How will you win the game")
print ("You will win the game by reaching the GOAL box." )
print ("# How does the game end")
print ("The game will be over if you hit the boarders and if any of the obstacles hit you.")
print ("# How do you enjoy the game")
print ("To enjoy the game you have to try to focus on what steps you're taking to reach your goal.")
print ("# System Quit")
print ("To quit the whole system press the key Q then hit enter to quit the whole system.")
| print('# Explanation of game')
print('The game works by you being a snake and that same snake has to eat fruits to increase your score and there will be obstacles in your way to make you lose.')
print('# How will you survive')
print('You will survive the game by avoiding the obstacles and by avoiding hitting the boarders.')
print('# How to play the game')
print('You simply just use the keys W, A, S, D to move up, down, right and left.')
print('# How will you win the game')
print('You will win the game by reaching the GOAL box.')
print('# How does the game end')
print('The game will be over if you hit the boarders and if any of the obstacles hit you.')
print('# How do you enjoy the game')
print("To enjoy the game you have to try to focus on what steps you're taking to reach your goal.")
print('# System Quit')
print('To quit the whole system press the key Q then hit enter to quit the whole system.') |
class NotAllowedException(Exception):
pass
class CannotDeleteLoadedItem(Exception):
pass
class UnknownUserException(Exception):
pass
class UnknownLoanItemException(Exception):
pass
class InitialAdminRoleException(Exception):
pass
class InvalidTokenException(Exception):
pass
class InvalidRequestException(Exception):
pass
class UserAlreadyExistsException(Exception):
pass
| class Notallowedexception(Exception):
pass
class Cannotdeleteloadeditem(Exception):
pass
class Unknownuserexception(Exception):
pass
class Unknownloanitemexception(Exception):
pass
class Initialadminroleexception(Exception):
pass
class Invalidtokenexception(Exception):
pass
class Invalidrequestexception(Exception):
pass
class Useralreadyexistsexception(Exception):
pass |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
MESSAGE_INDENT_NUM = 'indent steps must be {} multiples'
MESSAGE_DUPLICATED_SPACE = 'too many spaces'
MESSAGE_COMMA_HEAD = 'comma must be head of line'
MESSAGE_COMMA_END = 'comma must be end of line'
MESSAGE_WHITESPACE_AFTER_COMMA = 'whitespace must be after comma: ,'
MESSAGE_WHITESPACE_BEFORE_COMMA = 'whitespace must not be before comma: ,'
MESSAGE_WHITESPACE_AFTER_BRACKET = 'whitespace must not be after bracket: ('
MESSAGE_WHITESPACE_BEFORE_BRACKET = 'whitespace must not be before bracket: )'
MESSAGE_WHITESPACE_AFTER_OPERATOR = 'whitespace must be after binary operator'
MESSAGE_WHITESPACE_BEFORE_OPERATOR = 'whitespace must be after binary operator'
MESSAGE_KEYWORD_UPPER = 'reserved keywords must be upper case'
MESSAGE_KEYWORD_LOWER = 'reserved keywords must be lower case'
MESSAGE_JOIN_TABLE = 'table_name must be at the same line as join context'
MESSAGE_JOIN_CONTEXT = 'join context must be [left outer join], [inner join] or [cross join]'
MESSAGE_BREAK_LINE = 'break line at \'and\', \'or\', \'on\''
| message_indent_num = 'indent steps must be {} multiples'
message_duplicated_space = 'too many spaces'
message_comma_head = 'comma must be head of line'
message_comma_end = 'comma must be end of line'
message_whitespace_after_comma = 'whitespace must be after comma: ,'
message_whitespace_before_comma = 'whitespace must not be before comma: ,'
message_whitespace_after_bracket = 'whitespace must not be after bracket: ('
message_whitespace_before_bracket = 'whitespace must not be before bracket: )'
message_whitespace_after_operator = 'whitespace must be after binary operator'
message_whitespace_before_operator = 'whitespace must be after binary operator'
message_keyword_upper = 'reserved keywords must be upper case'
message_keyword_lower = 'reserved keywords must be lower case'
message_join_table = 'table_name must be at the same line as join context'
message_join_context = 'join context must be [left outer join], [inner join] or [cross join]'
message_break_line = "break line at 'and', 'or', 'on'" |
def max_sum(d):
res = d[0]
max_i = 0
max_j = 1
i = 0
j = 0
max_count = 0
for item in d:
max_count += item
j += 1
if max_count > res:
res = max_count
max_i, max_j = i, j
if max_count <= 0:
max_count = 0
i = j
return res, max_i, max_j
if __name__ == '__main__':
print(max_sum([-2, 11, -4, 13, -5, -2]))
| def max_sum(d):
res = d[0]
max_i = 0
max_j = 1
i = 0
j = 0
max_count = 0
for item in d:
max_count += item
j += 1
if max_count > res:
res = max_count
(max_i, max_j) = (i, j)
if max_count <= 0:
max_count = 0
i = j
return (res, max_i, max_j)
if __name__ == '__main__':
print(max_sum([-2, 11, -4, 13, -5, -2])) |
# generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/Analog.msg;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/Digital.msg;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/IOStates.msg;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/RobotStateRTMsg.msg;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/MasterboardDataMsg.msg;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/RobotModeDataMsg.msg;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/ToolDataMsg.msg"
services_str = "/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/srv/SetPayload.srv;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/srv/SetSpeedSliderFraction.srv;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/srv/SetIO.srv"
pkg_name = "ur_msgs"
dependencies_str = "std_msgs;geometry_msgs"
langs = "gencpp;geneus;genlisp;gennodejs;genpy"
dep_include_paths_str = "ur_msgs;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg;std_msgs;/opt/ros/melodic/share/std_msgs/cmake/../msg;geometry_msgs;/opt/ros/melodic/share/geometry_msgs/cmake/../msg"
PYTHON_EXECUTABLE = "/usr/bin/python2"
package_has_static_sources = '' == 'TRUE'
genmsg_check_deps_script = "/opt/ros/melodic/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py"
| messages_str = '/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/Analog.msg;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/Digital.msg;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/IOStates.msg;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/RobotStateRTMsg.msg;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/MasterboardDataMsg.msg;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/RobotModeDataMsg.msg;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg/ToolDataMsg.msg'
services_str = '/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/srv/SetPayload.srv;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/srv/SetSpeedSliderFraction.srv;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/srv/SetIO.srv'
pkg_name = 'ur_msgs'
dependencies_str = 'std_msgs;geometry_msgs'
langs = 'gencpp;geneus;genlisp;gennodejs;genpy'
dep_include_paths_str = 'ur_msgs;/home/krzysztof/Repos/ur3e-ird435-rg2/catkin_ws/src/fmauch_universal_robot/ur_msgs/msg;std_msgs;/opt/ros/melodic/share/std_msgs/cmake/../msg;geometry_msgs;/opt/ros/melodic/share/geometry_msgs/cmake/../msg'
python_executable = '/usr/bin/python2'
package_has_static_sources = '' == 'TRUE'
genmsg_check_deps_script = '/opt/ros/melodic/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py' |
def FordFulkerson(graph,start,end):
n = len(graph)
GPrime = [[None]*n for _ in range(n)]
for v in range(n):
for u, w in graph[v]:
GPrime[v][u] = w
for v in range(n):
for u in range(n):
if GPrime[v][u] != None and GPrime[u][v] == None:
GPrime[u][v] = 0
def dfs():
stop = [False]
minimum = [float("inf")]
visited = [False]*n
def _dfs(current):
if current == end:
stop[0] = True
return
visited[current] = True
mini = minimum[0]
for i, w in enumerate(GPrime[current]):
if w != None and not visited[i] and w != 0:
minimum[0] = min(minimum[0],w)
_dfs(i)
if not stop[0]:
minimum[0] = mini
else:
GPrime[current][i] -= minimum[0]
GPrime[i][current] += minimum[0]
break
_dfs(start)
return minimum[0], stop[0]
peakFlow = 0
while True:
minCapacity, wasReached = dfs()
if not wasReached:
break
peakFlow += minCapacity
return peakFlow
#graph, _ = readAdjl("FordFullkerson.txt",weighted=True)
graph = [[(1, 16), (3, 13)], [(2, 12), (3, 10)], [(3, 9), (5, 20)], [(1, 4), (4, 14)], [(2, 7), (5, 4)], []]
print(FordFulkerson(graph,0,5)) | def ford_fulkerson(graph, start, end):
n = len(graph)
g_prime = [[None] * n for _ in range(n)]
for v in range(n):
for (u, w) in graph[v]:
GPrime[v][u] = w
for v in range(n):
for u in range(n):
if GPrime[v][u] != None and GPrime[u][v] == None:
GPrime[u][v] = 0
def dfs():
stop = [False]
minimum = [float('inf')]
visited = [False] * n
def _dfs(current):
if current == end:
stop[0] = True
return
visited[current] = True
mini = minimum[0]
for (i, w) in enumerate(GPrime[current]):
if w != None and (not visited[i]) and (w != 0):
minimum[0] = min(minimum[0], w)
_dfs(i)
if not stop[0]:
minimum[0] = mini
else:
GPrime[current][i] -= minimum[0]
GPrime[i][current] += minimum[0]
break
_dfs(start)
return (minimum[0], stop[0])
peak_flow = 0
while True:
(min_capacity, was_reached) = dfs()
if not wasReached:
break
peak_flow += minCapacity
return peakFlow
graph = [[(1, 16), (3, 13)], [(2, 12), (3, 10)], [(3, 9), (5, 20)], [(1, 4), (4, 14)], [(2, 7), (5, 4)], []]
print(ford_fulkerson(graph, 0, 5)) |
class AbstractCodeGen(object):
def genCode(self, ast, symbolTable, **kwargs):
raise NotImplementedError()
def genIndex(self, mibsMap, **kwargs):
raise NotImplementedError()
| class Abstractcodegen(object):
def gen_code(self, ast, symbolTable, **kwargs):
raise not_implemented_error()
def gen_index(self, mibsMap, **kwargs):
raise not_implemented_error() |
z = 100
while z > 10:
a, b = input().split(" ")
a = int(a)
b = int(b)
if a < b :
print("Crescente")
elif b < a:
print("Decrescente")
elif a == b:
exit()
| z = 100
while z > 10:
(a, b) = input().split(' ')
a = int(a)
b = int(b)
if a < b:
print('Crescente')
elif b < a:
print('Decrescente')
elif a == b:
exit() |
def main():
palindrome = [it1*it2 for it1 in range(100,1000) for it2 in range(it1,1000) if str(it1*it2)==str(it1*it2)[::-1]]
for tc in range(int(input())):
N = int(input())
print(max(filter(lambda x: x<N,palindrome)))
if __name__=="__main__":
main()
| def main():
palindrome = [it1 * it2 for it1 in range(100, 1000) for it2 in range(it1, 1000) if str(it1 * it2) == str(it1 * it2)[::-1]]
for tc in range(int(input())):
n = int(input())
print(max(filter(lambda x: x < N, palindrome)))
if __name__ == '__main__':
main() |
print("Starting adding")
total = [1]
base = 2
power = 1000
for i in range(0, power):
for i in range(0, len(total)):
total[i] *= base
carrier = 0
for i in range(0, len(total)):
total[i] += carrier
head = total[i] % 10
carrier = (total[i] - head) / 10
total[i] = int(head)
while carrier != 0:
head = carrier % 10;
carrier = (carrier - head) / 10
total.append(int(head))
totalTemp = total[::-1]
print("Inbetween sum: ", end="")
for i in range(0, len(totalTemp)):
print(totalTemp[i], end="")
print()
totalSum = 0
for c in total:
totalSum += c
print(totalSum)
| print('Starting adding')
total = [1]
base = 2
power = 1000
for i in range(0, power):
for i in range(0, len(total)):
total[i] *= base
carrier = 0
for i in range(0, len(total)):
total[i] += carrier
head = total[i] % 10
carrier = (total[i] - head) / 10
total[i] = int(head)
while carrier != 0:
head = carrier % 10
carrier = (carrier - head) / 10
total.append(int(head))
total_temp = total[::-1]
print('Inbetween sum: ', end='')
for i in range(0, len(totalTemp)):
print(totalTemp[i], end='')
print()
total_sum = 0
for c in total:
total_sum += c
print(totalSum) |
# LC 735
class Solution:
def collide(self, a: int, b:int) -> int:
if abs(a) == abs(b):
return None
res = max(abs(a),abs(b))
if abs(a) < abs(b):
res *= (b // abs(b))
else:
res *= (a // abs(a))
return res
def asteroidCollision(self, asteroids: List[int]) -> List[int]:
if not len(asteroids):
return asteroids
stack = []
for i in asteroids:
if not stack:
stack.append(i)
else:
if stack[-1] ^ i > 0:
stack.append(i) # no collision
else:
curr = i
while stack and stack[-1] ^ curr < 0:
if stack[-1] < curr:
break
curr = self.collide(i, stack.pop(-1))
if not curr:
break
if curr:
stack.append(curr)
return stack
| class Solution:
def collide(self, a: int, b: int) -> int:
if abs(a) == abs(b):
return None
res = max(abs(a), abs(b))
if abs(a) < abs(b):
res *= b // abs(b)
else:
res *= a // abs(a)
return res
def asteroid_collision(self, asteroids: List[int]) -> List[int]:
if not len(asteroids):
return asteroids
stack = []
for i in asteroids:
if not stack:
stack.append(i)
elif stack[-1] ^ i > 0:
stack.append(i)
else:
curr = i
while stack and stack[-1] ^ curr < 0:
if stack[-1] < curr:
break
curr = self.collide(i, stack.pop(-1))
if not curr:
break
if curr:
stack.append(curr)
return stack |
with open('c:\\mine\\No.txt') as noTxt:
with open('c:\\mine\\number.txt','w') as numberTxt:
for line in noTxt:
nos = line.split(',')
start,end = int(nos[0]), int(nos[1])
for i in range(start, end):
numberTxt.write(str(i) + '\n') | with open('c:\\mine\\No.txt') as no_txt:
with open('c:\\mine\\number.txt', 'w') as number_txt:
for line in noTxt:
nos = line.split(',')
(start, end) = (int(nos[0]), int(nos[1]))
for i in range(start, end):
numberTxt.write(str(i) + '\n') |
def GLSL_type(a):
if(isinstance(a, str)):
return "int["+str(len(a))+"]"
elif(isinstance(a, list)):
return GLSL_type(a)+"["+str(len(a))+"]"
elif(type(a) == bool):
return "bool"
| def glsl_type(a):
if isinstance(a, str):
return 'int[' + str(len(a)) + ']'
elif isinstance(a, list):
return glsl_type(a) + '[' + str(len(a)) + ']'
elif type(a) == bool:
return 'bool' |
{
"targets": [
{
"target_name": "roo",
"sources": [ "./src/c/roo/roo.c",
"./src/c/roo/roo_node.c",
"./src/c/roo/callbacks.c",
"./src/c/roo/startup.c",
"./src/c/roo/interface.c",
"./src/c/roo/log.c",
"./src/c/roo/plugin.c",
"./src/c/roo/map.c",
"./src/c/roo/lane.c",
"./src/c/roo/operations.c"],
"libraries": ["-ljack", "-lcarla_standalone2", "-llilv-0"],
"include_dirs": ["/usr/include/carla", "/usr/include/carla/includes"]
}
]
}
| {'targets': [{'target_name': 'roo', 'sources': ['./src/c/roo/roo.c', './src/c/roo/roo_node.c', './src/c/roo/callbacks.c', './src/c/roo/startup.c', './src/c/roo/interface.c', './src/c/roo/log.c', './src/c/roo/plugin.c', './src/c/roo/map.c', './src/c/roo/lane.c', './src/c/roo/operations.c'], 'libraries': ['-ljack', '-lcarla_standalone2', '-llilv-0'], 'include_dirs': ['/usr/include/carla', '/usr/include/carla/includes']}]} |
num = 1
for i in range(16):
print(num<<i, end=', ')
print(); print()
for i in range(16):
print('0x%x'%(num<<i), end=',')
| num = 1
for i in range(16):
print(num << i, end=', ')
print()
print()
for i in range(16):
print('0x%x' % (num << i), end=',') |
x=[]
for i in range(20):
val=int(input())
x.append(val)
x.reverse()
for k in range(20):
print("N[{}] = {}".format(k,x[k])) | x = []
for i in range(20):
val = int(input())
x.append(val)
x.reverse()
for k in range(20):
print('N[{}] = {}'.format(k, x[k])) |
def swap(a, b): #function logic
print("Original: ",a, b)
if (a > b or a < b): #doing the swap when the two numbers aren't equal
temp = a
a = b
b = temp
print("Swapped: ",a, b)
else: #just returning the numbers in same order b/c they're equal, no need to swap
print("No swap: ",a, b)
def driver():
# setting parameters for different decisions by function
swap(10, 1)
swap(5,5)
swap(3,7)
swap("aaa", "aaa")
swap("aaa", "bbb")
swap("bbb", "aaa")
if __name__ == "__main__":
driver() | def swap(a, b):
print('Original: ', a, b)
if a > b or a < b:
temp = a
a = b
b = temp
print('Swapped: ', a, b)
else:
print('No swap: ', a, b)
def driver():
swap(10, 1)
swap(5, 5)
swap(3, 7)
swap('aaa', 'aaa')
swap('aaa', 'bbb')
swap('bbb', 'aaa')
if __name__ == '__main__':
driver() |
def rank(graph, res):
rank_page= {}
for page in res.keys():
word_count=res[page]
ingoing=graph.ingoing_links(page)
num_links=len(ingoing)
num_in_links=0
for link in ingoing:
if link in res.keys():
num_in_links+=res[link]
rank_page[page]=int(word_count+num_links*0.6 +num_in_links*0.2)
#4print(rank_page)
return rank_page
| def rank(graph, res):
rank_page = {}
for page in res.keys():
word_count = res[page]
ingoing = graph.ingoing_links(page)
num_links = len(ingoing)
num_in_links = 0
for link in ingoing:
if link in res.keys():
num_in_links += res[link]
rank_page[page] = int(word_count + num_links * 0.6 + num_in_links * 0.2)
return rank_page |
# Write a program which replaces all vowels in the string with '*'
str=input('enter the string : ')
str2='aeiou'
str3='AEIOU'
l=len(str)
str4=''
for x in str:
if x in str2 or x in str3:
str4=str4+'*'
else:
str4=str4+x
print(str4)
| str = input('enter the string : ')
str2 = 'aeiou'
str3 = 'AEIOU'
l = len(str)
str4 = ''
for x in str:
if x in str2 or x in str3:
str4 = str4 + '*'
else:
str4 = str4 + x
print(str4) |
## CONSTRUCTING GRAPH
v, e = map(int, raw_input().split())
grafo = [[] for i in range(v+1)]
for i in range(e):
v1, v2, w = map(int, raw_input().split())
# save edges that are getting in me, not edges from me to another v
grafo[v2].append((v1, w))
## INITIALIZING
beginning = input()
dp = [[float('inf') for i in range(v+1)] for j in range(v+1)]
for i in range(v+1): dp[i][beginning] = 0
## BELLMAN-FORD MAIN
for i in range(1, v+1, 1):
for j in range(1, v+1, 1):
sub_paths = [float('inf')]
for adj in grafo[j]:
adj_index = adj[0]
adj_weigth = adj[1]
sub_paths.append( dp[i-1][adj_index] + adj_weigth )
min_weigth_sub_path = min(sub_paths)
dp[i][j] = min(dp[i-1][j], min_weigth_sub_path)
| (v, e) = map(int, raw_input().split())
grafo = [[] for i in range(v + 1)]
for i in range(e):
(v1, v2, w) = map(int, raw_input().split())
grafo[v2].append((v1, w))
beginning = input()
dp = [[float('inf') for i in range(v + 1)] for j in range(v + 1)]
for i in range(v + 1):
dp[i][beginning] = 0
for i in range(1, v + 1, 1):
for j in range(1, v + 1, 1):
sub_paths = [float('inf')]
for adj in grafo[j]:
adj_index = adj[0]
adj_weigth = adj[1]
sub_paths.append(dp[i - 1][adj_index] + adj_weigth)
min_weigth_sub_path = min(sub_paths)
dp[i][j] = min(dp[i - 1][j], min_weigth_sub_path) |
LINE_COLORS = [
(255, 127, 127),
(255, 127, 182),
(102, 51, 73),
(214, 127, 255),
(85, 51, 102),
(161, 127, 255),
(63, 51, 102),
(127, 146, 255),
(51, 58, 102),
(127, 201, 255),
(51, 80, 102),
(127, 255, 197),
(51, 102, 78),
(127, 255, 142),
(51, 102, 56),
(165, 255, 127),
(66, 102, 51),
(218, 255, 127),
(87, 102, 51),
(255, 233, 127),
(102, 92, 51),
(255, 178, 127),
(102, 70, 51),
(178, 89, 89),
(102, 51, 51),
(210, 210, 210),
(100, 100, 100),
(0, 127, 127),
(0, 127, 70),
(178, 89, 127),
(148, 89, 178),
(111, 89, 178),
(89, 102, 178),
(89, 141, 178),
(89, 178, 136),
(89, 178, 99),
(116, 178, 89),
(153, 178, 89),
(178, 162, 89),
(178, 123, 89),
(160, 160, 160)]
| line_colors = [(255, 127, 127), (255, 127, 182), (102, 51, 73), (214, 127, 255), (85, 51, 102), (161, 127, 255), (63, 51, 102), (127, 146, 255), (51, 58, 102), (127, 201, 255), (51, 80, 102), (127, 255, 197), (51, 102, 78), (127, 255, 142), (51, 102, 56), (165, 255, 127), (66, 102, 51), (218, 255, 127), (87, 102, 51), (255, 233, 127), (102, 92, 51), (255, 178, 127), (102, 70, 51), (178, 89, 89), (102, 51, 51), (210, 210, 210), (100, 100, 100), (0, 127, 127), (0, 127, 70), (178, 89, 127), (148, 89, 178), (111, 89, 178), (89, 102, 178), (89, 141, 178), (89, 178, 136), (89, 178, 99), (116, 178, 89), (153, 178, 89), (178, 162, 89), (178, 123, 89), (160, 160, 160)] |
inventory = {'apples': 430, 'bananas': 312, 'oranges': 525, 'pears': 217}
print(inventory)
del inventory['pears'] # deletes a <key,value>
print(inventory)
inventory['apples'] = 10 # change value associated with key apples
print(inventory)
inventory['bananas'] = inventory['bananas'] * 2
print(inventory)
num_items = len(inventory)
print("Items in inventory: ", num_items)
| inventory = {'apples': 430, 'bananas': 312, 'oranges': 525, 'pears': 217}
print(inventory)
del inventory['pears']
print(inventory)
inventory['apples'] = 10
print(inventory)
inventory['bananas'] = inventory['bananas'] * 2
print(inventory)
num_items = len(inventory)
print('Items in inventory: ', num_items) |
#
# PHASE: collect jars
#
# DOCUMENT THIS
#
load(
"@io_bazel_rules_scala//scala/private:rule_impls.bzl",
"collect_jars_from_common_ctx",
)
def phase_scalatest_collect_jars(ctx, p):
args = struct(
base_classpath = p.scalac_provider.default_classpath + [ctx.attr._scalatest],
extra_runtime_deps = [
ctx.attr._scalatest_reporter,
ctx.attr._scalatest_runner,
],
)
return _phase_default_collect_jars(ctx, p, args)
def phase_repl_collect_jars(ctx, p):
args = struct(
base_classpath = p.scalac_provider.default_repl_classpath,
)
return _phase_default_collect_jars(ctx, p, args)
def phase_macro_library_collect_jars(ctx, p):
args = struct(
base_classpath = p.scalac_provider.default_macro_classpath,
)
return _phase_default_collect_jars(ctx, p, args)
def phase_junit_test_collect_jars(ctx, p):
args = struct(
extra_deps = [
ctx.attr._junit,
ctx.attr._hamcrest,
ctx.attr.suite_label,
ctx.attr._bazel_test_runner,
],
)
return _phase_default_collect_jars(ctx, p, args)
def phase_library_for_plugin_bootstrapping_collect_jars(ctx, p):
args = struct(
unused_dependency_checker_mode = "off",
)
return _phase_default_collect_jars(ctx, p, args)
def phase_common_collect_jars(ctx, p):
return _phase_default_collect_jars(ctx, p)
def _phase_default_collect_jars(ctx, p, _args = struct()):
return _phase_collect_jars(
ctx,
_args.base_classpath if hasattr(_args, "base_classpath") else p.scalac_provider.default_classpath,
_args.extra_deps if hasattr(_args, "extra_deps") else [],
_args.extra_runtime_deps if hasattr(_args, "extra_runtime_deps") else [],
_args.unused_dependency_checker_mode if hasattr(_args, "unused_dependency_checker_mode") else p.unused_deps_checker,
)
def _phase_collect_jars(
ctx,
base_classpath,
extra_deps,
extra_runtime_deps,
unused_dependency_checker_mode):
return collect_jars_from_common_ctx(
ctx,
base_classpath,
extra_deps,
extra_runtime_deps,
unused_dependency_checker_mode == "off",
)
| load('@io_bazel_rules_scala//scala/private:rule_impls.bzl', 'collect_jars_from_common_ctx')
def phase_scalatest_collect_jars(ctx, p):
args = struct(base_classpath=p.scalac_provider.default_classpath + [ctx.attr._scalatest], extra_runtime_deps=[ctx.attr._scalatest_reporter, ctx.attr._scalatest_runner])
return _phase_default_collect_jars(ctx, p, args)
def phase_repl_collect_jars(ctx, p):
args = struct(base_classpath=p.scalac_provider.default_repl_classpath)
return _phase_default_collect_jars(ctx, p, args)
def phase_macro_library_collect_jars(ctx, p):
args = struct(base_classpath=p.scalac_provider.default_macro_classpath)
return _phase_default_collect_jars(ctx, p, args)
def phase_junit_test_collect_jars(ctx, p):
args = struct(extra_deps=[ctx.attr._junit, ctx.attr._hamcrest, ctx.attr.suite_label, ctx.attr._bazel_test_runner])
return _phase_default_collect_jars(ctx, p, args)
def phase_library_for_plugin_bootstrapping_collect_jars(ctx, p):
args = struct(unused_dependency_checker_mode='off')
return _phase_default_collect_jars(ctx, p, args)
def phase_common_collect_jars(ctx, p):
return _phase_default_collect_jars(ctx, p)
def _phase_default_collect_jars(ctx, p, _args=struct()):
return _phase_collect_jars(ctx, _args.base_classpath if hasattr(_args, 'base_classpath') else p.scalac_provider.default_classpath, _args.extra_deps if hasattr(_args, 'extra_deps') else [], _args.extra_runtime_deps if hasattr(_args, 'extra_runtime_deps') else [], _args.unused_dependency_checker_mode if hasattr(_args, 'unused_dependency_checker_mode') else p.unused_deps_checker)
def _phase_collect_jars(ctx, base_classpath, extra_deps, extra_runtime_deps, unused_dependency_checker_mode):
return collect_jars_from_common_ctx(ctx, base_classpath, extra_deps, extra_runtime_deps, unused_dependency_checker_mode == 'off') |
#!/usr/bin/env python3
# https://abc059.contest.atcoder.jp/tasks/abc059_b
a = int(input())
b = int(input())
if a == b: print('EQUAL')
elif a < b: print('LESS')
else: print('GREATER')
| a = int(input())
b = int(input())
if a == b:
print('EQUAL')
elif a < b:
print('LESS')
else:
print('GREATER') |
# noinspection DuplicatedCode
class InsertConflictException(Exception):
pass
class OptimisticLockException(Exception):
pass
class UnexpectedStorageException(Exception):
pass
class UnsupportedCriteriaException(UnexpectedStorageException):
pass
class UnsupportedComputationException(UnexpectedStorageException):
pass
class UnsupportedStraightColumnException(UnexpectedStorageException):
pass
class NoFreeJoinException(UnexpectedStorageException):
pass
class NoCriteriaForUpdateException(UnexpectedStorageException):
pass
class UnsupportedSortMethodException(UnexpectedStorageException):
pass
class EntityNotFoundException(Exception):
pass
class TooManyEntitiesFoundException(Exception):
pass
| class Insertconflictexception(Exception):
pass
class Optimisticlockexception(Exception):
pass
class Unexpectedstorageexception(Exception):
pass
class Unsupportedcriteriaexception(UnexpectedStorageException):
pass
class Unsupportedcomputationexception(UnexpectedStorageException):
pass
class Unsupportedstraightcolumnexception(UnexpectedStorageException):
pass
class Nofreejoinexception(UnexpectedStorageException):
pass
class Nocriteriaforupdateexception(UnexpectedStorageException):
pass
class Unsupportedsortmethodexception(UnexpectedStorageException):
pass
class Entitynotfoundexception(Exception):
pass
class Toomanyentitiesfoundexception(Exception):
pass |
N, K, S = map(int, input().split())
str_S = str(S)
str_S1 = str(S+1)
ans = []
for _ in range(K):
ans.append(str_S)
for _ in range(N-K):
if S != 1000000000:
ans.append(str_S1)
else:
ans.append('1')
print(' '.join(ans))
| (n, k, s) = map(int, input().split())
str_s = str(S)
str_s1 = str(S + 1)
ans = []
for _ in range(K):
ans.append(str_S)
for _ in range(N - K):
if S != 1000000000:
ans.append(str_S1)
else:
ans.append('1')
print(' '.join(ans)) |
def epu_calib_gr1800_Aug2019(dets = [sclr, ring_curr]):
print('\n\n WARNING WARNING WARNING:\n\t check if there scalar is installed or not!!!!')
yield from gcdiag.diode
# srs settings for diode = SRS settings: 5 x1 uA/v , time = 1.0
yield from mv(m1_simple_fbk,0)
yield from mv(m3_simple_fbk,0)
# PHASE = 0 mm
yield from mv(epu1.phase, 0)
yield from mv(epu1.table,1)
yield from sleep(30)
#yield from mv(feslt.hg,2.0)
#yield from mv(feslt.vg,2.0)
#yield from bp.mv(pgm.cff,5.2707)
for i in range(250,1351,50):
yield from mv(pgm.en,i)
yield from sleep(5)
start_gap = epu1.gap.readback.value
yield from mv(epu1.gap,start_gap-1.5)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,3,31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] -1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,2,101)
# PHASE = 28.5 mm
yield from mv(epu1.phase, 28.5)
yield from mv(epu1.table,3)
yield from sleep(30)
yield from mv(pgm.en,850)
yield from beamline_align_v2()
yield from mv(m1_simple_fbk,0)
yield from mv(m3_simple_fbk,0)
yield from mv(pgm.en,350)
yield from sleep(5)
yield from mv(epu1.gap,18.01)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,2,31)
yield from mv(epu1.gap, 18.01)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,1,51)
for i in range(400,1351,50):
yield from mv(pgm.en,i)
yield from sleep(5)
start_gap = epu1.gap.readback.value
yield from mv(epu1.gap,start_gap-1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,2,31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] -1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,2,101)
# LEAVING THE BEAMLINE READY FOR NEXT TEST
yield from mv(epu1.phase, 0)
yield from mv(epu1.table,1)
yield from sleep(30)
yield from mv(pgm.en,530)
yield from beamline_align_v2()
def epu_calib_gr500(dets = [sclr, ring_curr]):
print('\n\n WARNING WARNING WARNING:\n\t check if there scalar is installed or not!!!!')
print('\n\n WARNING WARNING WARNING:\n\t this assumes epu interpolation table is DISABLED!!!!')
yield from gcdiag.diode
# srs settings for diode = SRS settings: 5 x10 uA/v , time = 1.0
#yield from mv(feslt.hg,2.0)
#yield from mv(feslt.vg,2.0)
#yield from bp.mv(pgm.cff,2.32)
yield from mv(extslt.hg,300)
yield from mv(extslt.vg,30)
#180 eV
yield from mv(pgm.en,180)
yield from mv(epu1.gap, 18.01)
yield from sleep(10)
yield from rel_scan(dets,epu1.gap,0,1.5,76)
yield from mv(epu1.gap, 18.01)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,1.5,76)
for i in range(200,1351,50):
calc_gap=e2g(i)
yield from mv(pgm.en,i)
yield from sleep(5)
yield from mv(epu1.gap,calc_gap-2)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,6,31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] -1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,2,101)
yield from sleep(100)
#800-1600 eV, 3rd harmonic
for i in range(800,1601,50):
calc_gap=e2g(i/3)
yield from mv(pgm.en,i)
yield from sleep(5)
yield from mv(epu1.gap,calc_gap-2)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,4,41)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0]-0.5)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,1.0,76)
calc_gap=e2g(850)
yield from mv(pgm.en,850)
yield from sleep(5)
yield from mv(epu1.gap,39.387)
yield from mv(shutterb,'close')
print('\n\n WARNING WARNING WARNING:\n\t EPU Table/Interpolation disabled!!!!')
print('\n\n WARNING WARNING WARNING:\n\t M1 Feedback disabled!!!!')
def epu_calib_gr1800(dets = [sclr, ring_curr]):
print('\n\n WARNING WARNING WARNING:\n\t check if there scalar is installed or not!!!!')
print('\n\n WARNING WARNING WARNING:\n\t this assumes epu interpolation table is DISABLED!!!!')
yield from gcdiag.diode
# srs settings for diode = SRS settings: 5 x1 uA/v , time = 1.0
yield from mv(epu1.phase, 0)
#yield from mv(feslt.hg,2.0)
#yield from mv(feslt.vg,2.0)
#yield from bp.mv(pgm.cff,5.2707)
for i in range(250,1351,50):
calc_gap=e2g(i)
yield from mv(pgm.en,i)
yield from sleep(5)
yield from mv(epu1.gap,calc_gap-2)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,6,31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] -1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,2,101)
yield from sleep(100)
#800-1550 eV, 3rd harmonic
#for i in range(800,2001,50):
#calc_gap=e2g(i/3)
#yield from mv(pgm.en,i)
#yield from sleep(5)
#yield from mv(epu1.gap,calc_gap-2)
#yield from sleep(10)
#yield from rel_scan(dets, epu1.gap,0,4,41)
#yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0]-0.5)
#yield from sleep(10)
#yield from rel_scan(dets, epu1.gap,0,1.0,76)
calc_gap=e2g(850)
yield from mv(pgm.en,850)
yield from sleep(5)
yield from mv(epu1.gap,calc_gap)
def epu_calib_ph28p5_gr500(dets = [sclr, ring_curr]):
print('\n\n WARNING WARNING WARNING:\n\t check if there scalar is installed or not!!!!')
print('\n\n WARNING WARNING WARNING:\n\t this assumes epu interpolation table is DISABLED!!!!')
yield from gcdiag.diode
yield from mv(extslt.hg,300)
yield from mv(extslt.vg,30)
# srs settings for diode = SRS settings: 5 x10 uA/v , time = 1.0
# Current gap limit is 18mm
yield from mv(epu1.phase, 28.5)
#yield from mv(feslt.hg,2.0)
#yield from mv(feslt.vg,2.0)
#yield from bp.mv(pgm.cff,2.24)
#1st Harmonic at 320 eV
#yield from mv(pgm.en,320,epu1.gap,17.05)
#yield from sleep(10)
#yield from rel_scan(dets,epu1.gap,0,1,30)
#yield from mv(epu1.gap,17.05)
#yield from sleep(10)
#yield from rel_scan(dets,epu1.gap,0,1,50)
#1st Harmonic
for i in range(400,451,50):
calc_gap=e2g(i)
yield from mv(pgm.en,i,epu1.gap,calc_gap-1.4-7.8 -(i-350)*0.0067)
yield from sleep(10)
yield from rel_scan(dets,epu1.gap,0,3,30)
yield from mv(epu1.gap,peaks['max']['sclr_channels_chan2'][0]-1)
yield from sleep(10)
yield from rel_scan(dets,epu1.gap,0,2,100)
for i in range(500,1351,50):
calc_gap=e2g(i)
yield from mv(pgm.en,i,epu1.gap,calc_gap-3-7.8 -(i-350)*0.0067)
yield from sleep(10)
yield from rel_scan(dets,epu1.gap,0,6,30)
yield from mv(epu1.gap,peaks['max']['sclr_channels_chan2'][0]-1)
yield from sleep(10)
yield from rel_scan(dets,epu1.gap,0,2,100)
yield from sleep(100)
#3rd Harmonic
for i in range(1100,1601,50):
calc_gap=e2g(i/3)
yield from mv(pgm.en,i,epu1.gap,calc_gap-0.5-8-(i-1000)*0.0027)
yield from sleep(10)
yield from rel_scan(dets,epu1.gap,0,2,30)
yield from mv(epu1.gap,peaks['max']['sclr_channels_chan2'][0]-0.5)
yield from sleep(10)
yield from rel_scan(dets,epu1.gap,0,1.0,75)
yield from mv(pgm.en,931.6)
yield from sleep(5)
yield from mv(epu1.gap,29.56)
yield from mv(shutterb,'close')
def epu_calib_ph28p5_gr1800(dets = [sclr, ring_curr]):
print('\n\n WARNING WARNING WARNING:\n\t check if there scalar is installed or not!!!!')
print('\n\n WARNING WARNING WARNING:\n\t this assumes epu interpolation table is DISABLED!!!!')
yield from gcdiag.diode
# srs settings for diode = SRS settings: 5 x1 uA/v
# Current gap limit is 18mm
yield from mv(epu1.phase, 28.5)
#yield from mv(feslt.hg,2.0)
#yield from mv(feslt.vg,2.0)
#yield from bp.mv(pgm.cff,5.2707)
yield from mv(pgm.en,350)
yield from sleep(5)
yield from mv(epu1.gap,18.01)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,2,31)
yield from mv(epu1.gap, 18.01)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,1,51)
for i in range(400,451,50):
calc_gap=e2g(i)
yield from mv(pgm.en,i)
yield from sleep(5)
yield from mv(epu1.gap,calc_gap-1.4-7.8 -(i-350)*0.0067)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,3,31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] -1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,2,101)
for i in range(500,1351,50):
calc_gap=e2g(i)
yield from mv(pgm.en,i)
yield from sleep(5)
yield from mv(epu1.gap,calc_gap-2-7.8 -(i-350)*0.0067)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,3,31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] -1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,2,101)
yield from sleep(30)
#800-1550 eV, 3rd harmonic
#for i in range(1100,2001,50):
#calc_gap=e2g(i/3)
#yield from mv(pgm.en,i)
#yield from sleep(5)
#yield from mv(epu1.gap,calc_gap-8.5-(i-1000)*0.0027)
#yield from sleep(10)
#yield from rel_scan(dets, epu1.gap,0,2,31)
#yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0]-0.5)
#yield from sleep(10)
#yield from rel_scan(dets, epu1.gap,0,1.0,76)
calc_gap=e2g(850)
yield from mv(pgm.en,530)
yield from sleep(5)
yield from mv(epu1.phase,0)
yield from mv(epu1.gap,28.01)
yield from mv(shutterb,'close')
print('\n\n WARNING WARNING WARNING:\n\t EPU Table/Interpolation disabled!!!!')
print('\n\n WARNING WARNING WARNING:\n\t M1 Feedback disabled!!!!')
def epu_calib_ph28p5_gr1800_v2(dets = [sclr, ring_curr]):
print('\n\n WARNING WARNING WARNING:\n\t check if there scalar is installed or not!!!!')
print('\n\n WARNING WARNING WARNING:\n\t this assumes epu interpolation table is DISABLED!!!!')
yield from gcdiag.diode
# srs settings for diode = SRS settings: 5 x1 uA/v
# Current gap limit is 18mm
yield from mv(epu1.phase, 28.5)
#yield from mv(feslt.hg,2.0)
#yield from mv(feslt.vg,2.0)
#yield from bp.mv(pgm.cff,5.2707)
yield from sleep(30)
#800-1550 eV, 3rd harmonic
for i in range(1100,2001,50):
calc_gap=e2g(i/3)
yield from mv(pgm.en,i)
yield from sleep(5)
yield from mv(epu1.gap,calc_gap-8.5-(i-1000)*0.0027)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,2,31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0]-0.5)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap,0,1.0,76)
calc_gap=e2g(850)
yield from mv(pgm.en,850)
yield from sleep(5)
yield from mv(epu1.gap,28.01)
yield from mv(shutterb,'close')
print('\n\n WARNING WARNING WARNING:\n\t EPU Table/Interpolation disabled!!!!')
print('\n\n WARNING WARNING WARNING:\n\t M1 Feedback disabled!!!!')
| def epu_calib_gr1800__aug2019(dets=[sclr, ring_curr]):
print('\n\n WARNING WARNING WARNING:\n\t check if there scalar is installed or not!!!!')
yield from gcdiag.diode
yield from mv(m1_simple_fbk, 0)
yield from mv(m3_simple_fbk, 0)
yield from mv(epu1.phase, 0)
yield from mv(epu1.table, 1)
yield from sleep(30)
for i in range(250, 1351, 50):
yield from mv(pgm.en, i)
yield from sleep(5)
start_gap = epu1.gap.readback.value
yield from mv(epu1.gap, start_gap - 1.5)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 3, 31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] - 1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 101)
yield from mv(epu1.phase, 28.5)
yield from mv(epu1.table, 3)
yield from sleep(30)
yield from mv(pgm.en, 850)
yield from beamline_align_v2()
yield from mv(m1_simple_fbk, 0)
yield from mv(m3_simple_fbk, 0)
yield from mv(pgm.en, 350)
yield from sleep(5)
yield from mv(epu1.gap, 18.01)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 31)
yield from mv(epu1.gap, 18.01)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 1, 51)
for i in range(400, 1351, 50):
yield from mv(pgm.en, i)
yield from sleep(5)
start_gap = epu1.gap.readback.value
yield from mv(epu1.gap, start_gap - 1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] - 1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 101)
yield from mv(epu1.phase, 0)
yield from mv(epu1.table, 1)
yield from sleep(30)
yield from mv(pgm.en, 530)
yield from beamline_align_v2()
def epu_calib_gr500(dets=[sclr, ring_curr]):
print('\n\n WARNING WARNING WARNING:\n\t check if there scalar is installed or not!!!!')
print('\n\n WARNING WARNING WARNING:\n\t this assumes epu interpolation table is DISABLED!!!!')
yield from gcdiag.diode
yield from mv(extslt.hg, 300)
yield from mv(extslt.vg, 30)
yield from mv(pgm.en, 180)
yield from mv(epu1.gap, 18.01)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 1.5, 76)
yield from mv(epu1.gap, 18.01)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 1.5, 76)
for i in range(200, 1351, 50):
calc_gap = e2g(i)
yield from mv(pgm.en, i)
yield from sleep(5)
yield from mv(epu1.gap, calc_gap - 2)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 6, 31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] - 1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 101)
yield from sleep(100)
for i in range(800, 1601, 50):
calc_gap = e2g(i / 3)
yield from mv(pgm.en, i)
yield from sleep(5)
yield from mv(epu1.gap, calc_gap - 2)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 4, 41)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] - 0.5)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 1.0, 76)
calc_gap = e2g(850)
yield from mv(pgm.en, 850)
yield from sleep(5)
yield from mv(epu1.gap, 39.387)
yield from mv(shutterb, 'close')
print('\n\n WARNING WARNING WARNING:\n\t EPU Table/Interpolation disabled!!!!')
print('\n\n WARNING WARNING WARNING:\n\t M1 Feedback disabled!!!!')
def epu_calib_gr1800(dets=[sclr, ring_curr]):
print('\n\n WARNING WARNING WARNING:\n\t check if there scalar is installed or not!!!!')
print('\n\n WARNING WARNING WARNING:\n\t this assumes epu interpolation table is DISABLED!!!!')
yield from gcdiag.diode
yield from mv(epu1.phase, 0)
for i in range(250, 1351, 50):
calc_gap = e2g(i)
yield from mv(pgm.en, i)
yield from sleep(5)
yield from mv(epu1.gap, calc_gap - 2)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 6, 31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] - 1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 101)
yield from sleep(100)
calc_gap = e2g(850)
yield from mv(pgm.en, 850)
yield from sleep(5)
yield from mv(epu1.gap, calc_gap)
def epu_calib_ph28p5_gr500(dets=[sclr, ring_curr]):
print('\n\n WARNING WARNING WARNING:\n\t check if there scalar is installed or not!!!!')
print('\n\n WARNING WARNING WARNING:\n\t this assumes epu interpolation table is DISABLED!!!!')
yield from gcdiag.diode
yield from mv(extslt.hg, 300)
yield from mv(extslt.vg, 30)
yield from mv(epu1.phase, 28.5)
for i in range(400, 451, 50):
calc_gap = e2g(i)
yield from mv(pgm.en, i, epu1.gap, calc_gap - 1.4 - 7.8 - (i - 350) * 0.0067)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 3, 30)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] - 1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 100)
for i in range(500, 1351, 50):
calc_gap = e2g(i)
yield from mv(pgm.en, i, epu1.gap, calc_gap - 3 - 7.8 - (i - 350) * 0.0067)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 6, 30)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] - 1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 100)
yield from sleep(100)
for i in range(1100, 1601, 50):
calc_gap = e2g(i / 3)
yield from mv(pgm.en, i, epu1.gap, calc_gap - 0.5 - 8 - (i - 1000) * 0.0027)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 30)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] - 0.5)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 1.0, 75)
yield from mv(pgm.en, 931.6)
yield from sleep(5)
yield from mv(epu1.gap, 29.56)
yield from mv(shutterb, 'close')
def epu_calib_ph28p5_gr1800(dets=[sclr, ring_curr]):
print('\n\n WARNING WARNING WARNING:\n\t check if there scalar is installed or not!!!!')
print('\n\n WARNING WARNING WARNING:\n\t this assumes epu interpolation table is DISABLED!!!!')
yield from gcdiag.diode
yield from mv(epu1.phase, 28.5)
yield from mv(pgm.en, 350)
yield from sleep(5)
yield from mv(epu1.gap, 18.01)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 31)
yield from mv(epu1.gap, 18.01)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 1, 51)
for i in range(400, 451, 50):
calc_gap = e2g(i)
yield from mv(pgm.en, i)
yield from sleep(5)
yield from mv(epu1.gap, calc_gap - 1.4 - 7.8 - (i - 350) * 0.0067)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 3, 31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] - 1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 101)
for i in range(500, 1351, 50):
calc_gap = e2g(i)
yield from mv(pgm.en, i)
yield from sleep(5)
yield from mv(epu1.gap, calc_gap - 2 - 7.8 - (i - 350) * 0.0067)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 3, 31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] - 1)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 101)
yield from sleep(30)
calc_gap = e2g(850)
yield from mv(pgm.en, 530)
yield from sleep(5)
yield from mv(epu1.phase, 0)
yield from mv(epu1.gap, 28.01)
yield from mv(shutterb, 'close')
print('\n\n WARNING WARNING WARNING:\n\t EPU Table/Interpolation disabled!!!!')
print('\n\n WARNING WARNING WARNING:\n\t M1 Feedback disabled!!!!')
def epu_calib_ph28p5_gr1800_v2(dets=[sclr, ring_curr]):
print('\n\n WARNING WARNING WARNING:\n\t check if there scalar is installed or not!!!!')
print('\n\n WARNING WARNING WARNING:\n\t this assumes epu interpolation table is DISABLED!!!!')
yield from gcdiag.diode
yield from mv(epu1.phase, 28.5)
yield from sleep(30)
for i in range(1100, 2001, 50):
calc_gap = e2g(i / 3)
yield from mv(pgm.en, i)
yield from sleep(5)
yield from mv(epu1.gap, calc_gap - 8.5 - (i - 1000) * 0.0027)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 2, 31)
yield from mv(epu1.gap, peaks['max']['sclr_channels_chan2'][0] - 0.5)
yield from sleep(10)
yield from rel_scan(dets, epu1.gap, 0, 1.0, 76)
calc_gap = e2g(850)
yield from mv(pgm.en, 850)
yield from sleep(5)
yield from mv(epu1.gap, 28.01)
yield from mv(shutterb, 'close')
print('\n\n WARNING WARNING WARNING:\n\t EPU Table/Interpolation disabled!!!!')
print('\n\n WARNING WARNING WARNING:\n\t M1 Feedback disabled!!!!') |
def duplicate(s):
if(len(s)<=1):
return s
if s[0]==s[1]:
return duplicate(s[1:])
return s[0]+duplicate(s[1:])
s = input()
print(duplicate(s))
| def duplicate(s):
if len(s) <= 1:
return s
if s[0] == s[1]:
return duplicate(s[1:])
return s[0] + duplicate(s[1:])
s = input()
print(duplicate(s)) |
linhas = int(input('Quantas linhas vai querer?: '))
colunas = int(input('quantas colunas vai querer?: '))
m = []
n = []
for l in range(linhas):
ln = []
lon = 0
for c in range(colunas):
t = int(input(f'qual o valor de [{l},{c}]?: '))
ln.append(t)
lon += t
m.append(ln)
n.append(lon)
for lin in range(linhas):
print(n[lin],end='\n')
for lin in range(linhas):
for col in range(colunas):
print(f'{m[lin][col]}*{n[lin]}',end='\t',)
print()
| linhas = int(input('Quantas linhas vai querer?: '))
colunas = int(input('quantas colunas vai querer?: '))
m = []
n = []
for l in range(linhas):
ln = []
lon = 0
for c in range(colunas):
t = int(input(f'qual o valor de [{l},{c}]?: '))
ln.append(t)
lon += t
m.append(ln)
n.append(lon)
for lin in range(linhas):
print(n[lin], end='\n')
for lin in range(linhas):
for col in range(colunas):
print(f'{m[lin][col]}*{n[lin]}', end='\t')
print() |
# coding=utf-8
# *** WARNING: this file was generated by crd2pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
SNAKE_TO_CAMEL_CASE_TABLE = {
"access_token_secret": "accessTokenSecret",
"api_version": "apiVersion",
"destroy_on_finalize": "destroyOnFinalize",
"env_secrets": "envSecrets",
"expect_no_refresh_changes": "expectNoRefreshChanges",
"git_auth_secret": "gitAuthSecret",
"last_attempted_commit": "lastAttemptedCommit",
"last_successful_commit": "lastSuccessfulCommit",
"last_update": "lastUpdate",
"project_repo": "projectRepo",
"repo_dir": "repoDir",
"retry_on_update_conflict": "retryOnUpdateConflict",
"secrets_provider": "secretsProvider",
}
CAMEL_TO_SNAKE_CASE_TABLE = {
"accessTokenSecret": "access_token_secret",
"apiVersion": "api_version",
"destroyOnFinalize": "destroy_on_finalize",
"envSecrets": "env_secrets",
"expectNoRefreshChanges": "expect_no_refresh_changes",
"gitAuthSecret": "git_auth_secret",
"lastAttemptedCommit": "last_attempted_commit",
"lastSuccessfulCommit": "last_successful_commit",
"lastUpdate": "last_update",
"projectRepo": "project_repo",
"repoDir": "repo_dir",
"retryOnUpdateConflict": "retry_on_update_conflict",
"secretsProvider": "secrets_provider",
}
| snake_to_camel_case_table = {'access_token_secret': 'accessTokenSecret', 'api_version': 'apiVersion', 'destroy_on_finalize': 'destroyOnFinalize', 'env_secrets': 'envSecrets', 'expect_no_refresh_changes': 'expectNoRefreshChanges', 'git_auth_secret': 'gitAuthSecret', 'last_attempted_commit': 'lastAttemptedCommit', 'last_successful_commit': 'lastSuccessfulCommit', 'last_update': 'lastUpdate', 'project_repo': 'projectRepo', 'repo_dir': 'repoDir', 'retry_on_update_conflict': 'retryOnUpdateConflict', 'secrets_provider': 'secretsProvider'}
camel_to_snake_case_table = {'accessTokenSecret': 'access_token_secret', 'apiVersion': 'api_version', 'destroyOnFinalize': 'destroy_on_finalize', 'envSecrets': 'env_secrets', 'expectNoRefreshChanges': 'expect_no_refresh_changes', 'gitAuthSecret': 'git_auth_secret', 'lastAttemptedCommit': 'last_attempted_commit', 'lastSuccessfulCommit': 'last_successful_commit', 'lastUpdate': 'last_update', 'projectRepo': 'project_repo', 'repoDir': 'repo_dir', 'retryOnUpdateConflict': 'retry_on_update_conflict', 'secretsProvider': 'secrets_provider'} |
def maxSubsetSumNoAdjacent(array):
# Write your code here.
if not array:
return 0
if len(array) < 3:
return max(array)
dp = [0]*len(array)
dp[0] = array[0]
dp[1] = max(array[1], dp[0])
for i in range(2, len(array)):
dp[i] = max(dp[i - 1], array[i] + dp[i - 2])
return max(dp)
| def max_subset_sum_no_adjacent(array):
if not array:
return 0
if len(array) < 3:
return max(array)
dp = [0] * len(array)
dp[0] = array[0]
dp[1] = max(array[1], dp[0])
for i in range(2, len(array)):
dp[i] = max(dp[i - 1], array[i] + dp[i - 2])
return max(dp) |
# Check if string is palindrom or not....using in-built fxn
a = str(input("Input String"))
b = a.reverse
if a==b:
print("string is palindrome")
else:
print("String is not palindrome")
| a = str(input('Input String'))
b = a.reverse
if a == b:
print('string is palindrome')
else:
print('String is not palindrome') |
def orf_single(seq):
startss = []
stopss = []
starts_ = []
stop_s = []
start = 0
sslen = 0
s_len1 = 0
s_len2 = 0
newseq = seq
newseq_6 = []
max_l = len(seq)
l = len(seq)
for i in range(len(seq)):
if (seq[i:i+3]=="ATG"):
start = 1 # has start codon
for j in range(int((len(seq)-(i+3))/3)):
if (seq[i+3+3*j:i+3+3*j+3]=="TAA") or (seq[i+3+3*j:i+3+3*j+3]=="TAG") or (seq[i+3+3*j:i+3+3*j+3]=="TGA"):
startss.append(i)
stopss.append(i+3+3*j+3)
break
if len(startss)==0 :
starts_.append(i)
if start == 0:
for k in range(len(seq)):
if (seq[k:k+3]=="TAA") or (seq[k:k+3]=="TAG") or (seq[k:k+3]=="TGA"):
stop_s.append(k+3)
if len(startss)!=0:
startss = np.array(startss)
stopss = np.array(stopss)
coding_len = stopss-startss
max_len_position = np.argmax(coding_len)
sslen = coding_len[max_len_position]
newseq = seq[(startss[max_len_position]):(stopss[max_len_position])]
max_l = sslen
if (startss[max_len_position]-3)>=0 and (startss[max_len_position]+5)<l:
newseq_6 = seq[(startss[max_len_position]-3): (startss[max_len_position])]+seq[(startss[max_len_position]+3):(startss[max_len_position]+6)]
elif len(starts_)!=0:
starts_ = np.array(starts_)
s_len1 = len(seq)-starts_[0]
newseq = seq[(starts_[0]):len(seq)]
max_l = s_len1
if (starts_[0]-3)>=0 and (starts_[0]+5)<l:
newseq_6 = seq[(starts_[0]-3):(starts_[0])]+seq[(starts_[0]+3):(starts_[0]+6)]
elif len(stop_s)!=0:
stop_s = np.array(stop_s)
s_len1 = stop_s[-1]
newseq = seq[0:(stop_s[-1])]
max_l = s_len1
orf_feature = (sslen/len(seq),s_len1/len(seq))
return orf_feature,max_l,newseq,newseq_6
def orf_feature(seq):
orf = []
max_l = []
newseq = []
newseq_nu6 = []
for i in range(len(seq)):
orfsin,max_lsin,newseqsin,newseq_nu6sin = orf_single(seq[i])
orf.append(orfsin)
max_l.append(max_lsin)
newseq.append(newseqsin)
newseq_nu6.append(newseq_nu6sin)
orf = np.array(orf)
max_l = np.array(max_l)
return orf,max_l,newseq,newseq_nu6
| def orf_single(seq):
startss = []
stopss = []
starts_ = []
stop_s = []
start = 0
sslen = 0
s_len1 = 0
s_len2 = 0
newseq = seq
newseq_6 = []
max_l = len(seq)
l = len(seq)
for i in range(len(seq)):
if seq[i:i + 3] == 'ATG':
start = 1
for j in range(int((len(seq) - (i + 3)) / 3)):
if seq[i + 3 + 3 * j:i + 3 + 3 * j + 3] == 'TAA' or seq[i + 3 + 3 * j:i + 3 + 3 * j + 3] == 'TAG' or seq[i + 3 + 3 * j:i + 3 + 3 * j + 3] == 'TGA':
startss.append(i)
stopss.append(i + 3 + 3 * j + 3)
break
if len(startss) == 0:
starts_.append(i)
if start == 0:
for k in range(len(seq)):
if seq[k:k + 3] == 'TAA' or seq[k:k + 3] == 'TAG' or seq[k:k + 3] == 'TGA':
stop_s.append(k + 3)
if len(startss) != 0:
startss = np.array(startss)
stopss = np.array(stopss)
coding_len = stopss - startss
max_len_position = np.argmax(coding_len)
sslen = coding_len[max_len_position]
newseq = seq[startss[max_len_position]:stopss[max_len_position]]
max_l = sslen
if startss[max_len_position] - 3 >= 0 and startss[max_len_position] + 5 < l:
newseq_6 = seq[startss[max_len_position] - 3:startss[max_len_position]] + seq[startss[max_len_position] + 3:startss[max_len_position] + 6]
elif len(starts_) != 0:
starts_ = np.array(starts_)
s_len1 = len(seq) - starts_[0]
newseq = seq[starts_[0]:len(seq)]
max_l = s_len1
if starts_[0] - 3 >= 0 and starts_[0] + 5 < l:
newseq_6 = seq[starts_[0] - 3:starts_[0]] + seq[starts_[0] + 3:starts_[0] + 6]
elif len(stop_s) != 0:
stop_s = np.array(stop_s)
s_len1 = stop_s[-1]
newseq = seq[0:stop_s[-1]]
max_l = s_len1
orf_feature = (sslen / len(seq), s_len1 / len(seq))
return (orf_feature, max_l, newseq, newseq_6)
def orf_feature(seq):
orf = []
max_l = []
newseq = []
newseq_nu6 = []
for i in range(len(seq)):
(orfsin, max_lsin, newseqsin, newseq_nu6sin) = orf_single(seq[i])
orf.append(orfsin)
max_l.append(max_lsin)
newseq.append(newseqsin)
newseq_nu6.append(newseq_nu6sin)
orf = np.array(orf)
max_l = np.array(max_l)
return (orf, max_l, newseq, newseq_nu6) |
numerotabuada = int(input("Escreva um numero e veja sua tabuada: "))
tabuada = []
for x in range(1,10+1):
mult = numerotabuada * x
tabuada.append(mult)
print(tabuada)
| numerotabuada = int(input('Escreva um numero e veja sua tabuada: '))
tabuada = []
for x in range(1, 10 + 1):
mult = numerotabuada * x
tabuada.append(mult)
print(tabuada) |
class Sense:
def __init__(self, short: str, ident: int):
self.ident = ident
self.short = short
self.pref_label = ''
self.alt_labels = []
def add_pref_label(self, pref_label: str):
self.__check_pref_label_not_set(pref_label)
self.pref_label = pref_label
def add_alt_label(self, alt_label: str):
if alt_label not in self.alt_labels:
self.alt_labels.append(alt_label)
def __check_pref_label_not_set(self, pref_label: str):
if self.pref_label != '':
raise ValueError(f"{pref_label} of {self.short} was already set to {self.pref_label}")
def check_pref_label_was_set(self):
if self.pref_label == '':
raise ValueError(f"pref_label of {self.short} was not set")
def get_dict_rep(self) -> dict:
return {
"ident": self.ident,
"pref_label": self.pref_label,
"alt_labels": self.alt_labels
}
| class Sense:
def __init__(self, short: str, ident: int):
self.ident = ident
self.short = short
self.pref_label = ''
self.alt_labels = []
def add_pref_label(self, pref_label: str):
self.__check_pref_label_not_set(pref_label)
self.pref_label = pref_label
def add_alt_label(self, alt_label: str):
if alt_label not in self.alt_labels:
self.alt_labels.append(alt_label)
def __check_pref_label_not_set(self, pref_label: str):
if self.pref_label != '':
raise value_error(f'{pref_label} of {self.short} was already set to {self.pref_label}')
def check_pref_label_was_set(self):
if self.pref_label == '':
raise value_error(f'pref_label of {self.short} was not set')
def get_dict_rep(self) -> dict:
return {'ident': self.ident, 'pref_label': self.pref_label, 'alt_labels': self.alt_labels} |
# Test the connection to the database
def test_ping(client):
response = client.get("/ping")
assert response.status_code == 200
assert response.json() == {"ping": "pong!"}
def test_root(client):
response = client.get("/")
assert response.status_code == 200
assert response.json() == {"Message": "Try /docs or /redoc"}
| def test_ping(client):
response = client.get('/ping')
assert response.status_code == 200
assert response.json() == {'ping': 'pong!'}
def test_root(client):
response = client.get('/')
assert response.status_code == 200
assert response.json() == {'Message': 'Try /docs or /redoc'} |
def power(a,b):
if b==0:
return 1
elif b%2 == 0:
val = power(a,int(b/2))
return val*val
else:
oddval = power(a,b-1)
return a*oddval
# take base
a = int(input())
#take exponent
b = int(input())
# to find a^b we divide b in two halves recursively.
answer=power(a,b)
print(answer) | def power(a, b):
if b == 0:
return 1
elif b % 2 == 0:
val = power(a, int(b / 2))
return val * val
else:
oddval = power(a, b - 1)
return a * oddval
a = int(input())
b = int(input())
answer = power(a, b)
print(answer) |
senha = int(input())
while senha != 2002:
print("Senha Invalida")
senha = int(input())
print("Acesso Permitido")
| senha = int(input())
while senha != 2002:
print('Senha Invalida')
senha = int(input())
print('Acesso Permitido') |
#body_x = 120
body_x = 140
body_y = 160
bottom_z = 15
bottom_wall_thikness = 1.5
dist_between_whells = 90
| body_x = 140
body_y = 160
bottom_z = 15
bottom_wall_thikness = 1.5
dist_between_whells = 90 |
DARKEST_GREEN = (15, 56, 15)
DARK_GREEN = (48, 98, 48)
LIGHT_GREEN = (111, 135, 12)
LIGHTEST_GREEN = (155, 188, 15)
DARKEST_GREEN_VAL = 3
DARK_GREEN_VAL = 2
LIGHT_GREEN_VAL = 1
LIGHTEST_GREEN_VAL = 0
| darkest_green = (15, 56, 15)
dark_green = (48, 98, 48)
light_green = (111, 135, 12)
lightest_green = (155, 188, 15)
darkest_green_val = 3
dark_green_val = 2
light_green_val = 1
lightest_green_val = 0 |
RUN_CONFIGURATIONS = {
"Python.DjangoServer": [
]
}
class RunConfiguration:
pass
# workspace.xml
# <?xml version="1.0" encoding="UTF-8"?>
# <project version="4">
# <component name="RunManager" selected="npm.build-prod">
# <configuration name="Worker" type="Python.DjangoServer" factoryName="Django server">
# <module name="CKDemo" />
# <option name="INTERPRETER_OPTIONS" value="" />
# <option name="PARENT_ENVS" value="true" />
# <envs>
# <env name="PYTHONUNBUFFERED" value="1" />
# <env name="DJANGO_SETTINGS_MODULE" value="pycharm" />
# </envs>
# <option name="SDK_HOME" value="$USER_HOME$/.virtualenvs/CKDemo/bin/python" />
# <option name="WORKING_DIRECTORY" value="" />
# <option name="IS_MODULE_SDK" value="false" />
# <option name="ADD_CONTENT_ROOTS" value="true" />
# <option name="ADD_SOURCE_ROOTS" value="true" />
# <option name="launchJavascriptDebuger" value="false" />
# <option name="host" value="" />
# <option name="additionalOptions" value="-Q celery" />
# <option name="browserUrl" value="" />
# <option name="runTestServer" value="false" />
# <option name="runNoReload" value="false" />
# <option name="useCustomRunCommand" value="true" />
# <option name="customRunCommand" value="worker" />
# <method v="2" />
# </configuration>
| run_configurations = {'Python.DjangoServer': []}
class Runconfiguration:
pass |
# DEBUG
ERROR="\033[31mERROR\033[0m"
SUCCESS="\033[32mSUCCESS\033[0m"
#ALGORITHM CONFIGS
NUM_ATTRS = 8
NUM_TARGETS = 1
NORMALIZE_TARGETS = False
TRAIN_RATIO = (2.0/3.0)
INPUT_DELIMITER = ','
HAS_HEADER=False
NUM_DIGITS = 5
NUM_NEIGHBOURS = 5
EXCLUDE_ATTRS= []
PREDICT_TARGET = 8
NUM_NEURONS_HIDDEN_LAYER = 9
LEARNING_RATE = 0.2
NUM_EPOCHS = 40
| error = '\x1b[31mERROR\x1b[0m'
success = '\x1b[32mSUCCESS\x1b[0m'
num_attrs = 8
num_targets = 1
normalize_targets = False
train_ratio = 2.0 / 3.0
input_delimiter = ','
has_header = False
num_digits = 5
num_neighbours = 5
exclude_attrs = []
predict_target = 8
num_neurons_hidden_layer = 9
learning_rate = 0.2
num_epochs = 40 |
CLIENT_ID_ENV_VAR = 'SPOTIFY_CLIENT_ID'
CLIENT_SECRET_ENV_VAR = 'SPOTIFY_CLIENT_SECRET'
USERNAME_ENV_VAR = 'SPOTIFY_USERNAME'
SPOTIFY_API_SCOPE = 'playlist-modify-private,playlist-read-private,user-library-modify,user-library-read'
DEFAULT_REDIRECT_URL = 'http://localhost:8888/callback' | client_id_env_var = 'SPOTIFY_CLIENT_ID'
client_secret_env_var = 'SPOTIFY_CLIENT_SECRET'
username_env_var = 'SPOTIFY_USERNAME'
spotify_api_scope = 'playlist-modify-private,playlist-read-private,user-library-modify,user-library-read'
default_redirect_url = 'http://localhost:8888/callback' |
class Data:
#Class Data is designed to hold an object in a tree
# name: the name of the node, generally more for the leaves and root
# length: the length of the branch from its top node
def __init__( self, name, length, id = 0 ):
self.name = name
self.length = length
self.id = id
def __str__( self ):
return "["+self.name+", "+ str( self.length ) + "]"
def Name( self ):
return self.name
def Length( self ):
return self.length
def Match( self, to_match ):
return to_match == self.name
class Node:
#Class Node has
# data: holding the node's current data
# sub: a list of the node's subordinate nodes
def __init__( self ):
self.data = Data("","0")
self.sub = []
self.parent = 0
def leaf( self, data ):
self.data = data
self.sub = []
def internal( self, data, sub ):
self.sub = sub
for item in self.sub:
item.parent = self
self.data = data
def children( self ):
return len( self.sub )
def __str__( self ):
total = ""
total = self.data.__str__()
if len( self.sub ) > 0:
total = total + "->("
for item in self.sub:
total = total + item.__str__() + ","
total = total[:len(total)-1] + ")"
return total
#Search current node and subordinate nodes for the node with data.name equal to name
def Search_For_Name( self, name ):
for item in self.sub:
if item.data.name == name:
return item
else:
to_return = item.Search_For_Name( name )
if( to_return != 0 ):
return to_return
return 0
#Find the longest branch distance below this node
def Longest_Branch( self ):
current_x = self.data.Length()
middle_x = 0
for each_item in self.sub:
newest_x = each_item.Longest_Branch()
if middle_x < newest_x:
middle_x = newest_x
returning = current_x + middle_x
return returning
#Return a list of the gi's found subordinate to this node
def GI_List( self ):
gi_list = []
if(len(self.sub)>0):
for item in self.sub:
if item.data.name != '':
gi_list.append(item.data.name)
else:
gi_list = gi_list + item.GI_List()
else:
gi_list.append( self.data.name )
return gi_list
#Wrapper class to hold a node
class Tree:
def __init__(self, node):
self.node = node
#Find the longest branch in the tree. If root_node is not 0, it is the star point
def Longest_Branch(self, root_node=0):
if( root_node == 0 ):
root_node = self.node
current_x = root_node.data.Length()
middle_x = 0
for each_item in root_node.sub:
newest_x = self.Longest_Branch(each_item)
if middle_x < newest_x:
middle_x = newest_x
returning = current_x + middle_x
return returning
#Search for a node given a name
def Get_Node_By_Name( self, name ):
if self.node.data.name == name:
return root
else:
return self.node.Search_For_Name( name )
| class Data:
def __init__(self, name, length, id=0):
self.name = name
self.length = length
self.id = id
def __str__(self):
return '[' + self.name + ', ' + str(self.length) + ']'
def name(self):
return self.name
def length(self):
return self.length
def match(self, to_match):
return to_match == self.name
class Node:
def __init__(self):
self.data = data('', '0')
self.sub = []
self.parent = 0
def leaf(self, data):
self.data = data
self.sub = []
def internal(self, data, sub):
self.sub = sub
for item in self.sub:
item.parent = self
self.data = data
def children(self):
return len(self.sub)
def __str__(self):
total = ''
total = self.data.__str__()
if len(self.sub) > 0:
total = total + '->('
for item in self.sub:
total = total + item.__str__() + ','
total = total[:len(total) - 1] + ')'
return total
def search__for__name(self, name):
for item in self.sub:
if item.data.name == name:
return item
else:
to_return = item.Search_For_Name(name)
if to_return != 0:
return to_return
return 0
def longest__branch(self):
current_x = self.data.Length()
middle_x = 0
for each_item in self.sub:
newest_x = each_item.Longest_Branch()
if middle_x < newest_x:
middle_x = newest_x
returning = current_x + middle_x
return returning
def gi__list(self):
gi_list = []
if len(self.sub) > 0:
for item in self.sub:
if item.data.name != '':
gi_list.append(item.data.name)
else:
gi_list = gi_list + item.GI_List()
else:
gi_list.append(self.data.name)
return gi_list
class Tree:
def __init__(self, node):
self.node = node
def longest__branch(self, root_node=0):
if root_node == 0:
root_node = self.node
current_x = root_node.data.Length()
middle_x = 0
for each_item in root_node.sub:
newest_x = self.Longest_Branch(each_item)
if middle_x < newest_x:
middle_x = newest_x
returning = current_x + middle_x
return returning
def get__node__by__name(self, name):
if self.node.data.name == name:
return root
else:
return self.node.Search_For_Name(name) |
nested = {}
for i, v in mut.iterrows():
if i not in nested:
nested[i] = {}
sample = v['Tumor_Sample_Barcode']
if sample not in nested[i]:
nested[i][sample] = {}
mut_type = v['Variant_Classification']
if mut_type not in nested[i][sample]:
nested[i][sample][mut_type] = []
hgvsp = v['HGVSp_Short']
nested[i][sample][mut_type].append(hgvsp)
if len(nested[i][sample][mut_type]) > 1:
print(i)
print(nested[i][sample][mut_type])
transformed_arrs = {}
for i, v in mut.iterrows():
variant = v['Variant_Classification']
gene_idx = i + ' ' + variant
sample = v['Tumor_Sample_Barcode']
if gene_idx not in transformed_arrs:
transformed_arrs[gene_idx] = {}
transformed_arrs[gene_idx]['Gene symbol'] = i
transformed_arrs[gene_idx]['Variant_Classification'] = variant
for s in mut_samples:
s_fixed = s.split('_')[0]
if s_fixed not in transformed_arrs[gene_idx]:
transformed_arrs[gene_idx][s_fixed] = 0
if s == sample:
transformed_arrs[gene_idx][s_fixed] += 1
print(transformed_arrs)
| nested = {}
for (i, v) in mut.iterrows():
if i not in nested:
nested[i] = {}
sample = v['Tumor_Sample_Barcode']
if sample not in nested[i]:
nested[i][sample] = {}
mut_type = v['Variant_Classification']
if mut_type not in nested[i][sample]:
nested[i][sample][mut_type] = []
hgvsp = v['HGVSp_Short']
nested[i][sample][mut_type].append(hgvsp)
if len(nested[i][sample][mut_type]) > 1:
print(i)
print(nested[i][sample][mut_type])
transformed_arrs = {}
for (i, v) in mut.iterrows():
variant = v['Variant_Classification']
gene_idx = i + ' ' + variant
sample = v['Tumor_Sample_Barcode']
if gene_idx not in transformed_arrs:
transformed_arrs[gene_idx] = {}
transformed_arrs[gene_idx]['Gene symbol'] = i
transformed_arrs[gene_idx]['Variant_Classification'] = variant
for s in mut_samples:
s_fixed = s.split('_')[0]
if s_fixed not in transformed_arrs[gene_idx]:
transformed_arrs[gene_idx][s_fixed] = 0
if s == sample:
transformed_arrs[gene_idx][s_fixed] += 1
print(transformed_arrs) |
# Config for automato
# WTF config
WTF_CSRF_ENABLED = True
SECRET_KEY = 'the_very_secure_secret_security_key_that_no_will_ever_guess'
# MySQL Config
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:alpine@127.0.0.1/automato'
SQLALCHEMY_TRACK_MODIFICATIONS = False
RABBITMQ_HOST = "localhost"
WEBDRIVER_PATH = r"C:\Users\padam\Downloads\chromedriver_win32\chromedriver.exe"
TESTING = False
| wtf_csrf_enabled = True
secret_key = 'the_very_secure_secret_security_key_that_no_will_ever_guess'
sqlalchemy_database_uri = 'mysql+pymysql://root:alpine@127.0.0.1/automato'
sqlalchemy_track_modifications = False
rabbitmq_host = 'localhost'
webdriver_path = 'C:\\Users\\padam\\Downloads\\chromedriver_win32\\chromedriver.exe'
testing = False |
# Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
DEPS = [
'raw_io',
'step',
]
def RunSteps(api):
# Read command's stdout and stderr.
step_result = api.step('echo', ['echo', 'Hello World'],
stdout=api.raw_io.output(),
stderr=api.raw_io.output())
# Pass stuff to command's stdin, read it from stdout.
step_result = api.step('cat', ['cat'],
stdin=api.raw_io.input_text(data='hello'),
stdout=api.raw_io.output('out'))
# Example of auto-mocking stdout. '\n' appended to mock 'echo' behavior.
step_result = api.step(
'automock',
['echo', 'huh'],
stdout=api.raw_io.output('out'),
step_test_data=(
lambda: api.raw_io.test_api.stream_output('huh\n')))
assert step_result.stdout == 'huh\n'
def GenTests(api):
yield api.test('basic')
| deps = ['raw_io', 'step']
def run_steps(api):
step_result = api.step('echo', ['echo', 'Hello World'], stdout=api.raw_io.output(), stderr=api.raw_io.output())
step_result = api.step('cat', ['cat'], stdin=api.raw_io.input_text(data='hello'), stdout=api.raw_io.output('out'))
step_result = api.step('automock', ['echo', 'huh'], stdout=api.raw_io.output('out'), step_test_data=lambda : api.raw_io.test_api.stream_output('huh\n'))
assert step_result.stdout == 'huh\n'
def gen_tests(api):
yield api.test('basic') |
numbers = [int(i) for i in input().split()]
average = sum(numbers) / len(numbers)
all_greater_than_average = [greater for greater in numbers if greater > average]
top_five = []
for j in range(5):
if len(all_greater_than_average) == 0:
break
top_five.append(str(max(all_greater_than_average)))
all_greater_than_average.remove(max(all_greater_than_average))
if len(top_five) == 0:
print("No")
else:
print(" ".join(top_five))
| numbers = [int(i) for i in input().split()]
average = sum(numbers) / len(numbers)
all_greater_than_average = [greater for greater in numbers if greater > average]
top_five = []
for j in range(5):
if len(all_greater_than_average) == 0:
break
top_five.append(str(max(all_greater_than_average)))
all_greater_than_average.remove(max(all_greater_than_average))
if len(top_five) == 0:
print('No')
else:
print(' '.join(top_five)) |
class Solution:
def maxRepeating(self, sequence: str, word: str) -> int:
mx = len(sequence) // len(word)
for repeat in range(1, mx + 2):
sub = word * repeat
if sub not in sequence:
return repeat - 1
return 0
| class Solution:
def max_repeating(self, sequence: str, word: str) -> int:
mx = len(sequence) // len(word)
for repeat in range(1, mx + 2):
sub = word * repeat
if sub not in sequence:
return repeat - 1
return 0 |
test = { 'name': 'q2a',
'points': 1,
'suites': [ { 'cases': [ {'code': '>>> 600 < num_schools < 700\nTrue', 'hidden': False, 'locked': False},
{'code': '>>> # Come back to this, not sure if it works;\n>>> num_schools == 659\nTrue', 'hidden': False, 'locked': False}],
'scored': True,
'setup': '',
'teardown': '',
'type': 'doctest'}]}
| test = {'name': 'q2a', 'points': 1, 'suites': [{'cases': [{'code': '>>> 600 < num_schools < 700\nTrue', 'hidden': False, 'locked': False}, {'code': '>>> # Come back to this, not sure if it works;\n>>> num_schools == 659\nTrue', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]} |
__all__ = ['__name__', '__version__', '__author__', '__author_email__', '__description__']
__name__ = 'ssec'
__version__ = '2.0.0'
__author__ = 'Justin Baudisch'
__author_email__ = 'baudischjustin1995@gmail.com'
__description__ = 'Yet another client library for server-sent events (sse).'
| __all__ = ['__name__', '__version__', '__author__', '__author_email__', '__description__']
__name__ = 'ssec'
__version__ = '2.0.0'
__author__ = 'Justin Baudisch'
__author_email__ = 'baudischjustin1995@gmail.com'
__description__ = 'Yet another client library for server-sent events (sse).' |
# calculate the hamming distance between two numbers
# count the number of 1 after xor operation of two number
# citation: https://leetcode.com/articles/hamming-distance/
# approach 1: using library function
def hamming_distance_using_library(x, y):
xor = x ^ y
return bin(xor).count('1')
# approach 2: using bit shifting
def hamming_distance_bit_shift(x, y):
xor = x ^ y
distance = 0
while xor:
if xor & 1:
# found 1
distance = distance + 1
xor = xor >> 1
return distance
# approach 3: Brian Kernighan's Algorithm
# approach 3 is faster than apporach 2
def hamming_distance_brian_kernighan(x, y):
xor = x ^ y
distance = 0
while xor:
xor = xor & (xor - 1) # clears the right most set bit
distance = distance + 1
return distance
| def hamming_distance_using_library(x, y):
xor = x ^ y
return bin(xor).count('1')
def hamming_distance_bit_shift(x, y):
xor = x ^ y
distance = 0
while xor:
if xor & 1:
distance = distance + 1
xor = xor >> 1
return distance
def hamming_distance_brian_kernighan(x, y):
xor = x ^ y
distance = 0
while xor:
xor = xor & xor - 1
distance = distance + 1
return distance |
# -*- coding: utf-8 -*-
__version__ = '1.4.0'
default_app_config = 'djangocms_translations.apps.DjangocmsTranslationsConfig'
| __version__ = '1.4.0'
default_app_config = 'djangocms_translations.apps.DjangocmsTranslationsConfig' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.