content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
description = 'W&T Box * 0-10V * Nr. 2' includes = [] _wutbox = 'wut-0-10-02' _wutbox_dev = _wutbox.replace('-','_') devices = { _wutbox_dev +'_1': device('nicos_mlz.sans1.devices.wut.WutValue', hostname = _wutbox + '.sans1.frm2', port = '1', description = 'input 1 voltage', fmtstr = '%.3F', lowlevel = False, loglevel = 'info', pollinterval = 5, maxage = 20, unit = 'V', ), _wutbox_dev +'_2': device('nicos_mlz.sans1.devices.wut.WutValue', hostname = _wutbox + '.sans1.frm2', port = '2', description = 'input 2 voltage', fmtstr = '%.3F', lowlevel = False, loglevel = 'info', pollinterval = 5, maxage = 20, unit = 'V', ), }
description = 'W&T Box * 0-10V * Nr. 2' includes = [] _wutbox = 'wut-0-10-02' _wutbox_dev = _wutbox.replace('-', '_') devices = {_wutbox_dev + '_1': device('nicos_mlz.sans1.devices.wut.WutValue', hostname=_wutbox + '.sans1.frm2', port='1', description='input 1 voltage', fmtstr='%.3F', lowlevel=False, loglevel='info', pollinterval=5, maxage=20, unit='V'), _wutbox_dev + '_2': device('nicos_mlz.sans1.devices.wut.WutValue', hostname=_wutbox + '.sans1.frm2', port='2', description='input 2 voltage', fmtstr='%.3F', lowlevel=False, loglevel='info', pollinterval=5, maxage=20, unit='V')}
#!/usr/bin/env python class ProxyAtom(object): """docstring for ProxyAtom""" def __init__(self, ips, ports): super(ProxyAtom, self).__init__() result = dict(zip(ips, ports)) self.items = set([':'.join((host, port)) for host, port in result.items()])
class Proxyatom(object): """docstring for ProxyAtom""" def __init__(self, ips, ports): super(ProxyAtom, self).__init__() result = dict(zip(ips, ports)) self.items = set([':'.join((host, port)) for (host, port) in result.items()])
#!/usr/bin/env python NAME = 'FortiWeb (Fortinet)' def is_waf(self): if self.matchcookie(r'^FORTIWAFSID='): return True for attack in self.attacks: r = attack(self) if r is None: return _, responsepage = r # Found a site running a tweaked version of Fortiweb block page. Picked those only # in common. Discarded others. if all(m in responsepage for m in (b'fgd_icon', b'Web Page Blocked', b'URL:', b'Attack ID', b'Message ID', b'Client IP')): return True return False
name = 'FortiWeb (Fortinet)' def is_waf(self): if self.matchcookie('^FORTIWAFSID='): return True for attack in self.attacks: r = attack(self) if r is None: return (_, responsepage) = r if all((m in responsepage for m in (b'fgd_icon', b'Web Page Blocked', b'URL:', b'Attack ID', b'Message ID', b'Client IP'))): return True return False
def checkResult(netSales, eps): try: crfo = float(netSales[0]) except: crfo = 0.0 try: prfo = float(netSales[1]) except: prfo = 0.0 try: lrfo = float(netSales[2]) except: lrfo = 0.0 try: cqe = float(eps[0]) except: cqe = 0.0 try: pqe = float(eps[1]) except: pqe = 0.0 try: lqe = float(eps[2]) except: lqe = 0.0 if(cqe > lqe and crfo > prfo): if(cqe <= 1 and (cqe >= pqe + 0.25)): return True elif(cqe <= 2 and (cqe >= pqe+0.5)): return True elif(cqe <= 10 and cqe > 2 and (cqe >= pqe+1)): return True elif(cqe > 10 and (cqe >= pqe + 1.5)): return True return False
def check_result(netSales, eps): try: crfo = float(netSales[0]) except: crfo = 0.0 try: prfo = float(netSales[1]) except: prfo = 0.0 try: lrfo = float(netSales[2]) except: lrfo = 0.0 try: cqe = float(eps[0]) except: cqe = 0.0 try: pqe = float(eps[1]) except: pqe = 0.0 try: lqe = float(eps[2]) except: lqe = 0.0 if cqe > lqe and crfo > prfo: if cqe <= 1 and cqe >= pqe + 0.25: return True elif cqe <= 2 and cqe >= pqe + 0.5: return True elif cqe <= 10 and cqe > 2 and (cqe >= pqe + 1): return True elif cqe > 10 and cqe >= pqe + 1.5: return True return False
''' A centered decagonal number is a centered figurate number that represents a decagon with a dot in the center and all other dots surrounding the center dot in successive decagonal layers. The centered decagonal number for n is given by the formula 5n^2+5n+1 ''' def centeredDecagonal (num): # Using formula return 5 * num * num + 5 * num + 1 # Driver code num = int(input()) print(num, "centered decagonal number :", centeredDecagonal(num)) ''' Input: 6 output: 6 centered decagonal number : 211 '''
""" A centered decagonal number is a centered figurate number that represents a decagon with a dot in the center and all other dots surrounding the center dot in successive decagonal layers. The centered decagonal number for n is given by the formula 5n^2+5n+1 """ def centered_decagonal(num): return 5 * num * num + 5 * num + 1 num = int(input()) print(num, 'centered decagonal number :', centered_decagonal(num)) '\nInput:\n6\noutput:\n6 centered decagonal number : 211\n'
# class Solution: # def convert(self, s: str, numRows: int) -> str: # lst = [] # N = len(s) # print (N//(2*numRows-2)) # [lst.append([s[i]]) for i in range(numRows)] # step = 2*numRows-2 # for k in range(N//step): # if k: # [lst[i].append(s[k * step + i]) for i in range(numRows)] # [lst[i].append(s[k*step+numRows-1-i+numRows-1]) for i in range(numRows-2,0, -1)] # for k in range(N%step): # lst[k].append(s[N//step *step + k]) # return lst # class Solution: # def convert(self, s: str, numRows: int) -> str: # lst = [] # N = len(s) # if numRows == 1 or N <= 2 or numRows >= N: # return s # # print (N//(2*numRows-2)) # [lst.append(s[i]) for i in range(numRows)] # step = 2*numRows-2 # if N < step: # for i in range(numRows-2, 2, -1): # # j = i # # a = numRows-1-i + numRows-1 # lst[i] += (s[numRows-1-i + numRows-1]) # for k in range(N//step): # if k: # for i in range(numRows): # lst[i]+=(s[k * step + i]) # for i in range(numRows - 2, 0, -1): # lst[i]+=(s[k*step+numRows-1-i+numRows-1]) # if N > step: # for k in range(min(N%step, numRows)): # a = N//step *step + k # lst[k]+=(s[N//step *step + k]) # if N%step - numRows>0: # for i in range(N%step - numRows): # lst[numRows-i-2]+=s[N//step *step + numRows+i] # # # return "".join(lst) # # class Solution: def convert(self, s: str, numRows: int) -> str: lst, idx = [], 0 p_down, p_up = 0, numRows-2 # p_down [0,numRows-1], p_up [numRows-2,1] N = len(s) if numRows == 1 or N <= 2 or numRows >= N: return s [lst.append(s[i]) for i in range(numRows)] idx += numRows while idx < N: if p_up <= 1: p_up = numRows-2 if p_down >= numRows-1: p_down = 0 while p_up >= 1: if idx >= N: break lst[p_up] += s[idx] p_up -= 1 idx += 1 while p_down <= numRows-1: if idx >= N: break lst[p_down] += s[idx] p_down += 1 idx += 1 return "".join(lst) s = "PAYPALISHIRINGXYZU" # s = "PAYPALISHIRING" numRows = 5 sol = Solution() print(sol.convert(s, numRows))
class Solution: def convert(self, s: str, numRows: int) -> str: (lst, idx) = ([], 0) (p_down, p_up) = (0, numRows - 2) n = len(s) if numRows == 1 or N <= 2 or numRows >= N: return s [lst.append(s[i]) for i in range(numRows)] idx += numRows while idx < N: if p_up <= 1: p_up = numRows - 2 if p_down >= numRows - 1: p_down = 0 while p_up >= 1: if idx >= N: break lst[p_up] += s[idx] p_up -= 1 idx += 1 while p_down <= numRows - 1: if idx >= N: break lst[p_down] += s[idx] p_down += 1 idx += 1 return ''.join(lst) s = 'PAYPALISHIRINGXYZU' num_rows = 5 sol = solution() print(sol.convert(s, numRows))
""" moe.py A set of functions that can be used to select an item from a list using the "Eeny, Meeny, Miny, Moe" method. There are a few versions of the rhyme. The "regular" one is as follows: Eeny, Meeny, Miny, Moe Catch a tiger by his toe If he hollers let him go Eeny, Meeny, Miny, Moe My mother told me To pick the very best one And you are it This script will deal with a few different versions of the rhyme: "regular" - As written above "short" - Does not contain the last three lines "not" - Has a "not" before the "it" on the final line. """ # Lengths of the various versions of the rhyme REGULAR_LENGTH = 30 NOT_LENGTH = 31 SHORT_LENGTH = 16 """ Performs the selection on the given list with the given rhyme length. :param items list to select from. :param rhyme_length Number of words in version of rhyme. :return selected item from given items. """ def pick(items, rhyme_length): if items is None or rhyme_length is None or len(items) == 0: return None else: num_items = len(items) if num_items >= rhyme_length: return items[rhyme_length - 1] elif rhyme_length % num_items == 0: return items[-1] else: index = rhyme_length % num_items return items[index - 1] """ Calls the pick method with the short rhyme length. :param items items to select from. :return selected item. """ def short_moe(items): global SHORT_LENGTH return pick(items, SHORT_LENGTH) """ Calls the pick method with the regular rhyme length. :param items items to select from. :return selected item. """ def moe(items): global REGULAR_LENGTH return pick(items, REGULAR_LENGTH) """ Calls the pick method with the "not" rhyme length. :param items items to select from. :return selected item. """ def not_moe(items): global NOT_LENGTH return pick(items, NOT_LENGTH)
""" moe.py A set of functions that can be used to select an item from a list using the "Eeny, Meeny, Miny, Moe" method. There are a few versions of the rhyme. The "regular" one is as follows: Eeny, Meeny, Miny, Moe Catch a tiger by his toe If he hollers let him go Eeny, Meeny, Miny, Moe My mother told me To pick the very best one And you are it This script will deal with a few different versions of the rhyme: "regular" - As written above "short" - Does not contain the last three lines "not" - Has a "not" before the "it" on the final line. """ regular_length = 30 not_length = 31 short_length = 16 '\nPerforms the selection on the given list with the given rhyme length.\n\n:param items list to select from.\n:param rhyme_length Number of words in version of rhyme.\n:return selected item from given items.\n' def pick(items, rhyme_length): if items is None or rhyme_length is None or len(items) == 0: return None else: num_items = len(items) if num_items >= rhyme_length: return items[rhyme_length - 1] elif rhyme_length % num_items == 0: return items[-1] else: index = rhyme_length % num_items return items[index - 1] '\nCalls the pick method with the short rhyme length.\n\n:param items items to select from.\n:return selected item.\n' def short_moe(items): global SHORT_LENGTH return pick(items, SHORT_LENGTH) '\nCalls the pick method with the regular rhyme length.\n\n:param items items to select from.\n:return selected item.\n' def moe(items): global REGULAR_LENGTH return pick(items, REGULAR_LENGTH) '\nCalls the pick method with the "not" rhyme length.\n\n:param items items to select from.\n:return selected item.\n' def not_moe(items): global NOT_LENGTH return pick(items, NOT_LENGTH)
def cpu_processing_time(cycles: int, freq: float): """ :param cycles :param freq: MHz :return: seconds """ return (cycles / (freq * pow(10, 6))) * pow(10, 3) if __name__ == "__main__": print(cpu_processing_time(1.05149 * pow(10, 6), 1300))
def cpu_processing_time(cycles: int, freq: float): """ :param cycles :param freq: MHz :return: seconds """ return cycles / (freq * pow(10, 6)) * pow(10, 3) if __name__ == '__main__': print(cpu_processing_time(1.05149 * pow(10, 6), 1300))
""" 21.25% """ class Solution(object): def firstMissingPositive(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return 1 nums = sorted(list(set(nums))) n = 0 for index, num in enumerate(nums): if num <= 0: n += 1 continue if index+1-n != num: return index+1-n return nums[-1]+1
""" 21.25% """ class Solution(object): def first_missing_positive(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return 1 nums = sorted(list(set(nums))) n = 0 for (index, num) in enumerate(nums): if num <= 0: n += 1 continue if index + 1 - n != num: return index + 1 - n return nums[-1] + 1
class Solution(object): def exclusiveTime(self, n, logs): """ :type n: int :type logs: List[str] :rtype: List[int] """ stack = [] overhead = [0] res = [0 for i in range(n)] for log_str in logs: log = log_str.split(':') if log[1] == 'start': overhead.append(0) stack.append(log) else: start_log = stack.pop() topped = overhead.pop() duration = int(log[2]) - int(start_log[2]) - topped + 1 overhead[-1] += duration + topped res[int(log[0])] += duration return res z = Solution() n = 4 logs = ["0:start:0","1:start:2", "2:start:3", "2:end:4", "1:end:5","3:start:7", "3:end:9", "0:end:12"] # n = 1 # logs = ["0:start:0","0:start:2","0:end:5","0:start:6","0:end:6","0:end:7"] # n = 1 # logs = ["0:start:0","0:start:1","0:start:2","0:end:3","0:end:4","0:end:5"] res = z.exclusiveTime(n, logs) print(res)
class Solution(object): def exclusive_time(self, n, logs): """ :type n: int :type logs: List[str] :rtype: List[int] """ stack = [] overhead = [0] res = [0 for i in range(n)] for log_str in logs: log = log_str.split(':') if log[1] == 'start': overhead.append(0) stack.append(log) else: start_log = stack.pop() topped = overhead.pop() duration = int(log[2]) - int(start_log[2]) - topped + 1 overhead[-1] += duration + topped res[int(log[0])] += duration return res z = solution() n = 4 logs = ['0:start:0', '1:start:2', '2:start:3', '2:end:4', '1:end:5', '3:start:7', '3:end:9', '0:end:12'] res = z.exclusiveTime(n, logs) print(res)
#!/usr/bin/env python # encoding: utf-8 """ remove_dups_from_sorted_list_ii.py Created by Shengwei on 2014-07-05. """ # https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list-ii/ # tags: medium, linked-list, pointer, dups, edge cases """ Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->1->1->2->3, return 2->3. """ # TODO: other solutions # 1. use counter to distinguish the situation where current value is not the same as the next # if counter is 0, current node is unique; otherwise, start from the next node # changejian's code and https://oj.leetcode.com/discuss/5743/how-can-i-improve-my-code) # 2. use two pointers, move prior one when necessary # https://github.com/MaskRay/LeetCode/blob/master/remove-duplicates-from-sorted-list-ii.cc # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: # @param head, a ListNode # @return a ListNode def deleteDuplicates(self, head): if head is None: return head pre = dummy_head = ListNode(0) dummy_head.next = head walker, runner = head, head.next while walker and walker.next: if walker.val != walker.next.val: pre.next = walker pre = walker walker = walker.next else: # look for next unique node or None runner = walker.next while runner.next and runner.next.val == walker.val: runner = runner.next # runner.next can be either None or a node with different value walker = runner.next # walker is either None (last node is also a dup) or last unique node pre.next = walker return dummy_head.next
""" remove_dups_from_sorted_list_ii.py Created by Shengwei on 2014-07-05. """ '\nGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.\n\nFor example,\nGiven 1->2->3->3->4->4->5, return 1->2->5.\nGiven 1->1->1->2->3, return 2->3.\n' class Solution: def delete_duplicates(self, head): if head is None: return head pre = dummy_head = list_node(0) dummy_head.next = head (walker, runner) = (head, head.next) while walker and walker.next: if walker.val != walker.next.val: pre.next = walker pre = walker walker = walker.next else: runner = walker.next while runner.next and runner.next.val == walker.val: runner = runner.next walker = runner.next pre.next = walker return dummy_head.next
"""This question was asked by BufferBox. Given a binary tree where all nodes are either 0 or 1, prune the tree so that subtrees containing all 0s are removed. For example, given the following tree: 0 / \ 1 0 / \ 1 0 / \ 0 0 should be pruned to: 0 / \ 1 0 / 1 We do not remove the tree at the root or its left child because it still has a 1 as a descendant. """
"""This question was asked by BufferBox. Given a binary tree where all nodes are either 0 or 1, prune the tree so that subtrees containing all 0s are removed. For example, given the following tree: 0 / 1 0 / 1 0 / 0 0 should be pruned to: 0 / 1 0 / 1 We do not remove the tree at the root or its left child because it still has a 1 as a descendant. """
NO_RESET = 0b0 BATCH_RESET = 0b1 EPOCH_RESET = 0b10 NONE_METER = 'none' SCALAR_METER = 'scalar' TEXT_METER = 'text' IMAGE_METER = 'image' HIST_METER = 'hist' GRAPH_METER = 'graph' AUDIO_METER = 'audio'
no_reset = 0 batch_reset = 1 epoch_reset = 2 none_meter = 'none' scalar_meter = 'scalar' text_meter = 'text' image_meter = 'image' hist_meter = 'hist' graph_meter = 'graph' audio_meter = 'audio'
lower=100 upper=999 for num in range(lower,upper+1): order=len(str(num)) sum=0 temp=num while temp>0: digit=temp%10 sum+=digit**order temp//=10 if num==sum: print(num)
lower = 100 upper = 999 for num in range(lower, upper + 1): order = len(str(num)) sum = 0 temp = num while temp > 0: digit = temp % 10 sum += digit ** order temp //= 10 if num == sum: print(num)
def is_interesting(number, awesome_phrases): if number<98: return 0 elif check(number, awesome_phrases) and number>=100: return 2 for i in range(number+1, number+3): if i>=100 and check(i, awesome_phrases): return 1 return 0 def check(n, awesome_phrases): return equal(n) or all_zero(n) or increase(n) or decrease(n) or palindrome(n) or awesome(n, awesome_phrases) def equal(n): return True if len(set(str(n)))==1 else False def all_zero(n): res=str(n) return True if int(res[1:])==0 else False def increase(n): res=str(n) for i in range(len(res)-1): if not ((int(res[i+1])-int(res[i]))==1 or ((int(res[i+1])==0 and int(res[i]))==9)): return False return True def decrease(n): res=str(n) for i in range(len(res)-1): if not (int(res[i])-int(res[i+1]))==1: return False return True def palindrome(n): return str(n)==str(n)[::-1] def awesome(n, awesome_phrases): if not awesome_phrases: return False return n in awesome_phrases
def is_interesting(number, awesome_phrases): if number < 98: return 0 elif check(number, awesome_phrases) and number >= 100: return 2 for i in range(number + 1, number + 3): if i >= 100 and check(i, awesome_phrases): return 1 return 0 def check(n, awesome_phrases): return equal(n) or all_zero(n) or increase(n) or decrease(n) or palindrome(n) or awesome(n, awesome_phrases) def equal(n): return True if len(set(str(n))) == 1 else False def all_zero(n): res = str(n) return True if int(res[1:]) == 0 else False def increase(n): res = str(n) for i in range(len(res) - 1): if not (int(res[i + 1]) - int(res[i]) == 1 or (int(res[i + 1]) == 0 and int(res[i])) == 9): return False return True def decrease(n): res = str(n) for i in range(len(res) - 1): if not int(res[i]) - int(res[i + 1]) == 1: return False return True def palindrome(n): return str(n) == str(n)[::-1] def awesome(n, awesome_phrases): if not awesome_phrases: return False return n in awesome_phrases
with open('input', 'r') as expense_report: expenses = [ int(a.strip()) for a in expense_report.readlines() ] expenses = sorted(expenses) def part1(): for a in expenses: for b in expenses: if a + b == 2020: print(f"{a} + {b} = 2020, {a} * {b} = {a * b}") return(a * b) def part2(): for a in expenses: for b in expenses: for c in expenses: if a + b + c == 2020: print(f"{a} + {b} + {c} = 2020, {a} * {b} * {c} = {a * b * c}") return(a * b * c) part1() part2()
with open('input', 'r') as expense_report: expenses = [int(a.strip()) for a in expense_report.readlines()] expenses = sorted(expenses) def part1(): for a in expenses: for b in expenses: if a + b == 2020: print(f'{a} + {b} = 2020, {a} * {b} = {a * b}') return a * b def part2(): for a in expenses: for b in expenses: for c in expenses: if a + b + c == 2020: print(f'{a} + {b} + {c} = 2020, {a} * {b} * {c} = {a * b * c}') return a * b * c part1() part2()
"""Migration for a given Submitty course database.""" def up(config, database, semester, course): """ Run up migration. :param config: Object holding configuration details about Submitty :type config: migrator.config.Config :param database: Object for interacting with given database for environment :type database: migrator.db.Database :param semester: Semester of the course being migrated :type semester: str :param course: Code of course being migrated :type course: str """ database.execute("ALTER TABLE queue_settings ADD IF NOT EXISTS token TEXT NOT null DEFAULT 'temp_token'"); database.execute("Update queue_settings SET token = code Where token = 'temp_token';"); def down(config, database, semester, course): """ Run down migration (rollback). :param config: Object holding configuration details about Submitty :type config: migrator.config.Config :param database: Object for interacting with given database for environment :type database: migrator.db.Database :param semester: Semester of the course being migrated :type semester: str :param course: Code of course being migrated :type course: str """ database.execute("ALTER TABLE queue_settings DROP COLUMN IF EXISTS token;");
"""Migration for a given Submitty course database.""" def up(config, database, semester, course): """ Run up migration. :param config: Object holding configuration details about Submitty :type config: migrator.config.Config :param database: Object for interacting with given database for environment :type database: migrator.db.Database :param semester: Semester of the course being migrated :type semester: str :param course: Code of course being migrated :type course: str """ database.execute("ALTER TABLE queue_settings ADD IF NOT EXISTS token TEXT NOT null DEFAULT 'temp_token'") database.execute("Update queue_settings SET token = code Where token = 'temp_token';") def down(config, database, semester, course): """ Run down migration (rollback). :param config: Object holding configuration details about Submitty :type config: migrator.config.Config :param database: Object for interacting with given database for environment :type database: migrator.db.Database :param semester: Semester of the course being migrated :type semester: str :param course: Code of course being migrated :type course: str """ database.execute('ALTER TABLE queue_settings DROP COLUMN IF EXISTS token;')
## # \file exceptions.py # \brief User-specific exceptions # # \author Michael Ebner (michael.ebner.14@ucl.ac.uk) # \date June 2017 # ## # Error handling in case the directory does not contain valid nifti file # \date 2017-06-14 11:11:37+0100 # class InputFilesNotValid(Exception): ## # \date 2017-06-14 11:12:55+0100 # # \param self The object # \param directory Path to empty folder, string # def __init__(self, directory): self.directory = directory def __str__(self): error = "Folder '%s' does not contain valid nifti files." % ( self.directory) return error ## # Error handling in case of an attempted object access which is not being # created yet # \date 2017-06-14 11:20:33+0100 # class ObjectNotCreated(Exception): ## # Store name of function which shall be executed to create desired object. # \date 2017-06-14 11:20:52+0100 # # \param self The object # \param function_call function call missing to create the object # def __init__(self, function_call): self.function_call = function_call def __str__(self): error = "Object has not been created yet. Run '%s' first." % ( self.function_call) return error ## # Error handling in case specified file does not exist # class FileNotExistent(Exception): ## # Store information on the missing file # \date 2017-06-29 12:49:18+0100 # # \param self The object # \param missing_file string of missing file # def __init__(self, missing_file): self.missing_file = missing_file def __str__(self): error = "File '%s' does not exist" % (self.missing_file) return error ## # Error handling in case specified directory does not exist # \date 2017-07-11 17:02:12+0100 # class DirectoryNotExistent(Exception): ## # Store information on the missing directory # \date 2017-07-11 17:02:46+0100 # # \param self The object # \param missing_directory string of missing directory # def __init__(self, missing_directory): self.missing_directory = missing_directory def __str__(self): error = "Directory '%s' does not exist" % (self.missing_directory) return error ## # Error handling in case multiple filenames exist # (e.g. same filename but two different extensions) # \date 2017-06-29 14:09:27+0100 # class FilenameAmbiguous(Exception): ## # Store information on the ambiguous file # \date 2017-06-29 14:10:34+0100 # # \param self The object # \param ambiguous_filename string of ambiguous file # def __init__(self, ambiguous_filename): self.ambiguous_filename = ambiguous_filename def __str__(self): error = "Filename '%s' ambiguous" % (self.ambiguous_filename) return error ## # Error handling in case IO is not correct # \date 2017-07-11 20:21:19+0100 # class IOError(Exception): ## # Store information on the IO error # \date 2017-07-11 20:21:38+0100 # # \param self The object # \param error The error # def __init__(self, error): self.error = error def __str__(self): return self.error
class Inputfilesnotvalid(Exception): def __init__(self, directory): self.directory = directory def __str__(self): error = "Folder '%s' does not contain valid nifti files." % self.directory return error class Objectnotcreated(Exception): def __init__(self, function_call): self.function_call = function_call def __str__(self): error = "Object has not been created yet. Run '%s' first." % self.function_call return error class Filenotexistent(Exception): def __init__(self, missing_file): self.missing_file = missing_file def __str__(self): error = "File '%s' does not exist" % self.missing_file return error class Directorynotexistent(Exception): def __init__(self, missing_directory): self.missing_directory = missing_directory def __str__(self): error = "Directory '%s' does not exist" % self.missing_directory return error class Filenameambiguous(Exception): def __init__(self, ambiguous_filename): self.ambiguous_filename = ambiguous_filename def __str__(self): error = "Filename '%s' ambiguous" % self.ambiguous_filename return error class Ioerror(Exception): def __init__(self, error): self.error = error def __str__(self): return self.error
# Testing with open("stuck_in_a_rut.in") as file1: N = int(file1.readline().strip()) cows = [[value if index == 0 else int(value) for index, value in enumerate(i.strip().split())] for i in file1.readlines()] # Actual # N = int(input()) # cow_numbers = [input() for _ in range(N)] # cows = [[value if index == 0 else int(value) for index, value in enumerate(i.strip().split())] for i in cow_numbers] future_path = {} max_x, max_y = max(cows, key=lambda x: x[1])[1], max(cows, key=lambda x: x[2])[2] for i in range(1, N+1): tmp_lst = [[1, cows[i-1][1], cows[i-1][2]]] if cows[i-1][0] == "E": tmp_1 = 2 for x in range(cows[i-1][1]+1, max_x+1): tmp_lst.append([tmp_1, x, cows[i-1][2]]) tmp_1 += 1 elif cows[i-1][0] == "N": tmp_1 = 2 for x in range(cows[i-1][2]+1, max_x+1): tmp_lst.append([tmp_1, cows[i-1][1], x]) tmp_1 += 1 future_path[i] = tmp_lst future_path_list = [x for key, value in future_path.items() for x in value] for key, value in future_path.items(): print(key, ": ", value, sep="") finish = {i: None for i in range(1, N+1)} for key, value in future_path.items(): x = True number_eaten = 0 for i in value: for y in future_path_list: if i[1:] == y[1:]: if i[0] > y[0]: n = True for g in future_path_list: if y[1:] == g[1:]: if y == [5, 11, 6]: print("**********************************") print(y, g) print("**********************************") if y[0] > g[0]: n = False print(i, y, key) if n: x = False if x: number_eaten += 1 finish[key] = [number_eaten, x] print(finish)
with open('stuck_in_a_rut.in') as file1: n = int(file1.readline().strip()) cows = [[value if index == 0 else int(value) for (index, value) in enumerate(i.strip().split())] for i in file1.readlines()] future_path = {} (max_x, max_y) = (max(cows, key=lambda x: x[1])[1], max(cows, key=lambda x: x[2])[2]) for i in range(1, N + 1): tmp_lst = [[1, cows[i - 1][1], cows[i - 1][2]]] if cows[i - 1][0] == 'E': tmp_1 = 2 for x in range(cows[i - 1][1] + 1, max_x + 1): tmp_lst.append([tmp_1, x, cows[i - 1][2]]) tmp_1 += 1 elif cows[i - 1][0] == 'N': tmp_1 = 2 for x in range(cows[i - 1][2] + 1, max_x + 1): tmp_lst.append([tmp_1, cows[i - 1][1], x]) tmp_1 += 1 future_path[i] = tmp_lst future_path_list = [x for (key, value) in future_path.items() for x in value] for (key, value) in future_path.items(): print(key, ': ', value, sep='') finish = {i: None for i in range(1, N + 1)} for (key, value) in future_path.items(): x = True number_eaten = 0 for i in value: for y in future_path_list: if i[1:] == y[1:]: if i[0] > y[0]: n = True for g in future_path_list: if y[1:] == g[1:]: if y == [5, 11, 6]: print('**********************************') print(y, g) print('**********************************') if y[0] > g[0]: n = False print(i, y, key) if n: x = False if x: number_eaten += 1 finish[key] = [number_eaten, x] print(finish)
__all__ = [ 'DataFSError', 'UnsupportedOperation', 'InvalidOpenMode', 'DataFileNotExist', 'MetaKeyNotExist', ] class DataFSError(Exception): """Base class for all :class:`DataFS` errors.""" class UnsupportedOperation(DataFSError): """ Class to indicate that a requested operation is not supported by the specific :class:`DataFS` subclass. """ class InvalidOpenMode(UnsupportedOperation): """ Class to indicate that the specified open mode is not supported. """ def __init__(self, mode): super(InvalidOpenMode, self).__init__(mode) @property def mode(self): return self.args[0] def __str__(self): return 'Invalid open mode: {!r}'.format(self.mode) class DataFileNotExist(DataFSError): """Class to indicate a requested data file does not exist.""" def __init__(self, filename): super(DataFileNotExist, self).__init__(filename) @property def filename(self): return self.args[0] def __str__(self): return 'Data file not exist: {!r}'.format(self.filename) class MetaKeyNotExist(DataFSError): """Class to indicate a requested meta key does not exist.""" def __init__(self, filename, meta_key): super(MetaKeyNotExist, self).__init__(filename, meta_key) @property def filename(self): return self.args[0] @property def meta_key(self): return self.args[1] def __str__(self): return 'In file {!r}: meta key not exist: {!r}'. \ format(self.filename, self.meta_key)
__all__ = ['DataFSError', 'UnsupportedOperation', 'InvalidOpenMode', 'DataFileNotExist', 'MetaKeyNotExist'] class Datafserror(Exception): """Base class for all :class:`DataFS` errors.""" class Unsupportedoperation(DataFSError): """ Class to indicate that a requested operation is not supported by the specific :class:`DataFS` subclass. """ class Invalidopenmode(UnsupportedOperation): """ Class to indicate that the specified open mode is not supported. """ def __init__(self, mode): super(InvalidOpenMode, self).__init__(mode) @property def mode(self): return self.args[0] def __str__(self): return 'Invalid open mode: {!r}'.format(self.mode) class Datafilenotexist(DataFSError): """Class to indicate a requested data file does not exist.""" def __init__(self, filename): super(DataFileNotExist, self).__init__(filename) @property def filename(self): return self.args[0] def __str__(self): return 'Data file not exist: {!r}'.format(self.filename) class Metakeynotexist(DataFSError): """Class to indicate a requested meta key does not exist.""" def __init__(self, filename, meta_key): super(MetaKeyNotExist, self).__init__(filename, meta_key) @property def filename(self): return self.args[0] @property def meta_key(self): return self.args[1] def __str__(self): return 'In file {!r}: meta key not exist: {!r}'.format(self.filename, self.meta_key)
# Time: O(max(h, k)) # Space: O(h) # 230 # Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. # # Note: # You may assume k is always valid, 1 <= k <= BST's total elements. # # Follow up: # What if the BST is modified (insert/delete operations) often and # you need to find the kth smallest frequently? How would you optimize the kthSmallest routine? # # Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: # @param {TreeNode} root # @param {integer} k # @return {integer} def kthSmallest(self, root, k): # USE THIS, inOrder_clean stack = [(root, False)] while stack: cur, visited = stack.pop() if cur: if visited: k -= 1 if k == 0: return cur.val else: stack.append((cur.right, False)) stack.append((cur, True)) stack.append((cur.left, False)) def kthSmallest_recur_woGlobalVar(self, root, k): # pass k and node as param def dfs(node, k): if node is None: return None, k # left subtree retVal, k = dfs(node.left, k) if retVal is not None: return retVal, k # process one node, decrement k if k == 1: return node.val, 0 k -= 1 # right subtree retVal, k = dfs(node.right, k) if retVal is not None: return retVal, k return None, k return dfs(root, k)[0] def kthSmallest_recur(self, root, k): self.ans = -1 self.k = k def inorder(root): if not root: return inorder(root.left) self.k -= 1 if self.k == 0: self.ans = root.val inorder(root.right) inorder(root) return self.ans def kthSmallest3(self, root, k): def pushLeft(node): while node: stack.append(node) node = node.left stack = [] pushLeft(root) while stack and k > 0: node = stack.pop() k -= 1 pushLeft(node.right) return node.val def kthSmallest4(self, root, k): s, cur, rank = [], root, 0 while s or cur: if cur: s.append(cur) cur = cur.left else: cur = s.pop() rank += 1 if rank == k: return cur.val cur = cur.right return float("-inf") root = TreeNode(3) root.left, root.right = TreeNode(1), TreeNode(4) root.left.right = TreeNode(2) print(Solution().kthSmallest(root, 1))
class Treenode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def kth_smallest(self, root, k): stack = [(root, False)] while stack: (cur, visited) = stack.pop() if cur: if visited: k -= 1 if k == 0: return cur.val else: stack.append((cur.right, False)) stack.append((cur, True)) stack.append((cur.left, False)) def kth_smallest_recur_wo_global_var(self, root, k): def dfs(node, k): if node is None: return (None, k) (ret_val, k) = dfs(node.left, k) if retVal is not None: return (retVal, k) if k == 1: return (node.val, 0) k -= 1 (ret_val, k) = dfs(node.right, k) if retVal is not None: return (retVal, k) return (None, k) return dfs(root, k)[0] def kth_smallest_recur(self, root, k): self.ans = -1 self.k = k def inorder(root): if not root: return inorder(root.left) self.k -= 1 if self.k == 0: self.ans = root.val inorder(root.right) inorder(root) return self.ans def kth_smallest3(self, root, k): def push_left(node): while node: stack.append(node) node = node.left stack = [] push_left(root) while stack and k > 0: node = stack.pop() k -= 1 push_left(node.right) return node.val def kth_smallest4(self, root, k): (s, cur, rank) = ([], root, 0) while s or cur: if cur: s.append(cur) cur = cur.left else: cur = s.pop() rank += 1 if rank == k: return cur.val cur = cur.right return float('-inf') root = tree_node(3) (root.left, root.right) = (tree_node(1), tree_node(4)) root.left.right = tree_node(2) print(solution().kthSmallest(root, 1))
height = int(input("Height: ")) width = int(input("Width: ")) for i in range(height): for j in range(width): print("* ",end='') print()
height = int(input('Height: ')) width = int(input('Width: ')) for i in range(height): for j in range(width): print('* ', end='') print()
shader_assignment = [] for shadingEngine in renderPartition.inputs(): if not shadingEngine.members(): continue if shadingEngine.name() == 'initialShadingGroup': continue nameSE = shadingEngine.name() nameSH = shadingEngine.surfaceShader.inputs()[0].name() shader_assignment.append([nameSE, nameSH, shadingEngine.listHistory(pruneDagObjects=True), shadingEngine.asSelectionSet().getSelectionStrings()]) if not shading_network_dir.exists(): shading_network_dir.makedirs() for nameSG, nameSH, shading_network, objects in shader_assignment: pm.select(deselect=True) pm.select(shading_network, noExpand=True) shading_network_path = shading_network_dir / nameSG + '.ma' pm.exportSelected(shading_network_path) for mesh in pm.ls(type='mesh'): pm.select(mesh, replace=True) pm.hyperShade(assign='lambert1') for shadingEngine in renderPartition.inputs(): if shadingEngine.name() in ('initialShadingGroup', 'initialParticleSE'): continue if not shadingEngine.members(): shading_network = shadingEngine.listHistory(pruneDagObjects=True) pm.select(shading_network, noExpand=True, replace=True) pm.delete() for snfile in shading_network_dir.listdir(): nodes = pm.importFile(snfile) newNodes.append((snfile.namebase, nodes)) for nameSG, nameSH, shading_network, objects in shader_assignment: for object in objects: pm.select(object, replace=True) pm.hyperShade(assign=nameSH)
shader_assignment = [] for shading_engine in renderPartition.inputs(): if not shadingEngine.members(): continue if shadingEngine.name() == 'initialShadingGroup': continue name_se = shadingEngine.name() name_sh = shadingEngine.surfaceShader.inputs()[0].name() shader_assignment.append([nameSE, nameSH, shadingEngine.listHistory(pruneDagObjects=True), shadingEngine.asSelectionSet().getSelectionStrings()]) if not shading_network_dir.exists(): shading_network_dir.makedirs() for (name_sg, name_sh, shading_network, objects) in shader_assignment: pm.select(deselect=True) pm.select(shading_network, noExpand=True) shading_network_path = shading_network_dir / nameSG + '.ma' pm.exportSelected(shading_network_path) for mesh in pm.ls(type='mesh'): pm.select(mesh, replace=True) pm.hyperShade(assign='lambert1') for shading_engine in renderPartition.inputs(): if shadingEngine.name() in ('initialShadingGroup', 'initialParticleSE'): continue if not shadingEngine.members(): shading_network = shadingEngine.listHistory(pruneDagObjects=True) pm.select(shading_network, noExpand=True, replace=True) pm.delete() for snfile in shading_network_dir.listdir(): nodes = pm.importFile(snfile) newNodes.append((snfile.namebase, nodes)) for (name_sg, name_sh, shading_network, objects) in shader_assignment: for object in objects: pm.select(object, replace=True) pm.hyperShade(assign=nameSH)
# Python - 2.7.6 Test.assert_equals(calculate_tip(30, 'poor'), 2) Test.assert_equals(calculate_tip(20, 'Excellent'), 4) Test.assert_equals(calculate_tip(20, 'hi'), 'Rating not recognised') Test.assert_equals(calculate_tip(107.65, 'GReat'), 17) Test.assert_equals(calculate_tip(20, 'great!'), 'Rating not recognised')
Test.assert_equals(calculate_tip(30, 'poor'), 2) Test.assert_equals(calculate_tip(20, 'Excellent'), 4) Test.assert_equals(calculate_tip(20, 'hi'), 'Rating not recognised') Test.assert_equals(calculate_tip(107.65, 'GReat'), 17) Test.assert_equals(calculate_tip(20, 'great!'), 'Rating not recognised')
# -*- coding: utf-8 -*- ################################################################################# # Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>) # Copyright(c): 2015-Present Webkul Software Pvt. Ltd. # All Rights Reserved. # # # # This program is copyright property of the author mentioned above. # You can`t redistribute it and/or modify it. # # # You should have received a copy of the License along with this program. # If not, see <https://store.webkul.com/license.html/> ################################################################################# { "name" : "Website Webkul Addons", "summary" : "Manage Webkul Website Addons", "category" : "Website", "version" : "2.0.1", "author" : "Webkul Software Pvt. Ltd.", "website" : "https://store.webkul.com/Odoo.html", "description" : "Website Webkul Addons", "live_test_url" : "http://odoodemo.webkul.com/?module=website_webkul_addons&version=12.0", "depends" : [ 'website', ], "data" : [ 'wizard/wk_website_wizard_view.xml', 'views/webkul_addons_config_view.xml', ], "images" : ['static/description/Banner.png'], "application" : True, "installable" : True, "auto_install" : False, }
{'name': 'Website Webkul Addons', 'summary': 'Manage Webkul Website Addons', 'category': 'Website', 'version': '2.0.1', 'author': 'Webkul Software Pvt. Ltd.', 'website': 'https://store.webkul.com/Odoo.html', 'description': 'Website Webkul Addons', 'live_test_url': 'http://odoodemo.webkul.com/?module=website_webkul_addons&version=12.0', 'depends': ['website'], 'data': ['wizard/wk_website_wizard_view.xml', 'views/webkul_addons_config_view.xml'], 'images': ['static/description/Banner.png'], 'application': True, 'installable': True, 'auto_install': False}
#------------------------------------------------------------------------------ # simple_universe/room.py # Copyright 2011 Joseph Schilz # Licensed under Apache v2 #------------------------------------------------------------------------------ class SimpleRoom(object): ID = [-1, -1] exits = [] description = "" def __init__(self, ID=[-1, -1], exits=False, description=False, contents=False): self.ID = ID self.exits = exits self.description = description self.THIS_WORLD = False self.contents = [] if contents: for content in contents: content.move_to(self, self.contents) def resolve_exit(self, the_exit): if type(the_exit[1]) == type([]): return self.THIS_WORLD.zones[the_exit[1][0]][the_exit[1][1]] else: return self.THIS_WORLD.zones[self.ID[0]][the_exit[1]] def zone(self): return self.THIS_WORLD.zones[self.ID[0]] def set_world(self, world): self.THIS_WORLD = world
class Simpleroom(object): id = [-1, -1] exits = [] description = '' def __init__(self, ID=[-1, -1], exits=False, description=False, contents=False): self.ID = ID self.exits = exits self.description = description self.THIS_WORLD = False self.contents = [] if contents: for content in contents: content.move_to(self, self.contents) def resolve_exit(self, the_exit): if type(the_exit[1]) == type([]): return self.THIS_WORLD.zones[the_exit[1][0]][the_exit[1][1]] else: return self.THIS_WORLD.zones[self.ID[0]][the_exit[1]] def zone(self): return self.THIS_WORLD.zones[self.ID[0]] def set_world(self, world): self.THIS_WORLD = world
# Time: O(n) # Space: O(1) # 751 # Given a start IP address ip and a number of ips we need to cover n, # return a representation of the range as a list (of smallest possible length) of CIDR blocks. # # A CIDR block is a string consisting of an IP, followed by a slash, # and then the prefix length. For example: "123.45.67.89/20". # That prefix length "20" represents the number of common prefix bits in the specified range. # # IP: 32 bits, CIDR: classless inter-domain routing # Example 1: # Input: ip = "255.0.0.7", n = 10 # Output: ["255.0.0.7/32","255.0.0.8/29","255.0.0.16/32"] # Explanation: # The initial ip address, when converted to binary, looks like this (spaces added for clarity): # 255.0.0.7 -> 11111111 00000000 00000000 00000111 # The address "255.0.0.7/32" specifies all addresses with a common prefix of 32 bits to the given address, # ie. just this one address. # # The address "255.0.0.8/29" specifies all addresses with a common prefix of 29 bits to the given address: # 255.0.0.8 -> 11111111 00000000 00000000 00001000 # Addresses with common prefix of 29 bits are: # 11111111 00000000 00000000 00001000 # 11111111 00000000 00000000 00001001 # 11111111 00000000 00000000 00001010 # 11111111 00000000 00000000 00001011 # 11111111 00000000 00000000 00001100 # 11111111 00000000 00000000 00001101 # 11111111 00000000 00000000 00001110 # 11111111 00000000 00000000 00001111 # # The address "255.0.0.16/32" specifies all addresses with a common prefix of 32 bits to the given address, # ie. just 11111111 00000000 00000000 00010000. # # In total, the answer specifies the range of 10 ips starting with the address 255.0.0.7 . # # There were other representations, such as: # ["255.0.0.7/32","255.0.0.8/30", "255.0.0.12/30", "255.0.0.16/32"], # but our answer was the shortest possible. # # Also note that a representation beginning with say, "255.0.0.7/30" would be incorrect, # because it includes addresses like 255.0.0.4 = 11111111 00000000 00000000 00000100 # that are outside the specified range. # Note: # - ip will be a valid IPv4 address. # - Every implied address ip + x (for x < n) will be a valid IPv4 address. # - n will be an integer in the range [1, 1000]. class Solution(object): def ipToCIDR(self, ip, n): """ :type ip: str :type n: int :rtype: List[str] """ def ip2int(ip): result = 0 for i in ip.split('.'): result = 256 * result + int(i) return result def int2ip(n): ans = [] for _ in range(4): n, rem = divmod(n, 256) ans.append(str(rem)) return '.'.join(ans[::-1]) #return ".".join(str((n >> i) % 256) for i in (24, 16, 8, 0)) start = ip2int(ip) result = [] while n: rightOne = start & (-start) flexibleBits = min(rightOne.bit_length(), n.bit_length()) - 1 mask = 32 - flexibleBits result.append(int2ip(start) + '/' + str(mask)) start += 1 << flexibleBits n -= 1 << flexibleBits return result print(Solution().ipToCIDR("0.0.0.8", 2)) # ["0.0.0.8/31"] print(Solution().ipToCIDR("0.0.0.8", 3)) # ["0.0.0.8/31","0.0.0.10/32"] print(Solution().ipToCIDR("0.0.0.9", 2)) # ["0.0.0.9/32","0.0.0.10/32"] print(Solution().ipToCIDR("0.0.0.9", 3)) # ["0.0.0.9/32","0.0.0.10/31"] print(Solution().ipToCIDR("0.0.0.7", 10)) # ["0.0.0.7/32","0.0.0.8/29","0.0.0.16/32"] print(Solution().ipToCIDR("0.0.0.6", 10)) # ["0.0.0.6/31","0.0.0.8/29""]
class Solution(object): def ip_to_cidr(self, ip, n): """ :type ip: str :type n: int :rtype: List[str] """ def ip2int(ip): result = 0 for i in ip.split('.'): result = 256 * result + int(i) return result def int2ip(n): ans = [] for _ in range(4): (n, rem) = divmod(n, 256) ans.append(str(rem)) return '.'.join(ans[::-1]) start = ip2int(ip) result = [] while n: right_one = start & -start flexible_bits = min(rightOne.bit_length(), n.bit_length()) - 1 mask = 32 - flexibleBits result.append(int2ip(start) + '/' + str(mask)) start += 1 << flexibleBits n -= 1 << flexibleBits return result print(solution().ipToCIDR('0.0.0.8', 2)) print(solution().ipToCIDR('0.0.0.8', 3)) print(solution().ipToCIDR('0.0.0.9', 2)) print(solution().ipToCIDR('0.0.0.9', 3)) print(solution().ipToCIDR('0.0.0.7', 10)) print(solution().ipToCIDR('0.0.0.6', 10))
def example_bytes_slice(): word = b'the lazy brown dog jumped' for i in range(10): # Memoryview slicing is 10x faster than bytes slicing if word[0:i] == 'the': return True def example_bytes_slice_as_arg(word: bytes): for i in range(10): # Memoryview slicing is 10x faster than bytes slicing if word[0:i] == 'the': return True
def example_bytes_slice(): word = b'the lazy brown dog jumped' for i in range(10): if word[0:i] == 'the': return True def example_bytes_slice_as_arg(word: bytes): for i in range(10): if word[0:i] == 'the': return True
prve_stiri = [2, 3, 5, 7] def je_prastevilo(n): i = 2 while i * i <= n: if n % i == 0: return False i += 1 return n > 1 def trunctable_z_desne(n): for indeks in range(1, len(str(n))): if not je_prastevilo(int(str(n)[0:indeks])): return False return n > 10 def trunctable_z_leve(n): for indeks in range(len(str(n))): if not je_prastevilo(int(str(n)[indeks:])): return False return n > 10 seznam = list() vsota = 0 for stevilo in range(1, 10 ** 6): if trunctable_z_desne(stevilo) and trunctable_z_leve(stevilo): vsota += stevilo seznam.append(stevilo)
prve_stiri = [2, 3, 5, 7] def je_prastevilo(n): i = 2 while i * i <= n: if n % i == 0: return False i += 1 return n > 1 def trunctable_z_desne(n): for indeks in range(1, len(str(n))): if not je_prastevilo(int(str(n)[0:indeks])): return False return n > 10 def trunctable_z_leve(n): for indeks in range(len(str(n))): if not je_prastevilo(int(str(n)[indeks:])): return False return n > 10 seznam = list() vsota = 0 for stevilo in range(1, 10 ** 6): if trunctable_z_desne(stevilo) and trunctable_z_leve(stevilo): vsota += stevilo seznam.append(stevilo)
low=1 high=2 third=0 sum=0 temp=0 while(third<4000000): third=low+high if(third%2==0): sum+=third low=high high=third print(sum+2)
low = 1 high = 2 third = 0 sum = 0 temp = 0 while third < 4000000: third = low + high if third % 2 == 0: sum += third low = high high = third print(sum + 2)
#Skill: array iteration #You are given an array of integers. Return the smallest positive integer that is not present in the array. The array may contain duplicate entries. #For example, the input [3, 4, -1, 1] should return 2 because it is the smallest positive integer that doesn't exist in the array. #Your solution should run in linear time and use constant space. #Here's your starting point: class Solution: #Cost: O(N), Space(1) def first_missing_positive(self, nums): #First pass to find +ve boundaries low = (1<<31) - 1 high = 0 for i in nums: if low > i and i>0: low = i if high < i: high = i # K pass to find first missing positive firstMiss = low + 1 searchmiss = firstMiss found = False kill = False l = len(nums) inx = 0 while (not kill) and (not found) : if nums[inx] < low or nums[inx] > high: inx += 1 continue if nums[inx] == searchmiss: searchmiss = searchmiss + 1 inx += 1 if inx < l: continue else: inx = 0 if searchmiss == firstMiss: found = True else: firstMiss = searchmiss if firstMiss > high or firstMiss < low: return None else: return firstMiss def first_missing_positive(nums): solu = Solution() return solu.first_missing_positive(nums) if __name__ == "__main__": print(first_missing_positive([8, 7, 2, 3, 4, 5, -1, 10, 6, 1])) print(first_missing_positive([7, 2, 3, 4, 5, -1, 10, 6, 1])) print(first_missing_positive([7, 2, 3, 4, 5, -1, 1])) print (first_missing_positive([3, 4, -1, 1])) # 2
class Solution: def first_missing_positive(self, nums): low = (1 << 31) - 1 high = 0 for i in nums: if low > i and i > 0: low = i if high < i: high = i first_miss = low + 1 searchmiss = firstMiss found = False kill = False l = len(nums) inx = 0 while not kill and (not found): if nums[inx] < low or nums[inx] > high: inx += 1 continue if nums[inx] == searchmiss: searchmiss = searchmiss + 1 inx += 1 if inx < l: continue else: inx = 0 if searchmiss == firstMiss: found = True else: first_miss = searchmiss if firstMiss > high or firstMiss < low: return None else: return firstMiss def first_missing_positive(nums): solu = solution() return solu.first_missing_positive(nums) if __name__ == '__main__': print(first_missing_positive([8, 7, 2, 3, 4, 5, -1, 10, 6, 1])) print(first_missing_positive([7, 2, 3, 4, 5, -1, 10, 6, 1])) print(first_missing_positive([7, 2, 3, 4, 5, -1, 1])) print(first_missing_positive([3, 4, -1, 1]))
class Solution: def maxProfit(self, inventory: List[int], orders: int) -> int: # [5, 5, 2] inventory.sort(reverse=True) inventory.append(0) ans = 0 idx = 0 n = len(inventory) while orders: # find the first index such that inv[j] < inv[i] lo, hi = idx + 1, n - 1 while lo < hi: mid = (lo + hi) // 2 if inventory[mid] == inventory[idx]: lo = mid + 1 else: hi = mid if lo >= n: break mult = lo if mult * (inventory[idx] - inventory[lo]) >= orders: # from inventory[idx] to inventory[lo] q, r = divmod(orders, mult) ans += mult * (inventory[idx] + inventory[idx] - q + 1) * q // 2 ans += r * (inventory[idx] - q) orders = 0 else: orders -= mult * (inventory[idx] - inventory[lo]) ans += mult * (inventory[idx] + inventory[lo] + 1) * (inventory[idx] - inventory[lo]) // 2 idx = lo ans %= 1_000_000_007 return ans
class Solution: def max_profit(self, inventory: List[int], orders: int) -> int: inventory.sort(reverse=True) inventory.append(0) ans = 0 idx = 0 n = len(inventory) while orders: (lo, hi) = (idx + 1, n - 1) while lo < hi: mid = (lo + hi) // 2 if inventory[mid] == inventory[idx]: lo = mid + 1 else: hi = mid if lo >= n: break mult = lo if mult * (inventory[idx] - inventory[lo]) >= orders: (q, r) = divmod(orders, mult) ans += mult * (inventory[idx] + inventory[idx] - q + 1) * q // 2 ans += r * (inventory[idx] - q) orders = 0 else: orders -= mult * (inventory[idx] - inventory[lo]) ans += mult * (inventory[idx] + inventory[lo] + 1) * (inventory[idx] - inventory[lo]) // 2 idx = lo ans %= 1000000007 return ans
# Copyright (c) 2014 Mirantis Inc. # Copyright (c) 2016 Codethink Ltd. # # 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. """ This module defines types for comment entries. """ STORY_CREATED = "story_created" STORY_DETAILS_CHANGED = "story_details_changed" TAGS_ADDED = "tags_added" TAGS_DELETED = "tags_deleted" USER_COMMENT = "user_comment" TASK_CREATED = "task_created" TASK_DETAILS_CHANGED = "task_details_changed" TASK_STATUS_CHANGED = "task_status_changed" TASK_PRIORITY_CHANGED = "task_priority_changed" TASK_ASSIGNEE_CHANGED = "task_assignee_changed" TASK_DELETED = "task_deleted" WORKLIST_CREATED = "worklist_created" # WORKLIST_DETAILS_CHANGED should occur when a value in any of the fields # in the `worklists` database table is changed. Changes in related tables # such as worklist_permissions, worklist_filters, and worklist_items have # their own event types. WORKLIST_DETAILS_CHANGED = "worklist_details_changed" WORKLIST_PERMISSION_CREATED = "worklist_permission_created" WORKLIST_PERMISSIONS_CHANGED = "worklist_permissions_changed" WORKLIST_FILTERS_CHANGED = "worklist_filters_changed" WORKLIST_CONTENTS_CHANGED = "worklist_contents_changed" BOARD_CREATED = "board_created" # BOARD_DETAILS_CHANGED should occur when a value in any of the fields # in the `boards` database table is changed. Changes in related tables # such as board_permissions, and board_worklists have their own event # types. BOARD_DETAILS_CHANGED = "board_details_changed" BOARD_PERMISSION_CREATED = "board_permission_created" BOARD_PERMISSIONS_CHANGED = "board_permissions_changed" BOARD_LANES_CHANGED = "board_lanes_changed" ALL = ( STORY_CREATED, STORY_DETAILS_CHANGED, USER_COMMENT, TAGS_ADDED, TAGS_DELETED, TASK_CREATED, TASK_ASSIGNEE_CHANGED, TASK_DETAILS_CHANGED, TASK_STATUS_CHANGED, TASK_PRIORITY_CHANGED, TASK_DELETED, WORKLIST_CREATED, WORKLIST_DETAILS_CHANGED, WORKLIST_PERMISSION_CREATED, WORKLIST_PERMISSIONS_CHANGED, WORKLIST_FILTERS_CHANGED, WORKLIST_CONTENTS_CHANGED, BOARD_CREATED, BOARD_DETAILS_CHANGED, BOARD_PERMISSION_CREATED, BOARD_PERMISSIONS_CHANGED, BOARD_LANES_CHANGED )
""" This module defines types for comment entries. """ story_created = 'story_created' story_details_changed = 'story_details_changed' tags_added = 'tags_added' tags_deleted = 'tags_deleted' user_comment = 'user_comment' task_created = 'task_created' task_details_changed = 'task_details_changed' task_status_changed = 'task_status_changed' task_priority_changed = 'task_priority_changed' task_assignee_changed = 'task_assignee_changed' task_deleted = 'task_deleted' worklist_created = 'worklist_created' worklist_details_changed = 'worklist_details_changed' worklist_permission_created = 'worklist_permission_created' worklist_permissions_changed = 'worklist_permissions_changed' worklist_filters_changed = 'worklist_filters_changed' worklist_contents_changed = 'worklist_contents_changed' board_created = 'board_created' board_details_changed = 'board_details_changed' board_permission_created = 'board_permission_created' board_permissions_changed = 'board_permissions_changed' board_lanes_changed = 'board_lanes_changed' all = (STORY_CREATED, STORY_DETAILS_CHANGED, USER_COMMENT, TAGS_ADDED, TAGS_DELETED, TASK_CREATED, TASK_ASSIGNEE_CHANGED, TASK_DETAILS_CHANGED, TASK_STATUS_CHANGED, TASK_PRIORITY_CHANGED, TASK_DELETED, WORKLIST_CREATED, WORKLIST_DETAILS_CHANGED, WORKLIST_PERMISSION_CREATED, WORKLIST_PERMISSIONS_CHANGED, WORKLIST_FILTERS_CHANGED, WORKLIST_CONTENTS_CHANGED, BOARD_CREATED, BOARD_DETAILS_CHANGED, BOARD_PERMISSION_CREATED, BOARD_PERMISSIONS_CHANGED, BOARD_LANES_CHANGED)
""" This module defines the AtlasMetaData container type. """ class AtlasMetaData(object): """ Container class for an Atlas's metadata. Readable metadata fields: number_of_points (long) number_of_lines (long) number_of_areas (long) number_of_nodes (long) number_of_edges (long) number_of_relations (long) original (bool) code_version (string) data_version (string) country (string) shard_name (string) tags (dict) """ def __init__(self): self.number_of_edges = 0 self.number_of_nodes = 0 self.number_of_areas = 0 self.number_of_lines = 0 self.number_of_points = 0 self.number_of_relations = 0 self.original = False self.code_version = "" self.data_version = "" self.country = "" self.shard_name = "" self.tags = {} def _get_atlas_metadata_from_proto(proto_atlas_metadata): """ Take a decoded ProtoAtlasMetaData object and turn it into a more user friendly AtlasMetaData object. """ new_atlas_metadata = AtlasMetaData() new_atlas_metadata.number_of_edges = proto_atlas_metadata.edgeNumber new_atlas_metadata.number_of_nodes = proto_atlas_metadata.nodeNumber new_atlas_metadata.number_of_areas = proto_atlas_metadata.areaNumber new_atlas_metadata.number_of_lines = proto_atlas_metadata.lineNumber new_atlas_metadata.number_of_points = proto_atlas_metadata.pointNumber new_atlas_metadata.number_of_relations = proto_atlas_metadata.relationNumber new_atlas_metadata.original = proto_atlas_metadata.original new_atlas_metadata.code_version = proto_atlas_metadata.codeVersion new_atlas_metadata.data_version = proto_atlas_metadata.dataVersion new_atlas_metadata.country = proto_atlas_metadata.country new_atlas_metadata.shard_name = proto_atlas_metadata.shardName # convert prototags and fill the tag dict for proto_tag in proto_atlas_metadata.tags: new_atlas_metadata.tags[proto_tag.key] = proto_tag.value return new_atlas_metadata
""" This module defines the AtlasMetaData container type. """ class Atlasmetadata(object): """ Container class for an Atlas's metadata. Readable metadata fields: number_of_points (long) number_of_lines (long) number_of_areas (long) number_of_nodes (long) number_of_edges (long) number_of_relations (long) original (bool) code_version (string) data_version (string) country (string) shard_name (string) tags (dict) """ def __init__(self): self.number_of_edges = 0 self.number_of_nodes = 0 self.number_of_areas = 0 self.number_of_lines = 0 self.number_of_points = 0 self.number_of_relations = 0 self.original = False self.code_version = '' self.data_version = '' self.country = '' self.shard_name = '' self.tags = {} def _get_atlas_metadata_from_proto(proto_atlas_metadata): """ Take a decoded ProtoAtlasMetaData object and turn it into a more user friendly AtlasMetaData object. """ new_atlas_metadata = atlas_meta_data() new_atlas_metadata.number_of_edges = proto_atlas_metadata.edgeNumber new_atlas_metadata.number_of_nodes = proto_atlas_metadata.nodeNumber new_atlas_metadata.number_of_areas = proto_atlas_metadata.areaNumber new_atlas_metadata.number_of_lines = proto_atlas_metadata.lineNumber new_atlas_metadata.number_of_points = proto_atlas_metadata.pointNumber new_atlas_metadata.number_of_relations = proto_atlas_metadata.relationNumber new_atlas_metadata.original = proto_atlas_metadata.original new_atlas_metadata.code_version = proto_atlas_metadata.codeVersion new_atlas_metadata.data_version = proto_atlas_metadata.dataVersion new_atlas_metadata.country = proto_atlas_metadata.country new_atlas_metadata.shard_name = proto_atlas_metadata.shardName for proto_tag in proto_atlas_metadata.tags: new_atlas_metadata.tags[proto_tag.key] = proto_tag.value return new_atlas_metadata
""" A Harness for creating and using GPs for inference. -- kandasamy@cs.cmu.edu """
""" A Harness for creating and using GPs for inference. -- kandasamy@cs.cmu.edu """
''' A non-empty array A consisting of N integers is given. The array contains an odd number of elements, and each element of the array can be paired with another element that has the same value, except for one element that is left unpaired. For example, in array A such that: A[0] = 9 A[1] = 3 A[2] = 9 A[3] = 3 A[4] = 9 A[5] = 7 A[6] = 9 the elements at indexes 0 and 2 have value 9, the elements at indexes 1 and 3 have value 3, the elements at indexes 4 and 6 have value 9, the element at index 5 has value 7 and is unpaired. Write a function: def solution(A) that, given an array A consisting of N integers fulfilling the above conditions, returns the value of the unpaired element. For example, given array A such that: A[0] = 9 A[1] = 3 A[2] = 9 A[3] = 3 A[4] = 9 A[5] = 7 A[6] = 9 the function should return 7, as explained in the example above. Write an efficient algorithm for the following assumptions: N is an odd integer within the range [1..1,000,000]; each element of array A is an integer within the range [1..1,000,000,000]; all but one of the values in A occur an even number of times. ''' def solution(A): A.sort() #print(A) for i in range(0,len(A),2): if(len(A)==1): return A[i] # print(A[i]) if(i+1==len(A)): return A[i] if(A[i]!=A[i+1]): # pass return A[i] A = [9,3,9,3,9,7,9] p=solution(A) #print(p)
""" A non-empty array A consisting of N integers is given. The array contains an odd number of elements, and each element of the array can be paired with another element that has the same value, except for one element that is left unpaired. For example, in array A such that: A[0] = 9 A[1] = 3 A[2] = 9 A[3] = 3 A[4] = 9 A[5] = 7 A[6] = 9 the elements at indexes 0 and 2 have value 9, the elements at indexes 1 and 3 have value 3, the elements at indexes 4 and 6 have value 9, the element at index 5 has value 7 and is unpaired. Write a function: def solution(A) that, given an array A consisting of N integers fulfilling the above conditions, returns the value of the unpaired element. For example, given array A such that: A[0] = 9 A[1] = 3 A[2] = 9 A[3] = 3 A[4] = 9 A[5] = 7 A[6] = 9 the function should return 7, as explained in the example above. Write an efficient algorithm for the following assumptions: N is an odd integer within the range [1..1,000,000]; each element of array A is an integer within the range [1..1,000,000,000]; all but one of the values in A occur an even number of times. """ def solution(A): A.sort() for i in range(0, len(A), 2): if len(A) == 1: return A[i] if i + 1 == len(A): return A[i] if A[i] != A[i + 1]: return A[i] a = [9, 3, 9, 3, 9, 7, 9] p = solution(A)
def maven_dependencies(callback): callback({"artifact": "antlr:antlr:2.7.6", "lang": "java", "sha1": "cf4f67dae5df4f9932ae7810f4548ef3e14dd35e", "repository": "https://repo.maven.apache.org/maven2/", "name": "antlr_antlr", "actual": "@antlr_antlr//jar", "bind": "jar/antlr/antlr"}) callback({"artifact": "aopalliance:aopalliance:1.0", "lang": "java", "sha1": "0235ba8b489512805ac13a8f9ea77a1ca5ebe3e8", "repository": "https://repo.maven.apache.org/maven2/", "name": "aopalliance_aopalliance", "actual": "@aopalliance_aopalliance//jar", "bind": "jar/aopalliance/aopalliance"}) callback({"artifact": "args4j:args4j:2.0.31", "lang": "java", "sha1": "6b870d81551ce93c5c776c3046299db8ad6c39d2", "repository": "https://repo.maven.apache.org/maven2/", "name": "args4j_args4j", "actual": "@args4j_args4j//jar", "bind": "jar/args4j/args4j"}) callback({"artifact": "com.cloudbees:groovy-cps:1.12", "lang": "java", "sha1": "d766273a59e0b954c016e805779106bca22764b9", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_cloudbees_groovy_cps", "actual": "@com_cloudbees_groovy_cps//jar", "bind": "jar/com/cloudbees/groovy_cps"}) callback({"artifact": "com.github.jnr:jffi:1.2.15", "lang": "java", "sha1": "f480f0234dd8f053da2421e60574cfbd9d85e1f5", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_github_jnr_jffi", "actual": "@com_github_jnr_jffi//jar", "bind": "jar/com/github/jnr/jffi"}) callback({"artifact": "com.github.jnr:jnr-constants:0.9.8", "lang": "java", "sha1": "478036404879bd582be79e9a7939f3a161601c8b", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_github_jnr_jnr_constants", "actual": "@com_github_jnr_jnr_constants//jar", "bind": "jar/com/github/jnr/jnr_constants"}) callback({"artifact": "com.github.jnr:jnr-ffi:2.1.4", "lang": "java", "sha1": "0a63bbd4af5cee55d820ef40dc5347d45765b788", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_github_jnr_jnr_ffi", "actual": "@com_github_jnr_jnr_ffi//jar", "bind": "jar/com/github/jnr/jnr_ffi"}) callback({"artifact": "com.github.jnr:jnr-posix:3.0.41", "lang": "java", "sha1": "36eff018149e53ed814a340ddb7de73ceb66bf96", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_github_jnr_jnr_posix", "actual": "@com_github_jnr_jnr_posix//jar", "bind": "jar/com/github/jnr/jnr_posix"}) callback({"artifact": "com.github.jnr:jnr-x86asm:1.0.2", "lang": "java", "sha1": "006936bbd6c5b235665d87bd450f5e13b52d4b48", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_github_jnr_jnr_x86asm", "actual": "@com_github_jnr_jnr_x86asm//jar", "bind": "jar/com/github/jnr/jnr_x86asm"}) callback({"artifact": "com.google.code.findbugs:jsr305:1.3.9", "lang": "java", "sha1": "40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_google_code_findbugs_jsr305", "actual": "@com_google_code_findbugs_jsr305//jar", "bind": "jar/com/google/code/findbugs/jsr305"}) callback({"artifact": "com.google.guava:guava:11.0.1", "lang": "java", "sha1": "57b40a943725d43610c898ac0169adf1b2d55742", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_google_guava_guava", "actual": "@com_google_guava_guava//jar", "bind": "jar/com/google/guava/guava"}) callback({"artifact": "com.google.inject:guice:4.0", "lang": "java", "sha1": "0f990a43d3725781b6db7cd0acf0a8b62dfd1649", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_google_inject_guice", "actual": "@com_google_inject_guice//jar", "bind": "jar/com/google/inject/guice"}) callback({"artifact": "com.infradna.tool:bridge-method-annotation:1.13", "lang": "java", "sha1": "18cdce50cde6f54ee5390d0907384f72183ff0fe", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_infradna_tool_bridge_method_annotation", "actual": "@com_infradna_tool_bridge_method_annotation//jar", "bind": "jar/com/infradna/tool/bridge_method_annotation"}) callback({"artifact": "com.jcraft:jzlib:1.1.3-kohsuke-1", "lang": "java", "sha1": "af5d27e1de29df05db95da5d76b546d075bc1bc5", "repository": "http://repo.jenkins-ci.org/public/", "name": "com_jcraft_jzlib", "actual": "@com_jcraft_jzlib//jar", "bind": "jar/com/jcraft/jzlib"}) callback({"artifact": "com.lesfurets:jenkins-pipeline-unit:1.0", "lang": "java", "sha1": "3aa90c606c541e88c268df3cc9e87306af69b29f", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_lesfurets_jenkins_pipeline_unit", "actual": "@com_lesfurets_jenkins_pipeline_unit//jar", "bind": "jar/com/lesfurets/jenkins_pipeline_unit"}) callback({"artifact": "com.sun.solaris:embedded_su4j:1.1", "lang": "java", "sha1": "9404130cc4e60670429f1ab8dbf94d669012725d", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_sun_solaris_embedded_su4j", "actual": "@com_sun_solaris_embedded_su4j//jar", "bind": "jar/com/sun/solaris/embedded_su4j"}) callback({"artifact": "com.sun.xml.txw2:txw2:20110809", "lang": "java", "sha1": "46afa3f3c468680875adb8f2a26086a126c89902", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_sun_xml_txw2_txw2", "actual": "@com_sun_xml_txw2_txw2//jar", "bind": "jar/com/sun/xml/txw2/txw2"}) callback({"artifact": "commons-beanutils:commons-beanutils:1.8.3", "lang": "java", "sha1": "686ef3410bcf4ab8ce7fd0b899e832aaba5facf7", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_beanutils_commons_beanutils", "actual": "@commons_beanutils_commons_beanutils//jar", "bind": "jar/commons_beanutils/commons_beanutils"}) callback({"artifact": "commons-codec:commons-codec:1.8", "lang": "java", "sha1": "af3be3f74d25fc5163b54f56a0d394b462dafafd", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_codec_commons_codec", "actual": "@commons_codec_commons_codec//jar", "bind": "jar/commons_codec/commons_codec"}) callback({"artifact": "commons-collections:commons-collections:3.2.2", "lang": "java", "sha1": "8ad72fe39fa8c91eaaf12aadb21e0c3661fe26d5", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_collections_commons_collections", "actual": "@commons_collections_commons_collections//jar", "bind": "jar/commons_collections/commons_collections"}) callback({"artifact": "commons-digester:commons-digester:2.1", "lang": "java", "sha1": "73a8001e7a54a255eef0f03521ec1805dc738ca0", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_digester_commons_digester", "actual": "@commons_digester_commons_digester//jar", "bind": "jar/commons_digester/commons_digester"}) callback({"artifact": "commons-discovery:commons-discovery:0.4", "lang": "java", "sha1": "9e3417d3866d9f71e83b959b229b35dc723c7bea", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_discovery_commons_discovery", "actual": "@commons_discovery_commons_discovery//jar", "bind": "jar/commons_discovery/commons_discovery"}) callback({"artifact": "commons-fileupload:commons-fileupload:1.3.1-jenkins-1", "lang": "java", "sha1": "5d0270b78ad9d5344ce4a8e35482ad8802526aca", "repository": "http://repo.jenkins-ci.org/public/", "name": "commons_fileupload_commons_fileupload", "actual": "@commons_fileupload_commons_fileupload//jar", "bind": "jar/commons_fileupload/commons_fileupload"}) callback({"artifact": "commons-httpclient:commons-httpclient:3.1", "lang": "java", "sha1": "964cd74171f427720480efdec40a7c7f6e58426a", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_httpclient_commons_httpclient", "actual": "@commons_httpclient_commons_httpclient//jar", "bind": "jar/commons_httpclient/commons_httpclient"}) # duplicates in commons-io:commons-io promoted to 2.5. Versions: 2.4 2.5 callback({"artifact": "commons-io:commons-io:2.5", "lang": "java", "sha1": "2852e6e05fbb95076fc091f6d1780f1f8fe35e0f", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_io_commons_io", "actual": "@commons_io_commons_io//jar", "bind": "jar/commons_io/commons_io"}) callback({"artifact": "commons-jelly:commons-jelly-tags-fmt:1.0", "lang": "java", "sha1": "2107da38fdd287ab78a4fa65c1300b5ad9999274", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_jelly_commons_jelly_tags_fmt", "actual": "@commons_jelly_commons_jelly_tags_fmt//jar", "bind": "jar/commons_jelly/commons_jelly_tags_fmt"}) callback({"artifact": "commons-jelly:commons-jelly-tags-xml:1.1", "lang": "java", "sha1": "cc0efc2ae0ff81ef7737afc786a0ce16a8540efc", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_jelly_commons_jelly_tags_xml", "actual": "@commons_jelly_commons_jelly_tags_xml//jar", "bind": "jar/commons_jelly/commons_jelly_tags_xml"}) callback({"artifact": "commons-lang:commons-lang:2.6", "lang": "java", "sha1": "0ce1edb914c94ebc388f086c6827e8bdeec71ac2", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_lang_commons_lang", "actual": "@commons_lang_commons_lang//jar", "bind": "jar/commons_lang/commons_lang"}) callback({"artifact": "javax.annotation:javax.annotation-api:1.2", "lang": "java", "sha1": "479c1e06db31c432330183f5cae684163f186146", "repository": "https://repo.maven.apache.org/maven2/", "name": "javax_annotation_javax_annotation_api", "actual": "@javax_annotation_javax_annotation_api//jar", "bind": "jar/javax/annotation/javax_annotation_api"}) callback({"artifact": "javax.inject:javax.inject:1", "lang": "java", "sha1": "6975da39a7040257bd51d21a231b76c915872d38", "repository": "https://repo.maven.apache.org/maven2/", "name": "javax_inject_javax_inject", "actual": "@javax_inject_javax_inject//jar", "bind": "jar/javax/inject/javax_inject"}) callback({"artifact": "javax.mail:mail:1.4.4", "lang": "java", "sha1": "b907ef0a02ff6e809392b1e7149198497fcc8e49", "repository": "https://repo.maven.apache.org/maven2/", "name": "javax_mail_mail", "actual": "@javax_mail_mail//jar", "bind": "jar/javax/mail/mail"}) callback({"artifact": "javax.servlet:jstl:1.1.0", "lang": "java", "sha1": "bca201e52333629c59e459e874e5ecd8f9899e15", "repository": "https://repo.maven.apache.org/maven2/", "name": "javax_servlet_jstl", "actual": "@javax_servlet_jstl//jar", "bind": "jar/javax/servlet/jstl"}) callback({"artifact": "javax.xml.stream:stax-api:1.0-2", "lang": "java", "sha1": "d6337b0de8b25e53e81b922352fbea9f9f57ba0b", "repository": "https://repo.maven.apache.org/maven2/", "name": "javax_xml_stream_stax_api", "actual": "@javax_xml_stream_stax_api//jar", "bind": "jar/javax/xml/stream/stax_api"}) callback({"artifact": "jaxen:jaxen:1.1-beta-11", "lang": "java", "sha1": "81e32b8bafcc778e5deea4e784670299f1c26b96", "repository": "https://repo.maven.apache.org/maven2/", "name": "jaxen_jaxen", "actual": "@jaxen_jaxen//jar", "bind": "jar/jaxen/jaxen"}) callback({"artifact": "jfree:jcommon:1.0.12", "lang": "java", "sha1": "737f02607d2f45bb1a589a85c63b4cd907e5e634", "repository": "https://repo.maven.apache.org/maven2/", "name": "jfree_jcommon", "actual": "@jfree_jcommon//jar", "bind": "jar/jfree/jcommon"}) callback({"artifact": "jfree:jfreechart:1.0.9", "lang": "java", "sha1": "6e522aa603bf7ac69da59edcf519b335490e93a6", "repository": "https://repo.maven.apache.org/maven2/", "name": "jfree_jfreechart", "actual": "@jfree_jfreechart//jar", "bind": "jar/jfree/jfreechart"}) callback({"artifact": "jline:jline:2.12", "lang": "java", "sha1": "ce9062c6a125e0f9ad766032573c041ae8ecc986", "repository": "https://repo.maven.apache.org/maven2/", "name": "jline_jline", "actual": "@jline_jline//jar", "bind": "jar/jline/jline"}) callback({"artifact": "junit:junit:4.12", "lang": "java", "sha1": "2973d150c0dc1fefe998f834810d68f278ea58ec", "repository": "https://repo.maven.apache.org/maven2/", "name": "junit_junit", "actual": "@junit_junit//jar", "bind": "jar/junit/junit"}) callback({"artifact": "net.i2p.crypto:eddsa:0.2.0", "lang": "java", "sha1": "0856a92559c4daf744cb27c93cd8b7eb1f8c4780", "repository": "https://repo.maven.apache.org/maven2/", "name": "net_i2p_crypto_eddsa", "actual": "@net_i2p_crypto_eddsa//jar", "bind": "jar/net/i2p/crypto/eddsa"}) callback({"artifact": "net.java.dev.jna:jna:4.2.1", "lang": "java", "sha1": "fcc5b10cb812c41b00708e7b57baccc3aee5567c", "repository": "https://repo.maven.apache.org/maven2/", "name": "net_java_dev_jna_jna", "actual": "@net_java_dev_jna_jna//jar", "bind": "jar/net/java/dev/jna/jna"}) callback({"artifact": "net.java.sezpoz:sezpoz:1.12", "lang": "java", "sha1": "01f7e4a04e06fdbc91d66ddf80c443c3f7c6503c", "repository": "https://repo.maven.apache.org/maven2/", "name": "net_java_sezpoz_sezpoz", "actual": "@net_java_sezpoz_sezpoz//jar", "bind": "jar/net/java/sezpoz/sezpoz"}) callback({"artifact": "net.sf.ezmorph:ezmorph:1.0.6", "lang": "java", "sha1": "01e55d2a0253ea37745d33062852fd2c90027432", "repository": "https://repo.maven.apache.org/maven2/", "name": "net_sf_ezmorph_ezmorph", "actual": "@net_sf_ezmorph_ezmorph//jar", "bind": "jar/net/sf/ezmorph/ezmorph"}) callback({"artifact": "org.acegisecurity:acegi-security:1.0.7", "lang": "java", "sha1": "72901120d299e0c6ed2f6a23dd37f9186eeb8cc3", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_acegisecurity_acegi_security", "actual": "@org_acegisecurity_acegi_security//jar", "bind": "jar/org/acegisecurity/acegi_security"}) callback({"artifact": "org.apache.ant:ant-launcher:1.8.4", "lang": "java", "sha1": "22f1e0c32a2bfc8edd45520db176bac98cebbbfe", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_apache_ant_ant_launcher", "actual": "@org_apache_ant_ant_launcher//jar", "bind": "jar/org/apache/ant/ant_launcher"}) callback({"artifact": "org.apache.ant:ant:1.8.4", "lang": "java", "sha1": "8acff3fb57e74bc062d4675d9dcfaffa0d524972", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_apache_ant_ant", "actual": "@org_apache_ant_ant//jar", "bind": "jar/org/apache/ant/ant"}) callback({"artifact": "org.apache.commons:commons-compress:1.10", "lang": "java", "sha1": "5eeb27c57eece1faf2d837868aeccc94d84dcc9a", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_apache_commons_commons_compress", "actual": "@org_apache_commons_commons_compress//jar", "bind": "jar/org/apache/commons/commons_compress"}) callback({"artifact": "org.apache.ivy:ivy:2.4.0", "lang": "java", "sha1": "5abe4c24bbe992a9ac07ca563d5bd3e8d569e9ed", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_apache_ivy_ivy", "actual": "@org_apache_ivy_ivy//jar", "bind": "jar/org/apache/ivy/ivy"}) # duplicates in org.codehaus.groovy:groovy-all fixed to 2.4.6. Versions: 2.4.6 2.4.11 callback({"artifact": "org.codehaus.groovy:groovy-all:2.4.6", "lang": "java", "sha1": "478feadca929a946b2f1fb962bb2179264759821", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_codehaus_groovy_groovy_all", "actual": "@org_codehaus_groovy_groovy_all//jar", "bind": "jar/org/codehaus/groovy/groovy_all"}) callback({"artifact": "org.codehaus.woodstox:wstx-asl:3.2.9", "lang": "java", "sha1": "c82b6e8f225bb799540e558b10ee24d268035597", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_codehaus_woodstox_wstx_asl", "actual": "@org_codehaus_woodstox_wstx_asl//jar", "bind": "jar/org/codehaus/woodstox/wstx_asl"}) callback({"artifact": "org.connectbot.jbcrypt:jbcrypt:1.0.0", "lang": "java", "sha1": "f37bba2b8b78fcc8111bb932318b621dcc6c5194", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_connectbot_jbcrypt_jbcrypt", "actual": "@org_connectbot_jbcrypt_jbcrypt//jar", "bind": "jar/org/connectbot/jbcrypt/jbcrypt"}) callback({"artifact": "org.fusesource.jansi:jansi:1.11", "lang": "java", "sha1": "655c643309c2f45a56a747fda70e3fadf57e9f11", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_fusesource_jansi_jansi", "actual": "@org_fusesource_jansi_jansi//jar", "bind": "jar/org/fusesource/jansi/jansi"}) callback({"artifact": "org.hamcrest:hamcrest-all:1.3", "lang": "java", "sha1": "63a21ebc981131004ad02e0434e799fd7f3a8d5a", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_hamcrest_hamcrest_all", "actual": "@org_hamcrest_hamcrest_all//jar", "bind": "jar/org/hamcrest/hamcrest_all"}) callback({"artifact": "org.hamcrest:hamcrest-core:1.3", "lang": "java", "sha1": "42a25dc3219429f0e5d060061f71acb49bf010a0", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_hamcrest_hamcrest_core", "actual": "@org_hamcrest_hamcrest_core//jar", "bind": "jar/org/hamcrest/hamcrest_core"}) callback({"artifact": "org.jboss.marshalling:jboss-marshalling-river:1.4.9.Final", "lang": "java", "sha1": "d41e3e1ed9cf4afd97d19df8ecc7f2120effeeb4", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jboss_marshalling_jboss_marshalling_river", "actual": "@org_jboss_marshalling_jboss_marshalling_river//jar", "bind": "jar/org/jboss/marshalling/jboss_marshalling_river"}) callback({"artifact": "org.jboss.marshalling:jboss-marshalling:1.4.9.Final", "lang": "java", "sha1": "8fd342ee3dde0448c7600275a936ea1b17deb494", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jboss_marshalling_jboss_marshalling", "actual": "@org_jboss_marshalling_jboss_marshalling//jar", "bind": "jar/org/jboss/marshalling/jboss_marshalling"}) callback({"artifact": "org.jenkins-ci.dom4j:dom4j:1.6.1-jenkins-4", "lang": "java", "sha1": "9a370b2010b5a1223c7a43dae6c05226918e17b1", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_dom4j_dom4j", "actual": "@org_jenkins_ci_dom4j_dom4j//jar", "bind": "jar/org/jenkins_ci/dom4j/dom4j"}) callback({"artifact": "org.jenkins-ci.main:cli:2.73.1", "lang": "java", "sha1": "03ae1decd36ee069108e66e70cd6ffcdd4320aec", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_main_cli", "actual": "@org_jenkins_ci_main_cli//jar", "bind": "jar/org/jenkins_ci/main/cli"}) callback({"artifact": "org.jenkins-ci.main:jenkins-core:2.73.1", "lang": "java", "sha1": "30c9e7029d46fd18a8720f9a491bf41ab8f2bdb2", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_main_jenkins_core", "actual": "@org_jenkins_ci_main_jenkins_core//jar", "bind": "jar/org/jenkins_ci/main/jenkins_core"}) callback({"artifact": "org.jenkins-ci.main:remoting:3.10", "lang": "java", "sha1": "19905fa1550ab34a33bb92a5e27e2a86733c9d15", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_main_remoting", "actual": "@org_jenkins_ci_main_remoting//jar", "bind": "jar/org/jenkins_ci/main/remoting"}) callback({"artifact": "org.jenkins-ci.plugins.icon-shim:icon-set:1.0.5", "lang": "java", "sha1": "dedc76ac61797dafc66f31e8507d65b98c9e57df", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_plugins_icon_shim_icon_set", "actual": "@org_jenkins_ci_plugins_icon_shim_icon_set//jar", "bind": "jar/org/jenkins_ci/plugins/icon_shim/icon_set"}) callback({"artifact": "org.jenkins-ci.plugins.workflow:workflow-api:2.11", "lang": "java", "sha1": "3a8a6e221a8b32fd9faabb33939c28f79fd961d7", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_plugins_workflow_workflow_api", "actual": "@org_jenkins_ci_plugins_workflow_workflow_api//jar", "bind": "jar/org/jenkins_ci/plugins/workflow/workflow_api"}) callback({"artifact": "org.jenkins-ci.plugins.workflow:workflow-step-api:2.9", "lang": "java", "sha1": "7d1ad140c092cf4a68a7763db9eac459b5ed86ff", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_plugins_workflow_workflow_step_api", "actual": "@org_jenkins_ci_plugins_workflow_workflow_step_api//jar", "bind": "jar/org/jenkins_ci/plugins/workflow/workflow_step_api"}) callback({"artifact": "org.jenkins-ci.plugins.workflow:workflow-support:2.14", "lang": "java", "sha1": "cd5f68c533ddd46fea3332ce788dffc80707ddb5", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_plugins_workflow_workflow_support", "actual": "@org_jenkins_ci_plugins_workflow_workflow_support//jar", "bind": "jar/org/jenkins_ci/plugins/workflow/workflow_support"}) callback({"artifact": "org.jenkins-ci.plugins:script-security:1.26", "lang": "java", "sha1": "44aacd104c0d5c8fe5d0f93e4a4001cae0e48c2b", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_plugins_script_security", "actual": "@org_jenkins_ci_plugins_script_security//jar", "bind": "jar/org/jenkins_ci/plugins/script_security"}) callback({"artifact": "org.jenkins-ci.plugins:structs:1.5", "lang": "java", "sha1": "72d429f749151f1c983c1fadcb348895cc6da20e", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_plugins_structs", "actual": "@org_jenkins_ci_plugins_structs//jar", "bind": "jar/org/jenkins_ci/plugins/structs"}) # duplicates in org.jenkins-ci:annotation-indexer promoted to 1.12. Versions: 1.9 1.12 callback({"artifact": "org.jenkins-ci:annotation-indexer:1.12", "lang": "java", "sha1": "8f6ee0cd64c305dcca29e2f5b46631d50890208f", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_annotation_indexer", "actual": "@org_jenkins_ci_annotation_indexer//jar", "bind": "jar/org/jenkins_ci/annotation_indexer"}) callback({"artifact": "org.jenkins-ci:bytecode-compatibility-transformer:1.8", "lang": "java", "sha1": "aded88ffe12f1904758397f96f16957e97b88e6e", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_bytecode_compatibility_transformer", "actual": "@org_jenkins_ci_bytecode_compatibility_transformer//jar", "bind": "jar/org/jenkins_ci/bytecode_compatibility_transformer"}) callback({"artifact": "org.jenkins-ci:commons-jelly:1.1-jenkins-20120928", "lang": "java", "sha1": "2720a0d54b7f32479b08970d7738041362e1f410", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_commons_jelly", "actual": "@org_jenkins_ci_commons_jelly//jar", "bind": "jar/org/jenkins_ci/commons_jelly"}) callback({"artifact": "org.jenkins-ci:commons-jexl:1.1-jenkins-20111212", "lang": "java", "sha1": "0a990a77bea8c5a400d58a6f5d98122236300f7d", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_commons_jexl", "actual": "@org_jenkins_ci_commons_jexl//jar", "bind": "jar/org/jenkins_ci/commons_jexl"}) callback({"artifact": "org.jenkins-ci:constant-pool-scanner:1.2", "lang": "java", "sha1": "e5e0b7c7fcb67767dbd195e0ca1f0ee9406dd423", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jenkins_ci_constant_pool_scanner", "actual": "@org_jenkins_ci_constant_pool_scanner//jar", "bind": "jar/org/jenkins_ci/constant_pool_scanner"}) callback({"artifact": "org.jenkins-ci:crypto-util:1.1", "lang": "java", "sha1": "3a199a4c3748012b9dbbf3080097dc9f302493d8", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_crypto_util", "actual": "@org_jenkins_ci_crypto_util//jar", "bind": "jar/org/jenkins_ci/crypto_util"}) callback({"artifact": "org.jenkins-ci:jmdns:3.4.0-jenkins-3", "lang": "java", "sha1": "264d0c402b48c365f34d072b864ed57f25e92e63", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_jmdns", "actual": "@org_jenkins_ci_jmdns//jar", "bind": "jar/org/jenkins_ci/jmdns"}) callback({"artifact": "org.jenkins-ci:memory-monitor:1.9", "lang": "java", "sha1": "1935bfb46474e3043ee2310a9bb790d42dde2ed7", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_memory_monitor", "actual": "@org_jenkins_ci_memory_monitor//jar", "bind": "jar/org/jenkins_ci/memory_monitor"}) # duplicates in org.jenkins-ci:symbol-annotation promoted to 1.5. Versions: 1.1 1.5 callback({"artifact": "org.jenkins-ci:symbol-annotation:1.5", "lang": "java", "sha1": "17694feb24cb69793914d0c1c11ff479ee4c1b38", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_symbol_annotation", "actual": "@org_jenkins_ci_symbol_annotation//jar", "bind": "jar/org/jenkins_ci/symbol_annotation"}) callback({"artifact": "org.jenkins-ci:task-reactor:1.4", "lang": "java", "sha1": "b89e501a3bc64fe9f28cb91efe75ed8745974ef8", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_task_reactor", "actual": "@org_jenkins_ci_task_reactor//jar", "bind": "jar/org/jenkins_ci/task_reactor"}) callback({"artifact": "org.jenkins-ci:trilead-ssh2:build-217-jenkins-11", "lang": "java", "sha1": "f10f4dd4121cc233cac229c51adb4775960fee0a", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_trilead_ssh2", "actual": "@org_jenkins_ci_trilead_ssh2//jar", "bind": "jar/org/jenkins_ci/trilead_ssh2"}) callback({"artifact": "org.jenkins-ci:version-number:1.4", "lang": "java", "sha1": "5d0f2ea16514c0ec8de86c102ce61a7837e45eb8", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_version_number", "actual": "@org_jenkins_ci_version_number//jar", "bind": "jar/org/jenkins_ci/version_number"}) callback({"artifact": "org.jruby.ext.posix:jna-posix:1.0.3-jenkins-1", "lang": "java", "sha1": "fb1148cc8192614ec1418d414f7b6026cc0ec71b", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jruby_ext_posix_jna_posix", "actual": "@org_jruby_ext_posix_jna_posix//jar", "bind": "jar/org/jruby/ext/posix/jna_posix"}) callback({"artifact": "org.jvnet.hudson:activation:1.1.1-hudson-1", "lang": "java", "sha1": "7957d80444223277f84676aabd5b0421b65888c4", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jvnet_hudson_activation", "actual": "@org_jvnet_hudson_activation//jar", "bind": "jar/org/jvnet/hudson/activation"}) callback({"artifact": "org.jvnet.hudson:commons-jelly-tags-define:1.0.1-hudson-20071021", "lang": "java", "sha1": "8b952d0e504ee505d234853119e5648441894234", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jvnet_hudson_commons_jelly_tags_define", "actual": "@org_jvnet_hudson_commons_jelly_tags_define//jar", "bind": "jar/org/jvnet/hudson/commons_jelly_tags_define"}) callback({"artifact": "org.jvnet.hudson:jtidy:4aug2000r7-dev-hudson-1", "lang": "java", "sha1": "ad8553d0acfa6e741d21d5b2c2beb737972ab7c7", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jvnet_hudson_jtidy", "actual": "@org_jvnet_hudson_jtidy//jar", "bind": "jar/org/jvnet/hudson/jtidy"}) callback({"artifact": "org.jvnet.hudson:xstream:1.4.7-jenkins-1", "lang": "java", "sha1": "161ed1603117c2d37b864f81a0d62f36cf7e958a", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jvnet_hudson_xstream", "actual": "@org_jvnet_hudson_xstream//jar", "bind": "jar/org/jvnet/hudson/xstream"}) callback({"artifact": "org.jvnet.localizer:localizer:1.24", "lang": "java", "sha1": "e20e7668dbf36e8d354dab922b89adb6273b703f", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jvnet_localizer_localizer", "actual": "@org_jvnet_localizer_localizer//jar", "bind": "jar/org/jvnet/localizer/localizer"}) callback({"artifact": "org.jvnet.robust-http-client:robust-http-client:1.2", "lang": "java", "sha1": "dee9fda92ad39a94a77ec6cf88300d4dd6db8a4d", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jvnet_robust_http_client_robust_http_client", "actual": "@org_jvnet_robust_http_client_robust_http_client//jar", "bind": "jar/org/jvnet/robust_http_client/robust_http_client"}) callback({"artifact": "org.jvnet.winp:winp:1.25", "lang": "java", "sha1": "1c88889f80c0e03a7fb62c26b706d68813f8e657", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jvnet_winp_winp", "actual": "@org_jvnet_winp_winp//jar", "bind": "jar/org/jvnet/winp/winp"}) callback({"artifact": "org.jvnet:tiger-types:2.2", "lang": "java", "sha1": "7ddc6bbc8ca59be8879d3a943bf77517ec190f39", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jvnet_tiger_types", "actual": "@org_jvnet_tiger_types//jar", "bind": "jar/org/jvnet/tiger_types"}) callback({"artifact": "org.kohsuke.jinterop:j-interop:2.0.6-kohsuke-1", "lang": "java", "sha1": "b2e243227608c1424ab0084564dc71659d273007", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_jinterop_j_interop", "actual": "@org_kohsuke_jinterop_j_interop//jar", "bind": "jar/org/kohsuke/jinterop/j_interop"}) callback({"artifact": "org.kohsuke.jinterop:j-interopdeps:2.0.6-kohsuke-1", "lang": "java", "sha1": "778400517a3419ce8c361498c194036534851736", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_jinterop_j_interopdeps", "actual": "@org_kohsuke_jinterop_j_interopdeps//jar", "bind": "jar/org/kohsuke/jinterop/j_interopdeps"}) callback({"artifact": "org.kohsuke.stapler:json-lib:2.4-jenkins-2", "lang": "java", "sha1": "7f4f9016d8c8b316ecbe68afe7c26df06d301366", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_kohsuke_stapler_json_lib", "actual": "@org_kohsuke_stapler_json_lib//jar", "bind": "jar/org/kohsuke/stapler/json_lib"}) callback({"artifact": "org.kohsuke.stapler:stapler-adjunct-codemirror:1.3", "lang": "java", "sha1": "fd1d45544400d2a4da6dfee9e60edd4ec3368806", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_kohsuke_stapler_stapler_adjunct_codemirror", "actual": "@org_kohsuke_stapler_stapler_adjunct_codemirror//jar", "bind": "jar/org/kohsuke/stapler/stapler_adjunct_codemirror"}) callback({"artifact": "org.kohsuke.stapler:stapler-adjunct-timeline:1.5", "lang": "java", "sha1": "3fa806cbb94679ceab9c1ecaaf5fea8207390cb7", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_stapler_stapler_adjunct_timeline", "actual": "@org_kohsuke_stapler_stapler_adjunct_timeline//jar", "bind": "jar/org/kohsuke/stapler/stapler_adjunct_timeline"}) callback({"artifact": "org.kohsuke.stapler:stapler-adjunct-zeroclipboard:1.3.5-1", "lang": "java", "sha1": "20184ea79888b55b6629e4479615b52f88b55173", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_stapler_stapler_adjunct_zeroclipboard", "actual": "@org_kohsuke_stapler_stapler_adjunct_zeroclipboard//jar", "bind": "jar/org/kohsuke/stapler/stapler_adjunct_zeroclipboard"}) callback({"artifact": "org.kohsuke.stapler:stapler-groovy:1.250", "lang": "java", "sha1": "a8b910923b8eef79dd99c8aa6418d8ada0de4c86", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_stapler_stapler_groovy", "actual": "@org_kohsuke_stapler_stapler_groovy//jar", "bind": "jar/org/kohsuke/stapler/stapler_groovy"}) callback({"artifact": "org.kohsuke.stapler:stapler-jelly:1.250", "lang": "java", "sha1": "6ac2202bf40e48a63623803697cd1801ee716273", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_stapler_stapler_jelly", "actual": "@org_kohsuke_stapler_stapler_jelly//jar", "bind": "jar/org/kohsuke/stapler/stapler_jelly"}) callback({"artifact": "org.kohsuke.stapler:stapler-jrebel:1.250", "lang": "java", "sha1": "b6f10cb14cf3462f5a51d03a7a00337052355c8c", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_stapler_stapler_jrebel", "actual": "@org_kohsuke_stapler_stapler_jrebel//jar", "bind": "jar/org/kohsuke/stapler/stapler_jrebel"}) callback({"artifact": "org.kohsuke.stapler:stapler:1.250", "lang": "java", "sha1": "d5afb2c46a2919d22e5bc3adccf5f09fbb0fb4e3", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_stapler_stapler", "actual": "@org_kohsuke_stapler_stapler//jar", "bind": "jar/org/kohsuke/stapler/stapler"}) callback({"artifact": "org.kohsuke:access-modifier-annotation:1.11", "lang": "java", "sha1": "d1ca3a10d8be91d1525f51dbc6a3c7644e0fc6ea", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_access_modifier_annotation", "actual": "@org_kohsuke_access_modifier_annotation//jar", "bind": "jar/org/kohsuke/access_modifier_annotation"}) callback({"artifact": "org.kohsuke:akuma:1.10", "lang": "java", "sha1": "0e2c6a1f79f17e3fab13332ab8e9b9016eeab0b6", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_akuma", "actual": "@org_kohsuke_akuma//jar", "bind": "jar/org/kohsuke/akuma"}) callback({"artifact": "org.kohsuke:asm5:5.0.1", "lang": "java", "sha1": "71ab0620a41ed37f626b96d80c2a7c58165550df", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_asm5", "actual": "@org_kohsuke_asm5//jar", "bind": "jar/org/kohsuke/asm5"}) callback({"artifact": "org.kohsuke:groovy-sandbox:1.10", "lang": "java", "sha1": "f4f33a2122cca74ce8beaaf6a3c5ab9c8644d977", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_groovy_sandbox", "actual": "@org_kohsuke_groovy_sandbox//jar", "bind": "jar/org/kohsuke/groovy_sandbox"}) callback({"artifact": "org.kohsuke:libpam4j:1.8", "lang": "java", "sha1": "548d4a1177adad8242fe03a6930c335669d669ad", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_libpam4j", "actual": "@org_kohsuke_libpam4j//jar", "bind": "jar/org/kohsuke/libpam4j"}) callback({"artifact": "org.kohsuke:libzfs:0.8", "lang": "java", "sha1": "5bb311276283921f7e1082c348c0253b17922dcc", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_libzfs", "actual": "@org_kohsuke_libzfs//jar", "bind": "jar/org/kohsuke/libzfs"}) callback({"artifact": "org.kohsuke:trilead-putty-extension:1.2", "lang": "java", "sha1": "0f2f41517e1f73be8e319da27a69e0dc0c524bf6", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_trilead_putty_extension", "actual": "@org_kohsuke_trilead_putty_extension//jar", "bind": "jar/org/kohsuke/trilead_putty_extension"}) callback({"artifact": "org.kohsuke:windows-package-checker:1.2", "lang": "java", "sha1": "86b5d2f9023633808d65dbcfdfd50dc5ad3ca31f", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_windows_package_checker", "actual": "@org_kohsuke_windows_package_checker//jar", "bind": "jar/org/kohsuke/windows_package_checker"}) callback({"artifact": "org.mindrot:jbcrypt:0.4", "lang": "java", "sha1": "af7e61017f73abb18ac4e036954f9f28c6366c07", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_mindrot_jbcrypt", "actual": "@org_mindrot_jbcrypt//jar", "bind": "jar/org/mindrot/jbcrypt"}) callback({"artifact": "org.ow2.asm:asm-analysis:5.0.3", "lang": "java", "sha1": "c7126aded0e8e13fed5f913559a0dd7b770a10f3", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_ow2_asm_asm_analysis", "actual": "@org_ow2_asm_asm_analysis//jar", "bind": "jar/org/ow2/asm/asm_analysis"}) callback({"artifact": "org.ow2.asm:asm-commons:5.0.3", "lang": "java", "sha1": "a7111830132c7f87d08fe48cb0ca07630f8cb91c", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_ow2_asm_asm_commons", "actual": "@org_ow2_asm_asm_commons//jar", "bind": "jar/org/ow2/asm/asm_commons"}) callback({"artifact": "org.ow2.asm:asm-tree:5.0.3", "lang": "java", "sha1": "287749b48ba7162fb67c93a026d690b29f410bed", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_ow2_asm_asm_tree", "actual": "@org_ow2_asm_asm_tree//jar", "bind": "jar/org/ow2/asm/asm_tree"}) callback({"artifact": "org.ow2.asm:asm-util:5.0.3", "lang": "java", "sha1": "1512e5571325854b05fb1efce1db75fcced54389", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_ow2_asm_asm_util", "actual": "@org_ow2_asm_asm_util//jar", "bind": "jar/org/ow2/asm/asm_util"}) callback({"artifact": "org.ow2.asm:asm:5.0.3", "lang": "java", "sha1": "dcc2193db20e19e1feca8b1240dbbc4e190824fa", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_ow2_asm_asm", "actual": "@org_ow2_asm_asm//jar", "bind": "jar/org/ow2/asm/asm"}) callback({"artifact": "org.samba.jcifs:jcifs:1.3.17-kohsuke-1", "lang": "java", "sha1": "6c9114dc4075277d829ea09e15d6ffab52f2d0c0", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_samba_jcifs_jcifs", "actual": "@org_samba_jcifs_jcifs//jar", "bind": "jar/org/samba/jcifs/jcifs"}) callback({"artifact": "org.slf4j:jcl-over-slf4j:1.7.7", "lang": "java", "sha1": "56003dcd0a31deea6391b9e2ef2f2dc90b205a92", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_slf4j_jcl_over_slf4j", "actual": "@org_slf4j_jcl_over_slf4j//jar", "bind": "jar/org/slf4j/jcl_over_slf4j"}) callback({"artifact": "org.slf4j:log4j-over-slf4j:1.7.7", "lang": "java", "sha1": "d521cb26a9c4407caafcec302e7804b048b07cea", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_slf4j_log4j_over_slf4j", "actual": "@org_slf4j_log4j_over_slf4j//jar", "bind": "jar/org/slf4j/log4j_over_slf4j"}) callback({"artifact": "org.slf4j:slf4j-api:1.7.7", "lang": "java", "sha1": "2b8019b6249bb05d81d3a3094e468753e2b21311", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_slf4j_slf4j_api", "actual": "@org_slf4j_slf4j_api//jar", "bind": "jar/org/slf4j/slf4j_api"}) callback({"artifact": "org.springframework:spring-aop:2.5.6.SEC03", "lang": "java", "sha1": "6468695557500723a18630b712ce112ec58827c1", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_aop", "actual": "@org_springframework_spring_aop//jar", "bind": "jar/org/springframework/spring_aop"}) callback({"artifact": "org.springframework:spring-beans:2.5.6.SEC03", "lang": "java", "sha1": "79b2c86ff12c21b2420b4c46dca51f0e58762aae", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_beans", "actual": "@org_springframework_spring_beans//jar", "bind": "jar/org/springframework/spring_beans"}) callback({"artifact": "org.springframework:spring-context-support:2.5.6.SEC03", "lang": "java", "sha1": "edf496f4ce066edc6b212e0e5521cb11ff97d55e", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_context_support", "actual": "@org_springframework_spring_context_support//jar", "bind": "jar/org/springframework/spring_context_support"}) callback({"artifact": "org.springframework:spring-context:2.5.6.SEC03", "lang": "java", "sha1": "5f1c24b26308afedc48a90a1fe2ed334a6475921", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_context", "actual": "@org_springframework_spring_context//jar", "bind": "jar/org/springframework/spring_context"}) callback({"artifact": "org.springframework:spring-core:2.5.6.SEC03", "lang": "java", "sha1": "644a23805a7ea29903bde0ccc1cd1a8b5f0432d6", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_core", "actual": "@org_springframework_spring_core//jar", "bind": "jar/org/springframework/spring_core"}) callback({"artifact": "org.springframework:spring-dao:1.2.9", "lang": "java", "sha1": "6f90baf86fc833cac3c677a8f35d3333ed86baea", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_dao", "actual": "@org_springframework_spring_dao//jar", "bind": "jar/org/springframework/spring_dao"}) callback({"artifact": "org.springframework:spring-jdbc:1.2.9", "lang": "java", "sha1": "8a81d42995e61e2deac49c2bc75cfacbb28e7218", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_jdbc", "actual": "@org_springframework_spring_jdbc//jar", "bind": "jar/org/springframework/spring_jdbc"}) callback({"artifact": "org.springframework:spring-web:2.5.6.SEC03", "lang": "java", "sha1": "699f171339f20126f1d09dde2dd17d6db2943fce", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_web", "actual": "@org_springframework_spring_web//jar", "bind": "jar/org/springframework/spring_web"}) callback({"artifact": "org.springframework:spring-webmvc:2.5.6.SEC03", "lang": "java", "sha1": "275c5ac6ade12819f49e984c8e06b114a4e23458", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_webmvc", "actual": "@org_springframework_spring_webmvc//jar", "bind": "jar/org/springframework/spring_webmvc"}) callback({"artifact": "oro:oro:2.0.8", "lang": "java", "sha1": "5592374f834645c4ae250f4c9fbb314c9369d698", "repository": "https://repo.maven.apache.org/maven2/", "name": "oro_oro", "actual": "@oro_oro//jar", "bind": "jar/oro/oro"}) callback({"artifact": "relaxngDatatype:relaxngDatatype:20020414", "lang": "java", "sha1": "de7952cecd05b65e0e4370cc93fc03035175eef5", "repository": "https://repo.maven.apache.org/maven2/", "name": "relaxngDatatype_relaxngDatatype", "actual": "@relaxngDatatype_relaxngDatatype//jar", "bind": "jar/relaxngDatatype/relaxngDatatype"}) callback({"artifact": "stax:stax-api:1.0.1", "lang": "java", "sha1": "49c100caf72d658aca8e58bd74a4ba90fa2b0d70", "repository": "https://repo.maven.apache.org/maven2/", "name": "stax_stax_api", "actual": "@stax_stax_api//jar", "bind": "jar/stax/stax_api"}) callback({"artifact": "xpp3:xpp3:1.1.4c", "lang": "java", "sha1": "9b988ea84b9e4e9f1874e390ce099b8ac12cfff5", "repository": "https://repo.maven.apache.org/maven2/", "name": "xpp3_xpp3", "actual": "@xpp3_xpp3//jar", "bind": "jar/xpp3/xpp3"})
def maven_dependencies(callback): callback({'artifact': 'antlr:antlr:2.7.6', 'lang': 'java', 'sha1': 'cf4f67dae5df4f9932ae7810f4548ef3e14dd35e', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'antlr_antlr', 'actual': '@antlr_antlr//jar', 'bind': 'jar/antlr/antlr'}) callback({'artifact': 'aopalliance:aopalliance:1.0', 'lang': 'java', 'sha1': '0235ba8b489512805ac13a8f9ea77a1ca5ebe3e8', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'aopalliance_aopalliance', 'actual': '@aopalliance_aopalliance//jar', 'bind': 'jar/aopalliance/aopalliance'}) callback({'artifact': 'args4j:args4j:2.0.31', 'lang': 'java', 'sha1': '6b870d81551ce93c5c776c3046299db8ad6c39d2', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'args4j_args4j', 'actual': '@args4j_args4j//jar', 'bind': 'jar/args4j/args4j'}) callback({'artifact': 'com.cloudbees:groovy-cps:1.12', 'lang': 'java', 'sha1': 'd766273a59e0b954c016e805779106bca22764b9', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_cloudbees_groovy_cps', 'actual': '@com_cloudbees_groovy_cps//jar', 'bind': 'jar/com/cloudbees/groovy_cps'}) callback({'artifact': 'com.github.jnr:jffi:1.2.15', 'lang': 'java', 'sha1': 'f480f0234dd8f053da2421e60574cfbd9d85e1f5', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_github_jnr_jffi', 'actual': '@com_github_jnr_jffi//jar', 'bind': 'jar/com/github/jnr/jffi'}) callback({'artifact': 'com.github.jnr:jnr-constants:0.9.8', 'lang': 'java', 'sha1': '478036404879bd582be79e9a7939f3a161601c8b', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_github_jnr_jnr_constants', 'actual': '@com_github_jnr_jnr_constants//jar', 'bind': 'jar/com/github/jnr/jnr_constants'}) callback({'artifact': 'com.github.jnr:jnr-ffi:2.1.4', 'lang': 'java', 'sha1': '0a63bbd4af5cee55d820ef40dc5347d45765b788', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_github_jnr_jnr_ffi', 'actual': '@com_github_jnr_jnr_ffi//jar', 'bind': 'jar/com/github/jnr/jnr_ffi'}) callback({'artifact': 'com.github.jnr:jnr-posix:3.0.41', 'lang': 'java', 'sha1': '36eff018149e53ed814a340ddb7de73ceb66bf96', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_github_jnr_jnr_posix', 'actual': '@com_github_jnr_jnr_posix//jar', 'bind': 'jar/com/github/jnr/jnr_posix'}) callback({'artifact': 'com.github.jnr:jnr-x86asm:1.0.2', 'lang': 'java', 'sha1': '006936bbd6c5b235665d87bd450f5e13b52d4b48', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_github_jnr_jnr_x86asm', 'actual': '@com_github_jnr_jnr_x86asm//jar', 'bind': 'jar/com/github/jnr/jnr_x86asm'}) callback({'artifact': 'com.google.code.findbugs:jsr305:1.3.9', 'lang': 'java', 'sha1': '40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_google_code_findbugs_jsr305', 'actual': '@com_google_code_findbugs_jsr305//jar', 'bind': 'jar/com/google/code/findbugs/jsr305'}) callback({'artifact': 'com.google.guava:guava:11.0.1', 'lang': 'java', 'sha1': '57b40a943725d43610c898ac0169adf1b2d55742', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_google_guava_guava', 'actual': '@com_google_guava_guava//jar', 'bind': 'jar/com/google/guava/guava'}) callback({'artifact': 'com.google.inject:guice:4.0', 'lang': 'java', 'sha1': '0f990a43d3725781b6db7cd0acf0a8b62dfd1649', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_google_inject_guice', 'actual': '@com_google_inject_guice//jar', 'bind': 'jar/com/google/inject/guice'}) callback({'artifact': 'com.infradna.tool:bridge-method-annotation:1.13', 'lang': 'java', 'sha1': '18cdce50cde6f54ee5390d0907384f72183ff0fe', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_infradna_tool_bridge_method_annotation', 'actual': '@com_infradna_tool_bridge_method_annotation//jar', 'bind': 'jar/com/infradna/tool/bridge_method_annotation'}) callback({'artifact': 'com.jcraft:jzlib:1.1.3-kohsuke-1', 'lang': 'java', 'sha1': 'af5d27e1de29df05db95da5d76b546d075bc1bc5', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'com_jcraft_jzlib', 'actual': '@com_jcraft_jzlib//jar', 'bind': 'jar/com/jcraft/jzlib'}) callback({'artifact': 'com.lesfurets:jenkins-pipeline-unit:1.0', 'lang': 'java', 'sha1': '3aa90c606c541e88c268df3cc9e87306af69b29f', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_lesfurets_jenkins_pipeline_unit', 'actual': '@com_lesfurets_jenkins_pipeline_unit//jar', 'bind': 'jar/com/lesfurets/jenkins_pipeline_unit'}) callback({'artifact': 'com.sun.solaris:embedded_su4j:1.1', 'lang': 'java', 'sha1': '9404130cc4e60670429f1ab8dbf94d669012725d', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_sun_solaris_embedded_su4j', 'actual': '@com_sun_solaris_embedded_su4j//jar', 'bind': 'jar/com/sun/solaris/embedded_su4j'}) callback({'artifact': 'com.sun.xml.txw2:txw2:20110809', 'lang': 'java', 'sha1': '46afa3f3c468680875adb8f2a26086a126c89902', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'com_sun_xml_txw2_txw2', 'actual': '@com_sun_xml_txw2_txw2//jar', 'bind': 'jar/com/sun/xml/txw2/txw2'}) callback({'artifact': 'commons-beanutils:commons-beanutils:1.8.3', 'lang': 'java', 'sha1': '686ef3410bcf4ab8ce7fd0b899e832aaba5facf7', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'commons_beanutils_commons_beanutils', 'actual': '@commons_beanutils_commons_beanutils//jar', 'bind': 'jar/commons_beanutils/commons_beanutils'}) callback({'artifact': 'commons-codec:commons-codec:1.8', 'lang': 'java', 'sha1': 'af3be3f74d25fc5163b54f56a0d394b462dafafd', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'commons_codec_commons_codec', 'actual': '@commons_codec_commons_codec//jar', 'bind': 'jar/commons_codec/commons_codec'}) callback({'artifact': 'commons-collections:commons-collections:3.2.2', 'lang': 'java', 'sha1': '8ad72fe39fa8c91eaaf12aadb21e0c3661fe26d5', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'commons_collections_commons_collections', 'actual': '@commons_collections_commons_collections//jar', 'bind': 'jar/commons_collections/commons_collections'}) callback({'artifact': 'commons-digester:commons-digester:2.1', 'lang': 'java', 'sha1': '73a8001e7a54a255eef0f03521ec1805dc738ca0', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'commons_digester_commons_digester', 'actual': '@commons_digester_commons_digester//jar', 'bind': 'jar/commons_digester/commons_digester'}) callback({'artifact': 'commons-discovery:commons-discovery:0.4', 'lang': 'java', 'sha1': '9e3417d3866d9f71e83b959b229b35dc723c7bea', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'commons_discovery_commons_discovery', 'actual': '@commons_discovery_commons_discovery//jar', 'bind': 'jar/commons_discovery/commons_discovery'}) callback({'artifact': 'commons-fileupload:commons-fileupload:1.3.1-jenkins-1', 'lang': 'java', 'sha1': '5d0270b78ad9d5344ce4a8e35482ad8802526aca', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'commons_fileupload_commons_fileupload', 'actual': '@commons_fileupload_commons_fileupload//jar', 'bind': 'jar/commons_fileupload/commons_fileupload'}) callback({'artifact': 'commons-httpclient:commons-httpclient:3.1', 'lang': 'java', 'sha1': '964cd74171f427720480efdec40a7c7f6e58426a', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'commons_httpclient_commons_httpclient', 'actual': '@commons_httpclient_commons_httpclient//jar', 'bind': 'jar/commons_httpclient/commons_httpclient'}) callback({'artifact': 'commons-io:commons-io:2.5', 'lang': 'java', 'sha1': '2852e6e05fbb95076fc091f6d1780f1f8fe35e0f', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'commons_io_commons_io', 'actual': '@commons_io_commons_io//jar', 'bind': 'jar/commons_io/commons_io'}) callback({'artifact': 'commons-jelly:commons-jelly-tags-fmt:1.0', 'lang': 'java', 'sha1': '2107da38fdd287ab78a4fa65c1300b5ad9999274', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'commons_jelly_commons_jelly_tags_fmt', 'actual': '@commons_jelly_commons_jelly_tags_fmt//jar', 'bind': 'jar/commons_jelly/commons_jelly_tags_fmt'}) callback({'artifact': 'commons-jelly:commons-jelly-tags-xml:1.1', 'lang': 'java', 'sha1': 'cc0efc2ae0ff81ef7737afc786a0ce16a8540efc', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'commons_jelly_commons_jelly_tags_xml', 'actual': '@commons_jelly_commons_jelly_tags_xml//jar', 'bind': 'jar/commons_jelly/commons_jelly_tags_xml'}) callback({'artifact': 'commons-lang:commons-lang:2.6', 'lang': 'java', 'sha1': '0ce1edb914c94ebc388f086c6827e8bdeec71ac2', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'commons_lang_commons_lang', 'actual': '@commons_lang_commons_lang//jar', 'bind': 'jar/commons_lang/commons_lang'}) callback({'artifact': 'javax.annotation:javax.annotation-api:1.2', 'lang': 'java', 'sha1': '479c1e06db31c432330183f5cae684163f186146', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'javax_annotation_javax_annotation_api', 'actual': '@javax_annotation_javax_annotation_api//jar', 'bind': 'jar/javax/annotation/javax_annotation_api'}) callback({'artifact': 'javax.inject:javax.inject:1', 'lang': 'java', 'sha1': '6975da39a7040257bd51d21a231b76c915872d38', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'javax_inject_javax_inject', 'actual': '@javax_inject_javax_inject//jar', 'bind': 'jar/javax/inject/javax_inject'}) callback({'artifact': 'javax.mail:mail:1.4.4', 'lang': 'java', 'sha1': 'b907ef0a02ff6e809392b1e7149198497fcc8e49', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'javax_mail_mail', 'actual': '@javax_mail_mail//jar', 'bind': 'jar/javax/mail/mail'}) callback({'artifact': 'javax.servlet:jstl:1.1.0', 'lang': 'java', 'sha1': 'bca201e52333629c59e459e874e5ecd8f9899e15', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'javax_servlet_jstl', 'actual': '@javax_servlet_jstl//jar', 'bind': 'jar/javax/servlet/jstl'}) callback({'artifact': 'javax.xml.stream:stax-api:1.0-2', 'lang': 'java', 'sha1': 'd6337b0de8b25e53e81b922352fbea9f9f57ba0b', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'javax_xml_stream_stax_api', 'actual': '@javax_xml_stream_stax_api//jar', 'bind': 'jar/javax/xml/stream/stax_api'}) callback({'artifact': 'jaxen:jaxen:1.1-beta-11', 'lang': 'java', 'sha1': '81e32b8bafcc778e5deea4e784670299f1c26b96', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'jaxen_jaxen', 'actual': '@jaxen_jaxen//jar', 'bind': 'jar/jaxen/jaxen'}) callback({'artifact': 'jfree:jcommon:1.0.12', 'lang': 'java', 'sha1': '737f02607d2f45bb1a589a85c63b4cd907e5e634', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'jfree_jcommon', 'actual': '@jfree_jcommon//jar', 'bind': 'jar/jfree/jcommon'}) callback({'artifact': 'jfree:jfreechart:1.0.9', 'lang': 'java', 'sha1': '6e522aa603bf7ac69da59edcf519b335490e93a6', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'jfree_jfreechart', 'actual': '@jfree_jfreechart//jar', 'bind': 'jar/jfree/jfreechart'}) callback({'artifact': 'jline:jline:2.12', 'lang': 'java', 'sha1': 'ce9062c6a125e0f9ad766032573c041ae8ecc986', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'jline_jline', 'actual': '@jline_jline//jar', 'bind': 'jar/jline/jline'}) callback({'artifact': 'junit:junit:4.12', 'lang': 'java', 'sha1': '2973d150c0dc1fefe998f834810d68f278ea58ec', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'junit_junit', 'actual': '@junit_junit//jar', 'bind': 'jar/junit/junit'}) callback({'artifact': 'net.i2p.crypto:eddsa:0.2.0', 'lang': 'java', 'sha1': '0856a92559c4daf744cb27c93cd8b7eb1f8c4780', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'net_i2p_crypto_eddsa', 'actual': '@net_i2p_crypto_eddsa//jar', 'bind': 'jar/net/i2p/crypto/eddsa'}) callback({'artifact': 'net.java.dev.jna:jna:4.2.1', 'lang': 'java', 'sha1': 'fcc5b10cb812c41b00708e7b57baccc3aee5567c', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'net_java_dev_jna_jna', 'actual': '@net_java_dev_jna_jna//jar', 'bind': 'jar/net/java/dev/jna/jna'}) callback({'artifact': 'net.java.sezpoz:sezpoz:1.12', 'lang': 'java', 'sha1': '01f7e4a04e06fdbc91d66ddf80c443c3f7c6503c', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'net_java_sezpoz_sezpoz', 'actual': '@net_java_sezpoz_sezpoz//jar', 'bind': 'jar/net/java/sezpoz/sezpoz'}) callback({'artifact': 'net.sf.ezmorph:ezmorph:1.0.6', 'lang': 'java', 'sha1': '01e55d2a0253ea37745d33062852fd2c90027432', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'net_sf_ezmorph_ezmorph', 'actual': '@net_sf_ezmorph_ezmorph//jar', 'bind': 'jar/net/sf/ezmorph/ezmorph'}) callback({'artifact': 'org.acegisecurity:acegi-security:1.0.7', 'lang': 'java', 'sha1': '72901120d299e0c6ed2f6a23dd37f9186eeb8cc3', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_acegisecurity_acegi_security', 'actual': '@org_acegisecurity_acegi_security//jar', 'bind': 'jar/org/acegisecurity/acegi_security'}) callback({'artifact': 'org.apache.ant:ant-launcher:1.8.4', 'lang': 'java', 'sha1': '22f1e0c32a2bfc8edd45520db176bac98cebbbfe', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_apache_ant_ant_launcher', 'actual': '@org_apache_ant_ant_launcher//jar', 'bind': 'jar/org/apache/ant/ant_launcher'}) callback({'artifact': 'org.apache.ant:ant:1.8.4', 'lang': 'java', 'sha1': '8acff3fb57e74bc062d4675d9dcfaffa0d524972', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_apache_ant_ant', 'actual': '@org_apache_ant_ant//jar', 'bind': 'jar/org/apache/ant/ant'}) callback({'artifact': 'org.apache.commons:commons-compress:1.10', 'lang': 'java', 'sha1': '5eeb27c57eece1faf2d837868aeccc94d84dcc9a', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_apache_commons_commons_compress', 'actual': '@org_apache_commons_commons_compress//jar', 'bind': 'jar/org/apache/commons/commons_compress'}) callback({'artifact': 'org.apache.ivy:ivy:2.4.0', 'lang': 'java', 'sha1': '5abe4c24bbe992a9ac07ca563d5bd3e8d569e9ed', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_apache_ivy_ivy', 'actual': '@org_apache_ivy_ivy//jar', 'bind': 'jar/org/apache/ivy/ivy'}) callback({'artifact': 'org.codehaus.groovy:groovy-all:2.4.6', 'lang': 'java', 'sha1': '478feadca929a946b2f1fb962bb2179264759821', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_codehaus_groovy_groovy_all', 'actual': '@org_codehaus_groovy_groovy_all//jar', 'bind': 'jar/org/codehaus/groovy/groovy_all'}) callback({'artifact': 'org.codehaus.woodstox:wstx-asl:3.2.9', 'lang': 'java', 'sha1': 'c82b6e8f225bb799540e558b10ee24d268035597', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_codehaus_woodstox_wstx_asl', 'actual': '@org_codehaus_woodstox_wstx_asl//jar', 'bind': 'jar/org/codehaus/woodstox/wstx_asl'}) callback({'artifact': 'org.connectbot.jbcrypt:jbcrypt:1.0.0', 'lang': 'java', 'sha1': 'f37bba2b8b78fcc8111bb932318b621dcc6c5194', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_connectbot_jbcrypt_jbcrypt', 'actual': '@org_connectbot_jbcrypt_jbcrypt//jar', 'bind': 'jar/org/connectbot/jbcrypt/jbcrypt'}) callback({'artifact': 'org.fusesource.jansi:jansi:1.11', 'lang': 'java', 'sha1': '655c643309c2f45a56a747fda70e3fadf57e9f11', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_fusesource_jansi_jansi', 'actual': '@org_fusesource_jansi_jansi//jar', 'bind': 'jar/org/fusesource/jansi/jansi'}) callback({'artifact': 'org.hamcrest:hamcrest-all:1.3', 'lang': 'java', 'sha1': '63a21ebc981131004ad02e0434e799fd7f3a8d5a', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_hamcrest_hamcrest_all', 'actual': '@org_hamcrest_hamcrest_all//jar', 'bind': 'jar/org/hamcrest/hamcrest_all'}) callback({'artifact': 'org.hamcrest:hamcrest-core:1.3', 'lang': 'java', 'sha1': '42a25dc3219429f0e5d060061f71acb49bf010a0', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_hamcrest_hamcrest_core', 'actual': '@org_hamcrest_hamcrest_core//jar', 'bind': 'jar/org/hamcrest/hamcrest_core'}) callback({'artifact': 'org.jboss.marshalling:jboss-marshalling-river:1.4.9.Final', 'lang': 'java', 'sha1': 'd41e3e1ed9cf4afd97d19df8ecc7f2120effeeb4', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_jboss_marshalling_jboss_marshalling_river', 'actual': '@org_jboss_marshalling_jboss_marshalling_river//jar', 'bind': 'jar/org/jboss/marshalling/jboss_marshalling_river'}) callback({'artifact': 'org.jboss.marshalling:jboss-marshalling:1.4.9.Final', 'lang': 'java', 'sha1': '8fd342ee3dde0448c7600275a936ea1b17deb494', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_jboss_marshalling_jboss_marshalling', 'actual': '@org_jboss_marshalling_jboss_marshalling//jar', 'bind': 'jar/org/jboss/marshalling/jboss_marshalling'}) callback({'artifact': 'org.jenkins-ci.dom4j:dom4j:1.6.1-jenkins-4', 'lang': 'java', 'sha1': '9a370b2010b5a1223c7a43dae6c05226918e17b1', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_dom4j_dom4j', 'actual': '@org_jenkins_ci_dom4j_dom4j//jar', 'bind': 'jar/org/jenkins_ci/dom4j/dom4j'}) callback({'artifact': 'org.jenkins-ci.main:cli:2.73.1', 'lang': 'java', 'sha1': '03ae1decd36ee069108e66e70cd6ffcdd4320aec', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_main_cli', 'actual': '@org_jenkins_ci_main_cli//jar', 'bind': 'jar/org/jenkins_ci/main/cli'}) callback({'artifact': 'org.jenkins-ci.main:jenkins-core:2.73.1', 'lang': 'java', 'sha1': '30c9e7029d46fd18a8720f9a491bf41ab8f2bdb2', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_main_jenkins_core', 'actual': '@org_jenkins_ci_main_jenkins_core//jar', 'bind': 'jar/org/jenkins_ci/main/jenkins_core'}) callback({'artifact': 'org.jenkins-ci.main:remoting:3.10', 'lang': 'java', 'sha1': '19905fa1550ab34a33bb92a5e27e2a86733c9d15', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_main_remoting', 'actual': '@org_jenkins_ci_main_remoting//jar', 'bind': 'jar/org/jenkins_ci/main/remoting'}) callback({'artifact': 'org.jenkins-ci.plugins.icon-shim:icon-set:1.0.5', 'lang': 'java', 'sha1': 'dedc76ac61797dafc66f31e8507d65b98c9e57df', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_plugins_icon_shim_icon_set', 'actual': '@org_jenkins_ci_plugins_icon_shim_icon_set//jar', 'bind': 'jar/org/jenkins_ci/plugins/icon_shim/icon_set'}) callback({'artifact': 'org.jenkins-ci.plugins.workflow:workflow-api:2.11', 'lang': 'java', 'sha1': '3a8a6e221a8b32fd9faabb33939c28f79fd961d7', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_plugins_workflow_workflow_api', 'actual': '@org_jenkins_ci_plugins_workflow_workflow_api//jar', 'bind': 'jar/org/jenkins_ci/plugins/workflow/workflow_api'}) callback({'artifact': 'org.jenkins-ci.plugins.workflow:workflow-step-api:2.9', 'lang': 'java', 'sha1': '7d1ad140c092cf4a68a7763db9eac459b5ed86ff', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_plugins_workflow_workflow_step_api', 'actual': '@org_jenkins_ci_plugins_workflow_workflow_step_api//jar', 'bind': 'jar/org/jenkins_ci/plugins/workflow/workflow_step_api'}) callback({'artifact': 'org.jenkins-ci.plugins.workflow:workflow-support:2.14', 'lang': 'java', 'sha1': 'cd5f68c533ddd46fea3332ce788dffc80707ddb5', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_plugins_workflow_workflow_support', 'actual': '@org_jenkins_ci_plugins_workflow_workflow_support//jar', 'bind': 'jar/org/jenkins_ci/plugins/workflow/workflow_support'}) callback({'artifact': 'org.jenkins-ci.plugins:script-security:1.26', 'lang': 'java', 'sha1': '44aacd104c0d5c8fe5d0f93e4a4001cae0e48c2b', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_plugins_script_security', 'actual': '@org_jenkins_ci_plugins_script_security//jar', 'bind': 'jar/org/jenkins_ci/plugins/script_security'}) callback({'artifact': 'org.jenkins-ci.plugins:structs:1.5', 'lang': 'java', 'sha1': '72d429f749151f1c983c1fadcb348895cc6da20e', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_plugins_structs', 'actual': '@org_jenkins_ci_plugins_structs//jar', 'bind': 'jar/org/jenkins_ci/plugins/structs'}) callback({'artifact': 'org.jenkins-ci:annotation-indexer:1.12', 'lang': 'java', 'sha1': '8f6ee0cd64c305dcca29e2f5b46631d50890208f', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_annotation_indexer', 'actual': '@org_jenkins_ci_annotation_indexer//jar', 'bind': 'jar/org/jenkins_ci/annotation_indexer'}) callback({'artifact': 'org.jenkins-ci:bytecode-compatibility-transformer:1.8', 'lang': 'java', 'sha1': 'aded88ffe12f1904758397f96f16957e97b88e6e', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_bytecode_compatibility_transformer', 'actual': '@org_jenkins_ci_bytecode_compatibility_transformer//jar', 'bind': 'jar/org/jenkins_ci/bytecode_compatibility_transformer'}) callback({'artifact': 'org.jenkins-ci:commons-jelly:1.1-jenkins-20120928', 'lang': 'java', 'sha1': '2720a0d54b7f32479b08970d7738041362e1f410', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_commons_jelly', 'actual': '@org_jenkins_ci_commons_jelly//jar', 'bind': 'jar/org/jenkins_ci/commons_jelly'}) callback({'artifact': 'org.jenkins-ci:commons-jexl:1.1-jenkins-20111212', 'lang': 'java', 'sha1': '0a990a77bea8c5a400d58a6f5d98122236300f7d', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_commons_jexl', 'actual': '@org_jenkins_ci_commons_jexl//jar', 'bind': 'jar/org/jenkins_ci/commons_jexl'}) callback({'artifact': 'org.jenkins-ci:constant-pool-scanner:1.2', 'lang': 'java', 'sha1': 'e5e0b7c7fcb67767dbd195e0ca1f0ee9406dd423', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_jenkins_ci_constant_pool_scanner', 'actual': '@org_jenkins_ci_constant_pool_scanner//jar', 'bind': 'jar/org/jenkins_ci/constant_pool_scanner'}) callback({'artifact': 'org.jenkins-ci:crypto-util:1.1', 'lang': 'java', 'sha1': '3a199a4c3748012b9dbbf3080097dc9f302493d8', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_crypto_util', 'actual': '@org_jenkins_ci_crypto_util//jar', 'bind': 'jar/org/jenkins_ci/crypto_util'}) callback({'artifact': 'org.jenkins-ci:jmdns:3.4.0-jenkins-3', 'lang': 'java', 'sha1': '264d0c402b48c365f34d072b864ed57f25e92e63', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_jmdns', 'actual': '@org_jenkins_ci_jmdns//jar', 'bind': 'jar/org/jenkins_ci/jmdns'}) callback({'artifact': 'org.jenkins-ci:memory-monitor:1.9', 'lang': 'java', 'sha1': '1935bfb46474e3043ee2310a9bb790d42dde2ed7', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_memory_monitor', 'actual': '@org_jenkins_ci_memory_monitor//jar', 'bind': 'jar/org/jenkins_ci/memory_monitor'}) callback({'artifact': 'org.jenkins-ci:symbol-annotation:1.5', 'lang': 'java', 'sha1': '17694feb24cb69793914d0c1c11ff479ee4c1b38', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_symbol_annotation', 'actual': '@org_jenkins_ci_symbol_annotation//jar', 'bind': 'jar/org/jenkins_ci/symbol_annotation'}) callback({'artifact': 'org.jenkins-ci:task-reactor:1.4', 'lang': 'java', 'sha1': 'b89e501a3bc64fe9f28cb91efe75ed8745974ef8', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_task_reactor', 'actual': '@org_jenkins_ci_task_reactor//jar', 'bind': 'jar/org/jenkins_ci/task_reactor'}) callback({'artifact': 'org.jenkins-ci:trilead-ssh2:build-217-jenkins-11', 'lang': 'java', 'sha1': 'f10f4dd4121cc233cac229c51adb4775960fee0a', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_trilead_ssh2', 'actual': '@org_jenkins_ci_trilead_ssh2//jar', 'bind': 'jar/org/jenkins_ci/trilead_ssh2'}) callback({'artifact': 'org.jenkins-ci:version-number:1.4', 'lang': 'java', 'sha1': '5d0f2ea16514c0ec8de86c102ce61a7837e45eb8', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jenkins_ci_version_number', 'actual': '@org_jenkins_ci_version_number//jar', 'bind': 'jar/org/jenkins_ci/version_number'}) callback({'artifact': 'org.jruby.ext.posix:jna-posix:1.0.3-jenkins-1', 'lang': 'java', 'sha1': 'fb1148cc8192614ec1418d414f7b6026cc0ec71b', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jruby_ext_posix_jna_posix', 'actual': '@org_jruby_ext_posix_jna_posix//jar', 'bind': 'jar/org/jruby/ext/posix/jna_posix'}) callback({'artifact': 'org.jvnet.hudson:activation:1.1.1-hudson-1', 'lang': 'java', 'sha1': '7957d80444223277f84676aabd5b0421b65888c4', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_jvnet_hudson_activation', 'actual': '@org_jvnet_hudson_activation//jar', 'bind': 'jar/org/jvnet/hudson/activation'}) callback({'artifact': 'org.jvnet.hudson:commons-jelly-tags-define:1.0.1-hudson-20071021', 'lang': 'java', 'sha1': '8b952d0e504ee505d234853119e5648441894234', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_jvnet_hudson_commons_jelly_tags_define', 'actual': '@org_jvnet_hudson_commons_jelly_tags_define//jar', 'bind': 'jar/org/jvnet/hudson/commons_jelly_tags_define'}) callback({'artifact': 'org.jvnet.hudson:jtidy:4aug2000r7-dev-hudson-1', 'lang': 'java', 'sha1': 'ad8553d0acfa6e741d21d5b2c2beb737972ab7c7', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_jvnet_hudson_jtidy', 'actual': '@org_jvnet_hudson_jtidy//jar', 'bind': 'jar/org/jvnet/hudson/jtidy'}) callback({'artifact': 'org.jvnet.hudson:xstream:1.4.7-jenkins-1', 'lang': 'java', 'sha1': '161ed1603117c2d37b864f81a0d62f36cf7e958a', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jvnet_hudson_xstream', 'actual': '@org_jvnet_hudson_xstream//jar', 'bind': 'jar/org/jvnet/hudson/xstream'}) callback({'artifact': 'org.jvnet.localizer:localizer:1.24', 'lang': 'java', 'sha1': 'e20e7668dbf36e8d354dab922b89adb6273b703f', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jvnet_localizer_localizer', 'actual': '@org_jvnet_localizer_localizer//jar', 'bind': 'jar/org/jvnet/localizer/localizer'}) callback({'artifact': 'org.jvnet.robust-http-client:robust-http-client:1.2', 'lang': 'java', 'sha1': 'dee9fda92ad39a94a77ec6cf88300d4dd6db8a4d', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jvnet_robust_http_client_robust_http_client', 'actual': '@org_jvnet_robust_http_client_robust_http_client//jar', 'bind': 'jar/org/jvnet/robust_http_client/robust_http_client'}) callback({'artifact': 'org.jvnet.winp:winp:1.25', 'lang': 'java', 'sha1': '1c88889f80c0e03a7fb62c26b706d68813f8e657', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_jvnet_winp_winp', 'actual': '@org_jvnet_winp_winp//jar', 'bind': 'jar/org/jvnet/winp/winp'}) callback({'artifact': 'org.jvnet:tiger-types:2.2', 'lang': 'java', 'sha1': '7ddc6bbc8ca59be8879d3a943bf77517ec190f39', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_jvnet_tiger_types', 'actual': '@org_jvnet_tiger_types//jar', 'bind': 'jar/org/jvnet/tiger_types'}) callback({'artifact': 'org.kohsuke.jinterop:j-interop:2.0.6-kohsuke-1', 'lang': 'java', 'sha1': 'b2e243227608c1424ab0084564dc71659d273007', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_jinterop_j_interop', 'actual': '@org_kohsuke_jinterop_j_interop//jar', 'bind': 'jar/org/kohsuke/jinterop/j_interop'}) callback({'artifact': 'org.kohsuke.jinterop:j-interopdeps:2.0.6-kohsuke-1', 'lang': 'java', 'sha1': '778400517a3419ce8c361498c194036534851736', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_jinterop_j_interopdeps', 'actual': '@org_kohsuke_jinterop_j_interopdeps//jar', 'bind': 'jar/org/kohsuke/jinterop/j_interopdeps'}) callback({'artifact': 'org.kohsuke.stapler:json-lib:2.4-jenkins-2', 'lang': 'java', 'sha1': '7f4f9016d8c8b316ecbe68afe7c26df06d301366', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_kohsuke_stapler_json_lib', 'actual': '@org_kohsuke_stapler_json_lib//jar', 'bind': 'jar/org/kohsuke/stapler/json_lib'}) callback({'artifact': 'org.kohsuke.stapler:stapler-adjunct-codemirror:1.3', 'lang': 'java', 'sha1': 'fd1d45544400d2a4da6dfee9e60edd4ec3368806', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_kohsuke_stapler_stapler_adjunct_codemirror', 'actual': '@org_kohsuke_stapler_stapler_adjunct_codemirror//jar', 'bind': 'jar/org/kohsuke/stapler/stapler_adjunct_codemirror'}) callback({'artifact': 'org.kohsuke.stapler:stapler-adjunct-timeline:1.5', 'lang': 'java', 'sha1': '3fa806cbb94679ceab9c1ecaaf5fea8207390cb7', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_stapler_stapler_adjunct_timeline', 'actual': '@org_kohsuke_stapler_stapler_adjunct_timeline//jar', 'bind': 'jar/org/kohsuke/stapler/stapler_adjunct_timeline'}) callback({'artifact': 'org.kohsuke.stapler:stapler-adjunct-zeroclipboard:1.3.5-1', 'lang': 'java', 'sha1': '20184ea79888b55b6629e4479615b52f88b55173', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_stapler_stapler_adjunct_zeroclipboard', 'actual': '@org_kohsuke_stapler_stapler_adjunct_zeroclipboard//jar', 'bind': 'jar/org/kohsuke/stapler/stapler_adjunct_zeroclipboard'}) callback({'artifact': 'org.kohsuke.stapler:stapler-groovy:1.250', 'lang': 'java', 'sha1': 'a8b910923b8eef79dd99c8aa6418d8ada0de4c86', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_stapler_stapler_groovy', 'actual': '@org_kohsuke_stapler_stapler_groovy//jar', 'bind': 'jar/org/kohsuke/stapler/stapler_groovy'}) callback({'artifact': 'org.kohsuke.stapler:stapler-jelly:1.250', 'lang': 'java', 'sha1': '6ac2202bf40e48a63623803697cd1801ee716273', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_stapler_stapler_jelly', 'actual': '@org_kohsuke_stapler_stapler_jelly//jar', 'bind': 'jar/org/kohsuke/stapler/stapler_jelly'}) callback({'artifact': 'org.kohsuke.stapler:stapler-jrebel:1.250', 'lang': 'java', 'sha1': 'b6f10cb14cf3462f5a51d03a7a00337052355c8c', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_stapler_stapler_jrebel', 'actual': '@org_kohsuke_stapler_stapler_jrebel//jar', 'bind': 'jar/org/kohsuke/stapler/stapler_jrebel'}) callback({'artifact': 'org.kohsuke.stapler:stapler:1.250', 'lang': 'java', 'sha1': 'd5afb2c46a2919d22e5bc3adccf5f09fbb0fb4e3', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_stapler_stapler', 'actual': '@org_kohsuke_stapler_stapler//jar', 'bind': 'jar/org/kohsuke/stapler/stapler'}) callback({'artifact': 'org.kohsuke:access-modifier-annotation:1.11', 'lang': 'java', 'sha1': 'd1ca3a10d8be91d1525f51dbc6a3c7644e0fc6ea', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_access_modifier_annotation', 'actual': '@org_kohsuke_access_modifier_annotation//jar', 'bind': 'jar/org/kohsuke/access_modifier_annotation'}) callback({'artifact': 'org.kohsuke:akuma:1.10', 'lang': 'java', 'sha1': '0e2c6a1f79f17e3fab13332ab8e9b9016eeab0b6', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_akuma', 'actual': '@org_kohsuke_akuma//jar', 'bind': 'jar/org/kohsuke/akuma'}) callback({'artifact': 'org.kohsuke:asm5:5.0.1', 'lang': 'java', 'sha1': '71ab0620a41ed37f626b96d80c2a7c58165550df', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_asm5', 'actual': '@org_kohsuke_asm5//jar', 'bind': 'jar/org/kohsuke/asm5'}) callback({'artifact': 'org.kohsuke:groovy-sandbox:1.10', 'lang': 'java', 'sha1': 'f4f33a2122cca74ce8beaaf6a3c5ab9c8644d977', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_groovy_sandbox', 'actual': '@org_kohsuke_groovy_sandbox//jar', 'bind': 'jar/org/kohsuke/groovy_sandbox'}) callback({'artifact': 'org.kohsuke:libpam4j:1.8', 'lang': 'java', 'sha1': '548d4a1177adad8242fe03a6930c335669d669ad', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_libpam4j', 'actual': '@org_kohsuke_libpam4j//jar', 'bind': 'jar/org/kohsuke/libpam4j'}) callback({'artifact': 'org.kohsuke:libzfs:0.8', 'lang': 'java', 'sha1': '5bb311276283921f7e1082c348c0253b17922dcc', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_libzfs', 'actual': '@org_kohsuke_libzfs//jar', 'bind': 'jar/org/kohsuke/libzfs'}) callback({'artifact': 'org.kohsuke:trilead-putty-extension:1.2', 'lang': 'java', 'sha1': '0f2f41517e1f73be8e319da27a69e0dc0c524bf6', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_trilead_putty_extension', 'actual': '@org_kohsuke_trilead_putty_extension//jar', 'bind': 'jar/org/kohsuke/trilead_putty_extension'}) callback({'artifact': 'org.kohsuke:windows-package-checker:1.2', 'lang': 'java', 'sha1': '86b5d2f9023633808d65dbcfdfd50dc5ad3ca31f', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_kohsuke_windows_package_checker', 'actual': '@org_kohsuke_windows_package_checker//jar', 'bind': 'jar/org/kohsuke/windows_package_checker'}) callback({'artifact': 'org.mindrot:jbcrypt:0.4', 'lang': 'java', 'sha1': 'af7e61017f73abb18ac4e036954f9f28c6366c07', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_mindrot_jbcrypt', 'actual': '@org_mindrot_jbcrypt//jar', 'bind': 'jar/org/mindrot/jbcrypt'}) callback({'artifact': 'org.ow2.asm:asm-analysis:5.0.3', 'lang': 'java', 'sha1': 'c7126aded0e8e13fed5f913559a0dd7b770a10f3', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_ow2_asm_asm_analysis', 'actual': '@org_ow2_asm_asm_analysis//jar', 'bind': 'jar/org/ow2/asm/asm_analysis'}) callback({'artifact': 'org.ow2.asm:asm-commons:5.0.3', 'lang': 'java', 'sha1': 'a7111830132c7f87d08fe48cb0ca07630f8cb91c', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_ow2_asm_asm_commons', 'actual': '@org_ow2_asm_asm_commons//jar', 'bind': 'jar/org/ow2/asm/asm_commons'}) callback({'artifact': 'org.ow2.asm:asm-tree:5.0.3', 'lang': 'java', 'sha1': '287749b48ba7162fb67c93a026d690b29f410bed', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_ow2_asm_asm_tree', 'actual': '@org_ow2_asm_asm_tree//jar', 'bind': 'jar/org/ow2/asm/asm_tree'}) callback({'artifact': 'org.ow2.asm:asm-util:5.0.3', 'lang': 'java', 'sha1': '1512e5571325854b05fb1efce1db75fcced54389', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_ow2_asm_asm_util', 'actual': '@org_ow2_asm_asm_util//jar', 'bind': 'jar/org/ow2/asm/asm_util'}) callback({'artifact': 'org.ow2.asm:asm:5.0.3', 'lang': 'java', 'sha1': 'dcc2193db20e19e1feca8b1240dbbc4e190824fa', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_ow2_asm_asm', 'actual': '@org_ow2_asm_asm//jar', 'bind': 'jar/org/ow2/asm/asm'}) callback({'artifact': 'org.samba.jcifs:jcifs:1.3.17-kohsuke-1', 'lang': 'java', 'sha1': '6c9114dc4075277d829ea09e15d6ffab52f2d0c0', 'repository': 'http://repo.jenkins-ci.org/public/', 'name': 'org_samba_jcifs_jcifs', 'actual': '@org_samba_jcifs_jcifs//jar', 'bind': 'jar/org/samba/jcifs/jcifs'}) callback({'artifact': 'org.slf4j:jcl-over-slf4j:1.7.7', 'lang': 'java', 'sha1': '56003dcd0a31deea6391b9e2ef2f2dc90b205a92', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_slf4j_jcl_over_slf4j', 'actual': '@org_slf4j_jcl_over_slf4j//jar', 'bind': 'jar/org/slf4j/jcl_over_slf4j'}) callback({'artifact': 'org.slf4j:log4j-over-slf4j:1.7.7', 'lang': 'java', 'sha1': 'd521cb26a9c4407caafcec302e7804b048b07cea', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_slf4j_log4j_over_slf4j', 'actual': '@org_slf4j_log4j_over_slf4j//jar', 'bind': 'jar/org/slf4j/log4j_over_slf4j'}) callback({'artifact': 'org.slf4j:slf4j-api:1.7.7', 'lang': 'java', 'sha1': '2b8019b6249bb05d81d3a3094e468753e2b21311', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_slf4j_slf4j_api', 'actual': '@org_slf4j_slf4j_api//jar', 'bind': 'jar/org/slf4j/slf4j_api'}) callback({'artifact': 'org.springframework:spring-aop:2.5.6.SEC03', 'lang': 'java', 'sha1': '6468695557500723a18630b712ce112ec58827c1', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_springframework_spring_aop', 'actual': '@org_springframework_spring_aop//jar', 'bind': 'jar/org/springframework/spring_aop'}) callback({'artifact': 'org.springframework:spring-beans:2.5.6.SEC03', 'lang': 'java', 'sha1': '79b2c86ff12c21b2420b4c46dca51f0e58762aae', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_springframework_spring_beans', 'actual': '@org_springframework_spring_beans//jar', 'bind': 'jar/org/springframework/spring_beans'}) callback({'artifact': 'org.springframework:spring-context-support:2.5.6.SEC03', 'lang': 'java', 'sha1': 'edf496f4ce066edc6b212e0e5521cb11ff97d55e', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_springframework_spring_context_support', 'actual': '@org_springframework_spring_context_support//jar', 'bind': 'jar/org/springframework/spring_context_support'}) callback({'artifact': 'org.springframework:spring-context:2.5.6.SEC03', 'lang': 'java', 'sha1': '5f1c24b26308afedc48a90a1fe2ed334a6475921', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_springframework_spring_context', 'actual': '@org_springframework_spring_context//jar', 'bind': 'jar/org/springframework/spring_context'}) callback({'artifact': 'org.springframework:spring-core:2.5.6.SEC03', 'lang': 'java', 'sha1': '644a23805a7ea29903bde0ccc1cd1a8b5f0432d6', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_springframework_spring_core', 'actual': '@org_springframework_spring_core//jar', 'bind': 'jar/org/springframework/spring_core'}) callback({'artifact': 'org.springframework:spring-dao:1.2.9', 'lang': 'java', 'sha1': '6f90baf86fc833cac3c677a8f35d3333ed86baea', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_springframework_spring_dao', 'actual': '@org_springframework_spring_dao//jar', 'bind': 'jar/org/springframework/spring_dao'}) callback({'artifact': 'org.springframework:spring-jdbc:1.2.9', 'lang': 'java', 'sha1': '8a81d42995e61e2deac49c2bc75cfacbb28e7218', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_springframework_spring_jdbc', 'actual': '@org_springframework_spring_jdbc//jar', 'bind': 'jar/org/springframework/spring_jdbc'}) callback({'artifact': 'org.springframework:spring-web:2.5.6.SEC03', 'lang': 'java', 'sha1': '699f171339f20126f1d09dde2dd17d6db2943fce', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_springframework_spring_web', 'actual': '@org_springframework_spring_web//jar', 'bind': 'jar/org/springframework/spring_web'}) callback({'artifact': 'org.springframework:spring-webmvc:2.5.6.SEC03', 'lang': 'java', 'sha1': '275c5ac6ade12819f49e984c8e06b114a4e23458', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'org_springframework_spring_webmvc', 'actual': '@org_springframework_spring_webmvc//jar', 'bind': 'jar/org/springframework/spring_webmvc'}) callback({'artifact': 'oro:oro:2.0.8', 'lang': 'java', 'sha1': '5592374f834645c4ae250f4c9fbb314c9369d698', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'oro_oro', 'actual': '@oro_oro//jar', 'bind': 'jar/oro/oro'}) callback({'artifact': 'relaxngDatatype:relaxngDatatype:20020414', 'lang': 'java', 'sha1': 'de7952cecd05b65e0e4370cc93fc03035175eef5', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'relaxngDatatype_relaxngDatatype', 'actual': '@relaxngDatatype_relaxngDatatype//jar', 'bind': 'jar/relaxngDatatype/relaxngDatatype'}) callback({'artifact': 'stax:stax-api:1.0.1', 'lang': 'java', 'sha1': '49c100caf72d658aca8e58bd74a4ba90fa2b0d70', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'stax_stax_api', 'actual': '@stax_stax_api//jar', 'bind': 'jar/stax/stax_api'}) callback({'artifact': 'xpp3:xpp3:1.1.4c', 'lang': 'java', 'sha1': '9b988ea84b9e4e9f1874e390ce099b8ac12cfff5', 'repository': 'https://repo.maven.apache.org/maven2/', 'name': 'xpp3_xpp3', 'actual': '@xpp3_xpp3//jar', 'bind': 'jar/xpp3/xpp3'})
def solve(lines): longest_intersec = [] for line in lines: (r1, r2) = line.split("-") (r1_start, r1_end) = map(int, r1.split(",")) (r2_start, r2_end) = map(int, r2.split(",")) current_longest_intersec = set(range(r1_start, r1_end + 1)) & set(range(r2_start, r2_end + 1)) if len(current_longest_intersec) > len(longest_intersec): longest_intersec = current_longest_intersec print(f"Longest intersection is {sorted(longest_intersec)} with length {len(longest_intersec)}") num_lines = int(input()) lines = [input() for _ in range(num_lines)] solve(lines)
def solve(lines): longest_intersec = [] for line in lines: (r1, r2) = line.split('-') (r1_start, r1_end) = map(int, r1.split(',')) (r2_start, r2_end) = map(int, r2.split(',')) current_longest_intersec = set(range(r1_start, r1_end + 1)) & set(range(r2_start, r2_end + 1)) if len(current_longest_intersec) > len(longest_intersec): longest_intersec = current_longest_intersec print(f'Longest intersection is {sorted(longest_intersec)} with length {len(longest_intersec)}') num_lines = int(input()) lines = [input() for _ in range(num_lines)] solve(lines)
def make_dist(): return default_python_distribution( python_version="3.8" ) def make_exe(dist): policy = dist.make_python_packaging_policy() policy.extension_module_filter = "all" # policy.file_scanner_classify_files = True policy.allow_files = True policy.file_scanner_emit_files = True # policy.include_classified_resources = True policy.resources_location = "in-memory" python_config = dist.make_python_interpreter_config() python_config.run_module = 'game' exe = dist.to_python_executable( name="synacor-challenge", packaging_policy=policy, config=python_config, ) exe.add_python_resources(exe.read_package_root( path=".", packages=["game", "machine", "datafiles"], )) exe.add_python_resources(exe.pip_download( ["-r", "requirements.txt"] )) return exe def make_embedded_resources(exe): return exe.to_embedded_resources() def make_install(exe): files = FileManifest() files.add_python_resource(".", exe) return files register_target("dist", make_dist) register_target("exe", make_exe, depends=["dist"], default=True) register_target("resources", make_embedded_resources, depends=["exe"], default_build_script=True) register_target("install", make_install, depends=["exe"]) resolve_targets() PYOXIDIZER_VERSION = "0.10.3" PYOXIDIZER_COMMIT = "UNKNOWN"
def make_dist(): return default_python_distribution(python_version='3.8') def make_exe(dist): policy = dist.make_python_packaging_policy() policy.extension_module_filter = 'all' policy.allow_files = True policy.file_scanner_emit_files = True policy.resources_location = 'in-memory' python_config = dist.make_python_interpreter_config() python_config.run_module = 'game' exe = dist.to_python_executable(name='synacor-challenge', packaging_policy=policy, config=python_config) exe.add_python_resources(exe.read_package_root(path='.', packages=['game', 'machine', 'datafiles'])) exe.add_python_resources(exe.pip_download(['-r', 'requirements.txt'])) return exe def make_embedded_resources(exe): return exe.to_embedded_resources() def make_install(exe): files = file_manifest() files.add_python_resource('.', exe) return files register_target('dist', make_dist) register_target('exe', make_exe, depends=['dist'], default=True) register_target('resources', make_embedded_resources, depends=['exe'], default_build_script=True) register_target('install', make_install, depends=['exe']) resolve_targets() pyoxidizer_version = '0.10.3' pyoxidizer_commit = 'UNKNOWN'
def double(num): return num * 2 # way 1 multiply = lambda x,y: x*y print(multiply(5,10)) # way 2 print((lambda x,y: x+y)(6, 82)) numbers = [23, 73, 62, 3] added = [ x*2 for x in numbers] print(added) added = [double(x) for x in numbers] print(added) added = [ (lambda x: x*2)(x) for x in numbers] print(added) added = map(double, numbers) print(added) print(list(added)) added = list(map(lambda x:x*2, numbers)) print(added)
def double(num): return num * 2 multiply = lambda x, y: x * y print(multiply(5, 10)) print((lambda x, y: x + y)(6, 82)) numbers = [23, 73, 62, 3] added = [x * 2 for x in numbers] print(added) added = [double(x) for x in numbers] print(added) added = [(lambda x: x * 2)(x) for x in numbers] print(added) added = map(double, numbers) print(added) print(list(added)) added = list(map(lambda x: x * 2, numbers)) print(added)
class AspectManager(object): def __init__(self): super(AspectManager, self).__init__() def get_module_hooker(self, name): return None def load_aspects(self): pass
class Aspectmanager(object): def __init__(self): super(AspectManager, self).__init__() def get_module_hooker(self, name): return None def load_aspects(self): pass
SECRET_KEY = 'example' TIME_ZONE = 'Asia/Shanghai' DEFAULT_XFILES_FACTOR = 0 URL_PREFIX = '/' LOG_DIR = '/var/log/graphite' GRAPHITE_ROOT = '/opt/graphite' CONF_DIR = '/etc/graphite' DASHBOARD_CONF = '/etc/graphite/dashboard.conf' GRAPHTEMPLATES_CONF = '/etc/graphite/graphTemplates.conf' # STORAGE_DIR = '/opt/graphite/storage' # STATIC_ROOT = '/opt/graphite/static' # INDEX_FILE = '/opt/graphite/storage/index' # CERES_DIR = '/opt/graphite/storage/ceres' # WHISPER_DIR = '/opt/graphite/storage/whisper' # RRD_DIR = '/opt/graphite/storage/rrd' # MEMCACHE_HOSTS = ['10.10.10.10:11211', '10.10.10.11:11211', '10.10.10.12:11211'] STORAGE_FINDERS = ( 'graphite.graphouse.GraphouseFinder', )
secret_key = 'example' time_zone = 'Asia/Shanghai' default_xfiles_factor = 0 url_prefix = '/' log_dir = '/var/log/graphite' graphite_root = '/opt/graphite' conf_dir = '/etc/graphite' dashboard_conf = '/etc/graphite/dashboard.conf' graphtemplates_conf = '/etc/graphite/graphTemplates.conf' storage_finders = ('graphite.graphouse.GraphouseFinder',)
n = int(input("Enter a number: ")) for x in range(1,16): print(n,"x",x,"=",(n*x))
n = int(input('Enter a number: ')) for x in range(1, 16): print(n, 'x', x, '=', n * x)
# # PySNMP MIB module TIMETRA-LLDP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TIMETRA-LLDP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:11:14 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint") AddressFamilyNumbers, = mibBuilder.importSymbols("IANA-ADDRESS-FAMILY-NUMBERS-MIB", "AddressFamilyNumbers") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") LldpManAddrIfSubtype, lldpLocManAddr, LldpPortIdSubtype, LldpChassisIdSubtype, LldpPortId, LldpSystemCapabilitiesMap, LldpChassisId, lldpLocManAddrSubtype, LldpManAddress = mibBuilder.importSymbols("LLDP-MIB", "LldpManAddrIfSubtype", "lldpLocManAddr", "LldpPortIdSubtype", "LldpChassisIdSubtype", "LldpPortId", "LldpSystemCapabilitiesMap", "LldpChassisId", "lldpLocManAddrSubtype", "LldpManAddress") TimeFilter, ZeroBasedCounter32 = mibBuilder.importSymbols("RMON2-MIB", "TimeFilter", "ZeroBasedCounter32") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance") NotificationType, iso, Gauge32, IpAddress, Bits, ObjectIdentity, MibIdentifier, Unsigned32, TimeTicks, Counter64, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "iso", "Gauge32", "IpAddress", "Bits", "ObjectIdentity", "MibIdentifier", "Unsigned32", "TimeTicks", "Counter64", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "Counter32") DisplayString, MacAddress, TextualConvention, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "MacAddress", "TextualConvention", "TruthValue") tmnxSRConfs, timetraSRMIBModules, tmnxSRNotifyPrefix, tmnxSRObjs = mibBuilder.importSymbols("TIMETRA-GLOBAL-MIB", "tmnxSRConfs", "timetraSRMIBModules", "tmnxSRNotifyPrefix", "tmnxSRObjs") TmnxEnabledDisabled, = mibBuilder.importSymbols("TIMETRA-TC-MIB", "TmnxEnabledDisabled") tmnxLldpMIBModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 6527, 1, 1, 3, 59)) tmnxLldpMIBModule.setRevisions(('1909-02-28 00:00', '1902-02-02 02:00',)) if mibBuilder.loadTexts: tmnxLldpMIBModule.setLastUpdated('0902280000Z') if mibBuilder.loadTexts: tmnxLldpMIBModule.setOrganization('Alcatel-Lucent') tmnxLldpNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 3, 59)) tmnxLldpObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59)) tmnxLldpConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59)) tmnxLldpConfiguration = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1)) tmnxLldpStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2)) tmnxLldpLocalSystemData = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3)) tmnxLldpRemoteSystemsData = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4)) class TmnxLldpDestAddressTableIndex(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 4096) class TmnxLldpManAddressIndex(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1)) namedValues = NamedValues(("system", 1)) tmnxLldpTxCreditMax = MibScalar((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100)).clone(5)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpTxCreditMax.setStatus('current') tmnxLldpMessageFastTx = MibScalar((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 3600)).clone(1)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpMessageFastTx.setStatus('current') tmnxLldpMessageFastTxInit = MibScalar((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 8)).clone(4)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpMessageFastTxInit.setStatus('current') tmnxLldpAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 4), TmnxEnabledDisabled()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpAdminStatus.setStatus('current') tmnxLldpPortConfigTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5), ) if mibBuilder.loadTexts: tmnxLldpPortConfigTable.setStatus('current') tmnxLldpPortConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpPortCfgDestAddressIndex")) if mibBuilder.loadTexts: tmnxLldpPortConfigEntry.setStatus('current') tmnxLldpPortCfgDestAddressIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1, 1), TmnxLldpDestAddressTableIndex()) if mibBuilder.loadTexts: tmnxLldpPortCfgDestAddressIndex.setStatus('current') tmnxLldpPortCfgAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("txOnly", 1), ("rxOnly", 2), ("txAndRx", 3), ("disabled", 4))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpPortCfgAdminStatus.setStatus('current') tmnxLldpPortCfgNotifyEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1, 3), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpPortCfgNotifyEnable.setStatus('current') tmnxLldpPortCfgTLVsTxEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1, 4), Bits().clone(namedValues=NamedValues(("portDesc", 0), ("sysName", 1), ("sysDesc", 2), ("sysCap", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpPortCfgTLVsTxEnable.setStatus('current') tmnxLldpConfigManAddrPortsTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6), ) if mibBuilder.loadTexts: tmnxLldpConfigManAddrPortsTable.setStatus('current') tmnxLldpConfigManAddrPortsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpPortCfgDestAddressIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpPortCfgAddressIndex")) if mibBuilder.loadTexts: tmnxLldpConfigManAddrPortsEntry.setStatus('current') tmnxLldpPortCfgAddressIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1, 1), TmnxLldpManAddressIndex()) if mibBuilder.loadTexts: tmnxLldpPortCfgAddressIndex.setStatus('current') tmnxLldpPortCfgManAddrTxEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1, 2), TmnxEnabledDisabled().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpPortCfgManAddrTxEnabled.setStatus('current') tmnxLldpPortCfgManAddrSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1, 3), AddressFamilyNumbers()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpPortCfgManAddrSubtype.setStatus('current') tmnxLldpPortCfgManAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1, 4), LldpManAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpPortCfgManAddress.setStatus('current') tmnxLldpDestAddressTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 7), ) if mibBuilder.loadTexts: tmnxLldpDestAddressTable.setStatus('current') tmnxLldpDestAddressTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 7, 1), ).setIndexNames((0, "TIMETRA-LLDP-MIB", "tmnxLldpAddressTableIndex")) if mibBuilder.loadTexts: tmnxLldpDestAddressTableEntry.setStatus('current') tmnxLldpAddressTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 7, 1, 1), TmnxLldpDestAddressTableIndex()) if mibBuilder.loadTexts: tmnxLldpAddressTableIndex.setStatus('current') tmnxLldpDestMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 7, 1, 2), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpDestMacAddress.setStatus('current') tmnxLldpStatsTxPortTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1), ) if mibBuilder.loadTexts: tmnxLldpStatsTxPortTable.setStatus('current') tmnxLldpStatsTxPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpStatsTxDestMACAddress")) if mibBuilder.loadTexts: tmnxLldpStatsTxPortEntry.setStatus('current') tmnxLldpStatsTxDestMACAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1, 1, 1), TmnxLldpDestAddressTableIndex()) if mibBuilder.loadTexts: tmnxLldpStatsTxDestMACAddress.setStatus('current') tmnxLldpStatsTxPortFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsTxPortFrames.setStatus('current') tmnxLldpStatsTxLLDPDULengthErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsTxLLDPDULengthErrs.setStatus('current') tmnxLldpStatsRxPortTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2), ) if mibBuilder.loadTexts: tmnxLldpStatsRxPortTable.setStatus('current') tmnxLldpStatsRxPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpStatsRxDestMACAddress")) if mibBuilder.loadTexts: tmnxLldpStatsRxPortEntry.setStatus('current') tmnxLldpStatsRxDestMACAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 1), TmnxLldpDestAddressTableIndex()) if mibBuilder.loadTexts: tmnxLldpStatsRxDestMACAddress.setStatus('current') tmnxLldpStatsRxPortFrameDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsRxPortFrameDiscard.setStatus('current') tmnxLldpStatsRxPortFrameErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsRxPortFrameErrs.setStatus('current') tmnxLldpStatsRxPortFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsRxPortFrames.setStatus('current') tmnxLldpStatsRxPortTLVDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsRxPortTLVDiscard.setStatus('current') tmnxLldpStatsRxPortTLVUnknown = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsRxPortTLVUnknown.setStatus('current') tmnxLldpStatsRxPortAgeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 7), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsRxPortAgeouts.setStatus('current') tmnxLldpLocPortTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1), ) if mibBuilder.loadTexts: tmnxLldpLocPortTable.setStatus('current') tmnxLldpLocPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpLocPortDestMACAddress")) if mibBuilder.loadTexts: tmnxLldpLocPortEntry.setStatus('current') tmnxLldpLocPortDestMACAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1, 1), TmnxLldpDestAddressTableIndex()) if mibBuilder.loadTexts: tmnxLldpLocPortDestMACAddress.setStatus('current') tmnxLldpLocPortIdSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1, 2), LldpPortIdSubtype()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpLocPortIdSubtype.setStatus('current') tmnxLldpLocPortId = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1, 3), LldpPortId()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpLocPortId.setStatus('current') tmnxLldpLocPortDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1, 4), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpLocPortDesc.setStatus('current') tmnxLldpRemTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1), ) if mibBuilder.loadTexts: tmnxLldpRemTable.setStatus('current') tmnxLldpRemEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1), ).setIndexNames((0, "TIMETRA-LLDP-MIB", "tmnxLldpRemTimeMark"), (0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpRemLocalDestMACAddress"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpRemIndex")) if mibBuilder.loadTexts: tmnxLldpRemEntry.setStatus('current') tmnxLldpRemTimeMark = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 1), TimeFilter()) if mibBuilder.loadTexts: tmnxLldpRemTimeMark.setStatus('current') tmnxLldpRemLocalDestMACAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 2), TmnxLldpDestAddressTableIndex()) if mibBuilder.loadTexts: tmnxLldpRemLocalDestMACAddress.setStatus('current') tmnxLldpRemIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: tmnxLldpRemIndex.setStatus('current') tmnxLldpRemChassisIdSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 4), LldpChassisIdSubtype()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemChassisIdSubtype.setStatus('current') tmnxLldpRemChassisId = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 5), LldpChassisId()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemChassisId.setStatus('current') tmnxLldpRemPortIdSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 6), LldpPortIdSubtype()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemPortIdSubtype.setStatus('current') tmnxLldpRemPortId = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 7), LldpPortId()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemPortId.setStatus('current') tmnxLldpRemPortDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 8), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemPortDesc.setStatus('current') tmnxLldpRemSysName = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 9), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemSysName.setStatus('current') tmnxLldpRemSysDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 10), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemSysDesc.setStatus('current') tmnxLldpRemSysCapSupported = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 11), LldpSystemCapabilitiesMap()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemSysCapSupported.setStatus('current') tmnxLldpRemSysCapEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 12), LldpSystemCapabilitiesMap()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemSysCapEnabled.setStatus('current') tmnxLldpRemManAddrTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2), ) if mibBuilder.loadTexts: tmnxLldpRemManAddrTable.setStatus('current') tmnxLldpRemManAddrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1), ).setIndexNames((0, "TIMETRA-LLDP-MIB", "tmnxLldpRemTimeMark"), (0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpRemLocalDestMACAddress"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpRemIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpRemManAddrSubtype"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpRemManAddr")) if mibBuilder.loadTexts: tmnxLldpRemManAddrEntry.setStatus('current') tmnxLldpRemManAddrSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 1), AddressFamilyNumbers()) if mibBuilder.loadTexts: tmnxLldpRemManAddrSubtype.setStatus('current') tmnxLldpRemManAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 2), LldpManAddress()) if mibBuilder.loadTexts: tmnxLldpRemManAddr.setStatus('current') tmnxLldpRemManAddrIfSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 3), LldpManAddrIfSubtype()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemManAddrIfSubtype.setStatus('current') tmnxLldpRemManAddrIfId = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemManAddrIfId.setStatus('current') tmnxLldpRemManAddrOID = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 5), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemManAddrOID.setStatus('current') tmnxLldpCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 1)) tmnxLldpGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2)) tmnxLldpCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 1, 1)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpConfigGroup"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxGroup"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsTxGroup"), ("TIMETRA-LLDP-MIB", "tmnxLldpLocSysGroup"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemSysGroup"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemManAddrGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpCompliance = tmnxLldpCompliance.setStatus('current') tmnxLldpConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 1)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpTxCreditMax"), ("TIMETRA-LLDP-MIB", "tmnxLldpMessageFastTx"), ("TIMETRA-LLDP-MIB", "tmnxLldpMessageFastTxInit"), ("TIMETRA-LLDP-MIB", "tmnxLldpAdminStatus"), ("TIMETRA-LLDP-MIB", "tmnxLldpPortCfgAdminStatus"), ("TIMETRA-LLDP-MIB", "tmnxLldpPortCfgNotifyEnable"), ("TIMETRA-LLDP-MIB", "tmnxLldpPortCfgTLVsTxEnable"), ("TIMETRA-LLDP-MIB", "tmnxLldpPortCfgManAddrTxEnabled"), ("TIMETRA-LLDP-MIB", "tmnxLldpPortCfgManAddrSubtype"), ("TIMETRA-LLDP-MIB", "tmnxLldpPortCfgManAddress"), ("TIMETRA-LLDP-MIB", "tmnxLldpDestMacAddress")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpConfigGroup = tmnxLldpConfigGroup.setStatus('current') tmnxLldpStatsRxGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 2)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxPortFrameDiscard"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxPortFrameErrs"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxPortFrames"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxPortTLVDiscard"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxPortTLVUnknown"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxPortAgeouts")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpStatsRxGroup = tmnxLldpStatsRxGroup.setStatus('current') tmnxLldpStatsTxGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 3)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpStatsTxPortFrames"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsTxLLDPDULengthErrs")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpStatsTxGroup = tmnxLldpStatsTxGroup.setStatus('current') tmnxLldpLocSysGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 4)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpLocPortIdSubtype"), ("TIMETRA-LLDP-MIB", "tmnxLldpLocPortId"), ("TIMETRA-LLDP-MIB", "tmnxLldpLocPortDesc")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpLocSysGroup = tmnxLldpLocSysGroup.setStatus('current') tmnxLldpRemSysGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 5)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpRemChassisIdSubtype"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemChassisId"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemPortIdSubtype"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemPortId"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemPortDesc"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemSysName"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemSysDesc"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemSysCapSupported"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemSysCapEnabled")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpRemSysGroup = tmnxLldpRemSysGroup.setStatus('current') tmnxLldpRemManAddrGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 6)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpRemManAddrIfSubtype"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemManAddrIfId"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemManAddrOID")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpRemManAddrGroup = tmnxLldpRemManAddrGroup.setStatus('current') mibBuilder.exportSymbols("TIMETRA-LLDP-MIB", tmnxLldpLocPortDestMACAddress=tmnxLldpLocPortDestMACAddress, tmnxLldpStatsRxPortTable=tmnxLldpStatsRxPortTable, tmnxLldpRemSysCapEnabled=tmnxLldpRemSysCapEnabled, tmnxLldpStatsRxPortFrameErrs=tmnxLldpStatsRxPortFrameErrs, tmnxLldpLocSysGroup=tmnxLldpLocSysGroup, tmnxLldpStatsTxPortTable=tmnxLldpStatsTxPortTable, tmnxLldpLocalSystemData=tmnxLldpLocalSystemData, tmnxLldpStatsTxPortEntry=tmnxLldpStatsTxPortEntry, tmnxLldpPortConfigTable=tmnxLldpPortConfigTable, tmnxLldpStatsTxDestMACAddress=tmnxLldpStatsTxDestMACAddress, tmnxLldpPortCfgTLVsTxEnable=tmnxLldpPortCfgTLVsTxEnable, tmnxLldpStatsRxDestMACAddress=tmnxLldpStatsRxDestMACAddress, tmnxLldpStatsRxPortFrames=tmnxLldpStatsRxPortFrames, tmnxLldpPortCfgManAddrSubtype=tmnxLldpPortCfgManAddrSubtype, tmnxLldpPortCfgAddressIndex=tmnxLldpPortCfgAddressIndex, tmnxLldpRemSysName=tmnxLldpRemSysName, tmnxLldpRemManAddrIfId=tmnxLldpRemManAddrIfId, tmnxLldpTxCreditMax=tmnxLldpTxCreditMax, tmnxLldpLocPortEntry=tmnxLldpLocPortEntry, tmnxLldpStatsRxPortEntry=tmnxLldpStatsRxPortEntry, tmnxLldpRemManAddr=tmnxLldpRemManAddr, tmnxLldpDestAddressTable=tmnxLldpDestAddressTable, tmnxLldpDestAddressTableEntry=tmnxLldpDestAddressTableEntry, tmnxLldpGroups=tmnxLldpGroups, tmnxLldpPortCfgManAddrTxEnabled=tmnxLldpPortCfgManAddrTxEnabled, tmnxLldpDestMacAddress=tmnxLldpDestMacAddress, tmnxLldpRemoteSystemsData=tmnxLldpRemoteSystemsData, tmnxLldpPortCfgDestAddressIndex=tmnxLldpPortCfgDestAddressIndex, tmnxLldpRemManAddrSubtype=tmnxLldpRemManAddrSubtype, tmnxLldpRemPortIdSubtype=tmnxLldpRemPortIdSubtype, tmnxLldpRemChassisIdSubtype=tmnxLldpRemChassisIdSubtype, tmnxLldpRemSysGroup=tmnxLldpRemSysGroup, tmnxLldpPortCfgNotifyEnable=tmnxLldpPortCfgNotifyEnable, tmnxLldpRemManAddrOID=tmnxLldpRemManAddrOID, tmnxLldpLocPortIdSubtype=tmnxLldpLocPortIdSubtype, PYSNMP_MODULE_ID=tmnxLldpMIBModule, tmnxLldpStatsRxPortFrameDiscard=tmnxLldpStatsRxPortFrameDiscard, tmnxLldpStatsRxPortAgeouts=tmnxLldpStatsRxPortAgeouts, tmnxLldpCompliances=tmnxLldpCompliances, tmnxLldpStatsRxPortTLVDiscard=tmnxLldpStatsRxPortTLVDiscard, tmnxLldpMIBModule=tmnxLldpMIBModule, TmnxLldpManAddressIndex=TmnxLldpManAddressIndex, tmnxLldpLocPortTable=tmnxLldpLocPortTable, tmnxLldpConfigManAddrPortsTable=tmnxLldpConfigManAddrPortsTable, tmnxLldpConfiguration=tmnxLldpConfiguration, tmnxLldpRemPortId=tmnxLldpRemPortId, tmnxLldpRemTable=tmnxLldpRemTable, tmnxLldpPortCfgManAddress=tmnxLldpPortCfgManAddress, tmnxLldpRemLocalDestMACAddress=tmnxLldpRemLocalDestMACAddress, tmnxLldpObjects=tmnxLldpObjects, tmnxLldpLocPortId=tmnxLldpLocPortId, tmnxLldpPortCfgAdminStatus=tmnxLldpPortCfgAdminStatus, tmnxLldpRemTimeMark=tmnxLldpRemTimeMark, tmnxLldpRemSysCapSupported=tmnxLldpRemSysCapSupported, tmnxLldpConfigGroup=tmnxLldpConfigGroup, tmnxLldpRemManAddrTable=tmnxLldpRemManAddrTable, tmnxLldpRemEntry=tmnxLldpRemEntry, tmnxLldpAddressTableIndex=tmnxLldpAddressTableIndex, tmnxLldpRemChassisId=tmnxLldpRemChassisId, tmnxLldpNotifications=tmnxLldpNotifications, tmnxLldpRemManAddrIfSubtype=tmnxLldpRemManAddrIfSubtype, tmnxLldpCompliance=tmnxLldpCompliance, tmnxLldpRemIndex=tmnxLldpRemIndex, tmnxLldpMessageFastTx=tmnxLldpMessageFastTx, tmnxLldpStatsTxLLDPDULengthErrs=tmnxLldpStatsTxLLDPDULengthErrs, TmnxLldpDestAddressTableIndex=TmnxLldpDestAddressTableIndex, tmnxLldpRemManAddrEntry=tmnxLldpRemManAddrEntry, tmnxLldpAdminStatus=tmnxLldpAdminStatus, tmnxLldpStatistics=tmnxLldpStatistics, tmnxLldpRemManAddrGroup=tmnxLldpRemManAddrGroup, tmnxLldpPortConfigEntry=tmnxLldpPortConfigEntry, tmnxLldpStatsTxGroup=tmnxLldpStatsTxGroup, tmnxLldpMessageFastTxInit=tmnxLldpMessageFastTxInit, tmnxLldpConfigManAddrPortsEntry=tmnxLldpConfigManAddrPortsEntry, tmnxLldpRemSysDesc=tmnxLldpRemSysDesc, tmnxLldpStatsRxPortTLVUnknown=tmnxLldpStatsRxPortTLVUnknown, tmnxLldpRemPortDesc=tmnxLldpRemPortDesc, tmnxLldpConformance=tmnxLldpConformance, tmnxLldpLocPortDesc=tmnxLldpLocPortDesc, tmnxLldpStatsRxGroup=tmnxLldpStatsRxGroup, tmnxLldpStatsTxPortFrames=tmnxLldpStatsTxPortFrames)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_size_constraint, single_value_constraint, constraints_intersection, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint') (address_family_numbers,) = mibBuilder.importSymbols('IANA-ADDRESS-FAMILY-NUMBERS-MIB', 'AddressFamilyNumbers') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (lldp_man_addr_if_subtype, lldp_loc_man_addr, lldp_port_id_subtype, lldp_chassis_id_subtype, lldp_port_id, lldp_system_capabilities_map, lldp_chassis_id, lldp_loc_man_addr_subtype, lldp_man_address) = mibBuilder.importSymbols('LLDP-MIB', 'LldpManAddrIfSubtype', 'lldpLocManAddr', 'LldpPortIdSubtype', 'LldpChassisIdSubtype', 'LldpPortId', 'LldpSystemCapabilitiesMap', 'LldpChassisId', 'lldpLocManAddrSubtype', 'LldpManAddress') (time_filter, zero_based_counter32) = mibBuilder.importSymbols('RMON2-MIB', 'TimeFilter', 'ZeroBasedCounter32') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance') (notification_type, iso, gauge32, ip_address, bits, object_identity, mib_identifier, unsigned32, time_ticks, counter64, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'iso', 'Gauge32', 'IpAddress', 'Bits', 'ObjectIdentity', 'MibIdentifier', 'Unsigned32', 'TimeTicks', 'Counter64', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'Counter32') (display_string, mac_address, textual_convention, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'MacAddress', 'TextualConvention', 'TruthValue') (tmnx_sr_confs, timetra_srmib_modules, tmnx_sr_notify_prefix, tmnx_sr_objs) = mibBuilder.importSymbols('TIMETRA-GLOBAL-MIB', 'tmnxSRConfs', 'timetraSRMIBModules', 'tmnxSRNotifyPrefix', 'tmnxSRObjs') (tmnx_enabled_disabled,) = mibBuilder.importSymbols('TIMETRA-TC-MIB', 'TmnxEnabledDisabled') tmnx_lldp_mib_module = module_identity((1, 3, 6, 1, 4, 1, 6527, 1, 1, 3, 59)) tmnxLldpMIBModule.setRevisions(('1909-02-28 00:00', '1902-02-02 02:00')) if mibBuilder.loadTexts: tmnxLldpMIBModule.setLastUpdated('0902280000Z') if mibBuilder.loadTexts: tmnxLldpMIBModule.setOrganization('Alcatel-Lucent') tmnx_lldp_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 3, 59)) tmnx_lldp_objects = mib_identifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59)) tmnx_lldp_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59)) tmnx_lldp_configuration = mib_identifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1)) tmnx_lldp_statistics = mib_identifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2)) tmnx_lldp_local_system_data = mib_identifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3)) tmnx_lldp_remote_systems_data = mib_identifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4)) class Tmnxlldpdestaddresstableindex(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 4096) class Tmnxlldpmanaddressindex(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1)) named_values = named_values(('system', 1)) tmnx_lldp_tx_credit_max = mib_scalar((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 100)).clone(5)).setMaxAccess('readwrite') if mibBuilder.loadTexts: tmnxLldpTxCreditMax.setStatus('current') tmnx_lldp_message_fast_tx = mib_scalar((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 3600)).clone(1)).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: tmnxLldpMessageFastTx.setStatus('current') tmnx_lldp_message_fast_tx_init = mib_scalar((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 8)).clone(4)).setMaxAccess('readwrite') if mibBuilder.loadTexts: tmnxLldpMessageFastTxInit.setStatus('current') tmnx_lldp_admin_status = mib_scalar((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 4), tmnx_enabled_disabled()).setMaxAccess('readwrite') if mibBuilder.loadTexts: tmnxLldpAdminStatus.setStatus('current') tmnx_lldp_port_config_table = mib_table((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5)) if mibBuilder.loadTexts: tmnxLldpPortConfigTable.setStatus('current') tmnx_lldp_port_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'TIMETRA-LLDP-MIB', 'tmnxLldpPortCfgDestAddressIndex')) if mibBuilder.loadTexts: tmnxLldpPortConfigEntry.setStatus('current') tmnx_lldp_port_cfg_dest_address_index = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1, 1), tmnx_lldp_dest_address_table_index()) if mibBuilder.loadTexts: tmnxLldpPortCfgDestAddressIndex.setStatus('current') tmnx_lldp_port_cfg_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('txOnly', 1), ('rxOnly', 2), ('txAndRx', 3), ('disabled', 4))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: tmnxLldpPortCfgAdminStatus.setStatus('current') tmnx_lldp_port_cfg_notify_enable = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1, 3), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: tmnxLldpPortCfgNotifyEnable.setStatus('current') tmnx_lldp_port_cfg_tl_vs_tx_enable = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1, 4), bits().clone(namedValues=named_values(('portDesc', 0), ('sysName', 1), ('sysDesc', 2), ('sysCap', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: tmnxLldpPortCfgTLVsTxEnable.setStatus('current') tmnx_lldp_config_man_addr_ports_table = mib_table((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6)) if mibBuilder.loadTexts: tmnxLldpConfigManAddrPortsTable.setStatus('current') tmnx_lldp_config_man_addr_ports_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'TIMETRA-LLDP-MIB', 'tmnxLldpPortCfgDestAddressIndex'), (0, 'TIMETRA-LLDP-MIB', 'tmnxLldpPortCfgAddressIndex')) if mibBuilder.loadTexts: tmnxLldpConfigManAddrPortsEntry.setStatus('current') tmnx_lldp_port_cfg_address_index = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1, 1), tmnx_lldp_man_address_index()) if mibBuilder.loadTexts: tmnxLldpPortCfgAddressIndex.setStatus('current') tmnx_lldp_port_cfg_man_addr_tx_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1, 2), tmnx_enabled_disabled().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: tmnxLldpPortCfgManAddrTxEnabled.setStatus('current') tmnx_lldp_port_cfg_man_addr_subtype = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1, 3), address_family_numbers()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpPortCfgManAddrSubtype.setStatus('current') tmnx_lldp_port_cfg_man_address = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1, 4), lldp_man_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpPortCfgManAddress.setStatus('current') tmnx_lldp_dest_address_table = mib_table((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 7)) if mibBuilder.loadTexts: tmnxLldpDestAddressTable.setStatus('current') tmnx_lldp_dest_address_table_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 7, 1)).setIndexNames((0, 'TIMETRA-LLDP-MIB', 'tmnxLldpAddressTableIndex')) if mibBuilder.loadTexts: tmnxLldpDestAddressTableEntry.setStatus('current') tmnx_lldp_address_table_index = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 7, 1, 1), tmnx_lldp_dest_address_table_index()) if mibBuilder.loadTexts: tmnxLldpAddressTableIndex.setStatus('current') tmnx_lldp_dest_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 7, 1, 2), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpDestMacAddress.setStatus('current') tmnx_lldp_stats_tx_port_table = mib_table((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1)) if mibBuilder.loadTexts: tmnxLldpStatsTxPortTable.setStatus('current') tmnx_lldp_stats_tx_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'TIMETRA-LLDP-MIB', 'tmnxLldpStatsTxDestMACAddress')) if mibBuilder.loadTexts: tmnxLldpStatsTxPortEntry.setStatus('current') tmnx_lldp_stats_tx_dest_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1, 1, 1), tmnx_lldp_dest_address_table_index()) if mibBuilder.loadTexts: tmnxLldpStatsTxDestMACAddress.setStatus('current') tmnx_lldp_stats_tx_port_frames = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpStatsTxPortFrames.setStatus('current') tmnx_lldp_stats_tx_lldpdu_length_errs = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpStatsTxLLDPDULengthErrs.setStatus('current') tmnx_lldp_stats_rx_port_table = mib_table((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2)) if mibBuilder.loadTexts: tmnxLldpStatsRxPortTable.setStatus('current') tmnx_lldp_stats_rx_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'TIMETRA-LLDP-MIB', 'tmnxLldpStatsRxDestMACAddress')) if mibBuilder.loadTexts: tmnxLldpStatsRxPortEntry.setStatus('current') tmnx_lldp_stats_rx_dest_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 1), tmnx_lldp_dest_address_table_index()) if mibBuilder.loadTexts: tmnxLldpStatsRxDestMACAddress.setStatus('current') tmnx_lldp_stats_rx_port_frame_discard = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpStatsRxPortFrameDiscard.setStatus('current') tmnx_lldp_stats_rx_port_frame_errs = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpStatsRxPortFrameErrs.setStatus('current') tmnx_lldp_stats_rx_port_frames = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpStatsRxPortFrames.setStatus('current') tmnx_lldp_stats_rx_port_tlv_discard = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpStatsRxPortTLVDiscard.setStatus('current') tmnx_lldp_stats_rx_port_tlv_unknown = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpStatsRxPortTLVUnknown.setStatus('current') tmnx_lldp_stats_rx_port_ageouts = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 7), zero_based_counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpStatsRxPortAgeouts.setStatus('current') tmnx_lldp_loc_port_table = mib_table((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1)) if mibBuilder.loadTexts: tmnxLldpLocPortTable.setStatus('current') tmnx_lldp_loc_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'TIMETRA-LLDP-MIB', 'tmnxLldpLocPortDestMACAddress')) if mibBuilder.loadTexts: tmnxLldpLocPortEntry.setStatus('current') tmnx_lldp_loc_port_dest_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1, 1), tmnx_lldp_dest_address_table_index()) if mibBuilder.loadTexts: tmnxLldpLocPortDestMACAddress.setStatus('current') tmnx_lldp_loc_port_id_subtype = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1, 2), lldp_port_id_subtype()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpLocPortIdSubtype.setStatus('current') tmnx_lldp_loc_port_id = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1, 3), lldp_port_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpLocPortId.setStatus('current') tmnx_lldp_loc_port_desc = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1, 4), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpLocPortDesc.setStatus('current') tmnx_lldp_rem_table = mib_table((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1)) if mibBuilder.loadTexts: tmnxLldpRemTable.setStatus('current') tmnx_lldp_rem_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1)).setIndexNames((0, 'TIMETRA-LLDP-MIB', 'tmnxLldpRemTimeMark'), (0, 'IF-MIB', 'ifIndex'), (0, 'TIMETRA-LLDP-MIB', 'tmnxLldpRemLocalDestMACAddress'), (0, 'TIMETRA-LLDP-MIB', 'tmnxLldpRemIndex')) if mibBuilder.loadTexts: tmnxLldpRemEntry.setStatus('current') tmnx_lldp_rem_time_mark = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 1), time_filter()) if mibBuilder.loadTexts: tmnxLldpRemTimeMark.setStatus('current') tmnx_lldp_rem_local_dest_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 2), tmnx_lldp_dest_address_table_index()) if mibBuilder.loadTexts: tmnxLldpRemLocalDestMACAddress.setStatus('current') tmnx_lldp_rem_index = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: tmnxLldpRemIndex.setStatus('current') tmnx_lldp_rem_chassis_id_subtype = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 4), lldp_chassis_id_subtype()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpRemChassisIdSubtype.setStatus('current') tmnx_lldp_rem_chassis_id = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 5), lldp_chassis_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpRemChassisId.setStatus('current') tmnx_lldp_rem_port_id_subtype = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 6), lldp_port_id_subtype()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpRemPortIdSubtype.setStatus('current') tmnx_lldp_rem_port_id = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 7), lldp_port_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpRemPortId.setStatus('current') tmnx_lldp_rem_port_desc = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 8), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpRemPortDesc.setStatus('current') tmnx_lldp_rem_sys_name = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 9), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpRemSysName.setStatus('current') tmnx_lldp_rem_sys_desc = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 10), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpRemSysDesc.setStatus('current') tmnx_lldp_rem_sys_cap_supported = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 11), lldp_system_capabilities_map()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpRemSysCapSupported.setStatus('current') tmnx_lldp_rem_sys_cap_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 12), lldp_system_capabilities_map()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpRemSysCapEnabled.setStatus('current') tmnx_lldp_rem_man_addr_table = mib_table((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2)) if mibBuilder.loadTexts: tmnxLldpRemManAddrTable.setStatus('current') tmnx_lldp_rem_man_addr_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1)).setIndexNames((0, 'TIMETRA-LLDP-MIB', 'tmnxLldpRemTimeMark'), (0, 'IF-MIB', 'ifIndex'), (0, 'TIMETRA-LLDP-MIB', 'tmnxLldpRemLocalDestMACAddress'), (0, 'TIMETRA-LLDP-MIB', 'tmnxLldpRemIndex'), (0, 'TIMETRA-LLDP-MIB', 'tmnxLldpRemManAddrSubtype'), (0, 'TIMETRA-LLDP-MIB', 'tmnxLldpRemManAddr')) if mibBuilder.loadTexts: tmnxLldpRemManAddrEntry.setStatus('current') tmnx_lldp_rem_man_addr_subtype = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 1), address_family_numbers()) if mibBuilder.loadTexts: tmnxLldpRemManAddrSubtype.setStatus('current') tmnx_lldp_rem_man_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 2), lldp_man_address()) if mibBuilder.loadTexts: tmnxLldpRemManAddr.setStatus('current') tmnx_lldp_rem_man_addr_if_subtype = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 3), lldp_man_addr_if_subtype()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpRemManAddrIfSubtype.setStatus('current') tmnx_lldp_rem_man_addr_if_id = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpRemManAddrIfId.setStatus('current') tmnx_lldp_rem_man_addr_oid = mib_table_column((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 5), object_identifier()).setMaxAccess('readonly') if mibBuilder.loadTexts: tmnxLldpRemManAddrOID.setStatus('current') tmnx_lldp_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 1)) tmnx_lldp_groups = mib_identifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2)) tmnx_lldp_compliance = module_compliance((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 1, 1)).setObjects(('TIMETRA-LLDP-MIB', 'tmnxLldpConfigGroup'), ('TIMETRA-LLDP-MIB', 'tmnxLldpStatsRxGroup'), ('TIMETRA-LLDP-MIB', 'tmnxLldpStatsTxGroup'), ('TIMETRA-LLDP-MIB', 'tmnxLldpLocSysGroup'), ('TIMETRA-LLDP-MIB', 'tmnxLldpRemSysGroup'), ('TIMETRA-LLDP-MIB', 'tmnxLldpRemManAddrGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnx_lldp_compliance = tmnxLldpCompliance.setStatus('current') tmnx_lldp_config_group = object_group((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 1)).setObjects(('TIMETRA-LLDP-MIB', 'tmnxLldpTxCreditMax'), ('TIMETRA-LLDP-MIB', 'tmnxLldpMessageFastTx'), ('TIMETRA-LLDP-MIB', 'tmnxLldpMessageFastTxInit'), ('TIMETRA-LLDP-MIB', 'tmnxLldpAdminStatus'), ('TIMETRA-LLDP-MIB', 'tmnxLldpPortCfgAdminStatus'), ('TIMETRA-LLDP-MIB', 'tmnxLldpPortCfgNotifyEnable'), ('TIMETRA-LLDP-MIB', 'tmnxLldpPortCfgTLVsTxEnable'), ('TIMETRA-LLDP-MIB', 'tmnxLldpPortCfgManAddrTxEnabled'), ('TIMETRA-LLDP-MIB', 'tmnxLldpPortCfgManAddrSubtype'), ('TIMETRA-LLDP-MIB', 'tmnxLldpPortCfgManAddress'), ('TIMETRA-LLDP-MIB', 'tmnxLldpDestMacAddress')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnx_lldp_config_group = tmnxLldpConfigGroup.setStatus('current') tmnx_lldp_stats_rx_group = object_group((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 2)).setObjects(('TIMETRA-LLDP-MIB', 'tmnxLldpStatsRxPortFrameDiscard'), ('TIMETRA-LLDP-MIB', 'tmnxLldpStatsRxPortFrameErrs'), ('TIMETRA-LLDP-MIB', 'tmnxLldpStatsRxPortFrames'), ('TIMETRA-LLDP-MIB', 'tmnxLldpStatsRxPortTLVDiscard'), ('TIMETRA-LLDP-MIB', 'tmnxLldpStatsRxPortTLVUnknown'), ('TIMETRA-LLDP-MIB', 'tmnxLldpStatsRxPortAgeouts')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnx_lldp_stats_rx_group = tmnxLldpStatsRxGroup.setStatus('current') tmnx_lldp_stats_tx_group = object_group((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 3)).setObjects(('TIMETRA-LLDP-MIB', 'tmnxLldpStatsTxPortFrames'), ('TIMETRA-LLDP-MIB', 'tmnxLldpStatsTxLLDPDULengthErrs')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnx_lldp_stats_tx_group = tmnxLldpStatsTxGroup.setStatus('current') tmnx_lldp_loc_sys_group = object_group((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 4)).setObjects(('TIMETRA-LLDP-MIB', 'tmnxLldpLocPortIdSubtype'), ('TIMETRA-LLDP-MIB', 'tmnxLldpLocPortId'), ('TIMETRA-LLDP-MIB', 'tmnxLldpLocPortDesc')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnx_lldp_loc_sys_group = tmnxLldpLocSysGroup.setStatus('current') tmnx_lldp_rem_sys_group = object_group((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 5)).setObjects(('TIMETRA-LLDP-MIB', 'tmnxLldpRemChassisIdSubtype'), ('TIMETRA-LLDP-MIB', 'tmnxLldpRemChassisId'), ('TIMETRA-LLDP-MIB', 'tmnxLldpRemPortIdSubtype'), ('TIMETRA-LLDP-MIB', 'tmnxLldpRemPortId'), ('TIMETRA-LLDP-MIB', 'tmnxLldpRemPortDesc'), ('TIMETRA-LLDP-MIB', 'tmnxLldpRemSysName'), ('TIMETRA-LLDP-MIB', 'tmnxLldpRemSysDesc'), ('TIMETRA-LLDP-MIB', 'tmnxLldpRemSysCapSupported'), ('TIMETRA-LLDP-MIB', 'tmnxLldpRemSysCapEnabled')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnx_lldp_rem_sys_group = tmnxLldpRemSysGroup.setStatus('current') tmnx_lldp_rem_man_addr_group = object_group((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 6)).setObjects(('TIMETRA-LLDP-MIB', 'tmnxLldpRemManAddrIfSubtype'), ('TIMETRA-LLDP-MIB', 'tmnxLldpRemManAddrIfId'), ('TIMETRA-LLDP-MIB', 'tmnxLldpRemManAddrOID')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnx_lldp_rem_man_addr_group = tmnxLldpRemManAddrGroup.setStatus('current') mibBuilder.exportSymbols('TIMETRA-LLDP-MIB', tmnxLldpLocPortDestMACAddress=tmnxLldpLocPortDestMACAddress, tmnxLldpStatsRxPortTable=tmnxLldpStatsRxPortTable, tmnxLldpRemSysCapEnabled=tmnxLldpRemSysCapEnabled, tmnxLldpStatsRxPortFrameErrs=tmnxLldpStatsRxPortFrameErrs, tmnxLldpLocSysGroup=tmnxLldpLocSysGroup, tmnxLldpStatsTxPortTable=tmnxLldpStatsTxPortTable, tmnxLldpLocalSystemData=tmnxLldpLocalSystemData, tmnxLldpStatsTxPortEntry=tmnxLldpStatsTxPortEntry, tmnxLldpPortConfigTable=tmnxLldpPortConfigTable, tmnxLldpStatsTxDestMACAddress=tmnxLldpStatsTxDestMACAddress, tmnxLldpPortCfgTLVsTxEnable=tmnxLldpPortCfgTLVsTxEnable, tmnxLldpStatsRxDestMACAddress=tmnxLldpStatsRxDestMACAddress, tmnxLldpStatsRxPortFrames=tmnxLldpStatsRxPortFrames, tmnxLldpPortCfgManAddrSubtype=tmnxLldpPortCfgManAddrSubtype, tmnxLldpPortCfgAddressIndex=tmnxLldpPortCfgAddressIndex, tmnxLldpRemSysName=tmnxLldpRemSysName, tmnxLldpRemManAddrIfId=tmnxLldpRemManAddrIfId, tmnxLldpTxCreditMax=tmnxLldpTxCreditMax, tmnxLldpLocPortEntry=tmnxLldpLocPortEntry, tmnxLldpStatsRxPortEntry=tmnxLldpStatsRxPortEntry, tmnxLldpRemManAddr=tmnxLldpRemManAddr, tmnxLldpDestAddressTable=tmnxLldpDestAddressTable, tmnxLldpDestAddressTableEntry=tmnxLldpDestAddressTableEntry, tmnxLldpGroups=tmnxLldpGroups, tmnxLldpPortCfgManAddrTxEnabled=tmnxLldpPortCfgManAddrTxEnabled, tmnxLldpDestMacAddress=tmnxLldpDestMacAddress, tmnxLldpRemoteSystemsData=tmnxLldpRemoteSystemsData, tmnxLldpPortCfgDestAddressIndex=tmnxLldpPortCfgDestAddressIndex, tmnxLldpRemManAddrSubtype=tmnxLldpRemManAddrSubtype, tmnxLldpRemPortIdSubtype=tmnxLldpRemPortIdSubtype, tmnxLldpRemChassisIdSubtype=tmnxLldpRemChassisIdSubtype, tmnxLldpRemSysGroup=tmnxLldpRemSysGroup, tmnxLldpPortCfgNotifyEnable=tmnxLldpPortCfgNotifyEnable, tmnxLldpRemManAddrOID=tmnxLldpRemManAddrOID, tmnxLldpLocPortIdSubtype=tmnxLldpLocPortIdSubtype, PYSNMP_MODULE_ID=tmnxLldpMIBModule, tmnxLldpStatsRxPortFrameDiscard=tmnxLldpStatsRxPortFrameDiscard, tmnxLldpStatsRxPortAgeouts=tmnxLldpStatsRxPortAgeouts, tmnxLldpCompliances=tmnxLldpCompliances, tmnxLldpStatsRxPortTLVDiscard=tmnxLldpStatsRxPortTLVDiscard, tmnxLldpMIBModule=tmnxLldpMIBModule, TmnxLldpManAddressIndex=TmnxLldpManAddressIndex, tmnxLldpLocPortTable=tmnxLldpLocPortTable, tmnxLldpConfigManAddrPortsTable=tmnxLldpConfigManAddrPortsTable, tmnxLldpConfiguration=tmnxLldpConfiguration, tmnxLldpRemPortId=tmnxLldpRemPortId, tmnxLldpRemTable=tmnxLldpRemTable, tmnxLldpPortCfgManAddress=tmnxLldpPortCfgManAddress, tmnxLldpRemLocalDestMACAddress=tmnxLldpRemLocalDestMACAddress, tmnxLldpObjects=tmnxLldpObjects, tmnxLldpLocPortId=tmnxLldpLocPortId, tmnxLldpPortCfgAdminStatus=tmnxLldpPortCfgAdminStatus, tmnxLldpRemTimeMark=tmnxLldpRemTimeMark, tmnxLldpRemSysCapSupported=tmnxLldpRemSysCapSupported, tmnxLldpConfigGroup=tmnxLldpConfigGroup, tmnxLldpRemManAddrTable=tmnxLldpRemManAddrTable, tmnxLldpRemEntry=tmnxLldpRemEntry, tmnxLldpAddressTableIndex=tmnxLldpAddressTableIndex, tmnxLldpRemChassisId=tmnxLldpRemChassisId, tmnxLldpNotifications=tmnxLldpNotifications, tmnxLldpRemManAddrIfSubtype=tmnxLldpRemManAddrIfSubtype, tmnxLldpCompliance=tmnxLldpCompliance, tmnxLldpRemIndex=tmnxLldpRemIndex, tmnxLldpMessageFastTx=tmnxLldpMessageFastTx, tmnxLldpStatsTxLLDPDULengthErrs=tmnxLldpStatsTxLLDPDULengthErrs, TmnxLldpDestAddressTableIndex=TmnxLldpDestAddressTableIndex, tmnxLldpRemManAddrEntry=tmnxLldpRemManAddrEntry, tmnxLldpAdminStatus=tmnxLldpAdminStatus, tmnxLldpStatistics=tmnxLldpStatistics, tmnxLldpRemManAddrGroup=tmnxLldpRemManAddrGroup, tmnxLldpPortConfigEntry=tmnxLldpPortConfigEntry, tmnxLldpStatsTxGroup=tmnxLldpStatsTxGroup, tmnxLldpMessageFastTxInit=tmnxLldpMessageFastTxInit, tmnxLldpConfigManAddrPortsEntry=tmnxLldpConfigManAddrPortsEntry, tmnxLldpRemSysDesc=tmnxLldpRemSysDesc, tmnxLldpStatsRxPortTLVUnknown=tmnxLldpStatsRxPortTLVUnknown, tmnxLldpRemPortDesc=tmnxLldpRemPortDesc, tmnxLldpConformance=tmnxLldpConformance, tmnxLldpLocPortDesc=tmnxLldpLocPortDesc, tmnxLldpStatsRxGroup=tmnxLldpStatsRxGroup, tmnxLldpStatsTxPortFrames=tmnxLldpStatsTxPortFrames)
class kdtree: def __init__(self, points, dimensions): self.dimensions = dimensions self.tree = self._build([(i, p) for i,p in enumerate(points)]) def closest(self, point): return self._closest(self.tree, point) def _build(self,points, depth=0): n = len(points) if n<= 0: return None dimension = depth % self.dimensions sorted_points = sorted(points, key=lambda point:point[1][dimension]) mid = n//2 return { 'mid':sorted_points[mid], 'left':self._build(sorted_points[:mid], depth+1), 'right':self._build(sorted_points[mid+1:], depth+1) } def _distance(self, point, node): if point == None or node == None: return float('Inf') d = 0 for p,n in zip(list(point),list(node[1])): d += (p - n)**2 return d def _closest(self, root, point, depth=0): if root is None: return None dimension = depth % self.dimensions mid_point = root['mid'] next_branch = root['left'] if point[dimension] < mid_point[1][dimension] else root['right'] opposite_branch = root['right'] if point[dimension] < mid_point[1][dimension] else root['left'] best_in_next_branch = self._closest(next_branch, point, depth+1) distance_to_mid_point = self._distance(point, mid_point) distance_to_next_branch = self._distance(point, best_in_next_branch) best = best_in_next_branch if distance_to_next_branch < distance_to_mid_point else mid_point best_distance = min(distance_to_next_branch, distance_to_mid_point) if best_distance > abs(point[dimension] - mid_point[1][dimension]): best_in_opposite_branch = self._closest(opposite_branch, point, depth+1) distance_to_opposite_branch = self._distance(point, best_in_opposite_branch) best = best_in_opposite_branch if distance_to_opposite_branch < best_distance else best return best
class Kdtree: def __init__(self, points, dimensions): self.dimensions = dimensions self.tree = self._build([(i, p) for (i, p) in enumerate(points)]) def closest(self, point): return self._closest(self.tree, point) def _build(self, points, depth=0): n = len(points) if n <= 0: return None dimension = depth % self.dimensions sorted_points = sorted(points, key=lambda point: point[1][dimension]) mid = n // 2 return {'mid': sorted_points[mid], 'left': self._build(sorted_points[:mid], depth + 1), 'right': self._build(sorted_points[mid + 1:], depth + 1)} def _distance(self, point, node): if point == None or node == None: return float('Inf') d = 0 for (p, n) in zip(list(point), list(node[1])): d += (p - n) ** 2 return d def _closest(self, root, point, depth=0): if root is None: return None dimension = depth % self.dimensions mid_point = root['mid'] next_branch = root['left'] if point[dimension] < mid_point[1][dimension] else root['right'] opposite_branch = root['right'] if point[dimension] < mid_point[1][dimension] else root['left'] best_in_next_branch = self._closest(next_branch, point, depth + 1) distance_to_mid_point = self._distance(point, mid_point) distance_to_next_branch = self._distance(point, best_in_next_branch) best = best_in_next_branch if distance_to_next_branch < distance_to_mid_point else mid_point best_distance = min(distance_to_next_branch, distance_to_mid_point) if best_distance > abs(point[dimension] - mid_point[1][dimension]): best_in_opposite_branch = self._closest(opposite_branch, point, depth + 1) distance_to_opposite_branch = self._distance(point, best_in_opposite_branch) best = best_in_opposite_branch if distance_to_opposite_branch < best_distance else best return best
def A_type_annotation(integer: int, boolean: bool, string: str): pass def B_annotation_as_documentation(argument: 'One of the usages in PEP-3107'): pass def C_annotation_and_default(integer: int=42, list_: list=None): pass def D_annotated_kw_only_args(*, kwo: int, with_default: str='value'): pass def E_annotated_varags_and_kwargs(*varargs: int, **kwargs: "This feels odd..."): pass
def a_type_annotation(integer: int, boolean: bool, string: str): pass def b_annotation_as_documentation(argument: 'One of the usages in PEP-3107'): pass def c_annotation_and_default(integer: int=42, list_: list=None): pass def d_annotated_kw_only_args(*, kwo: int, with_default: str='value'): pass def e_annotated_varags_and_kwargs(*varargs: int, **kwargs: 'This feels odd...'): pass
class Solution: def addSpaces(self, s: str, spaces: List[int]) -> str: ans = "" prev = 0 for sp in spaces: ans += s[prev:sp] + " " prev = sp return ans + s[prev:]
class Solution: def add_spaces(self, s: str, spaces: List[int]) -> str: ans = '' prev = 0 for sp in spaces: ans += s[prev:sp] + ' ' prev = sp return ans + s[prev:]
print('Congratulations on running this script!!') msg = 'hello world' print(msg)
print('Congratulations on running this script!!') msg = 'hello world' print(msg)
def test_post_sub_category(app, client): mock_request_data = { "category_fk": "47314685-54c1-4863-9918-09f58b981eea", "name": "teste", "description": "testado testando" } response = client.post('/sub_categorys', json=mock_request_data) assert response.status_code == 201 expected = 'successfully registered' assert expected in response.get_data(as_text=True) def test_get_sub_categorys(app, client): response = client.get('/sub_categorys') assert response.status_code == 200 expected = 'successfully fetched' assert expected in response.get_data(as_text=True) def test_get_sub_category_by_id(app, client): response = client.get('/sub_categorys/d61829b1-3e6b-4cc5-83d4-8381b71a613c') assert response.status_code == 201 expected = 'successfully fetched' assert expected in response.get_data(as_text=True) def test_update_sub_catgeory(app, client): mock_request_data = { "category_fk": "47314685-54c1-4863-9918-09f58b981eea", "name": "teste update", "description": "update com sucesso" } response = client.put('/sub_categorys/d61829b1-3e6b-4cc5-83d4-8381b71a613c', json=mock_request_data) assert response.status_code == 201 expected = 'successfully updated' assert expected in response.get_data(as_text=True) def test_delete_sub_catgeory(app, client): response = client.delete('/sub_categorys/e59999a5-ba37-4e05-9b06-18ca88c3ffce') assert response.status_code == 404 expected = 'sub category dont exist' assert expected in response.get_data(as_text=True)
def test_post_sub_category(app, client): mock_request_data = {'category_fk': '47314685-54c1-4863-9918-09f58b981eea', 'name': 'teste', 'description': 'testado testando'} response = client.post('/sub_categorys', json=mock_request_data) assert response.status_code == 201 expected = 'successfully registered' assert expected in response.get_data(as_text=True) def test_get_sub_categorys(app, client): response = client.get('/sub_categorys') assert response.status_code == 200 expected = 'successfully fetched' assert expected in response.get_data(as_text=True) def test_get_sub_category_by_id(app, client): response = client.get('/sub_categorys/d61829b1-3e6b-4cc5-83d4-8381b71a613c') assert response.status_code == 201 expected = 'successfully fetched' assert expected in response.get_data(as_text=True) def test_update_sub_catgeory(app, client): mock_request_data = {'category_fk': '47314685-54c1-4863-9918-09f58b981eea', 'name': 'teste update', 'description': 'update com sucesso'} response = client.put('/sub_categorys/d61829b1-3e6b-4cc5-83d4-8381b71a613c', json=mock_request_data) assert response.status_code == 201 expected = 'successfully updated' assert expected in response.get_data(as_text=True) def test_delete_sub_catgeory(app, client): response = client.delete('/sub_categorys/e59999a5-ba37-4e05-9b06-18ca88c3ffce') assert response.status_code == 404 expected = 'sub category dont exist' assert expected in response.get_data(as_text=True)
# %% class WalletSwiss: coversion_rates = {"usd" :1.10, "gpd": 0.81, "euro": 0.95, "yen": 123.84 } #shows swiss conversion rates for each each currency starting at $1 def __init__(self,currency_amount): self.currency_amount = currency_amount self.currency_type = "franc" def convert_currency(self,currency_type): conversion_rate = WalletSwiss.coversion_rates[currency_type] converted_amount = self.currency_amount * conversion_rate return converted_amount # TODO Updating conversion rate function # %%
class Walletswiss: coversion_rates = {'usd': 1.1, 'gpd': 0.81, 'euro': 0.95, 'yen': 123.84} def __init__(self, currency_amount): self.currency_amount = currency_amount self.currency_type = 'franc' def convert_currency(self, currency_type): conversion_rate = WalletSwiss.coversion_rates[currency_type] converted_amount = self.currency_amount * conversion_rate return converted_amount
# # from src/whrnd.c # # void init_rnd(int, int, int) to whrnd; .init # double rnd(void) to whrnd; .__call__ # class whrnd: def __init__(self, x=1, y=1, z=1): self.init(x, y, z) def init(self, x, y, z): self.x, self.y, self.z = x, y, z def __call__(self): self.x = 171 * (self.x % 177) - 2 * (self.x // 177) self.y = 172 * (self.y % 176) - 35 * (self.y // 176) self.z = 170 * (self.z % 178) - 63 * (self.z // 178) if self.x < 0: self.x += 30269 if self.y < 0: self.y += 30307 if self.z < 0: self.z += 30323 r = self.x / 30269 + self.y / 30307 + self.z / 30323 while r >= 1: r -= 1 return r
class Whrnd: def __init__(self, x=1, y=1, z=1): self.init(x, y, z) def init(self, x, y, z): (self.x, self.y, self.z) = (x, y, z) def __call__(self): self.x = 171 * (self.x % 177) - 2 * (self.x // 177) self.y = 172 * (self.y % 176) - 35 * (self.y // 176) self.z = 170 * (self.z % 178) - 63 * (self.z // 178) if self.x < 0: self.x += 30269 if self.y < 0: self.y += 30307 if self.z < 0: self.z += 30323 r = self.x / 30269 + self.y / 30307 + self.z / 30323 while r >= 1: r -= 1 return r
# # PySNMP MIB module DNOS-DCBX-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DNOS-DCBX-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:51:23 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint") dnOS, = mibBuilder.importSymbols("DELL-REF-MIB", "dnOS") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Integer32, Counter32, MibIdentifier, TimeTicks, ObjectIdentity, NotificationType, Gauge32, ModuleIdentity, Unsigned32, Counter64, iso, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Integer32", "Counter32", "MibIdentifier", "TimeTicks", "ObjectIdentity", "NotificationType", "Gauge32", "ModuleIdentity", "Unsigned32", "Counter64", "iso", "Bits") TextualConvention, MacAddress, RowStatus, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "MacAddress", "RowStatus", "DisplayString") fastPathDCBX = ModuleIdentity((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58)) fastPathDCBX.setRevisions(('2011-04-20 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: fastPathDCBX.setRevisionsDescriptions(('Initial version.',)) if mibBuilder.loadTexts: fastPathDCBX.setLastUpdated('201101260000Z') if mibBuilder.loadTexts: fastPathDCBX.setOrganization('Dell, Inc.') if mibBuilder.loadTexts: fastPathDCBX.setContactInfo('') if mibBuilder.loadTexts: fastPathDCBX.setDescription('The MIB definitions Data Center Bridging Exchange Protocol.') class DcbxPortRole(TextualConvention, Integer32): description = '.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("manual", 1), ("autoup", 2), ("autodown", 3), ("configSource", 4)) class DcbxVersion(TextualConvention, Integer32): description = '.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("auto", 1), ("ieee", 2), ("cin", 3), ("cee", 4)) agentDcbxGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1)) agentDcbxTable = MibTable((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1), ) if mibBuilder.loadTexts: agentDcbxTable.setStatus('current') if mibBuilder.loadTexts: agentDcbxTable.setDescription('A table providing configuration of DCBX per interface.') agentDcbxEntry = MibTableRow((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1), ).setIndexNames((0, "DNOS-DCBX-MIB", "agentDcbxIntfIndex")) if mibBuilder.loadTexts: agentDcbxEntry.setStatus('current') if mibBuilder.loadTexts: agentDcbxEntry.setDescription('DCBX configuration for a port.') agentDcbxIntfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: agentDcbxIntfIndex.setStatus('current') if mibBuilder.loadTexts: agentDcbxIntfIndex.setDescription('This is a unique index for an entry in the agentDcbxTable. A non-zero value indicates the ifIndex for the corresponding interface entry in the ifTable.') agentDcbxAutoCfgPortRole = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 2), DcbxPortRole().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentDcbxAutoCfgPortRole.setStatus('current') if mibBuilder.loadTexts: agentDcbxAutoCfgPortRole.setDescription(' Ports operating in the manual role do not have their configuration affected by peer devices or by internal propagation of configuration. These ports will advertise their configuration to their peer if DCBX is enabled on that port. Auto-up: Advertises a configuration, but is also willing to accept a configuration from the link-partner and propagate it internally to the auto-downstream ports as well as receive configuration propagated internally by other auto-upstream ports. Auto-down: Advertises a configuration but is not willing to accept one from the link partner. However, the port will accept a configuration propagated internally by the configuration source. Configuration Source:In this role, the port has been manually selected to be the configuration source. Configuration received over this port is propagated to the other auto-configuration ports.') agentDcbxVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 3), DcbxVersion().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentDcbxVersion.setStatus('deprecated') if mibBuilder.loadTexts: agentDcbxVersion.setDescription('CIN is Cisco Intel Nuova DCBX (version 1.0). CEE is converged enhanced ethernet DCBX (version 1.06). IEEE is 802-1 az version. The default value is auto. DCBX supports the legacy implementations v1.0 (CIN) and v1.06 (CEE) in addition to standard IEEE version 2.4 DCBX. 1.DCBX starts in standard IEEE mode by sending an IEEE standard version 2.4 DCBX frame. If the peer responds, then IEEE standard version 2.4 DCBX is used,Starts means after a link up, a DCBX timeout (or multiple peer condition) or when commanded by the network operator. If DCBX receives a DCBX frame with an OUI indicating a legacy version, it immediately switches into legacy mode for the detected version and does not wait for the 3x LLDP fast timeout. 2.If no IEEE DCBX response is received within 3 times the LLDP fast transmit timeout period, DCBX immediately transmits a version 1.06 DCBX frame with the appropriate version number. If DCBX receives a DCBX frame with an OUI indicating IEEE standard support, it immediately switches into IEEE standard mode and does not wait for the timer. If DCBX receives a DCBX frame with an OUI indicating legacy mode and a version number indicating version 1.0 support, it immediately switches into legacy 1.0 mode and does not wait for the timer. 3.If no version 1.06 response is received within 3 times the DCBX fast transmit timeout period, DCBX falls back to version 1.0 and immediately transmits a version 1.0 frame. If no response is received within 3 times the DCBX fast transmit period, DCBX waits the standard LLDP timeout period, and then begins again with step 1. If DCBX receives a DCBX frame with an OUI indicating IEEE standard mode, it immediately switches into IEEE standard mode.') agentDcbxSupportedTLVs = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 4), Bits().clone(namedValues=NamedValues(("pfc", 0), ("etsConfig", 1), ("etsRecom", 2), ("applicationPriority", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxSupportedTLVs.setStatus('current') if mibBuilder.loadTexts: agentDcbxSupportedTLVs.setDescription("Bitmap that includes the supported set of DCBX LLDP TLVs the device is capable of and whose transmission is allowed on the local LLDP agent by network management. Having the bit 'pfc(0)' set indicates that the LLDP transmit PFC TLV as part of DCBX TLVs. Having the bit 'etcConfig(1)' set indicates that the LLDP transmit ETS configuration TLV as part of DCBX TLVs. Having the bit 'etsRecom(2)' set indicates that transmit ETS Recomdenation TLV as part of DCBX TLVs. Having the bit 'applicationPriority(3)' set indicates that the LLDP transmit applicationPriority TLV as part of DCBX TLVs.") agentDcbxConfigTLVsTxEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 5), Bits().clone(namedValues=NamedValues(("pfc", 0), ("etsConfig", 1), ("etsRecom", 2), ("applicationPriority", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentDcbxConfigTLVsTxEnable.setStatus('current') if mibBuilder.loadTexts: agentDcbxConfigTLVsTxEnable.setDescription("Bitmap that includes the DCBX defined set of LLDP TLVs the device is capable of and whose transmission is allowed on the local LLDP agent by network management. Having the bit 'pfc(0)' set indicates that the LLDP transmit PFC TLV as part of DCBX TLVs. Having the bit 'etcConfig(1)' set indicates that the LLDP transmit ETS configuration TLV as part of DCBX TLVs. Having the bit 'etsRecom(2)' set indicates that transmit ETS Recomdenation TLV as part of DCBX TLVs. Having the bit 'applicationPriority(3)' set indicates that the LLDP transmit applicationPriority TLV as part of DCBX TLVs.") agentDcbxStatusTable = MibTable((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2), ) if mibBuilder.loadTexts: agentDcbxStatusTable.setStatus('current') if mibBuilder.loadTexts: agentDcbxStatusTable.setDescription('.') agentDcbxStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1), ).setIndexNames((0, "DNOS-DCBX-MIB", "agentDcbxIntfIndex")) if mibBuilder.loadTexts: agentDcbxStatusEntry.setStatus('current') if mibBuilder.loadTexts: agentDcbxStatusEntry.setDescription('.') agentDcbxOperVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 2), DcbxVersion().clone(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxOperVersion.setStatus('current') if mibBuilder.loadTexts: agentDcbxOperVersion.setDescription('Specifies the DCBX mode in which the interface is currently operating.') agentDcbxPeerMACaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxPeerMACaddress.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerMACaddress.setDescription('MAC Address of the DCBX peer.') agentDcbxCfgSource = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("true", 1), ("false", 0)))).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxCfgSource.setStatus('current') if mibBuilder.loadTexts: agentDcbxCfgSource.setDescription('Indicates if this port is the source of configuration information for auto-* ports.') agentDcbxMultiplePeerCount = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxMultiplePeerCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxMultiplePeerCount.setDescription('Indicates number of times multiple peers were detected. A duplicate peer is when more than one DCBX peer is detected on a port.') agentDcbxPeerRemovedCount = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxPeerRemovedCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerRemovedCount.setDescription('.') agentDcbxPeerOperVersionNum = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxPeerOperVersionNum.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerOperVersionNum.setDescription('Specifies the operational version of the peer DCBX device. Valid only when peer device is a CEE/CIN DCBX device.') agentDcbxPeerMaxVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 8), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxPeerMaxVersion.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerMaxVersion.setDescription('Specifies the max version of the peer DCBX device. Valid only when peer device is CEE/CIN DCBX device.') agentDcbxSeqNum = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 9), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxSeqNum.setStatus('current') if mibBuilder.loadTexts: agentDcbxSeqNum.setDescription('Specifies the current sequence number that is sent in DCBX control TLVs in CEE/CIN Mode.') agentDcbxAckNum = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 10), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxAckNum.setStatus('current') if mibBuilder.loadTexts: agentDcbxAckNum.setDescription('Specifies the current ACK number that is to be sent to peer in DCBX control TLVs in CEE/CIN Mode.') agentDcbxPeerRcvdAckNum = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 11), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxPeerRcvdAckNum.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerRcvdAckNum.setDescription('Specifies the current ACK number that is sent by peer in DCBX control TLV in CEE/CIN Mode.') agentDcbxTxCount = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 12), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxTxCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxTxCount.setDescription('The number of DCBX frames transmitted per interface.') agentDcbxRxCount = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 13), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxRxCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxRxCount.setDescription('The number of DCBX frames received per interface.') agentDcbxErrorFramesCount = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 14), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxErrorFramesCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxErrorFramesCount.setDescription('The number of DCBX frames discarded due to errors in the frame.') agentDcbxUnknownTLVsCount = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 15), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxUnknownTLVsCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxUnknownTLVsCount.setDescription('The number of DCBX (PFC, ETS, Application Priority or other) TLVs not recognized.') agentDcbxGroupGlobalConfGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 3)) agentDcbxGlobalConfVersion = MibScalar((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 3, 1), DcbxVersion().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentDcbxGlobalConfVersion.setStatus('current') if mibBuilder.loadTexts: agentDcbxGlobalConfVersion.setDescription('CIN is Cisco Intel Nuova DCBX (version 1.0). CEE is converged enhanced ethernet DCBX (version 1.06). IEEE is 802-1 az version. The default value is auto. DCBX supports the legacy implementations v1.0 (CIN) and v1.06 (CEE) in addition to standard IEEE version 2.4 DCBX. 1.DCBX starts in standard IEEE mode by sending an IEEE standard version 2.4 DCBX frame. If the peer responds, then IEEE standard version 2.4 DCBX is used,Starts means after a link up, a DCBX timeout (or multiple peer condition) or when commanded by the network operator. If DCBX receives a DCBX frame with an OUI indicating a legacy version, it immediately switches into legacy mode for the detected version and does not wait for the 3x LLDP fast timeout. 2.If no IEEE DCBX response is received within 3 times the LLDP fast transmit timeout period, DCBX immediately transmits a version 1.06 DCBX frame with the appropriate version number. If DCBX receives a DCBX frame with an OUI indicating IEEE standard support, it immediately switches into IEEE standard mode and does not wait for the timer. If DCBX receives a DCBX frame with an OUI indicating legacy mode and a version number indicating version 1.0 support, it immediately switches into legacy 1.0 mode and does not wait for the timer. 3.If no version 1.06 response is received within 3 times the DCBX fast transmit timeout period, DCBX falls back to version 1.0 and immediately transmits a version 1.0 frame. If no response is received within 3 times the DCBX fast transmit period, DCBX waits the standard LLDP timeout period, and then begins again with step 1. If DCBX receives a DCBX frame with an OUI indicating IEEE standard mode, it immediately switches into IEEE standard mode.') mibBuilder.exportSymbols("DNOS-DCBX-MIB", agentDcbxGroupGlobalConfGroup=agentDcbxGroupGlobalConfGroup, agentDcbxOperVersion=agentDcbxOperVersion, agentDcbxAckNum=agentDcbxAckNum, agentDcbxSupportedTLVs=agentDcbxSupportedTLVs, agentDcbxStatusEntry=agentDcbxStatusEntry, agentDcbxUnknownTLVsCount=agentDcbxUnknownTLVsCount, agentDcbxEntry=agentDcbxEntry, agentDcbxTable=agentDcbxTable, agentDcbxRxCount=agentDcbxRxCount, agentDcbxPeerRemovedCount=agentDcbxPeerRemovedCount, agentDcbxCfgSource=agentDcbxCfgSource, agentDcbxPeerRcvdAckNum=agentDcbxPeerRcvdAckNum, agentDcbxVersion=agentDcbxVersion, DcbxPortRole=DcbxPortRole, agentDcbxGroup=agentDcbxGroup, agentDcbxPeerOperVersionNum=agentDcbxPeerOperVersionNum, agentDcbxPeerMaxVersion=agentDcbxPeerMaxVersion, fastPathDCBX=fastPathDCBX, agentDcbxIntfIndex=agentDcbxIntfIndex, agentDcbxStatusTable=agentDcbxStatusTable, agentDcbxAutoCfgPortRole=agentDcbxAutoCfgPortRole, DcbxVersion=DcbxVersion, PYSNMP_MODULE_ID=fastPathDCBX, agentDcbxTxCount=agentDcbxTxCount, agentDcbxErrorFramesCount=agentDcbxErrorFramesCount, agentDcbxConfigTLVsTxEnable=agentDcbxConfigTLVsTxEnable, agentDcbxPeerMACaddress=agentDcbxPeerMACaddress, agentDcbxGlobalConfVersion=agentDcbxGlobalConfVersion, agentDcbxMultiplePeerCount=agentDcbxMultiplePeerCount, agentDcbxSeqNum=agentDcbxSeqNum)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, single_value_constraint, value_size_constraint, constraints_union, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint') (dn_os,) = mibBuilder.importSymbols('DELL-REF-MIB', 'dnOS') (interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, integer32, counter32, mib_identifier, time_ticks, object_identity, notification_type, gauge32, module_identity, unsigned32, counter64, iso, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'Integer32', 'Counter32', 'MibIdentifier', 'TimeTicks', 'ObjectIdentity', 'NotificationType', 'Gauge32', 'ModuleIdentity', 'Unsigned32', 'Counter64', 'iso', 'Bits') (textual_convention, mac_address, row_status, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'MacAddress', 'RowStatus', 'DisplayString') fast_path_dcbx = module_identity((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58)) fastPathDCBX.setRevisions(('2011-04-20 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: fastPathDCBX.setRevisionsDescriptions(('Initial version.',)) if mibBuilder.loadTexts: fastPathDCBX.setLastUpdated('201101260000Z') if mibBuilder.loadTexts: fastPathDCBX.setOrganization('Dell, Inc.') if mibBuilder.loadTexts: fastPathDCBX.setContactInfo('') if mibBuilder.loadTexts: fastPathDCBX.setDescription('The MIB definitions Data Center Bridging Exchange Protocol.') class Dcbxportrole(TextualConvention, Integer32): description = '.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4)) named_values = named_values(('manual', 1), ('autoup', 2), ('autodown', 3), ('configSource', 4)) class Dcbxversion(TextualConvention, Integer32): description = '.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4)) named_values = named_values(('auto', 1), ('ieee', 2), ('cin', 3), ('cee', 4)) agent_dcbx_group = mib_identifier((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1)) agent_dcbx_table = mib_table((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1)) if mibBuilder.loadTexts: agentDcbxTable.setStatus('current') if mibBuilder.loadTexts: agentDcbxTable.setDescription('A table providing configuration of DCBX per interface.') agent_dcbx_entry = mib_table_row((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1)).setIndexNames((0, 'DNOS-DCBX-MIB', 'agentDcbxIntfIndex')) if mibBuilder.loadTexts: agentDcbxEntry.setStatus('current') if mibBuilder.loadTexts: agentDcbxEntry.setDescription('DCBX configuration for a port.') agent_dcbx_intf_index = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 1), interface_index()) if mibBuilder.loadTexts: agentDcbxIntfIndex.setStatus('current') if mibBuilder.loadTexts: agentDcbxIntfIndex.setDescription('This is a unique index for an entry in the agentDcbxTable. A non-zero value indicates the ifIndex for the corresponding interface entry in the ifTable.') agent_dcbx_auto_cfg_port_role = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 2), dcbx_port_role().clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: agentDcbxAutoCfgPortRole.setStatus('current') if mibBuilder.loadTexts: agentDcbxAutoCfgPortRole.setDescription(' Ports operating in the manual role do not have their configuration affected by peer devices or by internal propagation of configuration. These ports will advertise their configuration to their peer if DCBX is enabled on that port. Auto-up: Advertises a configuration, but is also willing to accept a configuration from the link-partner and propagate it internally to the auto-downstream ports as well as receive configuration propagated internally by other auto-upstream ports. Auto-down: Advertises a configuration but is not willing to accept one from the link partner. However, the port will accept a configuration propagated internally by the configuration source. Configuration Source:In this role, the port has been manually selected to be the configuration source. Configuration received over this port is propagated to the other auto-configuration ports.') agent_dcbx_version = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 3), dcbx_version().clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: agentDcbxVersion.setStatus('deprecated') if mibBuilder.loadTexts: agentDcbxVersion.setDescription('CIN is Cisco Intel Nuova DCBX (version 1.0). CEE is converged enhanced ethernet DCBX (version 1.06). IEEE is 802-1 az version. The default value is auto. DCBX supports the legacy implementations v1.0 (CIN) and v1.06 (CEE) in addition to standard IEEE version 2.4 DCBX. 1.DCBX starts in standard IEEE mode by sending an IEEE standard version 2.4 DCBX frame. If the peer responds, then IEEE standard version 2.4 DCBX is used,Starts means after a link up, a DCBX timeout (or multiple peer condition) or when commanded by the network operator. If DCBX receives a DCBX frame with an OUI indicating a legacy version, it immediately switches into legacy mode for the detected version and does not wait for the 3x LLDP fast timeout. 2.If no IEEE DCBX response is received within 3 times the LLDP fast transmit timeout period, DCBX immediately transmits a version 1.06 DCBX frame with the appropriate version number. If DCBX receives a DCBX frame with an OUI indicating IEEE standard support, it immediately switches into IEEE standard mode and does not wait for the timer. If DCBX receives a DCBX frame with an OUI indicating legacy mode and a version number indicating version 1.0 support, it immediately switches into legacy 1.0 mode and does not wait for the timer. 3.If no version 1.06 response is received within 3 times the DCBX fast transmit timeout period, DCBX falls back to version 1.0 and immediately transmits a version 1.0 frame. If no response is received within 3 times the DCBX fast transmit period, DCBX waits the standard LLDP timeout period, and then begins again with step 1. If DCBX receives a DCBX frame with an OUI indicating IEEE standard mode, it immediately switches into IEEE standard mode.') agent_dcbx_supported_tl_vs = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 4), bits().clone(namedValues=named_values(('pfc', 0), ('etsConfig', 1), ('etsRecom', 2), ('applicationPriority', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxSupportedTLVs.setStatus('current') if mibBuilder.loadTexts: agentDcbxSupportedTLVs.setDescription("Bitmap that includes the supported set of DCBX LLDP TLVs the device is capable of and whose transmission is allowed on the local LLDP agent by network management. Having the bit 'pfc(0)' set indicates that the LLDP transmit PFC TLV as part of DCBX TLVs. Having the bit 'etcConfig(1)' set indicates that the LLDP transmit ETS configuration TLV as part of DCBX TLVs. Having the bit 'etsRecom(2)' set indicates that transmit ETS Recomdenation TLV as part of DCBX TLVs. Having the bit 'applicationPriority(3)' set indicates that the LLDP transmit applicationPriority TLV as part of DCBX TLVs.") agent_dcbx_config_tl_vs_tx_enable = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 5), bits().clone(namedValues=named_values(('pfc', 0), ('etsConfig', 1), ('etsRecom', 2), ('applicationPriority', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: agentDcbxConfigTLVsTxEnable.setStatus('current') if mibBuilder.loadTexts: agentDcbxConfigTLVsTxEnable.setDescription("Bitmap that includes the DCBX defined set of LLDP TLVs the device is capable of and whose transmission is allowed on the local LLDP agent by network management. Having the bit 'pfc(0)' set indicates that the LLDP transmit PFC TLV as part of DCBX TLVs. Having the bit 'etcConfig(1)' set indicates that the LLDP transmit ETS configuration TLV as part of DCBX TLVs. Having the bit 'etsRecom(2)' set indicates that transmit ETS Recomdenation TLV as part of DCBX TLVs. Having the bit 'applicationPriority(3)' set indicates that the LLDP transmit applicationPriority TLV as part of DCBX TLVs.") agent_dcbx_status_table = mib_table((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2)) if mibBuilder.loadTexts: agentDcbxStatusTable.setStatus('current') if mibBuilder.loadTexts: agentDcbxStatusTable.setDescription('.') agent_dcbx_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1)).setIndexNames((0, 'DNOS-DCBX-MIB', 'agentDcbxIntfIndex')) if mibBuilder.loadTexts: agentDcbxStatusEntry.setStatus('current') if mibBuilder.loadTexts: agentDcbxStatusEntry.setDescription('.') agent_dcbx_oper_version = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 2), dcbx_version().clone(1)).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxOperVersion.setStatus('current') if mibBuilder.loadTexts: agentDcbxOperVersion.setDescription('Specifies the DCBX mode in which the interface is currently operating.') agent_dcbx_peer_ma_caddress = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 3), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxPeerMACaddress.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerMACaddress.setDescription('MAC Address of the DCBX peer.') agent_dcbx_cfg_source = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 0))).clone(namedValues=named_values(('true', 1), ('false', 0)))).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxCfgSource.setStatus('current') if mibBuilder.loadTexts: agentDcbxCfgSource.setDescription('Indicates if this port is the source of configuration information for auto-* ports.') agent_dcbx_multiple_peer_count = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 5), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxMultiplePeerCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxMultiplePeerCount.setDescription('Indicates number of times multiple peers were detected. A duplicate peer is when more than one DCBX peer is detected on a port.') agent_dcbx_peer_removed_count = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 6), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxPeerRemovedCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerRemovedCount.setDescription('.') agent_dcbx_peer_oper_version_num = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 7), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxPeerOperVersionNum.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerOperVersionNum.setDescription('Specifies the operational version of the peer DCBX device. Valid only when peer device is a CEE/CIN DCBX device.') agent_dcbx_peer_max_version = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 8), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxPeerMaxVersion.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerMaxVersion.setDescription('Specifies the max version of the peer DCBX device. Valid only when peer device is CEE/CIN DCBX device.') agent_dcbx_seq_num = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 9), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxSeqNum.setStatus('current') if mibBuilder.loadTexts: agentDcbxSeqNum.setDescription('Specifies the current sequence number that is sent in DCBX control TLVs in CEE/CIN Mode.') agent_dcbx_ack_num = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 10), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxAckNum.setStatus('current') if mibBuilder.loadTexts: agentDcbxAckNum.setDescription('Specifies the current ACK number that is to be sent to peer in DCBX control TLVs in CEE/CIN Mode.') agent_dcbx_peer_rcvd_ack_num = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 11), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxPeerRcvdAckNum.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerRcvdAckNum.setDescription('Specifies the current ACK number that is sent by peer in DCBX control TLV in CEE/CIN Mode.') agent_dcbx_tx_count = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 12), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxTxCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxTxCount.setDescription('The number of DCBX frames transmitted per interface.') agent_dcbx_rx_count = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 13), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxRxCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxRxCount.setDescription('The number of DCBX frames received per interface.') agent_dcbx_error_frames_count = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 14), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxErrorFramesCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxErrorFramesCount.setDescription('The number of DCBX frames discarded due to errors in the frame.') agent_dcbx_unknown_tl_vs_count = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 15), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentDcbxUnknownTLVsCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxUnknownTLVsCount.setDescription('The number of DCBX (PFC, ETS, Application Priority or other) TLVs not recognized.') agent_dcbx_group_global_conf_group = mib_identifier((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 3)) agent_dcbx_global_conf_version = mib_scalar((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 3, 1), dcbx_version().clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: agentDcbxGlobalConfVersion.setStatus('current') if mibBuilder.loadTexts: agentDcbxGlobalConfVersion.setDescription('CIN is Cisco Intel Nuova DCBX (version 1.0). CEE is converged enhanced ethernet DCBX (version 1.06). IEEE is 802-1 az version. The default value is auto. DCBX supports the legacy implementations v1.0 (CIN) and v1.06 (CEE) in addition to standard IEEE version 2.4 DCBX. 1.DCBX starts in standard IEEE mode by sending an IEEE standard version 2.4 DCBX frame. If the peer responds, then IEEE standard version 2.4 DCBX is used,Starts means after a link up, a DCBX timeout (or multiple peer condition) or when commanded by the network operator. If DCBX receives a DCBX frame with an OUI indicating a legacy version, it immediately switches into legacy mode for the detected version and does not wait for the 3x LLDP fast timeout. 2.If no IEEE DCBX response is received within 3 times the LLDP fast transmit timeout period, DCBX immediately transmits a version 1.06 DCBX frame with the appropriate version number. If DCBX receives a DCBX frame with an OUI indicating IEEE standard support, it immediately switches into IEEE standard mode and does not wait for the timer. If DCBX receives a DCBX frame with an OUI indicating legacy mode and a version number indicating version 1.0 support, it immediately switches into legacy 1.0 mode and does not wait for the timer. 3.If no version 1.06 response is received within 3 times the DCBX fast transmit timeout period, DCBX falls back to version 1.0 and immediately transmits a version 1.0 frame. If no response is received within 3 times the DCBX fast transmit period, DCBX waits the standard LLDP timeout period, and then begins again with step 1. If DCBX receives a DCBX frame with an OUI indicating IEEE standard mode, it immediately switches into IEEE standard mode.') mibBuilder.exportSymbols('DNOS-DCBX-MIB', agentDcbxGroupGlobalConfGroup=agentDcbxGroupGlobalConfGroup, agentDcbxOperVersion=agentDcbxOperVersion, agentDcbxAckNum=agentDcbxAckNum, agentDcbxSupportedTLVs=agentDcbxSupportedTLVs, agentDcbxStatusEntry=agentDcbxStatusEntry, agentDcbxUnknownTLVsCount=agentDcbxUnknownTLVsCount, agentDcbxEntry=agentDcbxEntry, agentDcbxTable=agentDcbxTable, agentDcbxRxCount=agentDcbxRxCount, agentDcbxPeerRemovedCount=agentDcbxPeerRemovedCount, agentDcbxCfgSource=agentDcbxCfgSource, agentDcbxPeerRcvdAckNum=agentDcbxPeerRcvdAckNum, agentDcbxVersion=agentDcbxVersion, DcbxPortRole=DcbxPortRole, agentDcbxGroup=agentDcbxGroup, agentDcbxPeerOperVersionNum=agentDcbxPeerOperVersionNum, agentDcbxPeerMaxVersion=agentDcbxPeerMaxVersion, fastPathDCBX=fastPathDCBX, agentDcbxIntfIndex=agentDcbxIntfIndex, agentDcbxStatusTable=agentDcbxStatusTable, agentDcbxAutoCfgPortRole=agentDcbxAutoCfgPortRole, DcbxVersion=DcbxVersion, PYSNMP_MODULE_ID=fastPathDCBX, agentDcbxTxCount=agentDcbxTxCount, agentDcbxErrorFramesCount=agentDcbxErrorFramesCount, agentDcbxConfigTLVsTxEnable=agentDcbxConfigTLVsTxEnable, agentDcbxPeerMACaddress=agentDcbxPeerMACaddress, agentDcbxGlobalConfVersion=agentDcbxGlobalConfVersion, agentDcbxMultiplePeerCount=agentDcbxMultiplePeerCount, agentDcbxSeqNum=agentDcbxSeqNum)
description = 'system setup' group = 'lowlevel' display_order = 90 sysconfig = dict( cache = 'localhost', instrument = 'NEUTRA', experiment = 'Exp', datasinks = ['conssink', 'dmnsink', 'livesink', 'asciisink', 'shuttersink'], notifiers = ['email'], ) requires = ['shutters'] modules = [ 'nicos.commands.standard', 'nicos_sinq.commands.sics', 'nicos.commands.imaging', 'nicos_sinq.commands.hmcommands', 'nicos_sinq.commands.epicscommands'] includes = ['notifiers'] devices = dict( NEUTRA = device('nicos.devices.instrument.Instrument', description = 'instrument object', instrument = 'SINQ NEUTRA', responsible = 'Pavel Trtik <pavel.trtik@psi.ch>', operators = ['Paul-Scherrer-Institut (PSI)'], facility = 'SINQ, PSI', doi = 'http://dx.doi.org/10.1080/10589750108953075', website = 'https://www.psi.ch/sinq/NEUTRA/', ), Sample = device('nicos.devices.experiment.Sample', description = 'The defaultsample', ), Exp = device('nicos_sinq.devices.experiment.SinqExperiment', description = 'experiment object', dataroot = configdata('config.DATA_PATH'), sendmail = False, serviceexp = 'Service', sample = 'Sample', ), Space = device('nicos.devices.generic.FreeSpace', description = 'The amount of free space for storing data', path = None, minfree = 5, ), conssink = device('nicos.devices.datasinks.ConsoleScanSink'), asciisink = device('nicos.devices.datasinks.AsciiScanfileSink', filenametemplate = ['neutra%(year)sn%(scancounter)06d.dat'] ), dmnsink = device('nicos.devices.datasinks.DaemonSink'), livesink = device('nicos.devices.datasinks.LiveViewSink', description = "Sink for forwarding live data to the GUI", ), img_index = device('nicos.devices.generic.manual.ManualMove', description = 'Keeps the index of the last measured image', unit = '', abslimits = (0, 1e9), visibility = set(), ), )
description = 'system setup' group = 'lowlevel' display_order = 90 sysconfig = dict(cache='localhost', instrument='NEUTRA', experiment='Exp', datasinks=['conssink', 'dmnsink', 'livesink', 'asciisink', 'shuttersink'], notifiers=['email']) requires = ['shutters'] modules = ['nicos.commands.standard', 'nicos_sinq.commands.sics', 'nicos.commands.imaging', 'nicos_sinq.commands.hmcommands', 'nicos_sinq.commands.epicscommands'] includes = ['notifiers'] devices = dict(NEUTRA=device('nicos.devices.instrument.Instrument', description='instrument object', instrument='SINQ NEUTRA', responsible='Pavel Trtik <pavel.trtik@psi.ch>', operators=['Paul-Scherrer-Institut (PSI)'], facility='SINQ, PSI', doi='http://dx.doi.org/10.1080/10589750108953075', website='https://www.psi.ch/sinq/NEUTRA/'), Sample=device('nicos.devices.experiment.Sample', description='The defaultsample'), Exp=device('nicos_sinq.devices.experiment.SinqExperiment', description='experiment object', dataroot=configdata('config.DATA_PATH'), sendmail=False, serviceexp='Service', sample='Sample'), Space=device('nicos.devices.generic.FreeSpace', description='The amount of free space for storing data', path=None, minfree=5), conssink=device('nicos.devices.datasinks.ConsoleScanSink'), asciisink=device('nicos.devices.datasinks.AsciiScanfileSink', filenametemplate=['neutra%(year)sn%(scancounter)06d.dat']), dmnsink=device('nicos.devices.datasinks.DaemonSink'), livesink=device('nicos.devices.datasinks.LiveViewSink', description='Sink for forwarding live data to the GUI'), img_index=device('nicos.devices.generic.manual.ManualMove', description='Keeps the index of the last measured image', unit='', abslimits=(0, 1000000000.0), visibility=set()))
''' Log in color from https://stackoverflow.com/questions/287871/how-to-print-colored-text-in-terminal-in-python usage : import log log.info("Hello World") log.err("System Error") ''' HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = "\033[1m" def disable(): HEADER = '' OKBLUE = '' OKGREEN = '' WARNING = '' FAIL = '' ENDC = '' def infog( msg): print(OKGREEN + msg + ENDC) def info( msg): print(OKBLUE + msg + ENDC) def warn( msg): print(WARNING + msg + ENDC) def err( msg): print(FAIL + msg + ENDC)
""" Log in color from https://stackoverflow.com/questions/287871/how-to-print-colored-text-in-terminal-in-python usage : import log log.info("Hello World") log.err("System Error") """ header = '\x1b[95m' okblue = '\x1b[94m' okgreen = '\x1b[92m' warning = '\x1b[93m' fail = '\x1b[91m' endc = '\x1b[0m' bold = '\x1b[1m' def disable(): header = '' okblue = '' okgreen = '' warning = '' fail = '' endc = '' def infog(msg): print(OKGREEN + msg + ENDC) def info(msg): print(OKBLUE + msg + ENDC) def warn(msg): print(WARNING + msg + ENDC) def err(msg): print(FAIL + msg + ENDC)
class SpecialError(Exception): """ Exception raised when there is an error while parsing a special. """ def __init__(self, attribute, content=None): self.attribute = attribute self.content = content def __str__(self): return (f"Unable to parse '{self.attribute}'\n" f"Content: '{self.content}'\n")
class Specialerror(Exception): """ Exception raised when there is an error while parsing a special. """ def __init__(self, attribute, content=None): self.attribute = attribute self.content = content def __str__(self): return f"Unable to parse '{self.attribute}'\nContent: '{self.content}'\n"
#!/usr/bin/python # # Provides __ROR4__, __ROR8__, __ROL4__ and __ROL8__ functions. # # Author: Satoshi Tanda # ################################################################################ # The MIT License (MIT) # # Copyright (c) 2014 tandasat # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ################################################################################ def _rol(val, bits, bit_size): return (val << bits % bit_size) & (2 ** bit_size - 1) | \ ((val & (2 ** bit_size - 1)) >> (bit_size - (bits % bit_size))) def _ror(val, bits, bit_size): return ((val & (2 ** bit_size - 1)) >> bits % bit_size) | \ (val << (bit_size - (bits % bit_size)) & (2 ** bit_size - 1)) __ROR4__ = lambda val, bits: _ror(val, bits, 32) __ROR8__ = lambda val, bits: _ror(val, bits, 64) __ROL4__ = lambda val, bits: _rol(val, bits, 32) __ROL8__ = lambda val, bits: _rol(val, bits, 64) print('__ROR4__, __ROR8__, __ROL4__ and __ROL8__ were defined.') print('Try this in the Python interpreter:') print('hex(__ROR8__(0xD624722D3A28E80F, 0xD6))')
def _rol(val, bits, bit_size): return val << bits % bit_size & 2 ** bit_size - 1 | (val & 2 ** bit_size - 1) >> bit_size - bits % bit_size def _ror(val, bits, bit_size): return (val & 2 ** bit_size - 1) >> bits % bit_size | val << bit_size - bits % bit_size & 2 ** bit_size - 1 __ror4__ = lambda val, bits: _ror(val, bits, 32) __ror8__ = lambda val, bits: _ror(val, bits, 64) __rol4__ = lambda val, bits: _rol(val, bits, 32) __rol8__ = lambda val, bits: _rol(val, bits, 64) print('__ROR4__, __ROR8__, __ROL4__ and __ROL8__ were defined.') print('Try this in the Python interpreter:') print('hex(__ROR8__(0xD624722D3A28E80F, 0xD6))')
''' PARTITION PROBLEM The problem is to identify if a given set of n elements can be divided into two separate subsets such that sum of elements of both the subsets is equal. ''' def check(a, total, ind): if total == 0: return True if ind == -1 or total < 0: return False if a[ind] > total: return check(a, total, ind - 1) return check(a, total - a[ind], ind - 1) or \ check(a, total, ind - 1) n = int(input()) a = [] total = 0 for i in range(0, n): a.append(int(input())) total = total + a[i] if total % 2 == 1: print("Not Possible") else: if check(a, total / 2, n - 1): print("Possible") else: print("Not Possible") ''' INPUT : n = 4 a = [1, 4, 3, 2] OUTPUT : Possible VERIFICATION : Set can be divided into two sets : [1, 4] and [3, 2], both of whose sum is 5. '''
""" PARTITION PROBLEM The problem is to identify if a given set of n elements can be divided into two separate subsets such that sum of elements of both the subsets is equal. """ def check(a, total, ind): if total == 0: return True if ind == -1 or total < 0: return False if a[ind] > total: return check(a, total, ind - 1) return check(a, total - a[ind], ind - 1) or check(a, total, ind - 1) n = int(input()) a = [] total = 0 for i in range(0, n): a.append(int(input())) total = total + a[i] if total % 2 == 1: print('Not Possible') elif check(a, total / 2, n - 1): print('Possible') else: print('Not Possible') '\nINPUT :\nn = 4\na = [1, 4, 3, 2]\nOUTPUT :\nPossible\nVERIFICATION :\nSet can be divided into two sets :\n[1, 4] and [3, 2], both of whose sum is 5.\n'
n = int(input()) arr = list(map(str, input().split()))[:n] ans = "" for i in range(len(arr)): ans += chr(int(arr[i], 16)) print(ans)
n = int(input()) arr = list(map(str, input().split()))[:n] ans = '' for i in range(len(arr)): ans += chr(int(arr[i], 16)) print(ans)
# File: D (Python 2.4) GAME_DURATION = 300 GAME_COUNTDOWN = 10 GAME_OFF = 0 GAME_ON = 1 COOP_MODE = 0 TEAM_MODE = 1 FREE_MODE = 2 SHIP_DEPOSIT = 0 AV_DEPOSIT = 1 AV_MAX_CARRY = 200 GameTypes = [ 'Cooperative', 'Team vs. Team', 'Free For All'] TeamNames = [ 'Red', 'Blue', 'Green', 'Orange', 'England', 'France', 'Iraq'] TeamColors = [ (0.58799999999999997, 0.0, 0.058999999999999997), (0.031, 0.65900000000000003, 1.0), (0.0, 0.63900000000000001, 0.36899999999999999), (0.62, 0.47099999999999997, 0.81200000000000006), (0.10000000000000001, 0.10000000000000001, 0.20000000000000001), (0.20000000000000001, 0.10000000000000001, 0.10000000000000001), (0.10000000000000001, 0.10000000000000001, 0.10000000000000001)] TeamSpawnPoints = [ [ (-759, -45, 9.0999999999999996, -24, 0, 0)], [ (-760, -43, 9.0999999999999996, -24, 0, 0), (761, 70, 9.0999999999999996, 117, 0, 0)], [ (-760, -43, 9.0999999999999996, -133, 0, 0), (761, 70, 9.0999999999999996, 117, 0, 0), (-5, 760, 9.0999999999999996, -171, 0, 0), (-43, -760, 9.0999999999999996, 32, 0, 0)]] PlayerTeams = [ [ 0, 0, 0, 0], [ 0, 0, 1, 1], [ 0, 1, 2, 3]] PlayerShipIndex = 0 NumPlayerShips = [ 2, 2, 4] ShipPos = [ [ (-688, 10.800000000000001, 0, -21, 0, 0), (-708, -65, 0, -30, 0, 0)], [ (-688, 10.800000000000001, 0, -21, 0, 0), (688, -10, 0, 158, 0, 0)], [ (-688, 10.800000000000001, 0, -21, 0, 0), (688, -10, 0, 158, 0, 0), (-10.800000000000001, 688.0, 0, -111, 0, 0), (10.800000000000001, -688.0, 0, 65, 0, 0)]] ShipTeams = [ [ 0, 0], [ 0, 1], [ 0, 1, 2, 3]] AITeams = [ [ 4, 5], [ 4, 5], [ 4, 5]] SHIP_MAX_GOLD = [ 1000, 5000] SHIP_MAX_HP = [ 300, 1000] SHIP_CANNON_DAMAGE = [ 25, 25] NUM_AI_SHIPS = 6 Teams = [ [ 0], [ 0, 1], [ 0, 1, 2, 3]] TreasureSpawnPoints = [ (-578.0, -116.233, 0), (-477.43847656299999, 24.839570999100001, 0.0), (22.945888519299999, 474.46429443400001, 0.0), (577.84405517599998, 355.778076172, 0.0), (518.77471923799999, -544.80145263700001, 0.0)] DemoPlayerDNAs = [ ('sf', 'a', 'a', 'm'), ('ms', 'b', 'b', 'm'), ('tm', 'c', 'c', 'm'), ('tp', 'd', 'd', 'm')]
game_duration = 300 game_countdown = 10 game_off = 0 game_on = 1 coop_mode = 0 team_mode = 1 free_mode = 2 ship_deposit = 0 av_deposit = 1 av_max_carry = 200 game_types = ['Cooperative', 'Team vs. Team', 'Free For All'] team_names = ['Red', 'Blue', 'Green', 'Orange', 'England', 'France', 'Iraq'] team_colors = [(0.588, 0.0, 0.059), (0.031, 0.659, 1.0), (0.0, 0.639, 0.369), (0.62, 0.471, 0.812), (0.1, 0.1, 0.2), (0.2, 0.1, 0.1), (0.1, 0.1, 0.1)] team_spawn_points = [[(-759, -45, 9.1, -24, 0, 0)], [(-760, -43, 9.1, -24, 0, 0), (761, 70, 9.1, 117, 0, 0)], [(-760, -43, 9.1, -133, 0, 0), (761, 70, 9.1, 117, 0, 0), (-5, 760, 9.1, -171, 0, 0), (-43, -760, 9.1, 32, 0, 0)]] player_teams = [[0, 0, 0, 0], [0, 0, 1, 1], [0, 1, 2, 3]] player_ship_index = 0 num_player_ships = [2, 2, 4] ship_pos = [[(-688, 10.8, 0, -21, 0, 0), (-708, -65, 0, -30, 0, 0)], [(-688, 10.8, 0, -21, 0, 0), (688, -10, 0, 158, 0, 0)], [(-688, 10.8, 0, -21, 0, 0), (688, -10, 0, 158, 0, 0), (-10.8, 688.0, 0, -111, 0, 0), (10.8, -688.0, 0, 65, 0, 0)]] ship_teams = [[0, 0], [0, 1], [0, 1, 2, 3]] ai_teams = [[4, 5], [4, 5], [4, 5]] ship_max_gold = [1000, 5000] ship_max_hp = [300, 1000] ship_cannon_damage = [25, 25] num_ai_ships = 6 teams = [[0], [0, 1], [0, 1, 2, 3]] treasure_spawn_points = [(-578.0, -116.233, 0), (-477.438476563, 24.8395709991, 0.0), (22.9458885193, 474.464294434, 0.0), (577.844055176, 355.778076172, 0.0), (518.774719238, -544.801452637, 0.0)] demo_player_dn_as = [('sf', 'a', 'a', 'm'), ('ms', 'b', 'b', 'm'), ('tm', 'c', 'c', 'm'), ('tp', 'd', 'd', 'm')]
# -*- coding: utf-8 -*- """ Created on Wed Dec 19 13:58:37 2018 @author: Nihar """ sqr=[] for i in range(10): sq=(i+1)*(i+1) sqr.append(sq) print(sqr) cube=[] for i in range(10): sq=(i+1)**3 cube.append(sq) print(cube)
""" Created on Wed Dec 19 13:58:37 2018 @author: Nihar """ sqr = [] for i in range(10): sq = (i + 1) * (i + 1) sqr.append(sq) print(sqr) cube = [] for i in range(10): sq = (i + 1) ** 3 cube.append(sq) print(cube)
""" PredictGrade.py ================================================ This module contains the runner code for the predict grade package. """ # from DataSet import DataSet # from Models import Models # from Predictor import Predictor # from ModelType import ModelType # from Grade import Grade # from TextInterface import TextInterface DATA_PATH = "gradesComparison.cvs" NUM_COLUMNS = 2 VALIDATION_SIZE = 5 SEED = 7 def main(dataLocation : str, numColumns : int, validationSize : int, seed : int) -> None: """ This method is the runner for the predict gardes package. The method initialises all the other neccessary objects and then created a peciction based upon the model selected and the inputted data from the user. :param dataLocation: The path of the database (.csv) file which holds the existing data to be used by the sklearn model. :type dataLocation: string :param numColumns: The number of columns in the dataset. :type numCulumns: integer :param validationSize: The validation size of the data set. :type validationSize: integer :param seed: The seed of the data set. :type seed: integer :return : None :rtype : None """ # Initialise the objects currentInterface = TextInterface() data = DataSet(dataLocation, numColumns, validationSize, seed) models = Models() # Get the user's data for the predicted grade inputedPredictions = currentInterface.getPredictionValue() # Calculate the prediction newPredictionMeathod = Predictor(ModelType.KNeighborsClassifier, data) prediction = newPredictionMeathod.predict(inputedPredictions) # Display the prediction currentInterface.showPrediction(Grade(prediction)) if __name__ == "__main__": main(DATA_PATH, NUM_COLUMNS, VALIDATION_SIZE, SEED)
""" PredictGrade.py ================================================ This module contains the runner code for the predict grade package. """ data_path = 'gradesComparison.cvs' num_columns = 2 validation_size = 5 seed = 7 def main(dataLocation: str, numColumns: int, validationSize: int, seed: int) -> None: """ This method is the runner for the predict gardes package. The method initialises all the other neccessary objects and then created a peciction based upon the model selected and the inputted data from the user. :param dataLocation: The path of the database (.csv) file which holds the existing data to be used by the sklearn model. :type dataLocation: string :param numColumns: The number of columns in the dataset. :type numCulumns: integer :param validationSize: The validation size of the data set. :type validationSize: integer :param seed: The seed of the data set. :type seed: integer :return : None :rtype : None """ current_interface = text_interface() data = data_set(dataLocation, numColumns, validationSize, seed) models = models() inputed_predictions = currentInterface.getPredictionValue() new_prediction_meathod = predictor(ModelType.KNeighborsClassifier, data) prediction = newPredictionMeathod.predict(inputedPredictions) currentInterface.showPrediction(grade(prediction)) if __name__ == '__main__': main(DATA_PATH, NUM_COLUMNS, VALIDATION_SIZE, SEED)
"""Coins. Given an infinite supply of quarters dimes, nickels, and pennies, wrote code to represent the number of ways to represent n cents. """ def calc_num_coins(n): """Calc the num of coins.""" def add_coin(total=0): """.""" if total > n: return 0 if total == n: return 1 return add_coin(total + 1) + add_coin(total + 5) + add_coin(total + 10) + add_coin(total + 25) return add_coin()
"""Coins. Given an infinite supply of quarters dimes, nickels, and pennies, wrote code to represent the number of ways to represent n cents. """ def calc_num_coins(n): """Calc the num of coins.""" def add_coin(total=0): """.""" if total > n: return 0 if total == n: return 1 return add_coin(total + 1) + add_coin(total + 5) + add_coin(total + 10) + add_coin(total + 25) return add_coin()
#!/usr/bin/python class TaggedAttribute(object): """Simple container object to tag values with attributes. Feel free to initialize any node with a TA instead of its actual value only and it will then have the desired metadata. For example: from pylink import TaggedAttribute as TA tx_power = TA(2, part_number='234x', test_report='http://reports.co/234x') m = DAGModel([pylink.Transmitter(tx_power_at_pa_dbw=tx_power)]) """ def __init__(self, value, **kwargs): self.meta = kwargs self.value = value
class Taggedattribute(object): """Simple container object to tag values with attributes. Feel free to initialize any node with a TA instead of its actual value only and it will then have the desired metadata. For example: from pylink import TaggedAttribute as TA tx_power = TA(2, part_number='234x', test_report='http://reports.co/234x') m = DAGModel([pylink.Transmitter(tx_power_at_pa_dbw=tx_power)]) """ def __init__(self, value, **kwargs): self.meta = kwargs self.value = value
#program to find the position of the second occurrence of a given string in another given string. def find_string(txt, str1): return txt.find(str1, txt.find(str1)+1) print(find_string("The quick brown fox jumps over the lazy dog", "the")) print(find_string("the quick brown fox jumps over the lazy dog", "the"))
def find_string(txt, str1): return txt.find(str1, txt.find(str1) + 1) print(find_string('The quick brown fox jumps over the lazy dog', 'the')) print(find_string('the quick brown fox jumps over the lazy dog', 'the'))
lines = [] header = "| " for multiplikator in range(1,11): line = "|" + f"{multiplikator}".rjust(3) header += "|" + f"{multiplikator}".rjust(3) for multiplikand in range(1,11): line += "|" + f"{multiplikator * multiplikand}".rjust(3) lines.append("|---" + "+---"*10 + "|") lines.append(line+ "|") print ("/" + "-"*43 + "\\") print (header + "|") for line in lines: print (line) print("\\" + "-"*43 + "/")
lines = [] header = '| ' for multiplikator in range(1, 11): line = '|' + f'{multiplikator}'.rjust(3) header += '|' + f'{multiplikator}'.rjust(3) for multiplikand in range(1, 11): line += '|' + f'{multiplikator * multiplikand}'.rjust(3) lines.append('|---' + '+---' * 10 + '|') lines.append(line + '|') print('/' + '-' * 43 + '\\') print(header + '|') for line in lines: print(line) print('\\' + '-' * 43 + '/')
def foo(a, b): return a + b print("%d" % 10, end='')
def foo(a, b): return a + b print('%d' % 10, end='')
def test_training(): pass
def test_training(): pass
""" [2017-05-18] Challenge #315 [Intermediate] Game of life that has a twist https://www.reddit.com/r/dailyprogrammer/comments/6bumxo/20170518_challenge_315_intermediate_game_of_life/ So for the first part of the description I am borrowing /u/Elite6809 challenge of a while ago [link](https://www.reddit.com/r/dailyprogrammer/comments/271xyp/622014_challenge_165_easy_ascii_game_of_life/) This challenge is based on a game (the mathematical variety - not quite as fun!) called [Conway's Game of Life](http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life). This is called a cellular automaton. This means it is based on a 'playing field' of sorts, made up of lots of little cells or spaces. For Conway's game of life, the grid is square - but other shapes like hexagonal ones could potentially exist too. Each cell can have a value - in this case, on or off - and for each 'iteration' or loop of the game, the value of each cell will change depending on the other cells around it. This might sound confusing at first, but looks easier when you break it down a bit. * A cell's "neighbours" are the 8 cells around it. * If a cell is 'off' but exactly 3 of its neighbours are on, that cell will also turn on - like reproduction. * If a cell is 'on' but less than two of its neighbours are on, it will die out - like underpopulation. * If a cell is 'on' but more than three of its neighbours are on, it will die out - like overcrowding. Fairly simple, right? This might sound boring, but it can generate fairly complex patterns - [this one, for example](http://upload.wikimedia.org/wikipedia/commons/e/e5/Gospers_glider_gun.gif), is called the Gosper Glider Gun and is designed in such a way that it generates little patterns that fly away from it. There are other examples of such patterns, like ones which grow indefinitely. We are going to extend this by giving it some additional rules: There are two parties on the grid, say red and blue. When a cell only has neighbours that are of his own color, nothing changes and it will folow the rules as explained before. When a cell has neighbours that are not of his own 1 of two things can happen: - The total amount of cells in his neighbourhood of his color (including himself) is greater then the amount of cells not in his color in his neighbourhood -> apply normal rules, meaning that you have to count in the cells of other colors as alive cells - If the amout of the other colors is greater then amount of that cell's own color then it just changes color. Last if a cell is 'off' and has 3 neighbour cells that are alive it will be the color that is the most represented. Your challenge is, given a width and heigth to create a grid and a number of turns to simulate this variant # Formal Inputs and Outputs ## Input Description You will be given three numbers **W** and **H** and **N**. These will present the width and heigth of the grid. With this you can create a grid where on the grid, a period or full-stop `.` will represent 'off', and a hash sign `#`/`*` will represent 'on' (for each color). These states you can generate at random. The grid that you are using must 'wrap around'. That means, if something goes off the bottom of the playing field, then it will wrap around to the top, like this: http://upload.wikimedia.org/wikipedia/en/d/d1/Long_gun.gif See how those cells act like the top and bottom, and the left and right of the field are joined up? In other words, the neighbours of a cell can look like this - where the lines coming out are the neighbours: #-...- ...... ../|\. |\.../ ...... ...... ...... |/...\ ...... ...... #-...- ...... ...... |\.../ ..\|/. |/...\ ...... ..-#-. ## Output Description Using that starting state, simulate **N** iterations of Conway's Game of Life. Print the final state in the same format as above - `.` is off and `#` is on. # Sample Inputs & Output ## Sample Input 10 10 7 # Challenge ## Challenge Input 32 17 17 50 50 21 ## note For the initial state I would give it a 45% procent chance of being alive with dividing the red and blue ones to be 50/50 Also look what happens if you change up these numbers """ def main(): pass if __name__ == "__main__": main()
""" [2017-05-18] Challenge #315 [Intermediate] Game of life that has a twist https://www.reddit.com/r/dailyprogrammer/comments/6bumxo/20170518_challenge_315_intermediate_game_of_life/ So for the first part of the description I am borrowing /u/Elite6809 challenge of a while ago [link](https://www.reddit.com/r/dailyprogrammer/comments/271xyp/622014_challenge_165_easy_ascii_game_of_life/) This challenge is based on a game (the mathematical variety - not quite as fun!) called [Conway's Game of Life](http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life). This is called a cellular automaton. This means it is based on a 'playing field' of sorts, made up of lots of little cells or spaces. For Conway's game of life, the grid is square - but other shapes like hexagonal ones could potentially exist too. Each cell can have a value - in this case, on or off - and for each 'iteration' or loop of the game, the value of each cell will change depending on the other cells around it. This might sound confusing at first, but looks easier when you break it down a bit. * A cell's "neighbours" are the 8 cells around it. * If a cell is 'off' but exactly 3 of its neighbours are on, that cell will also turn on - like reproduction. * If a cell is 'on' but less than two of its neighbours are on, it will die out - like underpopulation. * If a cell is 'on' but more than three of its neighbours are on, it will die out - like overcrowding. Fairly simple, right? This might sound boring, but it can generate fairly complex patterns - [this one, for example](http://upload.wikimedia.org/wikipedia/commons/e/e5/Gospers_glider_gun.gif), is called the Gosper Glider Gun and is designed in such a way that it generates little patterns that fly away from it. There are other examples of such patterns, like ones which grow indefinitely. We are going to extend this by giving it some additional rules: There are two parties on the grid, say red and blue. When a cell only has neighbours that are of his own color, nothing changes and it will folow the rules as explained before. When a cell has neighbours that are not of his own 1 of two things can happen: - The total amount of cells in his neighbourhood of his color (including himself) is greater then the amount of cells not in his color in his neighbourhood -> apply normal rules, meaning that you have to count in the cells of other colors as alive cells - If the amout of the other colors is greater then amount of that cell's own color then it just changes color. Last if a cell is 'off' and has 3 neighbour cells that are alive it will be the color that is the most represented. Your challenge is, given a width and heigth to create a grid and a number of turns to simulate this variant # Formal Inputs and Outputs ## Input Description You will be given three numbers **W** and **H** and **N**. These will present the width and heigth of the grid. With this you can create a grid where on the grid, a period or full-stop `.` will represent 'off', and a hash sign `#`/`*` will represent 'on' (for each color). These states you can generate at random. The grid that you are using must 'wrap around'. That means, if something goes off the bottom of the playing field, then it will wrap around to the top, like this: http://upload.wikimedia.org/wikipedia/en/d/d1/Long_gun.gif See how those cells act like the top and bottom, and the left and right of the field are joined up? In other words, the neighbours of a cell can look like this - where the lines coming out are the neighbours: #-...- ...... ../|\\. |\\.../ ...... ...... ...... |/...\\ ...... ...... #-...- ...... ...... |\\.../ ..\\|/. |/...\\ ...... ..-#-. ## Output Description Using that starting state, simulate **N** iterations of Conway's Game of Life. Print the final state in the same format as above - `.` is off and `#` is on. # Sample Inputs & Output ## Sample Input 10 10 7 # Challenge ## Challenge Input 32 17 17 50 50 21 ## note For the initial state I would give it a 45% procent chance of being alive with dividing the red and blue ones to be 50/50 Also look what happens if you change up these numbers """ def main(): pass if __name__ == '__main__': main()
files = "newsequence.txt" write = "compress.txt" reverse = "reversed.txt" seq = dict() global key_max #Stores the sequence in a dictionary def store_seq(key, value): if key not in seq: seq.update({key:value}) #breaks each line down into sequences and counts the number of occurence of each sequence def check_exists(data): data = data.strip() size = len(data) start = 0 endpoint = size - 7 dna = open(files, "r") info = dna.read() while start < endpoint: end = start+8 curr = data[start:end] count = info.count(curr) store_seq(curr, count) start = start+1 dna.close() #reads the dna data from the file line by line def read_file(file_name): f = open(file_name, "r") for content in f: check_exists(content) f.close() #prints out the sequence with the maximum occurence def show_max_val(): global key_max key_max = max(seq.keys(), key=(lambda k: seq[k])) print("The sequence "+key_max+" has the highest occurence of ", seq[key_max]) #Reads the dna file and replaces the sequence with the highest occurence with a define letter def compress_file(): w = open(write, "a") dna = open(files, "r") info = dna.read() if info.find(key_max) != -1: info = info.replace(key_max, 'P') w.write("%s\r\n" % info) w.close() dna.close() #Reverses the file from the function above def reverse_data(): global key_max f = open(write, "r") data = f.read() data = data.replace('P', key_max) w = open(reverse, "a") w.write("%s\r\n" % data) w.close() f.close() if __name__ == "__main__": read_file(files) show_max_val() compress_file() reverse_data()
files = 'newsequence.txt' write = 'compress.txt' reverse = 'reversed.txt' seq = dict() global key_max def store_seq(key, value): if key not in seq: seq.update({key: value}) def check_exists(data): data = data.strip() size = len(data) start = 0 endpoint = size - 7 dna = open(files, 'r') info = dna.read() while start < endpoint: end = start + 8 curr = data[start:end] count = info.count(curr) store_seq(curr, count) start = start + 1 dna.close() def read_file(file_name): f = open(file_name, 'r') for content in f: check_exists(content) f.close() def show_max_val(): global key_max key_max = max(seq.keys(), key=lambda k: seq[k]) print('The sequence ' + key_max + ' has the highest occurence of ', seq[key_max]) def compress_file(): w = open(write, 'a') dna = open(files, 'r') info = dna.read() if info.find(key_max) != -1: info = info.replace(key_max, 'P') w.write('%s\r\n' % info) w.close() dna.close() def reverse_data(): global key_max f = open(write, 'r') data = f.read() data = data.replace('P', key_max) w = open(reverse, 'a') w.write('%s\r\n' % data) w.close() f.close() if __name__ == '__main__': read_file(files) show_max_val() compress_file() reverse_data()
man = 1 wives = man * 7 madai = wives * 7 cats = madai * 7 kitties = cats * 7 total = man + wives + madai + cats + kitties print(total)
man = 1 wives = man * 7 madai = wives * 7 cats = madai * 7 kitties = cats * 7 total = man + wives + madai + cats + kitties print(total)
ES_HOST = 'localhost:9200' ES_INDEX = 'pending-gwascatalog' ES_DOC_TYPE = 'variant' API_PREFIX = 'gwascatalog' API_VERSION = ''
es_host = 'localhost:9200' es_index = 'pending-gwascatalog' es_doc_type = 'variant' api_prefix = 'gwascatalog' api_version = ''
def sumall(upto): sumupto = 0 for i in range(1, upto + 1): sumupto = sumupto + i return sumupto print("The sum of the values from 1 to 50 inclusive is: ", sumall(50)) print("The sum of the values from 1 to 5 inclusive is: ", sumall(5)) print("The sum of the values from 1 to 10 inclusive is: ", sumall(10)) # above function replaces the below 2 sum5 = 0 for i in range(1, 6): sum5 = sum5 + i print("The sum of the vaules from 1 to 5 is inclusive: ", sum5) sum10 = 0 for i in range(1, 11): sum10 = sum10 + i print("The sum of the vaules from 1 to 10 is inclusive: ", sum10)
def sumall(upto): sumupto = 0 for i in range(1, upto + 1): sumupto = sumupto + i return sumupto print('The sum of the values from 1 to 50 inclusive is: ', sumall(50)) print('The sum of the values from 1 to 5 inclusive is: ', sumall(5)) print('The sum of the values from 1 to 10 inclusive is: ', sumall(10)) sum5 = 0 for i in range(1, 6): sum5 = sum5 + i print('The sum of the vaules from 1 to 5 is inclusive: ', sum5) sum10 = 0 for i in range(1, 11): sum10 = sum10 + i print('The sum of the vaules from 1 to 10 is inclusive: ', sum10)
class BatchClassifier: # Implement methods of this class to use it in main.py def train(self, filenames, image_classes): ''' Train the classifier. :param filenames: the list of filenames to be used for training :type filenames: [str] :param image_classes: a mapping of filename to class :type image_classes: {str: int} ''' raise NotImplemented def classify_test(self, filenames, image_classes): ''' Test the accuracy of the classifier with known data. :param filenames: the list of filenames to be used for training :type filenames: [str] :param image_classes: a mapping of filename to class :type image_classes: {str: int} ''' raise NotImplemented def classify_single(self, data): ''' Classify a given image. :param data: the image data to classify :type data: cv2 image representation ''' raise NotImplemented def save(self): ''' Save the classifier to 'classifier/<name>.pkl' ''' raise NotImplemented
class Batchclassifier: def train(self, filenames, image_classes): """ Train the classifier. :param filenames: the list of filenames to be used for training :type filenames: [str] :param image_classes: a mapping of filename to class :type image_classes: {str: int} """ raise NotImplemented def classify_test(self, filenames, image_classes): """ Test the accuracy of the classifier with known data. :param filenames: the list of filenames to be used for training :type filenames: [str] :param image_classes: a mapping of filename to class :type image_classes: {str: int} """ raise NotImplemented def classify_single(self, data): """ Classify a given image. :param data: the image data to classify :type data: cv2 image representation """ raise NotImplemented def save(self): """ Save the classifier to 'classifier/<name>.pkl' """ raise NotImplemented
# Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. # # (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). # # Find the minimum element. # # You may assume no duplicate exists in the array. # # Example 1: # # Input: [3,4,5,1,2] # Output: 1 # Example 2: # # Input: [4,5,6,7,0,1,2] # Output: 0 class Solution(object): def findMin(self, nums): """ :type nums: List[int] :rtype: int """ if not nums or len(nums) == 0: return 0 if len(nums) == 1: return nums[0] begin, end = 0, len(nums) - 1 return self.search(nums, begin, end) def search(self, nums, begin, end): if begin == end: return nums[begin] mid = (begin + end) // 2 return min(self.search(nums, begin, mid), self.search(nums, mid + 1, end)) s = Solution() print(s.findMin([3,5,4,1,2]))
class Solution(object): def find_min(self, nums): """ :type nums: List[int] :rtype: int """ if not nums or len(nums) == 0: return 0 if len(nums) == 1: return nums[0] (begin, end) = (0, len(nums) - 1) return self.search(nums, begin, end) def search(self, nums, begin, end): if begin == end: return nums[begin] mid = (begin + end) // 2 return min(self.search(nums, begin, mid), self.search(nums, mid + 1, end)) s = solution() print(s.findMin([3, 5, 4, 1, 2]))
carros = ["audi", "bmw", "ferrari","honda"] for carro in carros: if carro == "bmw": print(carro.upper()) else: print(carro.title())
carros = ['audi', 'bmw', 'ferrari', 'honda'] for carro in carros: if carro == 'bmw': print(carro.upper()) else: print(carro.title())
setup( name="earthinversion", version="1.0.0", description="Go to earthinversion blog", long_description=README, long_description_content_type="text/markdown", url="https://github.com/earthinversion/", author="Utpal Kumar", author_email="office@earthinversion.com", license="MIT", classifiers=[ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", ], packages=["pyqt"], include_package_data=True, install_requires=[ "matplotlib", "PyQt5", "sounddevice", ], entry_points={"console_scripts": ["pyqt=gui.__main__:voicePlotter"]}, )
setup(name='earthinversion', version='1.0.0', description='Go to earthinversion blog', long_description=README, long_description_content_type='text/markdown', url='https://github.com/earthinversion/', author='Utpal Kumar', author_email='office@earthinversion.com', license='MIT', classifiers=['License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 3'], packages=['pyqt'], include_package_data=True, install_requires=['matplotlib', 'PyQt5', 'sounddevice'], entry_points={'console_scripts': ['pyqt=gui.__main__:voicePlotter']})
API_LOGIN = "/users/sign_in" API_DEVICE_RELATIONS = "/device_relations" API_SYSTEMS = "/systems" API_ZONES = "/zones" API_EVENTS = "/events" # 2020-04-18: extracted from https://airzonecloud.com/assets/application-506494af86e686bf472b872d02048b42.js MODES_CONVERTER = { "0": {"name": "stop", "description": "Stop"}, "1": {"name": "cool-air", "description": "Air cooling"}, "2": {"name": "heat-radiant", "description": "Radiant heating"}, "3": {"name": "ventilate", "description": "Ventilate"}, "4": {"name": "heat-air", "description": "Air heating"}, "5": {"name": "heat-both", "description": "Combined heating"}, "6": {"name": "dehumidify", "description": "Dry"}, "7": {"name": "not_exit", "description": ""}, "8": {"name": "cool-radiant", "description": "Radiant cooling"}, "9": {"name": "cool-both", "description": "Combined cooling"}, } SCHEDULE_MODES_CONVERTER = { "0": {"name": "", "description": ""}, "1": {"name": "stop", "description": "Stop"}, "2": {"name": "ventilate", "description": "Ventilate"}, "3": {"name": "cool-air", "description": "Air cooling"}, "4": {"name": "heat-air", "description": "Air heating"}, "5": {"name": "heat-radiant", "description": "Radiant heating"}, "6": {"name": "heat-both", "description": "Combined heating"}, "7": {"name": "dehumidify", "description": "Dry"}, "8": {"name": "cool-radiant", "description": "Radiant cooling"}, "9": {"name": "cool-both", "description": "Combined cooling"}, } VELOCITIES_CONVERTER = { "0": {"name": "auto", "description": "Auto"}, "1": {"name": "velocity-1", "description": "Low speed"}, "2": {"name": "velocity-2", "description": "Medium speed"}, "3": {"name": "velocity-3", "description": "High speed"}, } AIRFLOW_CONVERTER = { "0": {"name": "airflow-0", "description": "Silence"}, "1": {"name": "airflow-1", "description": "Standard"}, "2": {"name": "airflow-2", "description": "Power"}, } ECO_CONVERTER = { "0": {"name": "eco-off", "description": "Eco off"}, "1": {"name": "eco-m", "description": "Eco manual"}, "2": {"name": "eco-a", "description": "Eco A"}, "3": {"name": "eco-aa", "description": "Eco A+"}, "4": {"name": "eco-aaa", "description": "Eco A++"}, } SCENES_CONVERTER = { "0": { "name": "stop", "description": "The air-conditioning system will remain switched off regardless of the demand status of any zone, all the motorized dampers will remain opened", }, "1": { "name": "confort", "description": "Default and standard user mode. The desired set point temperature can be selected using the predefined temperature ranges", }, "2": { "name": "unocupied", "description": "To be used when there is no presence detected for short periods of time. A more efficient set point temperature will be set. If the thermostat is activated, the zone will start running in comfort mode", }, "3": { "name": "night", "description": "The system automatically changes the set point temperature 0.5\xba C/1\xba F every 30 minutes in up to 4 increments of 2\xba C/4\xba F in 2 hours. When cooling, the system increases the set point temperature; when heating, the system decreases the set point temperature", }, "4": { "name": "eco", "description": "The range of available set point temperatures change for more efficient operation", }, "5": { "name": "vacation", "description": "This mode feature saves energy while the user is away for extended periods of time", }, }
api_login = '/users/sign_in' api_device_relations = '/device_relations' api_systems = '/systems' api_zones = '/zones' api_events = '/events' modes_converter = {'0': {'name': 'stop', 'description': 'Stop'}, '1': {'name': 'cool-air', 'description': 'Air cooling'}, '2': {'name': 'heat-radiant', 'description': 'Radiant heating'}, '3': {'name': 'ventilate', 'description': 'Ventilate'}, '4': {'name': 'heat-air', 'description': 'Air heating'}, '5': {'name': 'heat-both', 'description': 'Combined heating'}, '6': {'name': 'dehumidify', 'description': 'Dry'}, '7': {'name': 'not_exit', 'description': ''}, '8': {'name': 'cool-radiant', 'description': 'Radiant cooling'}, '9': {'name': 'cool-both', 'description': 'Combined cooling'}} schedule_modes_converter = {'0': {'name': '', 'description': ''}, '1': {'name': 'stop', 'description': 'Stop'}, '2': {'name': 'ventilate', 'description': 'Ventilate'}, '3': {'name': 'cool-air', 'description': 'Air cooling'}, '4': {'name': 'heat-air', 'description': 'Air heating'}, '5': {'name': 'heat-radiant', 'description': 'Radiant heating'}, '6': {'name': 'heat-both', 'description': 'Combined heating'}, '7': {'name': 'dehumidify', 'description': 'Dry'}, '8': {'name': 'cool-radiant', 'description': 'Radiant cooling'}, '9': {'name': 'cool-both', 'description': 'Combined cooling'}} velocities_converter = {'0': {'name': 'auto', 'description': 'Auto'}, '1': {'name': 'velocity-1', 'description': 'Low speed'}, '2': {'name': 'velocity-2', 'description': 'Medium speed'}, '3': {'name': 'velocity-3', 'description': 'High speed'}} airflow_converter = {'0': {'name': 'airflow-0', 'description': 'Silence'}, '1': {'name': 'airflow-1', 'description': 'Standard'}, '2': {'name': 'airflow-2', 'description': 'Power'}} eco_converter = {'0': {'name': 'eco-off', 'description': 'Eco off'}, '1': {'name': 'eco-m', 'description': 'Eco manual'}, '2': {'name': 'eco-a', 'description': 'Eco A'}, '3': {'name': 'eco-aa', 'description': 'Eco A+'}, '4': {'name': 'eco-aaa', 'description': 'Eco A++'}} scenes_converter = {'0': {'name': 'stop', 'description': 'The air-conditioning system will remain switched off regardless of the demand status of any zone, all the motorized dampers will remain opened'}, '1': {'name': 'confort', 'description': 'Default and standard user mode. The desired set point temperature can be selected using the predefined temperature ranges'}, '2': {'name': 'unocupied', 'description': 'To be used when there is no presence detected for short periods of time. A more efficient set point temperature will be set. If the thermostat is activated, the zone will start running in comfort mode'}, '3': {'name': 'night', 'description': 'The system automatically changes the set point temperature 0.5º C/1º F every 30 minutes in up to 4 increments of 2º C/4º F in 2 hours. When cooling, the system increases the set point temperature; when heating, the system decreases the set point temperature'}, '4': {'name': 'eco', 'description': 'The range of available set point temperatures change for more efficient operation'}, '5': {'name': 'vacation', 'description': 'This mode feature saves energy while the user is away for extended periods of time'}}
''' The MADLIBS QUIZ Use string concatenation (putting strings together) Ex: I ama traveling to ____ using ___ and its carrying ____ passegers for ____ kilometers Thank you for watching ________ channel please ________ ''' youtube_channel = "" print("thank you for watching " + youtube_channel + "Channel ") print(f"thank you for watching {youtube_channel}") print("Thank you for watching {}".format(youtube_channel)) #soln 2:---->Get user input name = input("Name: ") coding = input("coding: ") verb = input("Verb: ") madlib = "my name is {name} and I love {coding} because it is {verb}".format(name,coding,verb) print(madlib) #soln 2:---->Get user input # f formating name = input("Name: ") coding = input("coding: ") verb = input("Verb: ") madlib = "my name is {} and I love {} because it is {}".format(name,coding,verb) print(madlib) #soln f string #soln 2:---->Get user input name = input("Name: ") coding = input("coding: ") verb = input("Verb: ") madlib = f"my name is {name} and I love {coding} because it is {verb}" print(madlib)
""" The MADLIBS QUIZ Use string concatenation (putting strings together) Ex: I ama traveling to ____ using ___ and its carrying ____ passegers for ____ kilometers Thank you for watching ________ channel please ________ """ youtube_channel = '' print('thank you for watching ' + youtube_channel + 'Channel ') print(f'thank you for watching {youtube_channel}') print('Thank you for watching {}'.format(youtube_channel)) name = input('Name: ') coding = input('coding: ') verb = input('Verb: ') madlib = 'my name is {name} and I love {coding} because it is {verb}'.format(name, coding, verb) print(madlib) name = input('Name: ') coding = input('coding: ') verb = input('Verb: ') madlib = 'my name is {} and I love {} because it is {}'.format(name, coding, verb) print(madlib) name = input('Name: ') coding = input('coding: ') verb = input('Verb: ') madlib = f'my name is {name} and I love {coding} because it is {verb}' print(madlib)
# PEMDAS is followed for calculations. # Exponentiation print("2^2 = " + str(2 ** 2)) # Division always returns a float print ("1 / 2 = " + str(1 / 2)) # For integer division, use double forward-slashes print ("1 // 2 = " + str(1 // 2)) # Modulo is like division except it returns the remainder print ("10 % 3 = " + str(10 % 3))
print('2^2 = ' + str(2 ** 2)) print('1 / 2 = ' + str(1 / 2)) print('1 // 2 = ' + str(1 // 2)) print('10 % 3 = ' + str(10 % 3))
""" Demonstrates a try...except statement """ #Prompts the user to enter a number. line = input("Enter a number: ") try: #Converts the input to an int. number = int(line) #Prints the number the user entered. print(number) except ValueError: #This statement will execute if the input could not be #converted to an int (raised a ValueError) print("Invalid value") #Prints goodbye to show the program has ended. print("Goodbye!")
""" Demonstrates a try...except statement """ line = input('Enter a number: ') try: number = int(line) print(number) except ValueError: print('Invalid value') print('Goodbye!')
#!/usr/bin/env python3 # Write a program that compares two files of names to find: # Names unique to file 1 # Names unique to file 2 # Names shared in both files """ python3 checklist.py --file1 --file2 """
""" python3 checklist.py --file1 --file2 """
class Solution: def fib(self, n: int) -> int: prev, cur = 0, 1 if n == 0: return prev if n == 1: return cur for i in range(n): prev, cur = cur, prev + cur return prev
class Solution: def fib(self, n: int) -> int: (prev, cur) = (0, 1) if n == 0: return prev if n == 1: return cur for i in range(n): (prev, cur) = (cur, prev + cur) return prev
""" django-faktura Homepage: https://github.com/ricco386/django-faktura See the LICENSE file for copying permission. """ __version__ = "0.1" __author__ = "Richard Kellner" default_app_config = "faktura.apps.FakturaConfig"
""" django-faktura Homepage: https://github.com/ricco386/django-faktura See the LICENSE file for copying permission. """ __version__ = '0.1' __author__ = 'Richard Kellner' default_app_config = 'faktura.apps.FakturaConfig'
def test_countries_and_timezones(app_adm): app_adm.home_page.open_countries() country_page = app_adm.country_page countries_list = country_page.get_countries() sorted_countries = sorted(countries_list) for country in range(len(countries_list)): assert countries_list[country] == sorted_countries[country] if country_page.amount_tzs_by_index(country + 1) > 0: timezones = country_page.get_timezones_for_country(country + 1) sorted_timezones = sorted(timezones) for timezone in range(len(timezones)): assert timezones[timezone] == sorted_timezones[timezone]
def test_countries_and_timezones(app_adm): app_adm.home_page.open_countries() country_page = app_adm.country_page countries_list = country_page.get_countries() sorted_countries = sorted(countries_list) for country in range(len(countries_list)): assert countries_list[country] == sorted_countries[country] if country_page.amount_tzs_by_index(country + 1) > 0: timezones = country_page.get_timezones_for_country(country + 1) sorted_timezones = sorted(timezones) for timezone in range(len(timezones)): assert timezones[timezone] == sorted_timezones[timezone]
class Node: def __init__(self, data): self.data = data self.next = None class LinkedList: def __init__(self): self.head = None self.node_count = 0 def __str__(self): curr = self.head temp = [] while curr is not None: temp.append(str(curr.data)) curr = curr.next temp.append(str(None)) return " -> ".join(temp) def insert_at_beginning(self, data): temp = Node(data) if self.head is None: self.head = temp else: # set head to new node temp.next = self.head self.head = temp self.node_count += 1 def insert_at_end(self, data): temp = Node(data) if self.head is None: self.head = temp else: # set next of last item to new node curr = self.head while curr.next is not None: curr = curr.next curr.next = temp self.node_count += 1 def insert_at_position(self, data, position): temp = Node(data) if self.head is None: self.head = temp elif position <= 1: self.insert_at_beginning(data) elif position > self.node_count: self.insert_at_end(data) else: count = 1 curr = self.head while count < position - 1: # inserting after curr = curr.next count += 1 temp.next = curr.next curr.next = temp self.node_count += 1 def delete_from_beginning(self): if self.head is not None: temp = self.head self.head = self.head.next del temp self.node_count -= 1 def delete_from_end(self): if self.head is not None: if self.head.next is None: self.delete_from_beginning() else: # need reference to last and next to last. delete last and update next of the next to last to None curr = self.head prev = None while curr.next is not None: # 1 item list falls through here immediately prev = curr curr = curr.next prev.next = None # does not work on one item list, prev = None del curr self.node_count -= 1 def delete_at_position(self, position): if self.head is not None: if position <= 1: self.delete_from_beginning() elif position >= self.node_count: self.delete_from_end() else: curr = self.head prev = None count = 1 while count < position: prev = curr curr = curr.next count += 1 prev.next = curr.next del curr self.node_count -= 1 # simple demo list1 = LinkedList() print(list1) list1.insert_at_beginning(5) list1.insert_at_beginning(6) list1.insert_at_end(7) list1.insert_at_end(8) list1.insert_at_position(1, 1) list1.insert_at_position(3, 4) print(list1) list1.delete_from_beginning() list1.delete_from_end() list1.delete_at_position(2) print(list1)
class Node: def __init__(self, data): self.data = data self.next = None class Linkedlist: def __init__(self): self.head = None self.node_count = 0 def __str__(self): curr = self.head temp = [] while curr is not None: temp.append(str(curr.data)) curr = curr.next temp.append(str(None)) return ' -> '.join(temp) def insert_at_beginning(self, data): temp = node(data) if self.head is None: self.head = temp else: temp.next = self.head self.head = temp self.node_count += 1 def insert_at_end(self, data): temp = node(data) if self.head is None: self.head = temp else: curr = self.head while curr.next is not None: curr = curr.next curr.next = temp self.node_count += 1 def insert_at_position(self, data, position): temp = node(data) if self.head is None: self.head = temp elif position <= 1: self.insert_at_beginning(data) elif position > self.node_count: self.insert_at_end(data) else: count = 1 curr = self.head while count < position - 1: curr = curr.next count += 1 temp.next = curr.next curr.next = temp self.node_count += 1 def delete_from_beginning(self): if self.head is not None: temp = self.head self.head = self.head.next del temp self.node_count -= 1 def delete_from_end(self): if self.head is not None: if self.head.next is None: self.delete_from_beginning() else: curr = self.head prev = None while curr.next is not None: prev = curr curr = curr.next prev.next = None del curr self.node_count -= 1 def delete_at_position(self, position): if self.head is not None: if position <= 1: self.delete_from_beginning() elif position >= self.node_count: self.delete_from_end() else: curr = self.head prev = None count = 1 while count < position: prev = curr curr = curr.next count += 1 prev.next = curr.next del curr self.node_count -= 1 list1 = linked_list() print(list1) list1.insert_at_beginning(5) list1.insert_at_beginning(6) list1.insert_at_end(7) list1.insert_at_end(8) list1.insert_at_position(1, 1) list1.insert_at_position(3, 4) print(list1) list1.delete_from_beginning() list1.delete_from_end() list1.delete_at_position(2) print(list1)
class HowLongToBeatEntry: def __init__(self,detailId,gameName,description,playableOn,imageUrl,timeLabels,gameplayMain,gameplayMainExtra,gameplayCompletionist): self.detailId = detailId self.gameName = gameName self.description = description self.playableOn = playableOn self.imageUrl = imageUrl self.timeLabels = timeLabels self.gameplayMain = gameplayMain self.gameplayMainExtra = gameplayMainExtra self.gameplayCompletionist = gameplayCompletionist
class Howlongtobeatentry: def __init__(self, detailId, gameName, description, playableOn, imageUrl, timeLabels, gameplayMain, gameplayMainExtra, gameplayCompletionist): self.detailId = detailId self.gameName = gameName self.description = description self.playableOn = playableOn self.imageUrl = imageUrl self.timeLabels = timeLabels self.gameplayMain = gameplayMain self.gameplayMainExtra = gameplayMainExtra self.gameplayCompletionist = gameplayCompletionist
''' You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? ''' class Solution(object): def rotate(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ n = len(matrix) for row in range(n): for column in range(n - row): matrix[row][column], matrix[n - 1 - column][n - 1 - row] = matrix[n - 1 - column][n - 1 - row], \ matrix[row][column] for row in range(n // 2): for column in range(n): matrix[row][column], matrix[n - 1 - row][column] = matrix[n - 1 - row][column], matrix[row][column] # No need, just to test return matrix if __name__ == "__main__": assert Solution().rotate([[1, 2, 3], [8, 9, 4], [7, 6, 5]]) == [[7, 8, 1], [6, 9, 2], [5, 4, 3]]
""" You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? """ class Solution(object): def rotate(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ n = len(matrix) for row in range(n): for column in range(n - row): (matrix[row][column], matrix[n - 1 - column][n - 1 - row]) = (matrix[n - 1 - column][n - 1 - row], matrix[row][column]) for row in range(n // 2): for column in range(n): (matrix[row][column], matrix[n - 1 - row][column]) = (matrix[n - 1 - row][column], matrix[row][column]) return matrix if __name__ == '__main__': assert solution().rotate([[1, 2, 3], [8, 9, 4], [7, 6, 5]]) == [[7, 8, 1], [6, 9, 2], [5, 4, 3]]
class MyDeque: def __init__(self, max_size): self.max_size = max_size self.items = [None] * self.max_size self.size = 0 self.head = 0 self.tail = 0 def push_back(self, value): if self.size == self.max_size: raise IndexError('error') self.items[self.tail] = value self.size += 1 self.tail = (self.tail + 1) % self.max_size def push_front(self, value): if self.size == self.max_size: raise IndexError('error') self.head = self.max_size-1 if self.head == 0 else self.head-1 self.size += 1 self.items[self.head] = value def pop_front(self): if self.size == 0: raise IndexError('error') self.size -= 1 head = self.head self.head = (self.head + 1) % self.max_size return self.items[head] def pop_back(self): if self.size == 0: raise IndexError('error') self.size -= 1 self.tail = self.max_size-1 if self.tail == 0 else self.tail-1 return self.items[self.tail] def run_command(deque: MyDeque, command): try: if 'push' in command[0]: getattr(deque, command[0])(int(command[1])) else: print(getattr(deque, command[0])()) except IndexError as e: print(e) def main(): operations = int(input()) deque_size = int(input()) deque = MyDeque(deque_size) for _ in range(operations): command = input().strip().split() run_command(deque, command) if __name__ == '__main__': main()
class Mydeque: def __init__(self, max_size): self.max_size = max_size self.items = [None] * self.max_size self.size = 0 self.head = 0 self.tail = 0 def push_back(self, value): if self.size == self.max_size: raise index_error('error') self.items[self.tail] = value self.size += 1 self.tail = (self.tail + 1) % self.max_size def push_front(self, value): if self.size == self.max_size: raise index_error('error') self.head = self.max_size - 1 if self.head == 0 else self.head - 1 self.size += 1 self.items[self.head] = value def pop_front(self): if self.size == 0: raise index_error('error') self.size -= 1 head = self.head self.head = (self.head + 1) % self.max_size return self.items[head] def pop_back(self): if self.size == 0: raise index_error('error') self.size -= 1 self.tail = self.max_size - 1 if self.tail == 0 else self.tail - 1 return self.items[self.tail] def run_command(deque: MyDeque, command): try: if 'push' in command[0]: getattr(deque, command[0])(int(command[1])) else: print(getattr(deque, command[0])()) except IndexError as e: print(e) def main(): operations = int(input()) deque_size = int(input()) deque = my_deque(deque_size) for _ in range(operations): command = input().strip().split() run_command(deque, command) if __name__ == '__main__': main()
""" Collection of miscellaneous functions and utilities for admin tasks. """ __version__ = '0.1.0dev2'
""" Collection of miscellaneous functions and utilities for admin tasks. """ __version__ = '0.1.0dev2'
def findadjacent(y,x): global horizontal global vertical global map countlocal=0 for richtingy in range(-1,2): for richtingx in range(-1,2): if richtingx!=0 or richtingy!=0: offsetcounter=0 found=0 while found==0: found=1 offsetcounter+=1 if richtingy*offsetcounter+y>=0 and richtingy*offsetcounter+y<vertical: if richtingx*offsetcounter+x>=0 and richtingx*offsetcounter+x<horizontal: if map[richtingy*offsetcounter+y][richtingx*offsetcounter+x]=="#": countlocal+=1 elif map[richtingy*offsetcounter+y][richtingx*offsetcounter+x]==".": found=0 return countlocal f=open("./CoA/2020/data/11a.txt","r") #f=open("./CoA/2020/data/test.txt","r") count=0 horizontal=0 vertical=0 map=[] tmpmap=[] go_looking=True while go_looking: go_looking=False for line in f: # line=line.strip() map.append(line) count+=1 horizontal=len(line) vertical=count tmpmap=map.copy() for i in range(vertical): for j in range(horizontal): tmp=findadjacent(i,j) #print(i,j,tmp) if map[i][j]=="L": if tmp==0: line=tmpmap[i][:j]+"#"+tmpmap[i][j+1:] go_looking=True tmpmap[i]=line elif map[i][j]=="#": if tmp>=5: line=tmpmap[i][:j]+"L"+tmpmap[i][j+1:] go_looking=True tmpmap[i]=line #print(tmpmap) map=tmpmap.copy() count=0 for i in range(vertical): for j in range(horizontal): if map[i][j]=="#": count+=1 print(count)
def findadjacent(y, x): global horizontal global vertical global map countlocal = 0 for richtingy in range(-1, 2): for richtingx in range(-1, 2): if richtingx != 0 or richtingy != 0: offsetcounter = 0 found = 0 while found == 0: found = 1 offsetcounter += 1 if richtingy * offsetcounter + y >= 0 and richtingy * offsetcounter + y < vertical: if richtingx * offsetcounter + x >= 0 and richtingx * offsetcounter + x < horizontal: if map[richtingy * offsetcounter + y][richtingx * offsetcounter + x] == '#': countlocal += 1 elif map[richtingy * offsetcounter + y][richtingx * offsetcounter + x] == '.': found = 0 return countlocal f = open('./CoA/2020/data/11a.txt', 'r') count = 0 horizontal = 0 vertical = 0 map = [] tmpmap = [] go_looking = True while go_looking: go_looking = False for line in f: map.append(line) count += 1 horizontal = len(line) vertical = count tmpmap = map.copy() for i in range(vertical): for j in range(horizontal): tmp = findadjacent(i, j) if map[i][j] == 'L': if tmp == 0: line = tmpmap[i][:j] + '#' + tmpmap[i][j + 1:] go_looking = True tmpmap[i] = line elif map[i][j] == '#': if tmp >= 5: line = tmpmap[i][:j] + 'L' + tmpmap[i][j + 1:] go_looking = True tmpmap[i] = line map = tmpmap.copy() count = 0 for i in range(vertical): for j in range(horizontal): if map[i][j] == '#': count += 1 print(count)
class Solution: def fourSum(self, nums: List[int], target: int) -> List[List[int]]: nums.sort() ans=[] st=set() for i in range(0,len(nums)-2): for j in range(i+1,len(nums)-2): l=j+1 r=len(nums)-1 while(l<r): s=nums[i]+nums[j]+nums[l]+nums[r] if s<target: l+=1 elif s>target: r-=1 else: if (nums[i],nums[j],nums[l],nums[r]) not in st: st.add((nums[i],nums[j],nums[l],nums[r])) ans.append([nums[i],nums[j],nums[l],nums[r]]) l+=1 r-=1 return ans
class Solution: def four_sum(self, nums: List[int], target: int) -> List[List[int]]: nums.sort() ans = [] st = set() for i in range(0, len(nums) - 2): for j in range(i + 1, len(nums) - 2): l = j + 1 r = len(nums) - 1 while l < r: s = nums[i] + nums[j] + nums[l] + nums[r] if s < target: l += 1 elif s > target: r -= 1 else: if (nums[i], nums[j], nums[l], nums[r]) not in st: st.add((nums[i], nums[j], nums[l], nums[r])) ans.append([nums[i], nums[j], nums[l], nums[r]]) l += 1 r -= 1 return ans
n = int(input("Please enter a positive integer : ")) print(n) while n != 1: n = n // 2 if n % 2 == 0 else 3*n + 1 print(n)
n = int(input('Please enter a positive integer : ')) print(n) while n != 1: n = n // 2 if n % 2 == 0 else 3 * n + 1 print(n)
def hip(a, b, c): if b < a > c and a ** 2 == b ** 2 + c ** 2: return True elif a < b > c and b ** 2 == a ** 2 + c ** 2: return True elif a < c > b and c ** 2 == a ** 2 + b ** 2: return True else: return False e = str(input()).split() a = int(e[0]) b = int(e[1]) c = int(e[2]) if(a < b + c and b < a + c and c < a + b): if(a == b == c): print('Valido-Equilatero') elif(a == b or a == c or b == c): print('Valido-Isoceles') else: print('Valido-Escaleno') if hip(a, b, c): print('Retangulo: S') else: print('Retangulo: N') else: print('Invalido')
def hip(a, b, c): if b < a > c and a ** 2 == b ** 2 + c ** 2: return True elif a < b > c and b ** 2 == a ** 2 + c ** 2: return True elif a < c > b and c ** 2 == a ** 2 + b ** 2: return True else: return False e = str(input()).split() a = int(e[0]) b = int(e[1]) c = int(e[2]) if a < b + c and b < a + c and (c < a + b): if a == b == c: print('Valido-Equilatero') elif a == b or a == c or b == c: print('Valido-Isoceles') else: print('Valido-Escaleno') if hip(a, b, c): print('Retangulo: S') else: print('Retangulo: N') else: print('Invalido')
class CNF: def __init__(self, n_variables, clauses, occur_list, comments): self.n_variables = n_variables self.clauses = clauses self.occur_list = occur_list self.comments = comments def __str__(self): return f"""Number of variables: {self.n_variables} Clauses: {str(self.clauses)} Comments: {str(self.comments)}""" def to_file(self, filename): with open(filename, 'w') as f: f.write(self.to_string()) def to_string(self): string = f'p cnf {self.n_variables} {len(self.clauses)}\n' for clause in self.clauses: string += ' '.join(str(literal) for literal in clause) + ' 0\n' return string @classmethod def from_file(cls, filename): with open(filename) as f: return cls.from_string(f.read()) @classmethod def from_string(cls, string): n_variables, clauses, occur_list, comments = CNF.parse_dimacs(string) return cls(n_variables, clauses, occur_list, comments) @staticmethod def parse_dimacs(string): n_variables = 0 clauses = [] comments = [] occur_list = [] for line in string.splitlines(): line = line.strip() if not line: continue elif line[0] == 'c': comments.append(line) elif line.startswith('p cnf'): tokens = line.split() n_variables, n_remaining_clauses = int(tokens[2]), int(tokens[3]) occur_list = [[] for _ in range(n_variables * 2 + 1)] elif n_remaining_clauses > 0: clause = [] clause_index = len(clauses) for literal in line.split()[:-1]: literal = int(literal) clause.append(literal) occur_list[literal].append(clause_index) clauses.append(clause) n_remaining_clauses -= 1 else: break return n_variables, clauses, occur_list, comments
class Cnf: def __init__(self, n_variables, clauses, occur_list, comments): self.n_variables = n_variables self.clauses = clauses self.occur_list = occur_list self.comments = comments def __str__(self): return f'Number of variables: {self.n_variables}\nClauses: {str(self.clauses)}\nComments: {str(self.comments)}' def to_file(self, filename): with open(filename, 'w') as f: f.write(self.to_string()) def to_string(self): string = f'p cnf {self.n_variables} {len(self.clauses)}\n' for clause in self.clauses: string += ' '.join((str(literal) for literal in clause)) + ' 0\n' return string @classmethod def from_file(cls, filename): with open(filename) as f: return cls.from_string(f.read()) @classmethod def from_string(cls, string): (n_variables, clauses, occur_list, comments) = CNF.parse_dimacs(string) return cls(n_variables, clauses, occur_list, comments) @staticmethod def parse_dimacs(string): n_variables = 0 clauses = [] comments = [] occur_list = [] for line in string.splitlines(): line = line.strip() if not line: continue elif line[0] == 'c': comments.append(line) elif line.startswith('p cnf'): tokens = line.split() (n_variables, n_remaining_clauses) = (int(tokens[2]), int(tokens[3])) occur_list = [[] for _ in range(n_variables * 2 + 1)] elif n_remaining_clauses > 0: clause = [] clause_index = len(clauses) for literal in line.split()[:-1]: literal = int(literal) clause.append(literal) occur_list[literal].append(clause_index) clauses.append(clause) n_remaining_clauses -= 1 else: break return (n_variables, clauses, occur_list, comments)
#!/usr/bin/env python3 def left_join(phrases): return ','.join(phrases).replace("right", "left") if __name__ == '__main__': print(left_join(["right", "right", "left", "left", "forward"])) assert left_join(["right", "right", "left", "left", "forward"]) == "left,left,left,left,forward" assert left_join(["alright outright", "squirrel"]) == "alleft outleft,squirrel" assert left_join(["frightened", "eyebright"]) == "fleftened,eyebleft" assert left_join(["little", "squirrel"]) == "little,squirrel"
def left_join(phrases): return ','.join(phrases).replace('right', 'left') if __name__ == '__main__': print(left_join(['right', 'right', 'left', 'left', 'forward'])) assert left_join(['right', 'right', 'left', 'left', 'forward']) == 'left,left,left,left,forward' assert left_join(['alright outright', 'squirrel']) == 'alleft outleft,squirrel' assert left_join(['frightened', 'eyebright']) == 'fleftened,eyebleft' assert left_join(['little', 'squirrel']) == 'little,squirrel'
#!/usr/bin/env python # -*- coding:utf-8 _*- """ @author: Lu Chong @file: __init__.py @time: 2021/8/17/11:38 """
""" @author: Lu Chong @file: __init__.py @time: 2021/8/17/11:38 """
DATABASE_NAME = "lzhaoDemoDB" TABLE_NAME = "MarketPriceGTest" HT_TTL_HOURS = 24 CT_TTL_DAYS = 7 ONE_GB_IN_BYTES = 1073741824
database_name = 'lzhaoDemoDB' table_name = 'MarketPriceGTest' ht_ttl_hours = 24 ct_ttl_days = 7 one_gb_in_bytes = 1073741824
# -*- encoding=utf-8 -*- """ # ********************************************************************************** # Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved. # [openeuler-jenkins] is licensed under the Mulan PSL v1. # You can use this software according to the terms and conditions of the Mulan PSL v1. # You may obtain a copy of Mulan PSL v1 at: # http://license.coscl.org.cn/MulanPSL # THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR # PURPOSE. # See the Mulan PSL v1 for more details. # Author: # Create: 2020-09-23 # Description: access control list base class # ********************************************************************************** """ class ACResult(object): """ Use this variables (FAILED, WARNING, SUCCESS) at most time, and don't new ACResult unless you have specific needs. """ def __init__(self, val): self._val = val def __add__(self, other): return self if self.val >= other.val else other def __str__(self): return self.hint def __repr__(self): return self.__str__() @classmethod def get_instance(cls, val): """ :param val: 0/1/2/True/False/success/fail/warn :return: instance of ACResult """ if isinstance(val, int): return {0: SUCCESS, 1: WARNING, 2: FAILED}.get(val) if isinstance(val, bool): return {True: SUCCESS, False: FAILED}.get(val) try: val = int(val) return {0: SUCCESS, 1: WARNING, 2: FAILED}.get(val) except ValueError: return {"success": SUCCESS, "fail": FAILED, "failed": FAILED, "failure": FAILED, "warn": WARNING, "warning": WARNING}.get(val.lower(), FAILED) @property def val(self): return self._val @property def hint(self): return ["SUCCESS", "WARNING", "FAILED"][self.val] @property def emoji(self): return [":white_check_mark:", ":bug:", ":x:"][self.val] FAILED = ACResult(2) WARNING = ACResult(1) SUCCESS = ACResult(0)
""" # ********************************************************************************** # Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved. # [openeuler-jenkins] is licensed under the Mulan PSL v1. # You can use this software according to the terms and conditions of the Mulan PSL v1. # You may obtain a copy of Mulan PSL v1 at: # http://license.coscl.org.cn/MulanPSL # THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR # PURPOSE. # See the Mulan PSL v1 for more details. # Author: # Create: 2020-09-23 # Description: access control list base class # ********************************************************************************** """ class Acresult(object): """ Use this variables (FAILED, WARNING, SUCCESS) at most time, and don't new ACResult unless you have specific needs. """ def __init__(self, val): self._val = val def __add__(self, other): return self if self.val >= other.val else other def __str__(self): return self.hint def __repr__(self): return self.__str__() @classmethod def get_instance(cls, val): """ :param val: 0/1/2/True/False/success/fail/warn :return: instance of ACResult """ if isinstance(val, int): return {0: SUCCESS, 1: WARNING, 2: FAILED}.get(val) if isinstance(val, bool): return {True: SUCCESS, False: FAILED}.get(val) try: val = int(val) return {0: SUCCESS, 1: WARNING, 2: FAILED}.get(val) except ValueError: return {'success': SUCCESS, 'fail': FAILED, 'failed': FAILED, 'failure': FAILED, 'warn': WARNING, 'warning': WARNING}.get(val.lower(), FAILED) @property def val(self): return self._val @property def hint(self): return ['SUCCESS', 'WARNING', 'FAILED'][self.val] @property def emoji(self): return [':white_check_mark:', ':bug:', ':x:'][self.val] failed = ac_result(2) warning = ac_result(1) success = ac_result(0)
class Solution: def recursion(self,idx,arr,n,maxx,size,k): if idx == n: return maxx * size if (idx,size,maxx) in self.dp: return self.dp[(idx,size,maxx)] ch1 = self.recursion(idx+1,arr,n,max(maxx,arr[idx]),size+1,k) if size < k else 0 ch2 = self.recursion(idx+1,arr,n,arr[idx],1,k) + maxx*size best = ch1 if ch1 > ch2 else ch2 self.dp[(idx,size,maxx)] = best return best def maxSumAfterPartitioning(self, arr: List[int], k: int) -> int: self.dp = {} return self.recursion(1,arr,len(arr),arr[0],1,k)
class Solution: def recursion(self, idx, arr, n, maxx, size, k): if idx == n: return maxx * size if (idx, size, maxx) in self.dp: return self.dp[idx, size, maxx] ch1 = self.recursion(idx + 1, arr, n, max(maxx, arr[idx]), size + 1, k) if size < k else 0 ch2 = self.recursion(idx + 1, arr, n, arr[idx], 1, k) + maxx * size best = ch1 if ch1 > ch2 else ch2 self.dp[idx, size, maxx] = best return best def max_sum_after_partitioning(self, arr: List[int], k: int) -> int: self.dp = {} return self.recursion(1, arr, len(arr), arr[0], 1, k)
class Action: def do(self) -> None: raise NotImplementedError def undo(self) -> None: raise NotImplementedError def redo(self) -> None: raise NotImplementedError
class Action: def do(self) -> None: raise NotImplementedError def undo(self) -> None: raise NotImplementedError def redo(self) -> None: raise NotImplementedError