content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
X = [] Y = [] cont = 0 n = True while n: a,b = input().split(" ") a = int(a) b = int(b) if a == b: n = False cont-=1 else: X.append(a) Y.append(b) cont+=1 i = 0 while i < cont: if X[i] > Y[i]: print('Decrescente') elif X[i] < Y[i]: print('Crescente') i+=1
x = [] y = [] cont = 0 n = True while n: (a, b) = input().split(' ') a = int(a) b = int(b) if a == b: n = False cont -= 1 else: X.append(a) Y.append(b) cont += 1 i = 0 while i < cont: if X[i] > Y[i]: print('Decrescente') elif X[i] < Y[i]: print('Crescente') i += 1
def test_example(): num1 = 1 num2 = 3 if num2 > num1: print("Working")
def test_example(): num1 = 1 num2 = 3 if num2 > num1: print('Working')
class Node: def __init__(self,v): self.next=None self.prev=None self.value=v class Deque: def __init__(self): self.front=None self.tail=None def addFront(self, item): node=Node(item) if self.front is None: #case of none items self.front=node self.tail=node elif self.tail is self.front: # case of 1 item self.tail.prev=node self.front=node node.next=self.tail else: # case of several items self.front.prev=node prev_front=self.front self.front=node node.next=prev_front def addTail(self, item): node=Node(item) if self.front is None: self.front = node else: self.tail.next=node node.prev=self.tail self.tail=node def removeFront(self): if self.front is None: return None #if the stack is empty else: item=self.front if self.front.next is not None: self.front=self.front.next elif self.front.next is self.tail: self.front=self.tail else: self.front=None self.tail=None return item.value def removeTail(self): if self.front is None: return None #if the stack is empty else: if self.front.next is None: #case from one item item=self.front self.front=None self.tail=None else: item=self.tail self.tail=item.prev item.prev.next=None #case from two items return item.value def size(self): node = self.front length=0 while node is not None: length+=1 node = node.next return length def getFront(self): if self.front is None: return None else: return self.front.value def getTail(self): if self.tail is None: return None else: return self.tail.value
class Node: def __init__(self, v): self.next = None self.prev = None self.value = v class Deque: def __init__(self): self.front = None self.tail = None def add_front(self, item): node = node(item) if self.front is None: self.front = node self.tail = node elif self.tail is self.front: self.tail.prev = node self.front = node node.next = self.tail else: self.front.prev = node prev_front = self.front self.front = node node.next = prev_front def add_tail(self, item): node = node(item) if self.front is None: self.front = node else: self.tail.next = node node.prev = self.tail self.tail = node def remove_front(self): if self.front is None: return None else: item = self.front if self.front.next is not None: self.front = self.front.next elif self.front.next is self.tail: self.front = self.tail else: self.front = None self.tail = None return item.value def remove_tail(self): if self.front is None: return None else: if self.front.next is None: item = self.front self.front = None self.tail = None else: item = self.tail self.tail = item.prev item.prev.next = None return item.value def size(self): node = self.front length = 0 while node is not None: length += 1 node = node.next return length def get_front(self): if self.front is None: return None else: return self.front.value def get_tail(self): if self.tail is None: return None else: return self.tail.value
# ============================================================================= # MISC HELPER FUNCTIONS # ============================================================================= def push_backslash(stuff): """ push a backslash before a word, dumbest function ever""" stuff_url = "" if stuff is None: stuff = "" else: stuff_url = "/" + stuff return stuff, stuff_url def replace_dict_value(dictionary, old_value, new_value): """ Selectively replaces values in a dictionary Parameters: :dictionary(dict): input dictionary :old_value: value to be replaced :new_value: value to replace Returns: :output_dictionary (dict): dictionary with replaced values""" for key, value in dictionary.items(): if value == old_value: dictionary[key] = new_value return dictionary def shift_pos(pos, label_shift): """shift a pos by (sx, xy) pixels""" shiftx = label_shift[0] shifty = label_shift[1] pos2 = pos.copy() for key, position in pos2.items(): pos2[key] = ( position[0] + shiftx, position[1] + shifty) return pos2 def shorten_labels(label_dict, n): """cmon does it really need a description""" shorten_dict = label_dict.copy() for key, item in label_dict.items(): shorten_dict[key] = item[:n] return shorten_dict
def push_backslash(stuff): """ push a backslash before a word, dumbest function ever""" stuff_url = '' if stuff is None: stuff = '' else: stuff_url = '/' + stuff return (stuff, stuff_url) def replace_dict_value(dictionary, old_value, new_value): """ Selectively replaces values in a dictionary Parameters: :dictionary(dict): input dictionary :old_value: value to be replaced :new_value: value to replace Returns: :output_dictionary (dict): dictionary with replaced values""" for (key, value) in dictionary.items(): if value == old_value: dictionary[key] = new_value return dictionary def shift_pos(pos, label_shift): """shift a pos by (sx, xy) pixels""" shiftx = label_shift[0] shifty = label_shift[1] pos2 = pos.copy() for (key, position) in pos2.items(): pos2[key] = (position[0] + shiftx, position[1] + shifty) return pos2 def shorten_labels(label_dict, n): """cmon does it really need a description""" shorten_dict = label_dict.copy() for (key, item) in label_dict.items(): shorten_dict[key] = item[:n] return shorten_dict
class Solution: def moveZeroes(self, nums: List[int]) -> None: """ Do not return anything, modify nums in-place instead. """ for i in nums: if i == 0: nums.append(i) nums.remove(i)
class Solution: def move_zeroes(self, nums: List[int]) -> None: """ Do not return anything, modify nums in-place instead. """ for i in nums: if i == 0: nums.append(i) nums.remove(i)
class Solution(object): def setZeroes(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ m, n = len(matrix), len(matrix[0]) col_zero = any(matrix[i][0] == 0 for i in range(m)) row_zero = any(matrix[0][j] == 0 for j in range(n)) for i in range(m): for j in range(n): if matrix[i][j] == 0: matrix[i][0] = 0 matrix[0][j] = 0 for i in range(1, m): for j in range(1, n): if matrix[i][0] == 0 or matrix[0][j] == 0: matrix[i][j] = 0 if col_zero: for i in range(m): matrix[i][0] = 0 if row_zero: for j in range(n): matrix[0][j] = 0
class Solution(object): def set_zeroes(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ (m, n) = (len(matrix), len(matrix[0])) col_zero = any((matrix[i][0] == 0 for i in range(m))) row_zero = any((matrix[0][j] == 0 for j in range(n))) for i in range(m): for j in range(n): if matrix[i][j] == 0: matrix[i][0] = 0 matrix[0][j] = 0 for i in range(1, m): for j in range(1, n): if matrix[i][0] == 0 or matrix[0][j] == 0: matrix[i][j] = 0 if col_zero: for i in range(m): matrix[i][0] = 0 if row_zero: for j in range(n): matrix[0][j] = 0
''' A package to manipulate and display some random structures, including meander systems, planar triangulations, and ribbon tilings Created on May 8, 2021 @author: vladislavkargin ''' ''' #I prefer blank __init__.py from . import mndrpy from . import pmaps from . import ribbons '''
""" A package to manipulate and display some random structures, including meander systems, planar triangulations, and ribbon tilings Created on May 8, 2021 @author: vladislavkargin """ '\n#I prefer blank __init__.py\n\nfrom . import mndrpy\nfrom . import pmaps\nfrom . import ribbons\n'
#!/usr/bin/python3 '''Day 9 of the 2017 advent of code''' def process_garbage(stream, index): """Traverse stream. Break on '>' as end of garbage, return total as size of garbage and the new index """ total = 0 length = len(stream) while index < length: if stream[index] == ">": break elif stream[index] == "!": index += 1 #skip one character elif stream[index] == "<": pass #ignore else: total += 1 index += 1 return total, index def process_stream(stream, index, rank=0): """if we hit garbage switch to the helper function else recurse down the stream incrementing the rank for each sub group return the total garbage, and group count """ score = 0 garbage = 0 length = len(stream) while index < length: if stream[index] == "<": new_garbage, index = process_garbage(stream, index+1) garbage += new_garbage elif stream[index] == "{": new_garbage, new_score, index = process_stream(stream, index+1, rank+1) garbage += new_garbage score += new_score elif stream[index] == "}": break elif stream[index] == "!": index += 1 #skip one character index += 1 return garbage, score+rank, index def part_one(data): """Return the answer to part one of this day""" return process_stream(data, 0)[1] #sum of score def part_two(data): """Return the answer to part two of this day""" return process_stream(data, 0)[0] #sum of non cancelled garbage if __name__ == "__main__": DATA = "" with open("input", "r") as f: for line in f: DATA += line.rstrip() #hidden newline in file input print("Part 1: {}".format(part_one(DATA))) print("Part 2: {}".format(part_two(DATA)))
"""Day 9 of the 2017 advent of code""" def process_garbage(stream, index): """Traverse stream. Break on '>' as end of garbage, return total as size of garbage and the new index """ total = 0 length = len(stream) while index < length: if stream[index] == '>': break elif stream[index] == '!': index += 1 elif stream[index] == '<': pass else: total += 1 index += 1 return (total, index) def process_stream(stream, index, rank=0): """if we hit garbage switch to the helper function else recurse down the stream incrementing the rank for each sub group return the total garbage, and group count """ score = 0 garbage = 0 length = len(stream) while index < length: if stream[index] == '<': (new_garbage, index) = process_garbage(stream, index + 1) garbage += new_garbage elif stream[index] == '{': (new_garbage, new_score, index) = process_stream(stream, index + 1, rank + 1) garbage += new_garbage score += new_score elif stream[index] == '}': break elif stream[index] == '!': index += 1 index += 1 return (garbage, score + rank, index) def part_one(data): """Return the answer to part one of this day""" return process_stream(data, 0)[1] def part_two(data): """Return the answer to part two of this day""" return process_stream(data, 0)[0] if __name__ == '__main__': data = '' with open('input', 'r') as f: for line in f: data += line.rstrip() print('Part 1: {}'.format(part_one(DATA))) print('Part 2: {}'.format(part_two(DATA)))
name = input('Please enter your name:\n') age = int(input("Please enter your age:\n")) color = input('Enter your favorite color:\n') animal = input('Enter your favorite animal:\n') print('Hello my name is' , name , '.') print('I am' , age , 'years old.') print('My favorite color is' , color ,'.') print('My favorite animal is the' , animal , '.')
name = input('Please enter your name:\n') age = int(input('Please enter your age:\n')) color = input('Enter your favorite color:\n') animal = input('Enter your favorite animal:\n') print('Hello my name is', name, '.') print('I am', age, 'years old.') print('My favorite color is', color, '.') print('My favorite animal is the', animal, '.')
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/vis-02-curtailment.ipynb (unless otherwise specified). __all__ = ['get_wf_ids', 'flatten_list', 'get_curtailed_wfs_df', 'load_curtailed_wfs', 'add_next_week_of_data_to_curtailed_wfs'] # Cell flatten_list = lambda list_: [item for sublist in list_ for item in sublist] def get_wf_ids(dictionary_url='https://raw.githubusercontent.com/OSUKED/Power-Station-Dictionary/main/data/output/power_stations.csv'): df_dictionary = pd.read_csv(dictionary_url) wf_ids = flatten_list(df_dictionary.query('fuel_type=="wind"')['sett_bmu_id'].str.split(', ').to_list()) return wf_ids # Cell def get_curtailed_wfs_df( api_key: str=None, start_date: str = '2020-01-01', end_date: str = '2020-01-01 1:30', wf_ids: list=None, dictionary_url: str='https://raw.githubusercontent.com/OSUKED/Power-Station-Dictionary/main/data/output/power_stations.csv' ): if wf_ids is None: wf_ids = get_wf_ids(dictionary_url=dictionary_url) client = Client() df_detsysprices = client.get_DETSYSPRICES(start_date, end_date) df_curtailed_wfs = (df_detsysprices .query('recordType=="BID" & soFlag=="T" & id in @wf_ids') .astype({'bidVolume': float}) .groupby(['local_datetime', 'id']) ['bidVolume'] .sum() .reset_index() .pivot('local_datetime', 'id', 'bidVolume') ) return df_curtailed_wfs # Cell def load_curtailed_wfs( curtailed_wfs_fp: str='data/curtailed_wfs.csv' ): df_curtailed_wfs = pd.read_csv(curtailed_wfs_fp) df_curtailed_wfs = df_curtailed_wfs.set_index('local_datetime') df_curtailed_wfs.index = pd.to_datetime(df_curtailed_wfs.index, utc=True).tz_convert('Europe/London') return df_curtailed_wfs # Cell def add_next_week_of_data_to_curtailed_wfs( curtailed_wfs_fp: str='data/curtailed_wfs.csv', save_data: bool=True, ): df_curtailed_wfs = load_curtailed_wfs(curtailed_wfs_fp) most_recent_ts = df_curtailed_wfs.index.max() start_date = most_recent_ts + pd.Timedelta(minutes=30) end_date = start_date + pd.Timedelta(days=7) client = Client() df_curtailed_wfs_wk = get_curtailed_wfs_df(start_date=start_date, end_date=end_date, wf_ids=wf_ids) df_curtailed_wfs = df_curtailed_wfs.append(df_curtailed_wfs_wk) df_curtailed_wfs.to_csv(curtailed_wfs_fp) return df_curtailed_wfs
__all__ = ['get_wf_ids', 'flatten_list', 'get_curtailed_wfs_df', 'load_curtailed_wfs', 'add_next_week_of_data_to_curtailed_wfs'] flatten_list = lambda list_: [item for sublist in list_ for item in sublist] def get_wf_ids(dictionary_url='https://raw.githubusercontent.com/OSUKED/Power-Station-Dictionary/main/data/output/power_stations.csv'): df_dictionary = pd.read_csv(dictionary_url) wf_ids = flatten_list(df_dictionary.query('fuel_type=="wind"')['sett_bmu_id'].str.split(', ').to_list()) return wf_ids def get_curtailed_wfs_df(api_key: str=None, start_date: str='2020-01-01', end_date: str='2020-01-01 1:30', wf_ids: list=None, dictionary_url: str='https://raw.githubusercontent.com/OSUKED/Power-Station-Dictionary/main/data/output/power_stations.csv'): if wf_ids is None: wf_ids = get_wf_ids(dictionary_url=dictionary_url) client = client() df_detsysprices = client.get_DETSYSPRICES(start_date, end_date) df_curtailed_wfs = df_detsysprices.query('recordType=="BID" & soFlag=="T" & id in @wf_ids').astype({'bidVolume': float}).groupby(['local_datetime', 'id'])['bidVolume'].sum().reset_index().pivot('local_datetime', 'id', 'bidVolume') return df_curtailed_wfs def load_curtailed_wfs(curtailed_wfs_fp: str='data/curtailed_wfs.csv'): df_curtailed_wfs = pd.read_csv(curtailed_wfs_fp) df_curtailed_wfs = df_curtailed_wfs.set_index('local_datetime') df_curtailed_wfs.index = pd.to_datetime(df_curtailed_wfs.index, utc=True).tz_convert('Europe/London') return df_curtailed_wfs def add_next_week_of_data_to_curtailed_wfs(curtailed_wfs_fp: str='data/curtailed_wfs.csv', save_data: bool=True): df_curtailed_wfs = load_curtailed_wfs(curtailed_wfs_fp) most_recent_ts = df_curtailed_wfs.index.max() start_date = most_recent_ts + pd.Timedelta(minutes=30) end_date = start_date + pd.Timedelta(days=7) client = client() df_curtailed_wfs_wk = get_curtailed_wfs_df(start_date=start_date, end_date=end_date, wf_ids=wf_ids) df_curtailed_wfs = df_curtailed_wfs.append(df_curtailed_wfs_wk) df_curtailed_wfs.to_csv(curtailed_wfs_fp) return df_curtailed_wfs
""" 0081. Search in Rotated Sorted Array II Medium Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]). You are given a target value to search. If found in the array return true, otherwise return false. Example 1: Input: nums = [2,5,6,0,0,1,2], target = 0 Output: true Example 2: Input: nums = [2,5,6,0,0,1,2], target = 3 Output: false Follow up: This is a follow up problem to Search in Rotated Sorted Array, where nums may contain duplicates. Would this affect the run-time complexity? How and why? """ class Solution: def search(self, nums: List[int], target: int) -> bool: start = 0 end = len(nums) - 1 while start <= end: mid = (start + end)//2 if nums[mid] == target: return True if nums[mid] == nums[end]: end -= 1 elif nums[mid] > nums[end]: if nums[start] <= target and target < nums[mid]: end = mid - 1 else: start = mid + 1 else: if nums[mid] < target and target <= nums[end]: start = mid + 1 else: end = mid - 1 return False
""" 0081. Search in Rotated Sorted Array II Medium Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]). You are given a target value to search. If found in the array return true, otherwise return false. Example 1: Input: nums = [2,5,6,0,0,1,2], target = 0 Output: true Example 2: Input: nums = [2,5,6,0,0,1,2], target = 3 Output: false Follow up: This is a follow up problem to Search in Rotated Sorted Array, where nums may contain duplicates. Would this affect the run-time complexity? How and why? """ class Solution: def search(self, nums: List[int], target: int) -> bool: start = 0 end = len(nums) - 1 while start <= end: mid = (start + end) // 2 if nums[mid] == target: return True if nums[mid] == nums[end]: end -= 1 elif nums[mid] > nums[end]: if nums[start] <= target and target < nums[mid]: end = mid - 1 else: start = mid + 1 elif nums[mid] < target and target <= nums[end]: start = mid + 1 else: end = mid - 1 return False
"""Top-level package for sta-etl.""" __author__ = """Boris Bauermeister""" __email__ = 'Boris.Bauermeister@gmail' __version__ = '0.1.0' #from sta_etl import *
"""Top-level package for sta-etl.""" __author__ = 'Boris Bauermeister' __email__ = 'Boris.Bauermeister@gmail' __version__ = '0.1.0'
''' No 2. Buatlah fungsi tanpa pengembalian nilai, yaitu fungsi segitigabintang. Misal, jika dipanggil dg segitigabintang(4), keluarannya : * ** *** **** ''' def segitigabintang(baris): for i in range(baris): print('*' * (i+1))
""" No 2. Buatlah fungsi tanpa pengembalian nilai, yaitu fungsi segitigabintang. Misal, jika dipanggil dg segitigabintang(4), keluarannya : * ** *** **** """ def segitigabintang(baris): for i in range(baris): print('*' * (i + 1))
api_output_for_empty_months = """"Usage Data Extract", "", "AccountOwnerId","Account Name","ServiceAdministratorId","SubscriptionId","SubscriptionGuid","Subscription Name","Date","Month","Day","Year","Product","Meter ID","Meter Category","Meter Sub-Category","Meter Region","Meter Name","Consumed Quantity","ResourceRate","ExtendedCost","Resource Location","Consumed Service","Instance ID","ServiceInfo1","ServiceInfo2","AdditionalInfo","Tags","Store Service Identifier","Department Name","Cost Center","Unit Of Measure","Resource Group",' """ sample_data = [{u'AccountName': u'Platform', u'AccountOwnerId': u'donald.duck', u'AdditionalInfo': u'', u'ConsumedQuantity': 23.0, u'ConsumedService': u'Virtual Network', u'CostCenter': u'1234', u'Date': u'03/01/2017', u'Day': 1, u'DepartmentName': u'Engineering', u'ExtendedCost': 0.499222332425423563466, u'InstanceId': u'platform-vnet', u'MeterCategory': u'Virtual Network', u'MeterId': u'c90286c8-adf0-438e-a257-4468387df385', u'MeterName': u'Hours', u'MeterRegion': u'All', u'MeterSubCategory': u'Gateway Hour', u'Month': 3, u'Product': u'Windows Azure Compute 100 Hrs Virtual Network', u'ResourceGroup': u'', u'ResourceLocation': u'All', u'ResourceRate': 0.0304347826086957, u'ServiceAdministratorId': u'', u'ServiceInfo1': u'', u'ServiceInfo2': u'', u'StoreServiceIdentifier': u'', u'SubscriptionGuid': u'abc3455ac-3feg-2b3c5-abe4-ec1111111e6', u'SubscriptionId': 23467313421, u'SubscriptionName': u'Production', u'Tags': u'', u'UnitOfMeasure': u'Hours', u'Year': 2017}, {u'AccountName': u'Platform', u'AccountOwnerId': u'donald.duck', u'AdditionalInfo': u'', u'ConsumedQuantity': 0.064076, u'ConsumedService': u'Microsoft.Storage', u'CostCenter': u'1234', u'Date': u'03/01/2017', u'Day': 1, u'DepartmentName': u'Engineering', u'ExtendedCost': 0.50000011123124314235234522345, u'InstanceId': u'/subscriptions/abc3455ac-3feg-2b3c5-abe4-ec1111111e6/resourceGroups/my-group/providers/Microsoft.Storage/storageAccounts/ss7q3264domxo', u'MeterCategory': u'Windows Azure Storage', u'MeterId': u'd23a5753-ff85-4ddf-af28-8cc5cf2d3882', u'MeterName': u'Standard IO - Page Blob/Disk (GB)', u'MeterRegion': u'All Regions', u'MeterSubCategory': u'Locally Redundant', u'Month': 3, u'Product': u'Locally Redundant Storage Standard IO - Page Blob/Disk', u'ResourceGroup': u'my-group', u'ResourceLocation': u'euwest', u'ResourceRate': 0.0377320156152495, u'ServiceAdministratorId': u'', u'ServiceInfo1': u'', u'ServiceInfo2': u'', u'StoreServiceIdentifier': u'', u'SubscriptionGuid': u'abc3455ac-3feg-2b3c5-abe4-ec1111111e6', u'SubscriptionId': 23467313421, u'SubscriptionName': u'Production', u'Tags': None, u'UnitOfMeasure': u'GB', u'Year': 2017}]
api_output_for_empty_months = '"Usage Data Extract",\n "",\n "AccountOwnerId","Account Name","ServiceAdministratorId","SubscriptionId","SubscriptionGuid","Subscription Name","Date","Month","Day","Year","Product","Meter ID","Meter Category","Meter Sub-Category","Meter Region","Meter Name","Consumed Quantity","ResourceRate","ExtendedCost","Resource Location","Consumed Service","Instance ID","ServiceInfo1","ServiceInfo2","AdditionalInfo","Tags","Store Service Identifier","Department Name","Cost Center","Unit Of Measure","Resource Group",\'\n ' sample_data = [{u'AccountName': u'Platform', u'AccountOwnerId': u'donald.duck', u'AdditionalInfo': u'', u'ConsumedQuantity': 23.0, u'ConsumedService': u'Virtual Network', u'CostCenter': u'1234', u'Date': u'03/01/2017', u'Day': 1, u'DepartmentName': u'Engineering', u'ExtendedCost': 0.4992223324254236, u'InstanceId': u'platform-vnet', u'MeterCategory': u'Virtual Network', u'MeterId': u'c90286c8-adf0-438e-a257-4468387df385', u'MeterName': u'Hours', u'MeterRegion': u'All', u'MeterSubCategory': u'Gateway Hour', u'Month': 3, u'Product': u'Windows Azure Compute 100 Hrs Virtual Network', u'ResourceGroup': u'', u'ResourceLocation': u'All', u'ResourceRate': 0.0304347826086957, u'ServiceAdministratorId': u'', u'ServiceInfo1': u'', u'ServiceInfo2': u'', u'StoreServiceIdentifier': u'', u'SubscriptionGuid': u'abc3455ac-3feg-2b3c5-abe4-ec1111111e6', u'SubscriptionId': 23467313421, u'SubscriptionName': u'Production', u'Tags': u'', u'UnitOfMeasure': u'Hours', u'Year': 2017}, {u'AccountName': u'Platform', u'AccountOwnerId': u'donald.duck', u'AdditionalInfo': u'', u'ConsumedQuantity': 0.064076, u'ConsumedService': u'Microsoft.Storage', u'CostCenter': u'1234', u'Date': u'03/01/2017', u'Day': 1, u'DepartmentName': u'Engineering', u'ExtendedCost': 0.5000001112312431, u'InstanceId': u'/subscriptions/abc3455ac-3feg-2b3c5-abe4-ec1111111e6/resourceGroups/my-group/providers/Microsoft.Storage/storageAccounts/ss7q3264domxo', u'MeterCategory': u'Windows Azure Storage', u'MeterId': u'd23a5753-ff85-4ddf-af28-8cc5cf2d3882', u'MeterName': u'Standard IO - Page Blob/Disk (GB)', u'MeterRegion': u'All Regions', u'MeterSubCategory': u'Locally Redundant', u'Month': 3, u'Product': u'Locally Redundant Storage Standard IO - Page Blob/Disk', u'ResourceGroup': u'my-group', u'ResourceLocation': u'euwest', u'ResourceRate': 0.0377320156152495, u'ServiceAdministratorId': u'', u'ServiceInfo1': u'', u'ServiceInfo2': u'', u'StoreServiceIdentifier': u'', u'SubscriptionGuid': u'abc3455ac-3feg-2b3c5-abe4-ec1111111e6', u'SubscriptionId': 23467313421, u'SubscriptionName': u'Production', u'Tags': None, u'UnitOfMeasure': u'GB', u'Year': 2017}]
#!/usr/bin/python3 m1 = int(input("Enter no. of rows : \t")) n1 = int(input("Enter no. of columns : \t")) a = [] print("Enter Matrix 1:\n") for i in range(n1): row = list(map(int, input().split())) a.append(row) print(a) m2 = int(n1) print("\n Your Matrix 2 must have",n1,"rows and",m1,"columns \n") n2 = int(m1) b = [] for i in range(n2): row = list(map(int, input().split())) b.append(row) print(b) res = [] res = [ [ 0 for i in range(m2) ] for j in range(n1) ] for i in range(len(a)): for j in range(len(b[0])): for k in range(len(b)): res[i][j] += a[i][k] * b[k][j] print(res)
m1 = int(input('Enter no. of rows : \t')) n1 = int(input('Enter no. of columns : \t')) a = [] print('Enter Matrix 1:\n') for i in range(n1): row = list(map(int, input().split())) a.append(row) print(a) m2 = int(n1) print('\n Your Matrix 2 must have', n1, 'rows and', m1, 'columns \n') n2 = int(m1) b = [] for i in range(n2): row = list(map(int, input().split())) b.append(row) print(b) res = [] res = [[0 for i in range(m2)] for j in range(n1)] for i in range(len(a)): for j in range(len(b[0])): for k in range(len(b)): res[i][j] += a[i][k] * b[k][j] print(res)
# ============================================================================= # TexGen: Geometric textile modeller. # Copyright (C) 2015 Louise Brown # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # ============================================================================= # Create a textile Textile = CTextile() # Create a lenticular section Section = CSectionLenticular(0.3, 0.14) Section.AssignSectionMesh(CSectionMeshTriangulate(30)) # Create 4 yarns Yarns = (CYarn(), CYarn(), CYarn(), CYarn()) # Add nodes to the yarns to describe their paths Yarns[0].AddNode(CNode(XYZ(0, 0, 0))) Yarns[0].AddNode(CNode(XYZ(0.35, 0, 0.15))) Yarns[0].AddNode(CNode(XYZ(0.7, 0, 0))) Yarns[1].AddNode(CNode(XYZ(0, 0.35, 0.15))) Yarns[1].AddNode(CNode(XYZ(0.35, 0.35, 0))) Yarns[1].AddNode(CNode(XYZ(0.7, 0.35, 0.15))) Yarns[2].AddNode(CNode(XYZ(0, 0, 0.15))) Yarns[2].AddNode(CNode(XYZ(0, 0.35, 0))) Yarns[2].AddNode(CNode(XYZ(0, 0.7, 0.15))) Yarns[3].AddNode(CNode(XYZ(0.35, 0, 0))) Yarns[3].AddNode(CNode(XYZ(0.35, 0.35, 0.15))) Yarns[3].AddNode(CNode(XYZ(0.35, 0.7, 0))) # We want the same interpolation and section shape for all the yarns so loop over them all for Yarn in Yarns: # Set the interpolation function Yarn.AssignInterpolation(CInterpolationCubic()) # Assign a constant cross-section all along the yarn Yarn.AssignSection(CYarnSectionConstant(Section)) # Set the resolution Yarn.SetResolution(8) # Add repeats to the yarn Yarn.AddRepeat(XYZ(0.7, 0, 0)) Yarn.AddRepeat(XYZ(0, 0.7, 0)) # Add the yarn to our textile Textile.AddYarn(Yarn) # Create a domain and assign it to the textile Textile.AssignDomain(CDomainPlanes(XYZ(0, 0, -0.1), XYZ(0.7, 0.7, 0.25))); # Add the textile with the name "cotton" AddTextile("cotton", Textile)
textile = c_textile() section = c_section_lenticular(0.3, 0.14) Section.AssignSectionMesh(c_section_mesh_triangulate(30)) yarns = (c_yarn(), c_yarn(), c_yarn(), c_yarn()) Yarns[0].AddNode(c_node(xyz(0, 0, 0))) Yarns[0].AddNode(c_node(xyz(0.35, 0, 0.15))) Yarns[0].AddNode(c_node(xyz(0.7, 0, 0))) Yarns[1].AddNode(c_node(xyz(0, 0.35, 0.15))) Yarns[1].AddNode(c_node(xyz(0.35, 0.35, 0))) Yarns[1].AddNode(c_node(xyz(0.7, 0.35, 0.15))) Yarns[2].AddNode(c_node(xyz(0, 0, 0.15))) Yarns[2].AddNode(c_node(xyz(0, 0.35, 0))) Yarns[2].AddNode(c_node(xyz(0, 0.7, 0.15))) Yarns[3].AddNode(c_node(xyz(0.35, 0, 0))) Yarns[3].AddNode(c_node(xyz(0.35, 0.35, 0.15))) Yarns[3].AddNode(c_node(xyz(0.35, 0.7, 0))) for yarn in Yarns: Yarn.AssignInterpolation(c_interpolation_cubic()) Yarn.AssignSection(c_yarn_section_constant(Section)) Yarn.SetResolution(8) Yarn.AddRepeat(xyz(0.7, 0, 0)) Yarn.AddRepeat(xyz(0, 0.7, 0)) Textile.AddYarn(Yarn) Textile.AssignDomain(c_domain_planes(xyz(0, 0, -0.1), xyz(0.7, 0.7, 0.25))) add_textile('cotton', Textile)
# -*- coding: UTF-8 -*- logger.info("Loading 1 objects to table invoicing_plan...") # fields: id, user, today, journal, max_date, partner, course loader.save(create_invoicing_plan(1,6,date(2015,3,1),1,None,None,None)) loader.flush_deferred_objects()
logger.info('Loading 1 objects to table invoicing_plan...') loader.save(create_invoicing_plan(1, 6, date(2015, 3, 1), 1, None, None, None)) loader.flush_deferred_objects()
power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate Leakage': 0.00662954, 'Peak Dynamic': 0.0, 'Runtime Dynamic': 0.0, 'Subthreshold Leakage': 0.0691322, 'Subthreshold Leakage with power gating': 0.0259246}, 'Core': [{'Area': 32.6082, 'Execution Unit/Area': 8.2042, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.064476, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.253331, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.335857, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.122718, 'Execution Unit/Instruction Scheduler/Area': 2.17927, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.188561, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.32652, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.187268, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.70235, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.134893, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 5.73557, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0634506, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00683549, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0740694, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0505527, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.13752, 'Execution Unit/Register Files/Runtime Dynamic': 0.0573882, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.196646, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.52332, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 1.94177, 'Execution Unit/Subthreshold Leakage': 1.83518, 'Execution Unit/Subthreshold Leakage with power gating': 0.709678, 'Gate Leakage': 0.372997, 'Instruction Fetch Unit/Area': 5.86007, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000460515, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000460515, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000398547, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000152883, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000726193, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00204577, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00450687, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0590479, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0485976, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.09123, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.13364, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.165059, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.46206, 'Instruction Fetch Unit/Runtime Dynamic': 0.35385, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932587, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.105913, 'L2/Runtime Dynamic': 0.029468, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80969, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 3.17194, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.980098, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0351387, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.062596, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0625961, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 3.46873, 'Load Store Unit/Runtime Dynamic': 1.3514, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.154351, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.308703, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591622, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283406, 'Memory Management Unit/Area': 0.434579, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0547797, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0563481, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00813591, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.192201, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0219751, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.445403, 'Memory Management Unit/Runtime Dynamic': 0.0783231, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 19.7794, 'Renaming Unit/Area': 0.369768, 'Renaming Unit/FP Front End RAT/Area': 0.168486, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.221364, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925, 'Renaming Unit/Free List/Area': 0.0414755, 'Renaming Unit/Free List/Gate Leakage': 4.15911e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0401324, 'Renaming Unit/Free List/Runtime Dynamic': 0.0123057, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987, 'Renaming Unit/Gate Leakage': 0.00863632, 'Renaming Unit/Int Front End RAT/Area': 0.114751, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0948945, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.328564, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 4.08337, 'Subthreshold Leakage': 6.21877, 'Subthreshold Leakage with power gating': 2.58311}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0264891, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.223494, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.136566, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0663464, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.107014, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0540172, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.227378, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.054944, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.17456, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0258003, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00278287, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0303044, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.020581, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0561047, 'Execution Unit/Register Files/Runtime Dynamic': 0.0233639, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0704667, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.187539, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.06715, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000190311, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000190311, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000166083, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 6.44697e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000295648, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.000842353, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00181317, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0197851, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.2585, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0536059, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.0671989, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.53809, 'Instruction Fetch Unit/Runtime Dynamic': 0.143245, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0437782, 'L2/Runtime Dynamic': 0.0122258, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.03053, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.401989, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0256686, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0256687, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.15174, 'Load Store Unit/Runtime Dynamic': 0.554247, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0632944, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.126589, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0224634, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0231115, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.078249, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.00881622, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.272946, 'Memory Management Unit/Runtime Dynamic': 0.0319277, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.7706, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0678693, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00381932, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0328129, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.104502, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.9133, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.026525, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.223522, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.134947, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0653442, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.105398, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0532012, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.223943, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.0540457, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.17099, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0254944, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00274083, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0300875, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0202701, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0555819, 'Execution Unit/Register Files/Runtime Dynamic': 0.0230109, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0700187, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.184639, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.06049, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000189419, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000189419, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000165268, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 6.41336e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000291182, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.000835288, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00180597, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0194862, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.23949, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0535352, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.0661838, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.51816, 'Instruction Fetch Unit/Runtime Dynamic': 0.141846, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0430708, 'L2/Runtime Dynamic': 0.0119442, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.01377, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.39345, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0251266, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0251265, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.13243, 'Load Store Unit/Runtime Dynamic': 0.542492, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.061958, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.123916, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0219891, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0226268, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.077067, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.00880337, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.270949, 'Memory Management Unit/Runtime Dynamic': 0.0314302, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.7251, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0670636, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.0037643, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0323038, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.103132, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.89134, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0267206, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.223676, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.135946, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.065922, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.10633, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0536717, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.225923, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.054553, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.17378, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0256832, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00276506, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0303382, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0204493, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0560214, 'Execution Unit/Register Files/Runtime Dynamic': 0.0232144, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0705957, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.186858, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.06505, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000185308, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000185308, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000161703, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 6.27614e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000293756, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.000826076, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00176602, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0196585, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.25045, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0538894, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.066769, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.52965, 'Instruction Fetch Unit/Runtime Dynamic': 0.142909, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0448622, 'L2/Runtime Dynamic': 0.0125198, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.03051, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.40245, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0256681, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0256682, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.15172, 'Load Store Unit/Runtime Dynamic': 0.554705, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0632932, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.126587, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.022463, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0231278, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.0777482, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.00886089, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.272444, 'Memory Management Unit/Runtime Dynamic': 0.0319887, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.7619, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0675603, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00379641, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0326076, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.103964, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.91114, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 8.437790202507701, 'Runtime Dynamic': 8.437790202507701, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.377528, 'Runtime Dynamic': 0.14026, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 61.4145, 'Peak Power': 94.5267, 'Runtime Dynamic': 9.9394, 'Subthreshold Leakage': 31.5774, 'Subthreshold Leakage with power gating': 13.9484, 'Total Cores/Area': 128.669, 'Total Cores/Gate Leakage': 1.4798, 'Total Cores/Peak Dynamic': 61.037, 'Total Cores/Runtime Dynamic': 9.79914, 'Total Cores/Subthreshold Leakage': 24.7074, 'Total Cores/Subthreshold Leakage with power gating': 10.2429, 'Total L3s/Area': 61.9075, 'Total L3s/Gate Leakage': 0.0484137, 'Total L3s/Peak Dynamic': 0.377528, 'Total L3s/Runtime Dynamic': 0.14026, 'Total L3s/Subthreshold Leakage': 6.80085, 'Total L3s/Subthreshold Leakage with power gating': 3.32364, 'Total Leakage': 33.1122, 'Total NoCs/Area': 1.33155, 'Total NoCs/Gate Leakage': 0.00662954, 'Total NoCs/Peak Dynamic': 0.0, 'Total NoCs/Runtime Dynamic': 0.0, 'Total NoCs/Subthreshold Leakage': 0.0691322, 'Total NoCs/Subthreshold Leakage with power gating': 0.0259246}}
power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate Leakage': 0.00662954, 'Peak Dynamic': 0.0, 'Runtime Dynamic': 0.0, 'Subthreshold Leakage': 0.0691322, 'Subthreshold Leakage with power gating': 0.0259246}, 'Core': [{'Area': 32.6082, 'Execution Unit/Area': 8.2042, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.064476, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.253331, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.335857, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.122718, 'Execution Unit/Instruction Scheduler/Area': 2.17927, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.188561, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.32652, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.187268, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.70235, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.134893, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 5.73557, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0634506, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00683549, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0740694, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0505527, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.13752, 'Execution Unit/Register Files/Runtime Dynamic': 0.0573882, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.196646, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.52332, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 1.94177, 'Execution Unit/Subthreshold Leakage': 1.83518, 'Execution Unit/Subthreshold Leakage with power gating': 0.709678, 'Gate Leakage': 0.372997, 'Instruction Fetch Unit/Area': 5.86007, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000460515, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000460515, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000398547, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000152883, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000726193, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00204577, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00450687, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0590479, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0485976, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.09123, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.13364, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.165059, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.46206, 'Instruction Fetch Unit/Runtime Dynamic': 0.35385, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932587, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.105913, 'L2/Runtime Dynamic': 0.029468, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80969, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 3.17194, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.980098, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0351387, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.062596, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0625961, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 3.46873, 'Load Store Unit/Runtime Dynamic': 1.3514, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.154351, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.308703, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591622, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283406, 'Memory Management Unit/Area': 0.434579, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0547797, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0563481, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00813591, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.192201, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0219751, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.445403, 'Memory Management Unit/Runtime Dynamic': 0.0783231, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 19.7794, 'Renaming Unit/Area': 0.369768, 'Renaming Unit/FP Front End RAT/Area': 0.168486, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.221364, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925, 'Renaming Unit/Free List/Area': 0.0414755, 'Renaming Unit/Free List/Gate Leakage': 4.15911e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0401324, 'Renaming Unit/Free List/Runtime Dynamic': 0.0123057, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987, 'Renaming Unit/Gate Leakage': 0.00863632, 'Renaming Unit/Int Front End RAT/Area': 0.114751, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0948945, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.328564, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 4.08337, 'Subthreshold Leakage': 6.21877, 'Subthreshold Leakage with power gating': 2.58311}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0264891, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.223494, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.136566, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0663464, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.107014, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0540172, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.227378, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.054944, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.17456, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0258003, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00278287, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0303044, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.020581, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0561047, 'Execution Unit/Register Files/Runtime Dynamic': 0.0233639, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0704667, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.187539, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.06715, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000190311, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000190311, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000166083, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 6.44697e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000295648, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.000842353, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00181317, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0197851, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.2585, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0536059, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.0671989, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.53809, 'Instruction Fetch Unit/Runtime Dynamic': 0.143245, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0437782, 'L2/Runtime Dynamic': 0.0122258, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.03053, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.401989, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0256686, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0256687, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.15174, 'Load Store Unit/Runtime Dynamic': 0.554247, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0632944, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.126589, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0224634, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0231115, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.078249, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.00881622, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.272946, 'Memory Management Unit/Runtime Dynamic': 0.0319277, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.7706, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0678693, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00381932, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0328129, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.104502, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.9133, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.026525, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.223522, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.134947, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0653442, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.105398, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0532012, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.223943, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.0540457, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.17099, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0254944, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00274083, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0300875, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0202701, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0555819, 'Execution Unit/Register Files/Runtime Dynamic': 0.0230109, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0700187, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.184639, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.06049, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000189419, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000189419, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000165268, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 6.41336e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000291182, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.000835288, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00180597, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0194862, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.23949, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0535352, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.0661838, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.51816, 'Instruction Fetch Unit/Runtime Dynamic': 0.141846, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0430708, 'L2/Runtime Dynamic': 0.0119442, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.01377, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.39345, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0251266, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0251265, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.13243, 'Load Store Unit/Runtime Dynamic': 0.542492, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.061958, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.123916, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0219891, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0226268, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.077067, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.00880337, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.270949, 'Memory Management Unit/Runtime Dynamic': 0.0314302, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.7251, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0670636, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.0037643, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0323038, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.103132, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.89134, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0267206, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.223676, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.135946, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.065922, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.10633, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0536717, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.225923, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.054553, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.17378, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0256832, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00276506, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0303382, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0204493, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0560214, 'Execution Unit/Register Files/Runtime Dynamic': 0.0232144, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0705957, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.186858, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.06505, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000185308, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000185308, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000161703, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 6.27614e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000293756, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.000826076, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00176602, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0196585, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.25045, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0538894, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.066769, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.52965, 'Instruction Fetch Unit/Runtime Dynamic': 0.142909, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0448622, 'L2/Runtime Dynamic': 0.0125198, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.03051, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.40245, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0256681, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0256682, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.15172, 'Load Store Unit/Runtime Dynamic': 0.554705, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0632932, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.126587, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.022463, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0231278, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.0777482, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.00886089, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.272444, 'Memory Management Unit/Runtime Dynamic': 0.0319887, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.7619, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0675603, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00379641, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0326076, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.103964, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.91114, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 8.437790202507701, 'Runtime Dynamic': 8.437790202507701, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.377528, 'Runtime Dynamic': 0.14026, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 61.4145, 'Peak Power': 94.5267, 'Runtime Dynamic': 9.9394, 'Subthreshold Leakage': 31.5774, 'Subthreshold Leakage with power gating': 13.9484, 'Total Cores/Area': 128.669, 'Total Cores/Gate Leakage': 1.4798, 'Total Cores/Peak Dynamic': 61.037, 'Total Cores/Runtime Dynamic': 9.79914, 'Total Cores/Subthreshold Leakage': 24.7074, 'Total Cores/Subthreshold Leakage with power gating': 10.2429, 'Total L3s/Area': 61.9075, 'Total L3s/Gate Leakage': 0.0484137, 'Total L3s/Peak Dynamic': 0.377528, 'Total L3s/Runtime Dynamic': 0.14026, 'Total L3s/Subthreshold Leakage': 6.80085, 'Total L3s/Subthreshold Leakage with power gating': 3.32364, 'Total Leakage': 33.1122, 'Total NoCs/Area': 1.33155, 'Total NoCs/Gate Leakage': 0.00662954, 'Total NoCs/Peak Dynamic': 0.0, 'Total NoCs/Runtime Dynamic': 0.0, 'Total NoCs/Subthreshold Leakage': 0.0691322, 'Total NoCs/Subthreshold Leakage with power gating': 0.0259246}}
# Given the root to a binary tree, implement serialize(root), which serializes the tree into a string, and deserialize(s), which deserializes the string back into the tree. # # For example, given the following Node class: class Node: def __init__(self, val, left=None, right=None): self.val = val self.left = left self.right = right # The following test should pass: # node = Node('root', Node('left', Node('left.left')), Node('right')) # assert deserialize(serialize(node)).left.left.val == 'left.left' def serialize(root, string=''): string += root.val string += '(' if root.left != None: string = serialize(root.left,string) string += '|' if root.right != None: string = serialize(root.right,string) string += ')' return string def deserialize(string): nestDepth = 0 end = None for x in range(0,len(string)): if string[x] == ')': nestDepth -= 1 if string[x] == '(': if nestDepth == 0: val = string[:x] argStart = x nestDepth += 1 if string[x] == '|' and nestDepth <= 1: left = deserialize(string[argStart + 1:x]) right = deserialize(string[x + 1:-1]) end = Node(val, left, right) return end node = Node('root', Node('left', Node('left.left')), Node('right')) assert deserialize(serialize(node)).left.left.val == 'left.left'
class Node: def __init__(self, val, left=None, right=None): self.val = val self.left = left self.right = right def serialize(root, string=''): string += root.val string += '(' if root.left != None: string = serialize(root.left, string) string += '|' if root.right != None: string = serialize(root.right, string) string += ')' return string def deserialize(string): nest_depth = 0 end = None for x in range(0, len(string)): if string[x] == ')': nest_depth -= 1 if string[x] == '(': if nestDepth == 0: val = string[:x] arg_start = x nest_depth += 1 if string[x] == '|' and nestDepth <= 1: left = deserialize(string[argStart + 1:x]) right = deserialize(string[x + 1:-1]) end = node(val, left, right) return end node = node('root', node('left', node('left.left')), node('right')) assert deserialize(serialize(node)).left.left.val == 'left.left'
store.set_global_value('hotkey', '<meta>+r') if re.match('.*(Hyper)', window.get_active_class()): logging.debug('terminal refresh buffer') engine.set_return_value('<ctrl>+<shift>+r') else: logging.debug('normal') engine.set_return_value('<ctrl>+r') engine.run_script('combo')
store.set_global_value('hotkey', '<meta>+r') if re.match('.*(Hyper)', window.get_active_class()): logging.debug('terminal refresh buffer') engine.set_return_value('<ctrl>+<shift>+r') else: logging.debug('normal') engine.set_return_value('<ctrl>+r') engine.run_script('combo')
# Defining the left function def left(i): return 2*i+1 # Defining the right function def right(i): return 2*i+2 # Defining the parent node function def parent(i): return (i-1)//2 # Max_Heapify def max_heapify(arr,n,i): l=left(i) r=right(i) largest=i if n>l and arr[largest]<arr[l] : largest=l if n>r and arr[largest]<arr[r]: largest=r if largest!=i : arr[largest],arr[i]=arr[i],arr[largest] #Hepify the root again max_heapify(arr,n,largest) # build_max_heap function def build_max_heap(arr): for i in range(len(arr)//2,-1,-1): max_heapify(arr,len(arr),i) #Push Up function def pushup(arr,i): if arr[parent(i)]<arr[i]: arr[i],arr[parent(i)]=arr[parent(i)],arr[i] pushup(arr, parent(i)) # Push Down function def push_down(arr,n,i): l=left(i) r=right(i) if l >=n : return i elif r>=n: arr[i], arr[l] = arr[l], arr[i] return l else: if arr[l]>arr[r]: arr[i],arr[l]=arr[l],arr[i] largest=l else: arr[i],arr[r]=arr[r],arr[i] largest=r return push_down(arr,n,largest) # Heapsort Algorithm def heapsort_variant(arr): size=len(arr) # Build max heap build_max_heap(arr) for i in range(size-1, 0, -1): # Swapping the last element and the first arr[i], arr[0] = arr[0], arr[i] # Maintaining the heap leafpos = push_down(arr,i-1,0) pushup(arr, leafpos)
def left(i): return 2 * i + 1 def right(i): return 2 * i + 2 def parent(i): return (i - 1) // 2 def max_heapify(arr, n, i): l = left(i) r = right(i) largest = i if n > l and arr[largest] < arr[l]: largest = l if n > r and arr[largest] < arr[r]: largest = r if largest != i: (arr[largest], arr[i]) = (arr[i], arr[largest]) max_heapify(arr, n, largest) def build_max_heap(arr): for i in range(len(arr) // 2, -1, -1): max_heapify(arr, len(arr), i) def pushup(arr, i): if arr[parent(i)] < arr[i]: (arr[i], arr[parent(i)]) = (arr[parent(i)], arr[i]) pushup(arr, parent(i)) def push_down(arr, n, i): l = left(i) r = right(i) if l >= n: return i elif r >= n: (arr[i], arr[l]) = (arr[l], arr[i]) return l else: if arr[l] > arr[r]: (arr[i], arr[l]) = (arr[l], arr[i]) largest = l else: (arr[i], arr[r]) = (arr[r], arr[i]) largest = r return push_down(arr, n, largest) def heapsort_variant(arr): size = len(arr) build_max_heap(arr) for i in range(size - 1, 0, -1): (arr[i], arr[0]) = (arr[0], arr[i]) leafpos = push_down(arr, i - 1, 0) pushup(arr, leafpos)
#num1=int(raw_input("Enter num #1:")) #num2=int(raw_input("Enter num #2:")) #total= num1 + num2 #print("The sum is: "+ str(total)) # need to be a string so computer can read it # all strings can be integers but not all integers can be strings # num = int(raw_input("Enter a number:")) # if num>0: # print("That's a postive num!") # elif num<0: # print("That's a negative num!") # else: # print("Zero is neither postive nor negative!") # string = "hello" # for letter in string: # print(letter.upper()) # # for i in range(5): repaeted executed depend on how may letters in the string so hello would be 5 # print(i) # # x=1 # while x <=5: # print(x) # x=x+1 # my_name= "B" # friend1= "A" # friend2= "J" # friend3= "M" # print( # "My name is %s and my friends are %s, %s, and %s" % # (my_name,friend1,friend2,friend3 ) # ) # # name= "C" # age= 19 # print("My name is "+ name + "and I'm " + str(age)+"years old.") one way # print("My name is %s and I'm %s years old." %(name,age)) second way # def greetAgent(): # print("B. James Bond.") # greetAgent() always call the func # # def greetAgent(first_name, last_name): # print("%s. %s. %s." % (last_name, first_name, last_name)) # One way # # # def createAgentGreeting(first_name, last_name): # return"%s. %s. %s." % (last_name, first_name, last_name) # # print(createAgentGreeting("Citlally", "G")) # second way word = "computerz" print(word[:5]) # prints "compu" print(word[:-1]) # prints "computer" print(word[4:]) # prints "uterz" print(word[-3:]) # prints "erz"
word = 'computerz' print(word[:5]) print(word[:-1]) print(word[4:]) print(word[-3:])
class SinavroObject: pass def init(self, val): self.value = val gencls = lambda n: type(f'Sinavro{n.title()}', (SinavroObject,), {'__init__': init, 'type': n}) SinavroInt = gencls('int') SinavroFloat = gencls('float') SinavroString = gencls('string') SinavroBool = gencls('bool') SinavroArray = gencls('array')
class Sinavroobject: pass def init(self, val): self.value = val gencls = lambda n: type(f'Sinavro{n.title()}', (SinavroObject,), {'__init__': init, 'type': n}) sinavro_int = gencls('int') sinavro_float = gencls('float') sinavro_string = gencls('string') sinavro_bool = gencls('bool') sinavro_array = gencls('array')
def lambda_handler(event): try: first_num = event["queryStringParameters"]["firstNum"] except KeyError: first_num = 0 try: second_num = event["queryStringParameters"]["secondNum"] except KeyError: second_num = 0 try: operation_type = event["queryStringParameters"]["operation"] if operation_type == "add": result = add(first_num, second_num) elif operation_type == "subtract": result = subtract(first_num, second_num) elif operation_type == "subtract": result = multiply(first_num, second_num) else: result = "No Operation" except KeyError: return "No Operation" return result def add(first_num, second_num): result = int(first_num) + int(second_num) print("The result of % s + % s = %s" % (first_num, second_num, result)) return {"body": result, "statusCode": 200} def subtract(first_num, second_num): result = int(first_num) - int(second_num) print("The result of % s - % s = %s" % (first_num, second_num, result)) return {"body": result, "statusCode": 200} def multiply(first_num, second_num): result = int(first_num) * int(second_num) print("The result of % s * % s = %s" % (first_num, second_num, result)) return {"body": result, "statusCode": 200}
def lambda_handler(event): try: first_num = event['queryStringParameters']['firstNum'] except KeyError: first_num = 0 try: second_num = event['queryStringParameters']['secondNum'] except KeyError: second_num = 0 try: operation_type = event['queryStringParameters']['operation'] if operation_type == 'add': result = add(first_num, second_num) elif operation_type == 'subtract': result = subtract(first_num, second_num) elif operation_type == 'subtract': result = multiply(first_num, second_num) else: result = 'No Operation' except KeyError: return 'No Operation' return result def add(first_num, second_num): result = int(first_num) + int(second_num) print('The result of % s + % s = %s' % (first_num, second_num, result)) return {'body': result, 'statusCode': 200} def subtract(first_num, second_num): result = int(first_num) - int(second_num) print('The result of % s - % s = %s' % (first_num, second_num, result)) return {'body': result, 'statusCode': 200} def multiply(first_num, second_num): result = int(first_num) * int(second_num) print('The result of % s * % s = %s' % (first_num, second_num, result)) return {'body': result, 'statusCode': 200}
input1 = int(input("Enter the first number: ")) input2 = int(input("Enter the second number: ")) input3 = int(input("Enter the third number: ")) input4 = int(input("Enter the fourth number: ")) input5 = int(input("Enter the fifth number: ")) tuple_num = [] tuple_num.append(input1) tuple_num.append(input2) tuple_num.append(input3) tuple_num.append(input4) tuple_num.append(input5) print(tuple_num) tuple_num.sort() for a in tuple_num: print(a * a)
input1 = int(input('Enter the first number: ')) input2 = int(input('Enter the second number: ')) input3 = int(input('Enter the third number: ')) input4 = int(input('Enter the fourth number: ')) input5 = int(input('Enter the fifth number: ')) tuple_num = [] tuple_num.append(input1) tuple_num.append(input2) tuple_num.append(input3) tuple_num.append(input4) tuple_num.append(input5) print(tuple_num) tuple_num.sort() for a in tuple_num: print(a * a)
# Time: O(n!) # Space: O(n) class Solution(object): def constructDistancedSequence(self, n): """ :type n: int :rtype: List[int] """ def backtracking(n, i, result, lookup): if i == len(result): return True if result[i]: return backtracking(n, i+1, result, lookup) for x in reversed(range(1, n+1)): j = i if x == 1 else i+x if lookup[x] or j >= len(result) or result[j]: continue result[i], result[j], lookup[x] = x, x, True if backtracking(n, i+1, result, lookup): return True result[i], result[j], lookup[x] = 0, 0, False return False result, lookup = [0]*(2*n-1), [False]*(n+1) backtracking(n, 0, result, lookup) return result
class Solution(object): def construct_distanced_sequence(self, n): """ :type n: int :rtype: List[int] """ def backtracking(n, i, result, lookup): if i == len(result): return True if result[i]: return backtracking(n, i + 1, result, lookup) for x in reversed(range(1, n + 1)): j = i if x == 1 else i + x if lookup[x] or j >= len(result) or result[j]: continue (result[i], result[j], lookup[x]) = (x, x, True) if backtracking(n, i + 1, result, lookup): return True (result[i], result[j], lookup[x]) = (0, 0, False) return False (result, lookup) = ([0] * (2 * n - 1), [False] * (n + 1)) backtracking(n, 0, result, lookup) return result
#Longest Common Prefix in python #Implementation of python program to find the longest common prefix amongst the given list of strings. #If there is no common prefix then returning 0. #define the function to evaluate the longest common prefix def longestCommonPrefix(s): p = '' #declare an empty string for i in range(len(min(s, key=len))): f = s[0][i] for j in s[1:]: if j[i] != f: return p p += f return p #return the longest common prefix n = int(input("Enter the number of names in list for input:")) print("Enter the Strings:") s = [input() for i in range(n)] if(longestCommonPrefix(s)): print("The Common Prefix is:" ,longestCommonPrefix(s)) else: print("There is no common prefix for the given list of strings, hence the answer is:", 0)
def longest_common_prefix(s): p = '' for i in range(len(min(s, key=len))): f = s[0][i] for j in s[1:]: if j[i] != f: return p p += f return p n = int(input('Enter the number of names in list for input:')) print('Enter the Strings:') s = [input() for i in range(n)] if longest_common_prefix(s): print('The Common Prefix is:', longest_common_prefix(s)) else: print('There is no common prefix for the given list of strings, hence the answer is:', 0)
#!/usr/bin/env python P = int(input()) for _ in range(P): N, n, m = [int(i) for i in input().split()] print(f"{N} {(n - m) * m + 1}")
p = int(input()) for _ in range(P): (n, n, m) = [int(i) for i in input().split()] print(f'{N} {(n - m) * m + 1}')
def handler(event, context): return { "statusCode": 302, "headers": { "Location": "https://www.nhsx.nhs.uk/covid-19-response/data-and-covid-19/national-covid-19-chest-imaging-database-nccid/" }, }
def handler(event, context): return {'statusCode': 302, 'headers': {'Location': 'https://www.nhsx.nhs.uk/covid-19-response/data-and-covid-19/national-covid-19-chest-imaging-database-nccid/'}}
__name__ = 'factory_djoy' __version__ = '2.2.0' __author__ = 'James Cooke' __copyright__ = '2021, {}'.format(__author__) __description__ = 'Factories for Django, creating valid model instances every time.' __email__ = 'github@jamescooke.info'
__name__ = 'factory_djoy' __version__ = '2.2.0' __author__ = 'James Cooke' __copyright__ = '2021, {}'.format(__author__) __description__ = 'Factories for Django, creating valid model instances every time.' __email__ = 'github@jamescooke.info'
class CyclesMeshSettings: pass
class Cyclesmeshsettings: pass
l = ["+", "-"] def backRec(x): for j in l: x.append(j) if consistent(x): if solution(x): solutionFound(x) backRec(x) x.pop() def consistent(s): return len(s) < n def solution(s): summ = list2[0] if not len(s) == n - 1: return False for i in range(n - 1): if s[i] == "-": summ -= list2[i + 1] else: summ += list2[i + 1] return summ > 0 def solutionFound(s): print(s) n = int(input("Give number")) list2 = [] for i in range(n): list2.append(int(input(str(i) + ":"))) backRec([])
l = ['+', '-'] def back_rec(x): for j in l: x.append(j) if consistent(x): if solution(x): solution_found(x) back_rec(x) x.pop() def consistent(s): return len(s) < n def solution(s): summ = list2[0] if not len(s) == n - 1: return False for i in range(n - 1): if s[i] == '-': summ -= list2[i + 1] else: summ += list2[i + 1] return summ > 0 def solution_found(s): print(s) n = int(input('Give number')) list2 = [] for i in range(n): list2.append(int(input(str(i) + ':'))) back_rec([])
# block between mission & 6th and howard & 5th in SF. # appears to have lots of buses. # https://www.openstreetmap.org/way/88572932 -- Mission St # https://www.openstreetmap.org/relation/3406710 -- 14X to Daly City # https://www.openstreetmap.org/relation/3406709 -- 14X to Downtown # https://www.openstreetmap.org/relation/3406708 -- 14R to Mission # https://www.openstreetmap.org/relation/3000713 -- 14R to Downtown # ... and many more bus route relations z, x, y = (16, 10484, 25329) # test that at least one is present in tiles up to z12 while z >= 12: assert_has_feature( z, x, y, 'roads', { 'is_bus_route': True }) z, x, y = (z-1, x/2, y/2) # but that none are present in the parent tile at z11 assert_no_matching_feature( z, x, y, 'roads', { 'is_bus_route': True })
(z, x, y) = (16, 10484, 25329) while z >= 12: assert_has_feature(z, x, y, 'roads', {'is_bus_route': True}) (z, x, y) = (z - 1, x / 2, y / 2) assert_no_matching_feature(z, x, y, 'roads', {'is_bus_route': True})
class Zoo: def __init__(self, name, locations): self.name = name self.stillActive = True self.locations = locations self.currentLocation = self.locations[1] def changeLocation(self, direction): neighborID = self.currentLocation.neighbors[direction] self.currentLocation = self.locations[neighborID] def exit(self): if self.currentLocation.allowExit: self.stillActive = False class Location: def __init__(self, id, name, animal, neighbors, allowExit): self.id = id self.name = name self.animal = animal self.neighbors = neighbors self.allowExit = allowExit class Animal: def __init__(self, name, soundMade, foodEaten, shelterType): self.name = name self.soundMade = soundMade self.foodEaten = foodEaten self.shelterType = shelterType def speak(self): return 'The ' + self.name + ' sounds like: ' + self.soundMade def diet(self): return 'The ' + self.name + ' eats ' + self.foodEaten def shelter(self): return 'The ' + self.name + ' prefers: ' + self.shelterType
class Zoo: def __init__(self, name, locations): self.name = name self.stillActive = True self.locations = locations self.currentLocation = self.locations[1] def change_location(self, direction): neighbor_id = self.currentLocation.neighbors[direction] self.currentLocation = self.locations[neighborID] def exit(self): if self.currentLocation.allowExit: self.stillActive = False class Location: def __init__(self, id, name, animal, neighbors, allowExit): self.id = id self.name = name self.animal = animal self.neighbors = neighbors self.allowExit = allowExit class Animal: def __init__(self, name, soundMade, foodEaten, shelterType): self.name = name self.soundMade = soundMade self.foodEaten = foodEaten self.shelterType = shelterType def speak(self): return 'The ' + self.name + ' sounds like: ' + self.soundMade def diet(self): return 'The ' + self.name + ' eats ' + self.foodEaten def shelter(self): return 'The ' + self.name + ' prefers: ' + self.shelterType
UNKNOWN = u'' def describe_track(track): """ Prepare a short human-readable Track description. track (mopidy.models.Track): Track to source song data from. """ title = track.name or UNKNOWN # Simple/regular case: normal song (e.g. from Spotify). if track.artists: artist = next(iter(track.artists)).name elif track.album and track.album.artists: # Album-only artist case. artist = next(iter(track.album.artists)).name else: artist = UNKNOWN if track.album and track.album.name: album = track.album.name else: album = UNKNOWN return u';'.join([title, artist, album]) def describe_stream(raw_title): """ Attempt to parse given stream title in very rudimentary way. """ title = UNKNOWN artist = UNKNOWN album = UNKNOWN # Very common separator. if '-' in raw_title: parts = raw_title.split('-') artist = parts[0].strip() title = parts[1].strip() else: # Just assume we only have track title. title = raw_title return u';'.join([title, artist, album])
unknown = u'' def describe_track(track): """ Prepare a short human-readable Track description. track (mopidy.models.Track): Track to source song data from. """ title = track.name or UNKNOWN if track.artists: artist = next(iter(track.artists)).name elif track.album and track.album.artists: artist = next(iter(track.album.artists)).name else: artist = UNKNOWN if track.album and track.album.name: album = track.album.name else: album = UNKNOWN return u';'.join([title, artist, album]) def describe_stream(raw_title): """ Attempt to parse given stream title in very rudimentary way. """ title = UNKNOWN artist = UNKNOWN album = UNKNOWN if '-' in raw_title: parts = raw_title.split('-') artist = parts[0].strip() title = parts[1].strip() else: title = raw_title return u';'.join([title, artist, album])
# -*- coding: utf-8 -*- class Tile(int): TILES = ''' 1s 2s 3s 4s 5s 6s 7s 8s 9s 1p 2p 3p 4p 5p 6p 7p 8p 9p 1m 2m 3m 4m 5m 6m 7m 8m 9m ew sw ww nw wd gd rd '''.split() def as_data(self): return self.TILES[self // 4] class TilesConverter(object): @staticmethod def to_one_line_string(tiles): """ Convert 136 tiles array to the one line string Example of output 123s123p123m33z """ tiles = sorted(tiles) man = [t for t in tiles if t < 36] pin = [t for t in tiles if 36 <= t < 72] pin = [t - 36 for t in pin] sou = [t for t in tiles if 72 <= t < 108] sou = [t - 72 for t in sou] honors = [t for t in tiles if t >= 108] honors = [t - 108 for t in honors] sou = sou and ''.join([str((i // 4) + 1) for i in sou]) + 's' or '' pin = pin and ''.join([str((i // 4) + 1) for i in pin]) + 'p' or '' man = man and ''.join([str((i // 4) + 1) for i in man]) + 'm' or '' honors = honors and ''.join([str((i // 4) + 1) for i in honors]) + 'z' or '' return man + pin + sou + honors @staticmethod def to_34_array(tiles): """ Convert 136 array to the 34 tiles array """ results = [0] * 34 for tile in tiles: tile //= 4 results[tile] += 1 return results @staticmethod def string_to_136_array(sou=None, pin=None, man=None, honors=None): """ Method to convert one line string tiles format to the 136 array We need it to increase readability of our tests """ def _split_string(string, offset): data = [] if not string: return [] for i in string: tile = offset + (int(i) - 1) * 4 data.append(tile) return data results = _split_string(man, 0) results += _split_string(pin, 36) results += _split_string(sou, 72) results += _split_string(honors, 108) return results @staticmethod def string_to_34_array(sou=None, pin=None, man=None, honors=None): """ Method to convert one line string tiles format to the 34 array We need it to increase readability of our tests """ results = TilesConverter.string_to_136_array(sou, pin, man, honors) results = TilesConverter.to_34_array(results) return results @staticmethod def find_34_tile_in_136_array(tile34, tiles): """ Our shanten calculator will operate with 34 tiles format, after calculations we need to find calculated 34 tile in player's 136 tiles. For example we had 0 tile from 34 array in 136 array it can be present as 0, 1, 2, 3 """ if tile34 > 33: return None tile = tile34 * 4 possible_tiles = [tile] + [tile + i for i in range(1, 4)] found_tile = None for possible_tile in possible_tiles: if possible_tile in tiles: found_tile = possible_tile break return found_tile
class Tile(int): tiles = '\n 1s 2s 3s 4s 5s 6s 7s 8s 9s\n 1p 2p 3p 4p 5p 6p 7p 8p 9p\n 1m 2m 3m 4m 5m 6m 7m 8m 9m\n ew sw ww nw\n wd gd rd\n '.split() def as_data(self): return self.TILES[self // 4] class Tilesconverter(object): @staticmethod def to_one_line_string(tiles): """ Convert 136 tiles array to the one line string Example of output 123s123p123m33z """ tiles = sorted(tiles) man = [t for t in tiles if t < 36] pin = [t for t in tiles if 36 <= t < 72] pin = [t - 36 for t in pin] sou = [t for t in tiles if 72 <= t < 108] sou = [t - 72 for t in sou] honors = [t for t in tiles if t >= 108] honors = [t - 108 for t in honors] sou = sou and ''.join([str(i // 4 + 1) for i in sou]) + 's' or '' pin = pin and ''.join([str(i // 4 + 1) for i in pin]) + 'p' or '' man = man and ''.join([str(i // 4 + 1) for i in man]) + 'm' or '' honors = honors and ''.join([str(i // 4 + 1) for i in honors]) + 'z' or '' return man + pin + sou + honors @staticmethod def to_34_array(tiles): """ Convert 136 array to the 34 tiles array """ results = [0] * 34 for tile in tiles: tile //= 4 results[tile] += 1 return results @staticmethod def string_to_136_array(sou=None, pin=None, man=None, honors=None): """ Method to convert one line string tiles format to the 136 array We need it to increase readability of our tests """ def _split_string(string, offset): data = [] if not string: return [] for i in string: tile = offset + (int(i) - 1) * 4 data.append(tile) return data results = _split_string(man, 0) results += _split_string(pin, 36) results += _split_string(sou, 72) results += _split_string(honors, 108) return results @staticmethod def string_to_34_array(sou=None, pin=None, man=None, honors=None): """ Method to convert one line string tiles format to the 34 array We need it to increase readability of our tests """ results = TilesConverter.string_to_136_array(sou, pin, man, honors) results = TilesConverter.to_34_array(results) return results @staticmethod def find_34_tile_in_136_array(tile34, tiles): """ Our shanten calculator will operate with 34 tiles format, after calculations we need to find calculated 34 tile in player's 136 tiles. For example we had 0 tile from 34 array in 136 array it can be present as 0, 1, 2, 3 """ if tile34 > 33: return None tile = tile34 * 4 possible_tiles = [tile] + [tile + i for i in range(1, 4)] found_tile = None for possible_tile in possible_tiles: if possible_tile in tiles: found_tile = possible_tile break return found_tile
def test_get_news(sa_session, sa_backend, sa_child_news): assert(sa_child_news == sa_backend.get_news(sa_child_news.id)) assert(sa_backend.get_news(None) is None) def test_get_news_list(sa_session, sa_backend, sa_child_news): assert(sa_child_news in sa_backend.get_news_list()) assert(sa_child_news in sa_backend.get_news_list( owner=sa_child_news.owner)) assert(sa_child_news in sa_backend.get_news_list( root_url=sa_child_news.root.url)) assert(sa_child_news in sa_backend.get_news_list( owner=sa_child_news.owner, root_url=sa_child_news.root.url )) def test_news_exists(sa_session, sa_backend, sa_child_news): assert(sa_backend.news_exists(sa_child_news.id)) sa_backend.delete_news(sa_child_news) assert(not sa_backend.news_exists(sa_child_news.id)) def test_save_news(sa_session, sa_backend, sa_schedule, sa_news_model, url_root, content_root): news = sa_news_model.create_instance( schedule=sa_schedule, url=url_root, title='title', content=content_root, summary='summary' ) assert(news not in sa_backend.get_news_list(sa_schedule.owner, url_root)) sa_backend.save_news(news) assert(news in sa_backend.get_news_list(sa_schedule.owner, url_root)) def test_delete_news(sa_session, sa_backend, sa_child_news): assert(sa_backend.news_exists(sa_child_news.id)) sa_backend.delete_news(sa_child_news) assert(not sa_backend.news_exists(sa_child_news.id)) def test_get_schedule(sa_session, sa_backend, sa_schedule): assert(sa_schedule == sa_backend.get_schedule(sa_schedule.id)) def test_get_schedules(sa_session, sa_backend, sa_schedule, sa_owner, url_root): assert(sa_schedule in sa_backend.get_schedules(sa_owner, url_root))
def test_get_news(sa_session, sa_backend, sa_child_news): assert sa_child_news == sa_backend.get_news(sa_child_news.id) assert sa_backend.get_news(None) is None def test_get_news_list(sa_session, sa_backend, sa_child_news): assert sa_child_news in sa_backend.get_news_list() assert sa_child_news in sa_backend.get_news_list(owner=sa_child_news.owner) assert sa_child_news in sa_backend.get_news_list(root_url=sa_child_news.root.url) assert sa_child_news in sa_backend.get_news_list(owner=sa_child_news.owner, root_url=sa_child_news.root.url) def test_news_exists(sa_session, sa_backend, sa_child_news): assert sa_backend.news_exists(sa_child_news.id) sa_backend.delete_news(sa_child_news) assert not sa_backend.news_exists(sa_child_news.id) def test_save_news(sa_session, sa_backend, sa_schedule, sa_news_model, url_root, content_root): news = sa_news_model.create_instance(schedule=sa_schedule, url=url_root, title='title', content=content_root, summary='summary') assert news not in sa_backend.get_news_list(sa_schedule.owner, url_root) sa_backend.save_news(news) assert news in sa_backend.get_news_list(sa_schedule.owner, url_root) def test_delete_news(sa_session, sa_backend, sa_child_news): assert sa_backend.news_exists(sa_child_news.id) sa_backend.delete_news(sa_child_news) assert not sa_backend.news_exists(sa_child_news.id) def test_get_schedule(sa_session, sa_backend, sa_schedule): assert sa_schedule == sa_backend.get_schedule(sa_schedule.id) def test_get_schedules(sa_session, sa_backend, sa_schedule, sa_owner, url_root): assert sa_schedule in sa_backend.get_schedules(sa_owner, url_root)
# Implemented from: https://stackoverflow.com/questions/9501337/binary-search-algorithm-in-python def binary_search(sequence, value): lo, hi = 0, len(sequence) - 1 while lo <= hi: mid = (lo + hi) // 2 if sequence[mid] < value: lo = mid + 1 elif value < sequence[mid]: hi = mid - 1 else: return mid return None def dfs(graph, node, visited=[]): if node not in visited: visited.append(node) for n in graph[node]: dfs(graph, n, visited) return visited # Implemented from: https://pythoninwonderland.wordpress.com/2017/03/18/how-to-implement-breadth-first-search-in-python/ def bfs(graph, start): # keep track of all visited nodes explored = [] # keep track of nodes to be checked queue = [start] # keep looping until there are nodes still to be checked while queue: # pop shallowest node (first node) from queue node = queue.pop(0) if node not in explored: # add node to list of checked nodes explored.append(node) neighbours = graph[node] # add neighbours of node to queue for neighbour in neighbours: queue.append(neighbour) return explored
def binary_search(sequence, value): (lo, hi) = (0, len(sequence) - 1) while lo <= hi: mid = (lo + hi) // 2 if sequence[mid] < value: lo = mid + 1 elif value < sequence[mid]: hi = mid - 1 else: return mid return None def dfs(graph, node, visited=[]): if node not in visited: visited.append(node) for n in graph[node]: dfs(graph, n, visited) return visited def bfs(graph, start): explored = [] queue = [start] while queue: node = queue.pop(0) if node not in explored: explored.append(node) neighbours = graph[node] for neighbour in neighbours: queue.append(neighbour) return explored
''' Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would have exactly one solution. Example: Given array nums = [-1, 2, 1, -4], and target = 1. The sum that is closest to the target is 2. (-1 + 2 + 1 = 2). ''' class Solution: def threeSumClosest(self, nums: list, target: int) -> int: nums.sort() closest = 10**10 output = 0 for idx, x in enumerate(nums): if idx > 0 and nums[idx - 1] == nums[idx]: continue l = idx + 1 r = len(nums) - 1 while l < r: sums = x + nums[l] + nums[r] subtraction = abs(sums - target) if sums < target: if subtraction < abs(closest): closest = subtraction output = sums l += 1 elif sums > target: if subtraction < abs(closest): closest = subtraction output = sums r -= 1 else: return target return output
""" Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would have exactly one solution. Example: Given array nums = [-1, 2, 1, -4], and target = 1. The sum that is closest to the target is 2. (-1 + 2 + 1 = 2). """ class Solution: def three_sum_closest(self, nums: list, target: int) -> int: nums.sort() closest = 10 ** 10 output = 0 for (idx, x) in enumerate(nums): if idx > 0 and nums[idx - 1] == nums[idx]: continue l = idx + 1 r = len(nums) - 1 while l < r: sums = x + nums[l] + nums[r] subtraction = abs(sums - target) if sums < target: if subtraction < abs(closest): closest = subtraction output = sums l += 1 elif sums > target: if subtraction < abs(closest): closest = subtraction output = sums r -= 1 else: return target return output
"""An extension for workspace rules.""" load("@bazel_skylib//lib:paths.bzl", "paths") load("//:dependencies.bzl", "dependencies") def _workspace_dependencies_impl(ctx): platform = ctx.os.name if ctx.os.name != "mac os x" else "darwin" for dependency in dependencies: ctx.download( executable = True, output = dependency["name"], sha256 = dependency["sha256"][platform], url = dependency["url"][platform].format(version = dependency["version"]), ) ctx.file("BUILD.bazel", 'exports_files(glob(["**/*"]))\n') _workspace_dependencies = repository_rule(_workspace_dependencies_impl) _WORKSPACE_DEPENDENCIES_REPOSITORY_NAME = "workspace_dependencies" def workspace_dependencies(): """A macro for wrapping the workspace_dependencies repository rule with a hardcoded name. The workspace_dependencies repository rule should be called before any of the other rules in this Bazel extension. Hardcoding the target name is useful for consuming it internally. The targets produced by this rule are only used within the workspace rules. """ _workspace_dependencies( name = _WORKSPACE_DEPENDENCIES_REPOSITORY_NAME, ) def _workspace_status_impl(ctx): info_file_json = _convert_status(ctx, ctx.info_file) version_file_json= _convert_status(ctx, ctx.version_file) status_merger = ctx.actions.declare_file("status_merger.sh") workspace_status = ctx.actions.declare_file("workspace_status.json") ctx.actions.expand_template( is_executable = True, output = status_merger, substitutions = { "{info_file}": info_file_json.path, "{version_file}": version_file_json.path, "{workspace_status}": workspace_status.path, "{jq}": ctx.executable._jq.path, }, template = ctx.file._status_merger_tmpl, ) ctx.actions.run( executable = status_merger, inputs = [ info_file_json, version_file_json, ], outputs = [workspace_status], tools = [ctx.executable._jq], ) return [DefaultInfo(files = depset([workspace_status]))] def _convert_status(ctx, status_file): status_file_basename = paths.basename(status_file.path) status_file_json_name = paths.replace_extension(status_file_basename, ".json") status_file_json = ctx.actions.declare_file(status_file_json_name) status_converter = ctx.actions.declare_file("{}_converter.sh".format(status_file_basename)) ctx.actions.expand_template( is_executable = True, output = status_converter, substitutions = { "{input}": status_file.path, "{output}": status_file_json.path, "{jq}": ctx.executable._jq.path, }, template = ctx.file._status_converter_tmpl, ) ctx.actions.run( executable = status_converter, inputs = [status_file], outputs = [status_file_json], tools = [ctx.executable._jq], ) return status_file_json workspace_status = rule( _workspace_status_impl, attrs = { "_status_converter_tmpl": attr.label( allow_single_file = True, default = "//:status_converter.tmpl.sh", ), "_status_merger_tmpl": attr.label( allow_single_file = True, default = "//:status_merger.tmpl.sh", ), "_jq": attr.label( allow_single_file = True, cfg = "host", default = "@{}//:jq".format(_WORKSPACE_DEPENDENCIES_REPOSITORY_NAME), executable = True, ), }, ) def _yaml_loader(ctx): # Check if the output file name has the .bzl extension. out_ext = ctx.attr.out[len(ctx.attr.out)-4:] if out_ext != ".bzl": fail("Expected output file ({out}) to have .bzl extension".format(out = ctx.attr.out)) # Get the yq binary path. yq = ctx.path(ctx.attr._yq) # Get the YAML src absolute path and convert it to JSON. src = ctx.path(ctx.attr.src) res = ctx.execute([yq, "r", "--tojson", src]) if res.return_code != 0: fail(res.stderr) ctx.file("file.json", res.stdout) # Convert the JSON file to the Starlark extension. converter = ctx.path(ctx.attr._converter) res = ctx.execute([_python3(ctx), converter, "file.json"]) if res.return_code != 0: fail(res.stderr) # Write the .bzl file with the YAML contents converted. ctx.file(ctx.attr.out, res.stdout) # An empty BUILD.bazel is only needed to indicate it's a Bazel package. ctx.file("BUILD.bazel", "") yaml_loader = repository_rule( _yaml_loader, doc = "A repository rule to load a YAML file into a Starlark dictionary", attrs = { "src": attr.label( allow_single_file = True, doc = "The YAML file to be loaded into a Starlark dictionary", mandatory = True, ), "out": attr.string( doc = "The output file name", mandatory = True, ), "_yq": attr.label( allow_single_file = True, cfg = "host", default = "@{}//:yq".format(_WORKSPACE_DEPENDENCIES_REPOSITORY_NAME), executable = True, ), "_converter": attr.label( allow_single_file = True, default = "//:json_bzl_converter.py", ), }, ) def _python3(repository_ctx): """A helper function to get the Python 3 system interpreter if available. Otherwise, it fails. """ for option in ["python", "python3"]: python = repository_ctx.which(option) if python != None: res = repository_ctx.execute([python, "--version"]) if res.return_code != 0: fail(res.stderr) version = res.stdout.strip() if res.stdout.strip() != "" else res.stderr.strip() version = version.split(" ") if len(version) != 2: fail("Unable to parse Python output version: {}".format(version)) version = version[1] major_version = version.split(".")[0] if int(major_version) == 3: return python fail("Python 3 is required")
"""An extension for workspace rules.""" load('@bazel_skylib//lib:paths.bzl', 'paths') load('//:dependencies.bzl', 'dependencies') def _workspace_dependencies_impl(ctx): platform = ctx.os.name if ctx.os.name != 'mac os x' else 'darwin' for dependency in dependencies: ctx.download(executable=True, output=dependency['name'], sha256=dependency['sha256'][platform], url=dependency['url'][platform].format(version=dependency['version'])) ctx.file('BUILD.bazel', 'exports_files(glob(["**/*"]))\n') _workspace_dependencies = repository_rule(_workspace_dependencies_impl) _workspace_dependencies_repository_name = 'workspace_dependencies' def workspace_dependencies(): """A macro for wrapping the workspace_dependencies repository rule with a hardcoded name. The workspace_dependencies repository rule should be called before any of the other rules in this Bazel extension. Hardcoding the target name is useful for consuming it internally. The targets produced by this rule are only used within the workspace rules. """ _workspace_dependencies(name=_WORKSPACE_DEPENDENCIES_REPOSITORY_NAME) def _workspace_status_impl(ctx): info_file_json = _convert_status(ctx, ctx.info_file) version_file_json = _convert_status(ctx, ctx.version_file) status_merger = ctx.actions.declare_file('status_merger.sh') workspace_status = ctx.actions.declare_file('workspace_status.json') ctx.actions.expand_template(is_executable=True, output=status_merger, substitutions={'{info_file}': info_file_json.path, '{version_file}': version_file_json.path, '{workspace_status}': workspace_status.path, '{jq}': ctx.executable._jq.path}, template=ctx.file._status_merger_tmpl) ctx.actions.run(executable=status_merger, inputs=[info_file_json, version_file_json], outputs=[workspace_status], tools=[ctx.executable._jq]) return [default_info(files=depset([workspace_status]))] def _convert_status(ctx, status_file): status_file_basename = paths.basename(status_file.path) status_file_json_name = paths.replace_extension(status_file_basename, '.json') status_file_json = ctx.actions.declare_file(status_file_json_name) status_converter = ctx.actions.declare_file('{}_converter.sh'.format(status_file_basename)) ctx.actions.expand_template(is_executable=True, output=status_converter, substitutions={'{input}': status_file.path, '{output}': status_file_json.path, '{jq}': ctx.executable._jq.path}, template=ctx.file._status_converter_tmpl) ctx.actions.run(executable=status_converter, inputs=[status_file], outputs=[status_file_json], tools=[ctx.executable._jq]) return status_file_json workspace_status = rule(_workspace_status_impl, attrs={'_status_converter_tmpl': attr.label(allow_single_file=True, default='//:status_converter.tmpl.sh'), '_status_merger_tmpl': attr.label(allow_single_file=True, default='//:status_merger.tmpl.sh'), '_jq': attr.label(allow_single_file=True, cfg='host', default='@{}//:jq'.format(_WORKSPACE_DEPENDENCIES_REPOSITORY_NAME), executable=True)}) def _yaml_loader(ctx): out_ext = ctx.attr.out[len(ctx.attr.out) - 4:] if out_ext != '.bzl': fail('Expected output file ({out}) to have .bzl extension'.format(out=ctx.attr.out)) yq = ctx.path(ctx.attr._yq) src = ctx.path(ctx.attr.src) res = ctx.execute([yq, 'r', '--tojson', src]) if res.return_code != 0: fail(res.stderr) ctx.file('file.json', res.stdout) converter = ctx.path(ctx.attr._converter) res = ctx.execute([_python3(ctx), converter, 'file.json']) if res.return_code != 0: fail(res.stderr) ctx.file(ctx.attr.out, res.stdout) ctx.file('BUILD.bazel', '') yaml_loader = repository_rule(_yaml_loader, doc='A repository rule to load a YAML file into a Starlark dictionary', attrs={'src': attr.label(allow_single_file=True, doc='The YAML file to be loaded into a Starlark dictionary', mandatory=True), 'out': attr.string(doc='The output file name', mandatory=True), '_yq': attr.label(allow_single_file=True, cfg='host', default='@{}//:yq'.format(_WORKSPACE_DEPENDENCIES_REPOSITORY_NAME), executable=True), '_converter': attr.label(allow_single_file=True, default='//:json_bzl_converter.py')}) def _python3(repository_ctx): """A helper function to get the Python 3 system interpreter if available. Otherwise, it fails. """ for option in ['python', 'python3']: python = repository_ctx.which(option) if python != None: res = repository_ctx.execute([python, '--version']) if res.return_code != 0: fail(res.stderr) version = res.stdout.strip() if res.stdout.strip() != '' else res.stderr.strip() version = version.split(' ') if len(version) != 2: fail('Unable to parse Python output version: {}'.format(version)) version = version[1] major_version = version.split('.')[0] if int(major_version) == 3: return python fail('Python 3 is required')
def print_lol(arr): for row in arr: if (isinstance(row, list)): print_lol(row) else: print row
def print_lol(arr): for row in arr: if isinstance(row, list): print_lol(row) else: print row
class Source: """Source class to define News Source Objects""" def __init__(self,id,name,description,url,category,country): self.id = id self.name = name self.description = description self.url = url self.category = category self.country = country class Article: """Source class to define Article Objects from a news source""" def __init__(self,author,article_title,article_description,article_url,image_url,published): self.author = author self.article_title = article_title self.article_description = article_description self.article_url = article_url self.image_url = image_url self.published = published
class Source: """Source class to define News Source Objects""" def __init__(self, id, name, description, url, category, country): self.id = id self.name = name self.description = description self.url = url self.category = category self.country = country class Article: """Source class to define Article Objects from a news source""" def __init__(self, author, article_title, article_description, article_url, image_url, published): self.author = author self.article_title = article_title self.article_description = article_description self.article_url = article_url self.image_url = image_url self.published = published
def cwinstart(callobj, *args, **kwargs): print('cwinstart') print(' args', repr(args)) for arg in args: print(' ', arg) print(' kwargs', len(kwargs)) for k, v in kwargs.items(): print(' ', k, v) w = callobj(*args, **kwargs) print(' callobj()->', w) return w def cwincall(req1, req2, *args, **kwargs): print('cwincall') print(' req1=', req1, 'req2=', req2) print(' args', repr(args)) for arg in args: print(' ', arg) print('kwargs') for k, v in kwargs.items(): print(' ', k, v) return 'tomorrow'
def cwinstart(callobj, *args, **kwargs): print('cwinstart') print(' args', repr(args)) for arg in args: print(' ', arg) print(' kwargs', len(kwargs)) for (k, v) in kwargs.items(): print(' ', k, v) w = callobj(*args, **kwargs) print(' callobj()->', w) return w def cwincall(req1, req2, *args, **kwargs): print('cwincall') print(' req1=', req1, 'req2=', req2) print(' args', repr(args)) for arg in args: print(' ', arg) print('kwargs') for (k, v) in kwargs.items(): print(' ', k, v) return 'tomorrow'
#!/usr/bin/env python3 # Copyright (C) 2020-2021 The btclib developers # # This file is part of btclib. It is subject to the license terms in the # LICENSE file found in the top-level directory of this distribution. # # No part of btclib including this file, may be copied, modified, propagated, # or distributed except according to the terms contained in the LICENSE file. "__init__ module for the btclib package." name = "btclib" __version__ = "2021.1" __author__ = "The btclib developers" __author_email__ = "devs@btclib.org" __copyright__ = "Copyright (C) 2017-2021 The btclib developers" __license__ = "MIT License"
"""__init__ module for the btclib package.""" name = 'btclib' __version__ = '2021.1' __author__ = 'The btclib developers' __author_email__ = 'devs@btclib.org' __copyright__ = 'Copyright (C) 2017-2021 The btclib developers' __license__ = 'MIT License'
for num in range(1,6): #code inside for loop if num == 4: continue #code inside for loop print(num) #code outside for loop print("continue statement executed on num = 4")
for num in range(1, 6): if num == 4: continue print(num) print('continue statement executed on num = 4')
def get_remain(cpf: str, start: int, upto: int) -> int: total = 0 for count, num in enumerate(cpf[:upto]): try: total += int(num) * (start - count) except ValueError: return None remain = (total * 10) % 11 remain = remain if remain != 10 else 0 return remain def padronize_date(date: str) -> str: day, month, year = map(lambda x: x.lstrip("0"), date.split("/")) day = day if len(day) == 2 else f"0{day}" month = month if len(month) == 2 else f"0{month}" year = year if len(year) == 4 else f"{'0'*(4-len(year))}{year}" return f"{day}/{month}/{year}" def padronize_time(time: str) -> str: hour, minute = map(lambda x: x.lstrip("0"), time.split(":")) hour = hour if len(hour) == 2 else f"0{hour}" minute = minute if len(minute) == 2 else f"0{minute}" return f"{hour}:{minute}"
def get_remain(cpf: str, start: int, upto: int) -> int: total = 0 for (count, num) in enumerate(cpf[:upto]): try: total += int(num) * (start - count) except ValueError: return None remain = total * 10 % 11 remain = remain if remain != 10 else 0 return remain def padronize_date(date: str) -> str: (day, month, year) = map(lambda x: x.lstrip('0'), date.split('/')) day = day if len(day) == 2 else f'0{day}' month = month if len(month) == 2 else f'0{month}' year = year if len(year) == 4 else f"{'0' * (4 - len(year))}{year}" return f'{day}/{month}/{year}' def padronize_time(time: str) -> str: (hour, minute) = map(lambda x: x.lstrip('0'), time.split(':')) hour = hour if len(hour) == 2 else f'0{hour}' minute = minute if len(minute) == 2 else f'0{minute}' return f'{hour}:{minute}'
class Student: def __init__(self, name, hours, qpoints): self.name = name self.hours = float(hours) self.qpoints = float(qpoints) def get_name(self): return self.name def get_hours(self): return self.hours def get_qpoints(self): return self.qpoints def gpa(self): return self.qpoints / self.hours def make_student(info_str): # info_str is a tab-separated line: name hours qpoints # returns a corresponding Student object name, hours, qpoints = info_str.split('\t') return Student(name, hours, qpoints) def main(): # open the input file for reading filename = input('Enter the name of the grade file: ') infile = open(filename, 'r') # set best to the record for the first student in the file best = make_student(infile.readline()) # process subsequent lines of the file for line in infile: # turn the line into a student record s = make_student(line) # if this student is best so far, remember it. if s.gpa() > best.gpa(): best = s infile.close() # print information about the best student print('The best student is', best.get_name()) print('hours:', best.get_hours()) print('GPA:', best.gpa()) if __name__ == '__main__': main()
class Student: def __init__(self, name, hours, qpoints): self.name = name self.hours = float(hours) self.qpoints = float(qpoints) def get_name(self): return self.name def get_hours(self): return self.hours def get_qpoints(self): return self.qpoints def gpa(self): return self.qpoints / self.hours def make_student(info_str): (name, hours, qpoints) = info_str.split('\t') return student(name, hours, qpoints) def main(): filename = input('Enter the name of the grade file: ') infile = open(filename, 'r') best = make_student(infile.readline()) for line in infile: s = make_student(line) if s.gpa() > best.gpa(): best = s infile.close() print('The best student is', best.get_name()) print('hours:', best.get_hours()) print('GPA:', best.gpa()) if __name__ == '__main__': main()
class Solution: def firstUniqChar(self, s): table = {} for ele in s: table[ele] = table.get(ele, 0) + 1 # for i in range(len(s)): # if table[s[i]] == 1: # return i for ele in s: if table[ele] == 1: return s.index(ele) return -1 if __name__ == '__main__': s = 'leetcode' # output 0 #s = 'loveleetcode' # output 2 #s = 'llee' # output -1 print(Solution().firstUniqChar(s))
class Solution: def first_uniq_char(self, s): table = {} for ele in s: table[ele] = table.get(ele, 0) + 1 for ele in s: if table[ele] == 1: return s.index(ele) return -1 if __name__ == '__main__': s = 'leetcode' print(solution().firstUniqChar(s))
#program to compute and print sum of two given integers (more than or equal to zero). # If given integers or the sum have more than 80 digits, print "overflow". print("Input first integer:") x = int(input()) print("Input second integer:") y = int(input()) if x >= 10 ** 80 or y >= 10 ** 80 or x + y >= 10 ** 80: print("Overflow!") else: print("Sum of the two integers: ",x + y)
print('Input first integer:') x = int(input()) print('Input second integer:') y = int(input()) if x >= 10 ** 80 or y >= 10 ** 80 or x + y >= 10 ** 80: print('Overflow!') else: print('Sum of the two integers: ', x + y)
{ "targets": [ { "target_name": "allofw", "include_dirs": [ "<!@(pkg-config liballofw --cflags-only-I | sed s/-I//g)", "<!(node -e \"require('nan')\")" ], "libraries": [ "<!@(pkg-config liballofw --libs)", "<!@(pkg-config glew --libs)", ], "cflags!": [ "-fno-exceptions", "-fno-rtti" ], "cflags_cc!": [ "-fno-exceptions", "-fno-rtti" ], "cflags_cc": [ "-std=c++11" ], 'conditions': [ [ 'OS=="mac"', { 'xcode_settings': { 'OTHER_CPLUSPLUSFLAGS' : ['-std=c++11'], 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'GCC_ENABLE_CPP_RTTI': 'YES' }, } ], ], "sources": [ "src/allofw.cpp", "src/node_graphics.cpp", "src/node_sharedmemory.cpp", "src/node_opengl.cpp", "src/node_omnistereo.cpp", "src/gl3binding/glbind.cpp" ] } ] }
{'targets': [{'target_name': 'allofw', 'include_dirs': ['<!@(pkg-config liballofw --cflags-only-I | sed s/-I//g)', '<!(node -e "require(\'nan\')")'], 'libraries': ['<!@(pkg-config liballofw --libs)', '<!@(pkg-config glew --libs)'], 'cflags!': ['-fno-exceptions', '-fno-rtti'], 'cflags_cc!': ['-fno-exceptions', '-fno-rtti'], 'cflags_cc': ['-std=c++11'], 'conditions': [['OS=="mac"', {'xcode_settings': {'OTHER_CPLUSPLUSFLAGS': ['-std=c++11'], 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'GCC_ENABLE_CPP_RTTI': 'YES'}}]], 'sources': ['src/allofw.cpp', 'src/node_graphics.cpp', 'src/node_sharedmemory.cpp', 'src/node_opengl.cpp', 'src/node_omnistereo.cpp', 'src/gl3binding/glbind.cpp']}]}
TOKEN_PREALTA_CLIENTE = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InJhdWx0ckBnbWFpbC5jb20iLCJleHAiOjQ3MzM1MTA0MDAsIm93bmVyX25hbWUiOiJSYXVsIEVucmlxdWUgVG9ycmVzIFJleWVzIiwidHlwZSI6ImVtYWlsX2NvbmZpcm1hdGlvbl9uZXdfY2xpZW50In0.R-nXh1nXvlBABfEdV1g81mdIzJqMFLvFV7FAP7PQRCM' TOKEN_PREALTA_CLIENTE_CADUCO = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjoibGF0aWVuZGl0YTJAZ2FtaWwuY29tIiwib3duZXJfbmFtZSI6IkFuZ2VsIEdhcmNpYSIsImV4cCI6MTU4NjU3ODg1MCwidHlwZSI6ImVtYWlsX2NvbmZpcm1hdGlvbl9uZXdfY2xpZW50In0.x66iQug11cjmkUHqmZq68gdbN3ffSVyD9MHagrspKRw' TOKEN_PREALTA_USUARIO = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InJhdWx0ckBnbWFpbC5jb20iLCJleHAiOjQ3MzM1MTA0MDAsIm5hbWUiOiJSYXVsIEVucmlxdWUgVG9ycmVzIFJleWVzIiwic2NoZW1hX25hbWUiOiJtaXRpZW5kaXRhIiwidHlwZSI6ImVtYWlsX2NvbmZpcm1hdGlvbl9uZXdfdXNlciJ9.gcagbNxnNxIkgZbP0mu-9MudiFb9b6cKvttPF4EHH5E' TOKEN_USUARIO_LOGIN = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InJhdWx0ckBnbWFpbC5jb20iLCJleHAiOjQ3MzM1MTA0MDAsInNjaGVtYV9uYW1lIjoibWl0aWVuZGl0YSIsInR5cGUiOiJ1c2VyX2xvZ2luIn0.vCdeH0iP94XBucXYtWZvEQq7CuEr-P80SdfIjN673qI'
token_prealta_cliente = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InJhdWx0ckBnbWFpbC5jb20iLCJleHAiOjQ3MzM1MTA0MDAsIm93bmVyX25hbWUiOiJSYXVsIEVucmlxdWUgVG9ycmVzIFJleWVzIiwidHlwZSI6ImVtYWlsX2NvbmZpcm1hdGlvbl9uZXdfY2xpZW50In0.R-nXh1nXvlBABfEdV1g81mdIzJqMFLvFV7FAP7PQRCM' token_prealta_cliente_caduco = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjoibGF0aWVuZGl0YTJAZ2FtaWwuY29tIiwib3duZXJfbmFtZSI6IkFuZ2VsIEdhcmNpYSIsImV4cCI6MTU4NjU3ODg1MCwidHlwZSI6ImVtYWlsX2NvbmZpcm1hdGlvbl9uZXdfY2xpZW50In0.x66iQug11cjmkUHqmZq68gdbN3ffSVyD9MHagrspKRw' token_prealta_usuario = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InJhdWx0ckBnbWFpbC5jb20iLCJleHAiOjQ3MzM1MTA0MDAsIm5hbWUiOiJSYXVsIEVucmlxdWUgVG9ycmVzIFJleWVzIiwic2NoZW1hX25hbWUiOiJtaXRpZW5kaXRhIiwidHlwZSI6ImVtYWlsX2NvbmZpcm1hdGlvbl9uZXdfdXNlciJ9.gcagbNxnNxIkgZbP0mu-9MudiFb9b6cKvttPF4EHH5E' token_usuario_login = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InJhdWx0ckBnbWFpbC5jb20iLCJleHAiOjQ3MzM1MTA0MDAsInNjaGVtYV9uYW1lIjoibWl0aWVuZGl0YSIsInR5cGUiOiJ1c2VyX2xvZ2luIn0.vCdeH0iP94XBucXYtWZvEQq7CuEr-P80SdfIjN673qI'
SRM_TO_HEX = { "0": "#FFFFFF", "1": "#F3F993", "2": "#F5F75C", "3": "#F6F513", "4": "#EAE615", "5": "#E0D01B", "6": "#D5BC26", "7": "#CDAA37", "8": "#C1963C", "9": "#BE8C3A", "10": "#BE823A", "11": "#C17A37", "12": "#BF7138", "13": "#BC6733", "14": "#B26033", "15": "#A85839", "16": "#985336", "17": "#8D4C32", "18": "#7C452D", "19": "#6B3A1E", "20": "#5D341A", "21": "#4E2A0C", "22": "#4A2727", "23": "#361F1B", "24": "#261716", "25": "#231716", "26": "#19100F", "27": "#16100F", "28": "#120D0C", "29": "#100B0A", "30": "#050B0A" } WATER_L_PER_GRAIN_KG = 2.5 MAIN_STYLES = { "1": "LIGHT LAGER", "2": "PILSNER", "3": "EUROPEAN AMBER LAGER", "4": "DARK LAGER", "5": "BOCK", "6": "LIGHT HYBRID BEER", "7": "AMBER HYBRID BEER", "8": "ENGLISH PALE ALE", "9": "SCOTTISH AND IRISH ALE", "10": "AMERICAN ALE", "11": "ENGLISH BROWN ALE", "12": "PORTER", "13": "STOUT", "14": "INDIA PALE ALE (IPA)", "15": "GERMAN WHEAT AND RYE BEER", "16": "BELGIAN AND FRENCH ALE", "17": "SOUR ALE", "18": "BELGIAN STRONG ALE", "19": "STRONG ALE", "20": "FRUIT BEER", "21": "SPICE / HERB / VEGETABLE BEER", "22": "SMOKE-FLAVORED AND WOOD-AGED BEER", "23": "SPECIALTY BEER", "24": "TRADITIONAL MEAD", "25": "MELOMEL (FRUIT MEAD)", "26": "OTHER MEAD", "27": "STANDARD CIDER AND PERRY", "28": "SPECIALTY CIDER AND PERRY" }
srm_to_hex = {'0': '#FFFFFF', '1': '#F3F993', '2': '#F5F75C', '3': '#F6F513', '4': '#EAE615', '5': '#E0D01B', '6': '#D5BC26', '7': '#CDAA37', '8': '#C1963C', '9': '#BE8C3A', '10': '#BE823A', '11': '#C17A37', '12': '#BF7138', '13': '#BC6733', '14': '#B26033', '15': '#A85839', '16': '#985336', '17': '#8D4C32', '18': '#7C452D', '19': '#6B3A1E', '20': '#5D341A', '21': '#4E2A0C', '22': '#4A2727', '23': '#361F1B', '24': '#261716', '25': '#231716', '26': '#19100F', '27': '#16100F', '28': '#120D0C', '29': '#100B0A', '30': '#050B0A'} water_l_per_grain_kg = 2.5 main_styles = {'1': 'LIGHT LAGER', '2': 'PILSNER', '3': 'EUROPEAN AMBER LAGER', '4': 'DARK LAGER', '5': 'BOCK', '6': 'LIGHT HYBRID BEER', '7': 'AMBER HYBRID BEER', '8': 'ENGLISH PALE ALE', '9': 'SCOTTISH AND IRISH ALE', '10': 'AMERICAN ALE', '11': 'ENGLISH BROWN ALE', '12': 'PORTER', '13': 'STOUT', '14': 'INDIA PALE ALE (IPA)', '15': 'GERMAN WHEAT AND RYE BEER', '16': 'BELGIAN AND FRENCH ALE', '17': 'SOUR ALE', '18': 'BELGIAN STRONG ALE', '19': 'STRONG ALE', '20': 'FRUIT BEER', '21': 'SPICE / HERB / VEGETABLE BEER', '22': 'SMOKE-FLAVORED AND WOOD-AGED BEER', '23': 'SPECIALTY BEER', '24': 'TRADITIONAL MEAD', '25': 'MELOMEL (FRUIT MEAD)', '26': 'OTHER MEAD', '27': 'STANDARD CIDER AND PERRY', '28': 'SPECIALTY CIDER AND PERRY'}
# ------ [ API ] ------ API = '/api' # ---------- [ BLOCKCHAIN ] ---------- API_BLOCKCHAIN = f'{API}/blockchain' API_BLOCKCHAIN_LENGTH = f'{API_BLOCKCHAIN}/length' API_BLOCKCHAIN_BLOCKS = f'{API_BLOCKCHAIN}/blocks' # ---------- [ BROADCASTS ] ---------- API_BROADCASTS = f'{API}/broadcasts' API_BROADCASTS_NEW_BLOCK = f'{API_BROADCASTS}/new_block' API_BROADCASTS_NEW_TRANSACTION = f'{API_BROADCASTS}/new_transaction' # ---------- [ TRANSACTIONS ] ---------- API_TRANSACTIONS = f'{API}/transactions' API_TRANSACTIONS_PENDING = f'{API_TRANSACTIONS}/pending' API_TRANSACTIONS_UTXO = f'{API_TRANSACTIONS}/UTXO' # ---------- [ NODES ] ---------- API_NODES = f'{API}/nodes' API_NODES_LIST = f'{API_NODES}/list' API_NODES_INFO = f'{API_NODES}/info' API_NODES_REGISTER = f'{API_NODES}/register' # ------ [ WEB ] ------ WEB_HOME = '/' WEB_SELECTOR = '/selector' WEB_CHAT = '/chat' WEB_CHAT_WITH_ADDRESS = f'{WEB_CHAT}/<address>'
api = '/api' api_blockchain = f'{API}/blockchain' api_blockchain_length = f'{API_BLOCKCHAIN}/length' api_blockchain_blocks = f'{API_BLOCKCHAIN}/blocks' api_broadcasts = f'{API}/broadcasts' api_broadcasts_new_block = f'{API_BROADCASTS}/new_block' api_broadcasts_new_transaction = f'{API_BROADCASTS}/new_transaction' api_transactions = f'{API}/transactions' api_transactions_pending = f'{API_TRANSACTIONS}/pending' api_transactions_utxo = f'{API_TRANSACTIONS}/UTXO' api_nodes = f'{API}/nodes' api_nodes_list = f'{API_NODES}/list' api_nodes_info = f'{API_NODES}/info' api_nodes_register = f'{API_NODES}/register' web_home = '/' web_selector = '/selector' web_chat = '/chat' web_chat_with_address = f'{WEB_CHAT}/<address>'
#tables or h5py libname="h5py" #tables" #libname="tables" def setlib(name): global libname libname = name
libname = 'h5py' def setlib(name): global libname libname = name
if __name__ == "__main__": pages = [5, 4, 3, 2, 1, 4, 3, 5, 4, 3, 2, 1, 5] faults = {3: 0, 4: 0} for frames in faults: memory = [] for page in pages: out = None if page not in memory: if len(memory) == frames: out = memory.pop(0) memory.append(page) faults[frames] += 1 print(f"In: {page} --> {memory} --> Out: {out}") print(f"Marcos: {frames}, Fallas: {faults[frames]}\n") if faults[4] > faults[3]: print(f"La secuencia {pages} presenta anomalia de Belady")
if __name__ == '__main__': pages = [5, 4, 3, 2, 1, 4, 3, 5, 4, 3, 2, 1, 5] faults = {3: 0, 4: 0} for frames in faults: memory = [] for page in pages: out = None if page not in memory: if len(memory) == frames: out = memory.pop(0) memory.append(page) faults[frames] += 1 print(f'In: {page} --> {memory} --> Out: {out}') print(f'Marcos: {frames}, Fallas: {faults[frames]}\n') if faults[4] > faults[3]: print(f'La secuencia {pages} presenta anomalia de Belady')
a={'a':'hello','b':'1','c':'jayalatha','d':[1,2]} d={} val=list(a.values()) val.sort(key=len) print(val) for i in val: for j in a: if(i==a[j]): d.update({j:a[j]}) print(d)
a = {'a': 'hello', 'b': '1', 'c': 'jayalatha', 'd': [1, 2]} d = {} val = list(a.values()) val.sort(key=len) print(val) for i in val: for j in a: if i == a[j]: d.update({j: a[j]}) print(d)
# -*- coding: utf-8 -*- """ Created on Wed Nov 04 17:37:37 2015 @author: Kevin """
""" Created on Wed Nov 04 17:37:37 2015 @author: Kevin """
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "core_library", "core_resx", "core_xunit_test") core_resx( name = "core_resource", src = ":src/Moq/Properties/Resources.resx", identifier = "Moq.Properties.Resources.resources", ) core_library( name = "Moq.dll", srcs = glob(["src/Moq/**/*.cs"]), defines = [ "NETCORE", ], keyfile = ":Moq.snk", resources = [":core_resource"], visibility = ["//visibility:public"], nowarn = ["CS3027"], deps = [ "@//ifluentinterface:IFluentInterface.dll", "@TypeNameFormatter//:TypeNameFormatter.dll", "@castle.core//:Castle.Core.dll", "@core_sdk_stdlib//:libraryset", ], ) core_xunit_test( name = "Moq.Tests.dll", srcs = glob( ["tests/Moq.Tests/**/*.cs"], exclude = ["**/FSharpCompatibilityFixture.cs"], ), defines = [ "NETCORE", ], keyfile = ":Moq.snk", nowarn = ["CS1701"], visibility = ["//visibility:public"], deps = [ ":Moq.dll", "@xunit.assert//:lib", "@xunit.extensibility.core//:lib", "@xunit.extensibility.execution//:lib", ], )
load('@io_bazel_rules_dotnet//dotnet:defs.bzl', 'core_library', 'core_resx', 'core_xunit_test') core_resx(name='core_resource', src=':src/Moq/Properties/Resources.resx', identifier='Moq.Properties.Resources.resources') core_library(name='Moq.dll', srcs=glob(['src/Moq/**/*.cs']), defines=['NETCORE'], keyfile=':Moq.snk', resources=[':core_resource'], visibility=['//visibility:public'], nowarn=['CS3027'], deps=['@//ifluentinterface:IFluentInterface.dll', '@TypeNameFormatter//:TypeNameFormatter.dll', '@castle.core//:Castle.Core.dll', '@core_sdk_stdlib//:libraryset']) core_xunit_test(name='Moq.Tests.dll', srcs=glob(['tests/Moq.Tests/**/*.cs'], exclude=['**/FSharpCompatibilityFixture.cs']), defines=['NETCORE'], keyfile=':Moq.snk', nowarn=['CS1701'], visibility=['//visibility:public'], deps=[':Moq.dll', '@xunit.assert//:lib', '@xunit.extensibility.core//:lib', '@xunit.extensibility.execution//:lib'])
# Time: O(n^2) # Space: O(n) # Given an array of unique integers, each integer is strictly greater than 1. # We make a binary tree using these integers and each number may be used for # any number of times. # Each non-leaf node's value should be equal to the product of the values of # it's children. # How many binary trees can we make? Return the answer modulo 10 ** 9 + 7. # # Example 1: # # Input: A = [2, 4] # Output: 3 # Explanation: We can make these trees: [2], [4], [4, 2, 2] # Example 2: # # Input: A = [2, 4, 5, 10] # Output: 7 # Explanation: We can make these trees: # [2], [4], [5], [10], [4, 2, 2], [10, 2, 5], [10, 5, 2]. # # Note: # - 1 <= A.length <= 1000. # - 2 <= A[i] <= 10 ^ 9. try: xrange # Python 2 except NameError: xrange = range # Python 3 class Solution(object): def numFactoredBinaryTrees(self, A): """ :type A: List[int] :rtype: int """ M = 10**9 + 7 A.sort() dp = {} for i in xrange(len(A)): dp[A[i]] = 1 for j in xrange(i): if A[i] % A[j] == 0 and A[i] // A[j] in dp: dp[A[i]] += dp[A[j]] * dp[A[i] // A[j]] dp[A[i]] %= M return sum(dp.values()) % M
try: xrange except NameError: xrange = range class Solution(object): def num_factored_binary_trees(self, A): """ :type A: List[int] :rtype: int """ m = 10 ** 9 + 7 A.sort() dp = {} for i in xrange(len(A)): dp[A[i]] = 1 for j in xrange(i): if A[i] % A[j] == 0 and A[i] // A[j] in dp: dp[A[i]] += dp[A[j]] * dp[A[i] // A[j]] dp[A[i]] %= M return sum(dp.values()) % M
class reversor: def __init__(self, value): self.value = value def __eq__(self, other): return self.value == other.value def __lt__(self, other): """ Inverted it to be able to sort in descending order. """ return self.value >= other.value if __name__ == '__main__': tuples = [(3, 'x'), (2, 'y'), (1, 'a'), (1, 'z')] tuples.sort(key=lambda x: (x[0], x[1])) assert tuples == [(1, 'a'), (1, 'z'), (2, 'y'),(3, 'x')], "Error 1: 0 asc, 1 asc" tuples.sort(key=lambda x: (x[0], reversor(x[1]))) assert tuples == [(1, 'z'), (1, 'a'), (2, 'y'),(3, 'x')], "Error 2: 0 asc, 1 desc" # The following approach works for a single char string. tuples.sort(key=lambda x: (x[0], -ord(x[1]))) assert tuples == [(1, 'z'), (1, 'a'), (2, 'y'), (3, 'x')], "Error 3: 0 asc, 1 desc"
class Reversor: def __init__(self, value): self.value = value def __eq__(self, other): return self.value == other.value def __lt__(self, other): """ Inverted it to be able to sort in descending order. """ return self.value >= other.value if __name__ == '__main__': tuples = [(3, 'x'), (2, 'y'), (1, 'a'), (1, 'z')] tuples.sort(key=lambda x: (x[0], x[1])) assert tuples == [(1, 'a'), (1, 'z'), (2, 'y'), (3, 'x')], 'Error 1: 0 asc, 1 asc' tuples.sort(key=lambda x: (x[0], reversor(x[1]))) assert tuples == [(1, 'z'), (1, 'a'), (2, 'y'), (3, 'x')], 'Error 2: 0 asc, 1 desc' tuples.sort(key=lambda x: (x[0], -ord(x[1]))) assert tuples == [(1, 'z'), (1, 'a'), (2, 'y'), (3, 'x')], 'Error 3: 0 asc, 1 desc'
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Yue-Wen FANG' __maintainer__ = "Yue-Wen FANG" __email__ = 'fyuewen@gmail.com' __license__ = 'Apache License 2.0' __creation_date__= 'Dec. 25, 2018' """ This example shows the functionality of positional arguments and keyword ONLY arguments. The positional arguments correspond to tuple, the keyword ONLY arguments correspond to dict. """ def add_function_01(x, *args): # you can use any other proper names instead of using args """ positional arguments""" print('x is', x) for i in args: print(i), def add_function_02(x, *args, **kwargs): # you can use any other proper names instead of using args """ positional arguments and keyword specific arguments """ print('x is', x) print(args) print('the type of args is', type(args)) print(kwargs.values()) print(kwargs.keys()) print('the type or kwargs is', type(kwargs)) if __name__ == "__main__": add_function_01(1,2,3,45) print("*************") add_function_02(3, 1, 2, 3, 45, c=3, d=4) print("*************")
__author__ = 'Yue-Wen FANG' __maintainer__ = 'Yue-Wen FANG' __email__ = 'fyuewen@gmail.com' __license__ = 'Apache License 2.0' __creation_date__ = 'Dec. 25, 2018' '\nThis example shows the functionality\nof positional arguments and keyword ONLY arguments.\n\nThe positional arguments correspond to tuple,\nthe keyword ONLY arguments correspond to dict.\n' def add_function_01(x, *args): """ positional arguments""" print('x is', x) for i in args: (print(i),) def add_function_02(x, *args, **kwargs): """ positional arguments and keyword specific arguments """ print('x is', x) print(args) print('the type of args is', type(args)) print(kwargs.values()) print(kwargs.keys()) print('the type or kwargs is', type(kwargs)) if __name__ == '__main__': add_function_01(1, 2, 3, 45) print('*************') add_function_02(3, 1, 2, 3, 45, c=3, d=4) print('*************')
""" A unival tree (which stands for "universal value") is a tree where all nodes under it have the same value. Given the root to a binary tree, count the number of unival subtrees. For example, the following tree has 5 unival subtrees: 0 / \ 1 0 / \ 1 0 / \ 1 1 """ class Node: def __init__(self, data): self.data = data self.left = None self.right = None # O(n) def count_univals2(root): total_count, is_unival = helper(root) return total_count def helper(root): if root == None: return (0, True) left_count, is_left_unival = helper(root.left) right_count, is_right_unival = helper(root.right) is_unival = True if not is_left_unival or not is_right_unival: is_unival = False if root.left != None and root.left.data != root.data: is_unival = False if root.right != None and root.right.data != root.data: is_unival = False if is_unival: return (left_count + right_count + 1, True) else: return (left_count + right_count, False) def is_unival(root): if root == None: return True if root.left != None and root.left.data != root.data: return False if root.right != None and root.right.data != root.data: return False if is_unival(root.left) and is_unival(root.right): return True return False # O(n^2) def count_univals(root): if root == None: return 0 total_count = count_univals(root.left) + count_univals(root.right) if is_unival(root): total_count += 1 return total_count """ 5 / \ 4 5 / \ \ 4 4 5 """ root = Node(5) root.left = Node(4) root.right = Node(5) root.left.left = Node(4) root.left.right = Node(4) root.right.right = Node(5) print(count_univals(root)) print(count_univals2(root))
""" A unival tree (which stands for "universal value") is a tree where all nodes under it have the same value. Given the root to a binary tree, count the number of unival subtrees. For example, the following tree has 5 unival subtrees: 0 / 1 0 / 1 0 / 1 1 """ class Node: def __init__(self, data): self.data = data self.left = None self.right = None def count_univals2(root): (total_count, is_unival) = helper(root) return total_count def helper(root): if root == None: return (0, True) (left_count, is_left_unival) = helper(root.left) (right_count, is_right_unival) = helper(root.right) is_unival = True if not is_left_unival or not is_right_unival: is_unival = False if root.left != None and root.left.data != root.data: is_unival = False if root.right != None and root.right.data != root.data: is_unival = False if is_unival: return (left_count + right_count + 1, True) else: return (left_count + right_count, False) def is_unival(root): if root == None: return True if root.left != None and root.left.data != root.data: return False if root.right != None and root.right.data != root.data: return False if is_unival(root.left) and is_unival(root.right): return True return False def count_univals(root): if root == None: return 0 total_count = count_univals(root.left) + count_univals(root.right) if is_unival(root): total_count += 1 return total_count '\n 5 \n / \\ \n 4 5 \n / \\ \\ \n 4 4 5 \n' root = node(5) root.left = node(4) root.right = node(5) root.left.left = node(4) root.left.right = node(4) root.right.right = node(5) print(count_univals(root)) print(count_univals2(root))
# Iterations: Definite Loops ''' Use the 'for' word there is a iteration variable like 'i' or 'friend' ''' # for i in [5, 4, 3, 2, 1] : # print(i) # print('Blastoff!') # friends = ['matheus', 'wataru', 'mogli'] # for friend in friends : # print('happy new year:', friend) # print('Done!')
""" Use the 'for' word there is a iteration variable like 'i' or 'friend' """
class formstruct(): name = str() while True: name = input("\n.bot >> enter your first name:") if not name.isalpha(): print(".bot >> your first name must have alphabets only!") continue else: name = name.upper() break city = str() while True: city = input("\n.bot >> enter your city:") if not city.isalpha(): print(".bot >> a city name can have alphabets only!") continue else: city = city.upper() break state = str() while True: state = input(".bot >> which sate do your reside in?") if not state.isalpha(): print(".bot >> a state name can have alphabets only!") continue else: state = state.upper() break pincode = str() while True: pincode = input(".bot >> pincode of your area?") if not pincode.isnumeric(): print(".bot >> a pincode has numeric characters only") continue if not len(pincode)==6: print(".bot >> invalid pincode , please make sure your pincode is of 6 digits") continue else: break mobilenumber = str() while True: mobilenumber = input(".bot >> provide us the mobile number we can contact you with?") if not mobilenumber.isnumeric(): print(".bot >> a mobile number has numeric characters only") continue if not len(mobilenumber) == 10: print(".bot >> invalid mobile number , please make sure your mobile number is of 10 digits") continue else: break aadhaarnumber = str() while True: aadhaarnumber = input(".bot >> enter your aadhaar number:") if not aadhaarnumber.isnumeric(): print(".bot >> an aadhaar number has numeric characters only") continue if not len(aadhaarnumber) == 12: print(".bot >> invalid aadhaar number , please make sure your aadhaar number is of 12 digits") continue else: break def __init__(self,val): print("In Class Method") self.val = val print("The Value is: ", val)
class Formstruct: name = str() while True: name = input('\n.bot >> enter your first name:') if not name.isalpha(): print('.bot >> your first name must have alphabets only!') continue else: name = name.upper() break city = str() while True: city = input('\n.bot >> enter your city:') if not city.isalpha(): print('.bot >> a city name can have alphabets only!') continue else: city = city.upper() break state = str() while True: state = input('.bot >> which sate do your reside in?') if not state.isalpha(): print('.bot >> a state name can have alphabets only!') continue else: state = state.upper() break pincode = str() while True: pincode = input('.bot >> pincode of your area?') if not pincode.isnumeric(): print('.bot >> a pincode has numeric characters only') continue if not len(pincode) == 6: print('.bot >> invalid pincode , please make sure your pincode is of 6 digits') continue else: break mobilenumber = str() while True: mobilenumber = input('.bot >> provide us the mobile number we can contact you with?') if not mobilenumber.isnumeric(): print('.bot >> a mobile number has numeric characters only') continue if not len(mobilenumber) == 10: print('.bot >> invalid mobile number , please make sure your mobile number is of 10 digits') continue else: break aadhaarnumber = str() while True: aadhaarnumber = input('.bot >> enter your aadhaar number:') if not aadhaarnumber.isnumeric(): print('.bot >> an aadhaar number has numeric characters only') continue if not len(aadhaarnumber) == 12: print('.bot >> invalid aadhaar number , please make sure your aadhaar number is of 12 digits') continue else: break def __init__(self, val): print('In Class Method') self.val = val print('The Value is: ', val)
# # @lc app=leetcode id=719 lang=python3 # # [719] Find K-th Smallest Pair Distance # # https://leetcode.com/problems/find-k-th-smallest-pair-distance/description/ # # algorithms # Hard (30.99%) # Likes: 827 # Dislikes: 30 # Total Accepted: 29.9K # Total Submissions: 96.4K # Testcase Example: '[1,3,1]\n1' # # Given an integer array, return the k-th smallest distance among all the # pairs. The distance of a pair (A, B) is defined as the absolute difference # between A and B. # # Example 1: # # Input: # nums = [1,3,1] # k = 1 # Output: 0 # Explanation: # Here are all the pairs: # (1,3) -> 2 # (1,1) -> 0 # (3,1) -> 2 # Then the 1st smallest distance pair is (1,1), and its distance is 0. # # # # Note: # # 2 . # 0 . # 1 . # # # # @lc code=start class Solution: def smallestDistancePair(self, nums: List[int], k: int) -> int: n = len(nums) nums = sorted(nums) low = 0 high = nums[n-1] - nums[0] while low < high: mid = int((low + high) / 2) left, count = 0, 0 for right in range(n): while nums[right] - nums[left] > mid: left += 1 count += right - left if count >= k: high = mid else: low = mid + 1 return low # @lc code=end
class Solution: def smallest_distance_pair(self, nums: List[int], k: int) -> int: n = len(nums) nums = sorted(nums) low = 0 high = nums[n - 1] - nums[0] while low < high: mid = int((low + high) / 2) (left, count) = (0, 0) for right in range(n): while nums[right] - nums[left] > mid: left += 1 count += right - left if count >= k: high = mid else: low = mid + 1 return low
def chess_knight(start, moves): def knight_can_move(from_pos, to_pos): return set(map(lambda x: abs(ord(x[0]) - ord(x[1])), zip(from_pos, to_pos))) == {1, 2} def knight_moves(pos): return {f + r for f in 'abcdefgh' for r in '12345678' if knight_can_move(pos, f + r)} # till task become consistent, hardcode res = knight_moves(start) if moves == 2: res.update(*map(knight_moves, res)) return sorted(res)
def chess_knight(start, moves): def knight_can_move(from_pos, to_pos): return set(map(lambda x: abs(ord(x[0]) - ord(x[1])), zip(from_pos, to_pos))) == {1, 2} def knight_moves(pos): return {f + r for f in 'abcdefgh' for r in '12345678' if knight_can_move(pos, f + r)} res = knight_moves(start) if moves == 2: res.update(*map(knight_moves, res)) return sorted(res)
n = str(input()) if("0000000" in n): print("YES") elif("1111111" in n): print("YES") else: print("NO")
n = str(input()) if '0000000' in n: print('YES') elif '1111111' in n: print('YES') else: print('NO')
list = ['a','b','c'] print(list)
list = ['a', 'b', 'c'] print(list)
# # Copyright 2017 ABSA Group Limited # # 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. # # Enable Spline tracking. # For Spark 2.3+ we recommend the codeless approach to enable Spline - by setting spark.sql.queryExecutionListeners # (See: examples/README.md) # Otherwise execute the following method to enable Spline manually. sc._jvm.za.co.absa.spline.harvester \ .SparkLineageInitializer.enableLineageTracking(spark._jsparkSession) # Execute a Spark job as usual: spark.read \ .option("header", "true") \ .option("inferschema", "true") \ .csv("data/input/batch/wikidata.csv") \ .write \ .mode('overwrite') \ .csv("data/output/batch/python-sample.csv")
sc._jvm.za.co.absa.spline.harvester.SparkLineageInitializer.enableLineageTracking(spark._jsparkSession) spark.read.option('header', 'true').option('inferschema', 'true').csv('data/input/batch/wikidata.csv').write.mode('overwrite').csv('data/output/batch/python-sample.csv')
""" Darshan Error classes and functions. """ class DarshanBaseError(Exception): """ Base exception class for Darshan errors in Python. """ pass class DarshanVersionError(NotImplementedError): """ Raised when using a feature which is not provided by libdarshanutil. """ min_version = None def __init__(self, min_version, msg="Feature"): self.msg = msg self.min_version = min_version self.version = "0.0.0" def __repr__(self): return "DarshanVersionError('%s')" % str(self) def __str__(self): return "%s requires libdarshanutil >= %s, have %s" % (self.msg, self.min_version, self.version)
""" Darshan Error classes and functions. """ class Darshanbaseerror(Exception): """ Base exception class for Darshan errors in Python. """ pass class Darshanversionerror(NotImplementedError): """ Raised when using a feature which is not provided by libdarshanutil. """ min_version = None def __init__(self, min_version, msg='Feature'): self.msg = msg self.min_version = min_version self.version = '0.0.0' def __repr__(self): return "DarshanVersionError('%s')" % str(self) def __str__(self): return '%s requires libdarshanutil >= %s, have %s' % (self.msg, self.min_version, self.version)
file = open("input.txt", "r") num_valid = 0 for line in file: # policy = part before colon policy = line.strip().split(":")[0] # get min/max number allowed for given letter min_max = policy.split(" ")[0] letter = policy.split(" ")[1] min = int(min_max.split("-")[0]) max = int(min_max.split("-")[1]) # password = part after colon password = line.strip().split(":")[1] # check if password contains between min and max of given letter if password.count(letter) >= min and password.count(letter) <= max: num_valid += 1 print("Number of valid passwords = ", num_valid)
file = open('input.txt', 'r') num_valid = 0 for line in file: policy = line.strip().split(':')[0] min_max = policy.split(' ')[0] letter = policy.split(' ')[1] min = int(min_max.split('-')[0]) max = int(min_max.split('-')[1]) password = line.strip().split(':')[1] if password.count(letter) >= min and password.count(letter) <= max: num_valid += 1 print('Number of valid passwords = ', num_valid)
# Problem code def search(nums, target): return search_helper(nums, target, 0, len(nums) - 1) def search_helper(nums, target, left, right): if left > right: return -1 mid = (left + right) // 2 # right part is good if nums[mid] <= nums[right]: # we fall for it if target >= nums[mid] and target <= nums[right]: return binary_search(nums, target, mid, right) # we don't fall for it else: return search_helper(nums, target, left, mid - 1) # left part is good if nums[mid] >= nums[left]: # we fall for it if target >= nums[left] and target <= nums[mid]: return binary_search(nums, target, left, mid) #we don't fall for it else: return search_helper(nums, target, mid + 1, right) return -1 def binary_search(nums, target, left, right): while left <= right: mid = (left + right) // 2 if nums[mid] == target: return mid elif target > nums[mid]: left = mid + 1 else: right = mid - 1 return -1
def search(nums, target): return search_helper(nums, target, 0, len(nums) - 1) def search_helper(nums, target, left, right): if left > right: return -1 mid = (left + right) // 2 if nums[mid] <= nums[right]: if target >= nums[mid] and target <= nums[right]: return binary_search(nums, target, mid, right) else: return search_helper(nums, target, left, mid - 1) if nums[mid] >= nums[left]: if target >= nums[left] and target <= nums[mid]: return binary_search(nums, target, left, mid) else: return search_helper(nums, target, mid + 1, right) return -1 def binary_search(nums, target, left, right): while left <= right: mid = (left + right) // 2 if nums[mid] == target: return mid elif target > nums[mid]: left = mid + 1 else: right = mid - 1 return -1
# # PySNMP MIB module CISCO-EMBEDDED-EVENT-MGR-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-EMBEDDED-EVENT-MGR-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:39:13 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint") ciscoExperiment, = mibBuilder.importSymbols("CISCO-SMI", "ciscoExperiment") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") iso, Counter64, Unsigned32, Counter32, ModuleIdentity, Bits, IpAddress, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Integer32, TimeTicks, Gauge32, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Counter64", "Unsigned32", "Counter32", "ModuleIdentity", "Bits", "IpAddress", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Integer32", "TimeTicks", "Gauge32", "MibIdentifier") TruthValue, TextualConvention, DisplayString, DateAndTime = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TextualConvention", "DisplayString", "DateAndTime") cEventMgrMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 10, 134)) cEventMgrMIB.setRevisions(('2006-11-07 00:00', '2003-04-16 00:00',)) if mibBuilder.loadTexts: cEventMgrMIB.setLastUpdated('200611070000Z') if mibBuilder.loadTexts: cEventMgrMIB.setOrganization('Cisco Systems, Inc.') cEventMgrMIBNotif = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 0)) cEventMgrMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 1)) cEventMgrConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 3)) ceemEventMap = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 1)) ceemHistory = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2)) ceemRegisteredPolicy = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3)) class NotifySource(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("server", 1), ("policy", 2)) ceemEventMapTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 1, 1), ) if mibBuilder.loadTexts: ceemEventMapTable.setStatus('current') ceemEventMapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 1, 1, 1), ).setIndexNames((0, "CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemEventIndex")) if mibBuilder.loadTexts: ceemEventMapEntry.setStatus('current') ceemEventIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 1, 1, 1, 1), Unsigned32()) if mibBuilder.loadTexts: ceemEventIndex.setStatus('current') ceemEventName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 1, 1, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemEventName.setStatus('current') ceemEventDescrText = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 1, 1, 1, 3), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemEventDescrText.setStatus('current') ceemHistoryMaxEventEntries = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 50)).clone(10)).setMaxAccess("readwrite") if mibBuilder.loadTexts: ceemHistoryMaxEventEntries.setStatus('current') ceemHistoryLastEventEntry = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryLastEventEntry.setStatus('current') ceemHistoryEventTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3), ) if mibBuilder.loadTexts: ceemHistoryEventTable.setStatus('current') ceemHistoryEventEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1), ).setIndexNames((0, "CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventIndex")) if mibBuilder.loadTexts: ceemHistoryEventEntry.setStatus('current') ceemHistoryEventIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: ceemHistoryEventIndex.setStatus('current') ceemHistoryEventType1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 2), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryEventType1.setStatus('current') ceemHistoryEventType2 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryEventType2.setStatus('current') ceemHistoryEventType3 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryEventType3.setStatus('current') ceemHistoryEventType4 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryEventType4.setStatus('current') ceemHistoryPolicyPath = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 6), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryPolicyPath.setStatus('current') ceemHistoryPolicyName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 7), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryPolicyName.setStatus('current') ceemHistoryPolicyExitStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryPolicyExitStatus.setStatus('current') ceemHistoryPolicyIntData1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryPolicyIntData1.setStatus('current') ceemHistoryPolicyIntData2 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryPolicyIntData2.setStatus('current') ceemHistoryPolicyStrData = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 11), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryPolicyStrData.setStatus('current') ceemHistoryNotifyType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 12), NotifySource()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryNotifyType.setStatus('current') ceemHistoryEventType5 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 13), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryEventType5.setStatus('current') ceemHistoryEventType6 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 14), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryEventType6.setStatus('current') ceemHistoryEventType7 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 15), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryEventType7.setStatus('current') ceemHistoryEventType8 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 16), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemHistoryEventType8.setStatus('current') ceemRegisteredPolicyTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1), ) if mibBuilder.loadTexts: ceemRegisteredPolicyTable.setStatus('current') ceemRegisteredPolicyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1), ).setIndexNames((0, "CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyIndex")) if mibBuilder.loadTexts: ceemRegisteredPolicyEntry.setStatus('current') ceemRegisteredPolicyIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 1), Unsigned32()) if mibBuilder.loadTexts: ceemRegisteredPolicyIndex.setStatus('current') ceemRegisteredPolicyName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyName.setStatus('current') ceemRegisteredPolicyEventType1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyEventType1.setStatus('current') ceemRegisteredPolicyEventType2 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyEventType2.setStatus('current') ceemRegisteredPolicyEventType3 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyEventType3.setStatus('current') ceemRegisteredPolicyEventType4 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyEventType4.setStatus('current') ceemRegisteredPolicyStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyStatus.setStatus('current') ceemRegisteredPolicyType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("user", 1), ("system", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyType.setStatus('current') ceemRegisteredPolicyNotifFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 9), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyNotifFlag.setStatus('current') ceemRegisteredPolicyRegTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 10), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyRegTime.setStatus('current') ceemRegisteredPolicyEnabledTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 11), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyEnabledTime.setStatus('current') ceemRegisteredPolicyRunTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 12), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyRunTime.setStatus('current') ceemRegisteredPolicyRunCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyRunCount.setStatus('current') ceemRegisteredPolicyEventType5 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 14), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyEventType5.setStatus('current') ceemRegisteredPolicyEventType6 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 15), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyEventType6.setStatus('current') ceemRegisteredPolicyEventType7 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 16), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyEventType7.setStatus('current') ceemRegisteredPolicyEventType8 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 17), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ceemRegisteredPolicyEventType8.setStatus('current') cEventMgrServerEvent = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 134, 0, 1)).setObjects(("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType1"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType2"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType3"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType4"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyPath"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyName"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyExitStatus")) if mibBuilder.loadTexts: cEventMgrServerEvent.setStatus('current') cEventMgrPolicyEvent = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 134, 0, 2)).setObjects(("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType1"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType2"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType3"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType4"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyPath"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyName"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyIntData1"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyIntData2"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyStrData")) if mibBuilder.loadTexts: cEventMgrPolicyEvent.setStatus('current') cEventMgrCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 1)) cEventMgrGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2)) cEventMgrCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 1, 1)).setObjects(("CISCO-EMBEDDED-EVENT-MGR-MIB", "cEventMgrDescrGroup"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "cEventMgrNotificationsGroup"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "cEventMgrRegisteredPolicyGroup"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "cEventMgrHistoryGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cEventMgrCompliance = cEventMgrCompliance.setStatus('deprecated') cEventMgrComplianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 1, 2)).setObjects(("CISCO-EMBEDDED-EVENT-MGR-MIB", "cEventMgrDescrGroup"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "cEventMgrNotificationsGroup"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "cEventMgrRegisteredPolicyGroup"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "cEventMgrRegisteredPolicyGroupSup1"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "cEventMgrHistoryGroup"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "cEventMgrHistoryGroupSup1")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cEventMgrComplianceRev1 = cEventMgrComplianceRev1.setStatus('current') cEventMgrDescrGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2, 1)).setObjects(("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemEventName"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemEventDescrText")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cEventMgrDescrGroup = cEventMgrDescrGroup.setStatus('current') cEventMgrHistoryGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2, 2)).setObjects(("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryMaxEventEntries"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryLastEventEntry"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType1"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType2"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType3"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType4"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyPath"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyName"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyExitStatus"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyIntData1"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyIntData2"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryPolicyStrData"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryNotifyType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cEventMgrHistoryGroup = cEventMgrHistoryGroup.setStatus('current') cEventMgrNotificationsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2, 3)).setObjects(("CISCO-EMBEDDED-EVENT-MGR-MIB", "cEventMgrServerEvent"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "cEventMgrPolicyEvent")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cEventMgrNotificationsGroup = cEventMgrNotificationsGroup.setStatus('current') cEventMgrRegisteredPolicyGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2, 4)).setObjects(("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyName"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyEventType1"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyEventType2"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyEventType3"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyEventType4"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyStatus"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyType"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyNotifFlag"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyRegTime"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyEnabledTime"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyRunTime"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyRunCount")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cEventMgrRegisteredPolicyGroup = cEventMgrRegisteredPolicyGroup.setStatus('current') cEventMgrHistoryGroupSup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2, 5)).setObjects(("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType5"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType6"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType7"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemHistoryEventType8")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cEventMgrHistoryGroupSup1 = cEventMgrHistoryGroupSup1.setStatus('current') cEventMgrRegisteredPolicyGroupSup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2, 6)).setObjects(("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyEventType5"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyEventType6"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyEventType7"), ("CISCO-EMBEDDED-EVENT-MGR-MIB", "ceemRegisteredPolicyEventType8")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cEventMgrRegisteredPolicyGroupSup1 = cEventMgrRegisteredPolicyGroupSup1.setStatus('current') mibBuilder.exportSymbols("CISCO-EMBEDDED-EVENT-MGR-MIB", ceemEventDescrText=ceemEventDescrText, ceemHistoryEventType5=ceemHistoryEventType5, ceemRegisteredPolicyEventType4=ceemRegisteredPolicyEventType4, ceemEventName=ceemEventName, ceemHistoryPolicyIntData1=ceemHistoryPolicyIntData1, ceemRegisteredPolicyEntry=ceemRegisteredPolicyEntry, ceemHistoryPolicyExitStatus=ceemHistoryPolicyExitStatus, ceemRegisteredPolicyRunTime=ceemRegisteredPolicyRunTime, cEventMgrDescrGroup=cEventMgrDescrGroup, ceemHistory=ceemHistory, cEventMgrNotificationsGroup=cEventMgrNotificationsGroup, cEventMgrRegisteredPolicyGroup=cEventMgrRegisteredPolicyGroup, ceemRegisteredPolicyEventType3=ceemRegisteredPolicyEventType3, ceemRegisteredPolicyStatus=ceemRegisteredPolicyStatus, ceemEventIndex=ceemEventIndex, cEventMgrConformance=cEventMgrConformance, ceemRegisteredPolicyEventType6=ceemRegisteredPolicyEventType6, cEventMgrServerEvent=cEventMgrServerEvent, cEventMgrHistoryGroup=cEventMgrHistoryGroup, ceemHistoryPolicyStrData=ceemHistoryPolicyStrData, NotifySource=NotifySource, cEventMgrPolicyEvent=cEventMgrPolicyEvent, ceemRegisteredPolicyEventType8=ceemRegisteredPolicyEventType8, cEventMgrMIBNotif=cEventMgrMIBNotif, ceemHistoryEventType2=ceemHistoryEventType2, ceemEventMap=ceemEventMap, cEventMgrGroups=cEventMgrGroups, ceemHistoryEventType6=ceemHistoryEventType6, PYSNMP_MODULE_ID=cEventMgrMIB, ceemRegisteredPolicyRegTime=ceemRegisteredPolicyRegTime, cEventMgrRegisteredPolicyGroupSup1=cEventMgrRegisteredPolicyGroupSup1, cEventMgrMIB=cEventMgrMIB, ceemHistoryPolicyIntData2=ceemHistoryPolicyIntData2, ceemRegisteredPolicyEventType7=ceemRegisteredPolicyEventType7, ceemHistoryEventEntry=ceemHistoryEventEntry, ceemHistoryEventTable=ceemHistoryEventTable, cEventMgrMIBObjects=cEventMgrMIBObjects, ceemEventMapEntry=ceemEventMapEntry, ceemRegisteredPolicyName=ceemRegisteredPolicyName, ceemRegisteredPolicy=ceemRegisteredPolicy, ceemHistoryEventType3=ceemHistoryEventType3, ceemHistoryEventType8=ceemHistoryEventType8, ceemHistoryEventIndex=ceemHistoryEventIndex, cEventMgrCompliance=cEventMgrCompliance, ceemRegisteredPolicyNotifFlag=ceemRegisteredPolicyNotifFlag, ceemRegisteredPolicyRunCount=ceemRegisteredPolicyRunCount, ceemRegisteredPolicyEventType1=ceemRegisteredPolicyEventType1, ceemRegisteredPolicyIndex=ceemRegisteredPolicyIndex, ceemHistoryEventType1=ceemHistoryEventType1, ceemHistoryPolicyName=ceemHistoryPolicyName, ceemHistoryNotifyType=ceemHistoryNotifyType, ceemRegisteredPolicyEventType5=ceemRegisteredPolicyEventType5, ceemRegisteredPolicyType=ceemRegisteredPolicyType, ceemHistoryMaxEventEntries=ceemHistoryMaxEventEntries, ceemEventMapTable=ceemEventMapTable, ceemHistoryPolicyPath=ceemHistoryPolicyPath, cEventMgrHistoryGroupSup1=cEventMgrHistoryGroupSup1, ceemRegisteredPolicyEventType2=ceemRegisteredPolicyEventType2, ceemHistoryEventType4=ceemHistoryEventType4, ceemRegisteredPolicyTable=ceemRegisteredPolicyTable, ceemHistoryLastEventEntry=ceemHistoryLastEventEntry, cEventMgrCompliances=cEventMgrCompliances, ceemRegisteredPolicyEnabledTime=ceemRegisteredPolicyEnabledTime, ceemHistoryEventType7=ceemHistoryEventType7, cEventMgrComplianceRev1=cEventMgrComplianceRev1)
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, single_value_constraint, value_range_constraint, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint') (cisco_experiment,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoExperiment') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup') (iso, counter64, unsigned32, counter32, module_identity, bits, ip_address, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, integer32, time_ticks, gauge32, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'Counter64', 'Unsigned32', 'Counter32', 'ModuleIdentity', 'Bits', 'IpAddress', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'Integer32', 'TimeTicks', 'Gauge32', 'MibIdentifier') (truth_value, textual_convention, display_string, date_and_time) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'TextualConvention', 'DisplayString', 'DateAndTime') c_event_mgr_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 10, 134)) cEventMgrMIB.setRevisions(('2006-11-07 00:00', '2003-04-16 00:00')) if mibBuilder.loadTexts: cEventMgrMIB.setLastUpdated('200611070000Z') if mibBuilder.loadTexts: cEventMgrMIB.setOrganization('Cisco Systems, Inc.') c_event_mgr_mib_notif = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 0)) c_event_mgr_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 1)) c_event_mgr_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 3)) ceem_event_map = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 1)) ceem_history = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2)) ceem_registered_policy = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3)) class Notifysource(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('server', 1), ('policy', 2)) ceem_event_map_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 1, 1)) if mibBuilder.loadTexts: ceemEventMapTable.setStatus('current') ceem_event_map_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 1, 1, 1)).setIndexNames((0, 'CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemEventIndex')) if mibBuilder.loadTexts: ceemEventMapEntry.setStatus('current') ceem_event_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 1, 1, 1, 1), unsigned32()) if mibBuilder.loadTexts: ceemEventIndex.setStatus('current') ceem_event_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 1, 1, 1, 2), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemEventName.setStatus('current') ceem_event_descr_text = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 1, 1, 1, 3), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemEventDescrText.setStatus('current') ceem_history_max_event_entries = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 50)).clone(10)).setMaxAccess('readwrite') if mibBuilder.loadTexts: ceemHistoryMaxEventEntries.setStatus('current') ceem_history_last_event_entry = mib_scalar((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryLastEventEntry.setStatus('current') ceem_history_event_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3)) if mibBuilder.loadTexts: ceemHistoryEventTable.setStatus('current') ceem_history_event_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1)).setIndexNames((0, 'CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventIndex')) if mibBuilder.loadTexts: ceemHistoryEventEntry.setStatus('current') ceem_history_event_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: ceemHistoryEventIndex.setStatus('current') ceem_history_event_type1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 2), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryEventType1.setStatus('current') ceem_history_event_type2 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 3), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryEventType2.setStatus('current') ceem_history_event_type3 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryEventType3.setStatus('current') ceem_history_event_type4 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 5), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryEventType4.setStatus('current') ceem_history_policy_path = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 6), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryPolicyPath.setStatus('current') ceem_history_policy_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 7), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryPolicyName.setStatus('current') ceem_history_policy_exit_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(-2147483648, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryPolicyExitStatus.setStatus('current') ceem_history_policy_int_data1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(-2147483648, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryPolicyIntData1.setStatus('current') ceem_history_policy_int_data2 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(-2147483648, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryPolicyIntData2.setStatus('current') ceem_history_policy_str_data = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 11), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryPolicyStrData.setStatus('current') ceem_history_notify_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 12), notify_source()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryNotifyType.setStatus('current') ceem_history_event_type5 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 13), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryEventType5.setStatus('current') ceem_history_event_type6 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 14), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryEventType6.setStatus('current') ceem_history_event_type7 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 15), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryEventType7.setStatus('current') ceem_history_event_type8 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 2, 3, 1, 16), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemHistoryEventType8.setStatus('current') ceem_registered_policy_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1)) if mibBuilder.loadTexts: ceemRegisteredPolicyTable.setStatus('current') ceem_registered_policy_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1)).setIndexNames((0, 'CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyIndex')) if mibBuilder.loadTexts: ceemRegisteredPolicyEntry.setStatus('current') ceem_registered_policy_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 1), unsigned32()) if mibBuilder.loadTexts: ceemRegisteredPolicyIndex.setStatus('current') ceem_registered_policy_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 2), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyName.setStatus('current') ceem_registered_policy_event_type1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 3), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyEventType1.setStatus('current') ceem_registered_policy_event_type2 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyEventType2.setStatus('current') ceem_registered_policy_event_type3 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 5), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyEventType3.setStatus('current') ceem_registered_policy_event_type4 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 6), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyEventType4.setStatus('current') ceem_registered_policy_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyStatus.setStatus('current') ceem_registered_policy_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('user', 1), ('system', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyType.setStatus('current') ceem_registered_policy_notif_flag = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 9), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyNotifFlag.setStatus('current') ceem_registered_policy_reg_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 10), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyRegTime.setStatus('current') ceem_registered_policy_enabled_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 11), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyEnabledTime.setStatus('current') ceem_registered_policy_run_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 12), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyRunTime.setStatus('current') ceem_registered_policy_run_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyRunCount.setStatus('current') ceem_registered_policy_event_type5 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 14), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyEventType5.setStatus('current') ceem_registered_policy_event_type6 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 15), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyEventType6.setStatus('current') ceem_registered_policy_event_type7 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 16), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyEventType7.setStatus('current') ceem_registered_policy_event_type8 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 134, 1, 3, 1, 1, 17), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ceemRegisteredPolicyEventType8.setStatus('current') c_event_mgr_server_event = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 134, 0, 1)).setObjects(('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType1'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType2'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType3'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType4'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyPath'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyName'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyExitStatus')) if mibBuilder.loadTexts: cEventMgrServerEvent.setStatus('current') c_event_mgr_policy_event = notification_type((1, 3, 6, 1, 4, 1, 9, 10, 134, 0, 2)).setObjects(('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType1'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType2'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType3'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType4'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyPath'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyName'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyIntData1'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyIntData2'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyStrData')) if mibBuilder.loadTexts: cEventMgrPolicyEvent.setStatus('current') c_event_mgr_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 1)) c_event_mgr_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2)) c_event_mgr_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 1, 1)).setObjects(('CISCO-EMBEDDED-EVENT-MGR-MIB', 'cEventMgrDescrGroup'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'cEventMgrNotificationsGroup'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'cEventMgrRegisteredPolicyGroup'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'cEventMgrHistoryGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): c_event_mgr_compliance = cEventMgrCompliance.setStatus('deprecated') c_event_mgr_compliance_rev1 = module_compliance((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 1, 2)).setObjects(('CISCO-EMBEDDED-EVENT-MGR-MIB', 'cEventMgrDescrGroup'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'cEventMgrNotificationsGroup'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'cEventMgrRegisteredPolicyGroup'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'cEventMgrRegisteredPolicyGroupSup1'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'cEventMgrHistoryGroup'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'cEventMgrHistoryGroupSup1')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): c_event_mgr_compliance_rev1 = cEventMgrComplianceRev1.setStatus('current') c_event_mgr_descr_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2, 1)).setObjects(('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemEventName'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemEventDescrText')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): c_event_mgr_descr_group = cEventMgrDescrGroup.setStatus('current') c_event_mgr_history_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2, 2)).setObjects(('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryMaxEventEntries'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryLastEventEntry'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType1'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType2'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType3'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType4'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyPath'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyName'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyExitStatus'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyIntData1'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyIntData2'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryPolicyStrData'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryNotifyType')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): c_event_mgr_history_group = cEventMgrHistoryGroup.setStatus('current') c_event_mgr_notifications_group = notification_group((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2, 3)).setObjects(('CISCO-EMBEDDED-EVENT-MGR-MIB', 'cEventMgrServerEvent'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'cEventMgrPolicyEvent')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): c_event_mgr_notifications_group = cEventMgrNotificationsGroup.setStatus('current') c_event_mgr_registered_policy_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2, 4)).setObjects(('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyName'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyEventType1'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyEventType2'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyEventType3'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyEventType4'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyStatus'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyType'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyNotifFlag'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyRegTime'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyEnabledTime'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyRunTime'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyRunCount')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): c_event_mgr_registered_policy_group = cEventMgrRegisteredPolicyGroup.setStatus('current') c_event_mgr_history_group_sup1 = object_group((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2, 5)).setObjects(('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType5'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType6'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType7'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemHistoryEventType8')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): c_event_mgr_history_group_sup1 = cEventMgrHistoryGroupSup1.setStatus('current') c_event_mgr_registered_policy_group_sup1 = object_group((1, 3, 6, 1, 4, 1, 9, 10, 134, 3, 2, 6)).setObjects(('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyEventType5'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyEventType6'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyEventType7'), ('CISCO-EMBEDDED-EVENT-MGR-MIB', 'ceemRegisteredPolicyEventType8')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): c_event_mgr_registered_policy_group_sup1 = cEventMgrRegisteredPolicyGroupSup1.setStatus('current') mibBuilder.exportSymbols('CISCO-EMBEDDED-EVENT-MGR-MIB', ceemEventDescrText=ceemEventDescrText, ceemHistoryEventType5=ceemHistoryEventType5, ceemRegisteredPolicyEventType4=ceemRegisteredPolicyEventType4, ceemEventName=ceemEventName, ceemHistoryPolicyIntData1=ceemHistoryPolicyIntData1, ceemRegisteredPolicyEntry=ceemRegisteredPolicyEntry, ceemHistoryPolicyExitStatus=ceemHistoryPolicyExitStatus, ceemRegisteredPolicyRunTime=ceemRegisteredPolicyRunTime, cEventMgrDescrGroup=cEventMgrDescrGroup, ceemHistory=ceemHistory, cEventMgrNotificationsGroup=cEventMgrNotificationsGroup, cEventMgrRegisteredPolicyGroup=cEventMgrRegisteredPolicyGroup, ceemRegisteredPolicyEventType3=ceemRegisteredPolicyEventType3, ceemRegisteredPolicyStatus=ceemRegisteredPolicyStatus, ceemEventIndex=ceemEventIndex, cEventMgrConformance=cEventMgrConformance, ceemRegisteredPolicyEventType6=ceemRegisteredPolicyEventType6, cEventMgrServerEvent=cEventMgrServerEvent, cEventMgrHistoryGroup=cEventMgrHistoryGroup, ceemHistoryPolicyStrData=ceemHistoryPolicyStrData, NotifySource=NotifySource, cEventMgrPolicyEvent=cEventMgrPolicyEvent, ceemRegisteredPolicyEventType8=ceemRegisteredPolicyEventType8, cEventMgrMIBNotif=cEventMgrMIBNotif, ceemHistoryEventType2=ceemHistoryEventType2, ceemEventMap=ceemEventMap, cEventMgrGroups=cEventMgrGroups, ceemHistoryEventType6=ceemHistoryEventType6, PYSNMP_MODULE_ID=cEventMgrMIB, ceemRegisteredPolicyRegTime=ceemRegisteredPolicyRegTime, cEventMgrRegisteredPolicyGroupSup1=cEventMgrRegisteredPolicyGroupSup1, cEventMgrMIB=cEventMgrMIB, ceemHistoryPolicyIntData2=ceemHistoryPolicyIntData2, ceemRegisteredPolicyEventType7=ceemRegisteredPolicyEventType7, ceemHistoryEventEntry=ceemHistoryEventEntry, ceemHistoryEventTable=ceemHistoryEventTable, cEventMgrMIBObjects=cEventMgrMIBObjects, ceemEventMapEntry=ceemEventMapEntry, ceemRegisteredPolicyName=ceemRegisteredPolicyName, ceemRegisteredPolicy=ceemRegisteredPolicy, ceemHistoryEventType3=ceemHistoryEventType3, ceemHistoryEventType8=ceemHistoryEventType8, ceemHistoryEventIndex=ceemHistoryEventIndex, cEventMgrCompliance=cEventMgrCompliance, ceemRegisteredPolicyNotifFlag=ceemRegisteredPolicyNotifFlag, ceemRegisteredPolicyRunCount=ceemRegisteredPolicyRunCount, ceemRegisteredPolicyEventType1=ceemRegisteredPolicyEventType1, ceemRegisteredPolicyIndex=ceemRegisteredPolicyIndex, ceemHistoryEventType1=ceemHistoryEventType1, ceemHistoryPolicyName=ceemHistoryPolicyName, ceemHistoryNotifyType=ceemHistoryNotifyType, ceemRegisteredPolicyEventType5=ceemRegisteredPolicyEventType5, ceemRegisteredPolicyType=ceemRegisteredPolicyType, ceemHistoryMaxEventEntries=ceemHistoryMaxEventEntries, ceemEventMapTable=ceemEventMapTable, ceemHistoryPolicyPath=ceemHistoryPolicyPath, cEventMgrHistoryGroupSup1=cEventMgrHistoryGroupSup1, ceemRegisteredPolicyEventType2=ceemRegisteredPolicyEventType2, ceemHistoryEventType4=ceemHistoryEventType4, ceemRegisteredPolicyTable=ceemRegisteredPolicyTable, ceemHistoryLastEventEntry=ceemHistoryLastEventEntry, cEventMgrCompliances=cEventMgrCompliances, ceemRegisteredPolicyEnabledTime=ceemRegisteredPolicyEnabledTime, ceemHistoryEventType7=ceemHistoryEventType7, cEventMgrComplianceRev1=cEventMgrComplianceRev1)
screen_resX=1920 screen_resY=1080 img_id=['1.JPG_HIGH_', '2.JPG_HIGH_', '7.JPG_HIGH_', '12.JPG_HIGH_', '13.JPG_HIGH_', '15.JPG_HIGH_', '19.JPG_HIGH_', '25.JPG_HIGH_', '27.JPG_HIGH_', '29.JPG_HIGH_', '41.JPG_HIGH_', '42.JPG_HIGH_', '43.JPG_HIGH_', '44.JPG_HIGH_', '48.JPG_HIGH_', '49.JPG_HIGH_', '51.JPG_HIGH_', '54.JPG_HIGH_', '55.JPG_HIGH_', '59.JPG_HIGH_', '61.JPG_HIGH_', '64.JPG_HIGH_', '67.JPG_HIGH_', '74.JPG_HIGH_', '76.JPG_HIGH_', '77.JPG_HIGH_', '84.JPG_HIGH_', '87.JPG_HIGH_', '88.JPG_HIGH_', '91.JPG_HIGH_', '94.JPG_HIGH_', '95.JPG_HIGH_', '100.JPG_HIGH_', '101.JPG_HIGH_', '112.JPG_HIGH_', '113.JPG_HIGH_', '3.JPG_LOW_', '6.JPG_LOW_', '10.JPG_LOW_', '17.JPG_LOW_', '21.JPG_LOW_', '23.JPG_LOW_', '28.JPG_LOW_', '33.JPG_LOW_', '35.JPG_LOW_', '38.JPG_LOW_', '39.JPG_LOW_', '40.JPG_LOW_', '46.JPG_LOW_', '50.JPG_LOW_', '52.JPG_LOW_', '58.JPG_LOW_', '60.JPG_LOW_', '62.JPG_LOW_', '63.JPG_LOW_', '70.JPG_LOW_', '72.JPG_LOW_', '73.JPG_LOW_', '75.JPG_LOW_', '78.JPG_LOW_', '80.JPG_LOW_', '82.JPG_LOW_', '89.JPG_LOW_', '90.JPG_LOW_', '92.JPG_LOW_', '97.JPG_LOW_', '99.JPG_LOW_', '102.JPG_LOW_', '103.JPG_LOW_', '104.JPG_LOW_', '105.JPG_LOW_', '108.JPG_LOW_'] sub_id=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31] BEHAVIORAL_FILE='C:/Users/presi/Desktop/PhD/Memory guided attention in '\ 'cluttered scenes v.3/Behavioral Data/Memory/Preprocessed/Memory_all_dirty.csv' DATA_PATH='C:/Users/presi/Desktop/PhD/Memory guided attention in '\ 'cluttered scenes v.3/Eye Tracking Data/1. Associative Learning/Raw' TRIALS_PATH='C:/Users/presi/Desktop/PhD/Memory guided attention in '\ 'cluttered scenes v.3/Eye Tracking Data/'\ '1. Associative Learning/Learn_trials' EVENTS_PATH='C:/Users/presi/Desktop/PhD/Memory guided attention in '\ 'cluttered scenes v.3/Eye Tracking Data/'\ '1. Associative Learning/Learn_events' COLLATION_PATH='C:/Users/presi/Desktop/PhD/Memory guided attention in '\ 'cluttered scenes v.3/Eye Tracking Data/'\ '1. Associative Learning/Learn_collation' DIR_ROUTE_PATH='C:/Users/presi/Desktop/PhD/Memory guided attention in '\ 'cluttered scenes v.3/Eye Tracking Data/'\ '1. Associative Learning/Learn_direct_route' IMG_PATH='C:/Users/presi/Desktop/PhD/Memory guided attention in '\ 'cluttered scenes v.3/Tasks/Task2/Scenes' RAW_SCANPATH='C:/Users/presi/Desktop/PhD/Memory guided attention in '\ 'cluttered scenes v.3/Eye Tracking Data/1. Associative Learning/'\ 'Learn_ visualizations/Raw_Scanpaths' #IVT_SCANPATH='C:/Users/presi/Desktop/PhD/Memory guided attention in '\ #'cluttered scenes v.3/Eye Tracking Data/1. Associative Learning/'\ # 'Learn_visualizations/IVT_Scanpaths' IVT_SCANPATH='E:/UCY PhD/Memory guided attention'\ ' in cluttered scenes v.3/1. Associative Learning/'\ 'Learn_visualizations/IVT_Scanpaths'
screen_res_x = 1920 screen_res_y = 1080 img_id = ['1.JPG_HIGH_', '2.JPG_HIGH_', '7.JPG_HIGH_', '12.JPG_HIGH_', '13.JPG_HIGH_', '15.JPG_HIGH_', '19.JPG_HIGH_', '25.JPG_HIGH_', '27.JPG_HIGH_', '29.JPG_HIGH_', '41.JPG_HIGH_', '42.JPG_HIGH_', '43.JPG_HIGH_', '44.JPG_HIGH_', '48.JPG_HIGH_', '49.JPG_HIGH_', '51.JPG_HIGH_', '54.JPG_HIGH_', '55.JPG_HIGH_', '59.JPG_HIGH_', '61.JPG_HIGH_', '64.JPG_HIGH_', '67.JPG_HIGH_', '74.JPG_HIGH_', '76.JPG_HIGH_', '77.JPG_HIGH_', '84.JPG_HIGH_', '87.JPG_HIGH_', '88.JPG_HIGH_', '91.JPG_HIGH_', '94.JPG_HIGH_', '95.JPG_HIGH_', '100.JPG_HIGH_', '101.JPG_HIGH_', '112.JPG_HIGH_', '113.JPG_HIGH_', '3.JPG_LOW_', '6.JPG_LOW_', '10.JPG_LOW_', '17.JPG_LOW_', '21.JPG_LOW_', '23.JPG_LOW_', '28.JPG_LOW_', '33.JPG_LOW_', '35.JPG_LOW_', '38.JPG_LOW_', '39.JPG_LOW_', '40.JPG_LOW_', '46.JPG_LOW_', '50.JPG_LOW_', '52.JPG_LOW_', '58.JPG_LOW_', '60.JPG_LOW_', '62.JPG_LOW_', '63.JPG_LOW_', '70.JPG_LOW_', '72.JPG_LOW_', '73.JPG_LOW_', '75.JPG_LOW_', '78.JPG_LOW_', '80.JPG_LOW_', '82.JPG_LOW_', '89.JPG_LOW_', '90.JPG_LOW_', '92.JPG_LOW_', '97.JPG_LOW_', '99.JPG_LOW_', '102.JPG_LOW_', '103.JPG_LOW_', '104.JPG_LOW_', '105.JPG_LOW_', '108.JPG_LOW_'] sub_id = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31] behavioral_file = 'C:/Users/presi/Desktop/PhD/Memory guided attention in cluttered scenes v.3/Behavioral Data/Memory/Preprocessed/Memory_all_dirty.csv' data_path = 'C:/Users/presi/Desktop/PhD/Memory guided attention in cluttered scenes v.3/Eye Tracking Data/1. Associative Learning/Raw' trials_path = 'C:/Users/presi/Desktop/PhD/Memory guided attention in cluttered scenes v.3/Eye Tracking Data/1. Associative Learning/Learn_trials' events_path = 'C:/Users/presi/Desktop/PhD/Memory guided attention in cluttered scenes v.3/Eye Tracking Data/1. Associative Learning/Learn_events' collation_path = 'C:/Users/presi/Desktop/PhD/Memory guided attention in cluttered scenes v.3/Eye Tracking Data/1. Associative Learning/Learn_collation' dir_route_path = 'C:/Users/presi/Desktop/PhD/Memory guided attention in cluttered scenes v.3/Eye Tracking Data/1. Associative Learning/Learn_direct_route' img_path = 'C:/Users/presi/Desktop/PhD/Memory guided attention in cluttered scenes v.3/Tasks/Task2/Scenes' raw_scanpath = 'C:/Users/presi/Desktop/PhD/Memory guided attention in cluttered scenes v.3/Eye Tracking Data/1. Associative Learning/Learn_ visualizations/Raw_Scanpaths' ivt_scanpath = 'E:/UCY PhD/Memory guided attention in cluttered scenes v.3/1. Associative Learning/Learn_visualizations/IVT_Scanpaths'
def create_matrix(rows_count): matrix = [] for _ in range(rows_count): matrix.append([int(x) for x in input().split(', ')]) return matrix def get_square_sum(row, col, matrix): square_sum = 0 for r in range(row, row + 2): for c in range(col, col + 2): square_sum += matrix[r][c] return square_sum def print_square(matrix, row, col): for r in range(row, row + 2): for c in range(col, col + 2): print(matrix[r][c], end=' ') print() rows_count, cols_count = [int(x) for x in input().split(', ')] matrix = create_matrix(rows_count) best_pos = 0, 0 best_sum = get_square_sum(0, 0, matrix) for r in range(rows_count - 1): for c in range(cols_count - 1): current_pos = r, c current_sum = get_square_sum(r, c, matrix) if current_sum > best_sum: best_pos = current_pos best_sum = current_sum print_square(matrix, best_pos[0], best_pos[1]) print(best_sum)
def create_matrix(rows_count): matrix = [] for _ in range(rows_count): matrix.append([int(x) for x in input().split(', ')]) return matrix def get_square_sum(row, col, matrix): square_sum = 0 for r in range(row, row + 2): for c in range(col, col + 2): square_sum += matrix[r][c] return square_sum def print_square(matrix, row, col): for r in range(row, row + 2): for c in range(col, col + 2): print(matrix[r][c], end=' ') print() (rows_count, cols_count) = [int(x) for x in input().split(', ')] matrix = create_matrix(rows_count) best_pos = (0, 0) best_sum = get_square_sum(0, 0, matrix) for r in range(rows_count - 1): for c in range(cols_count - 1): current_pos = (r, c) current_sum = get_square_sum(r, c, matrix) if current_sum > best_sum: best_pos = current_pos best_sum = current_sum print_square(matrix, best_pos[0], best_pos[1]) print(best_sum)
#!/usr/bin/env python3 # Diodes "1N4148" "1N5817G" "BAT43" # Zener "1N457" # bc junction of many transistors can also be used as dioded, i.e. 2SC1815, 2SA9012, etc. with very small leakage current (~1pA at -4V).
"""1N4148""" '1N5817G' 'BAT43' '1N457'
clientId = 'CLIENT_ID' clientSecret = 'CLIENT_SECRET' geniusToken = 'GENIUS_TOKEN' bitrate = '320'
client_id = 'CLIENT_ID' client_secret = 'CLIENT_SECRET' genius_token = 'GENIUS_TOKEN' bitrate = '320'
''' Created on Jun 15, 2016 @author: eze ''' class NotFoundException(Exception): ''' classdocs ''' def __init__(self, element): ''' Constructor ''' self.elementNotFound = element def __str__(self, *args, **kwargs): return "NotFoundException(%s)" % self.elementNotFound
""" Created on Jun 15, 2016 @author: eze """ class Notfoundexception(Exception): """ classdocs """ def __init__(self, element): """ Constructor """ self.elementNotFound = element def __str__(self, *args, **kwargs): return 'NotFoundException(%s)' % self.elementNotFound
# Solution to the practise problem # https://automatetheboringstuff.com/chapter6/ # Table Printer def printTable(tableList): """Prints the list of list of strings with each column right justified""" colWidth = 0 for row in tableList: colWidth = max(colWidth, max([len(x) for x in row])) colWidth += 1 printedTable = '' tableList = [[row[i] for row in tableList] for i in range(len(tableList[0]))] for row in tableList: for item in row: printedTable += item.rjust(colWidth, ' ') printedTable += '\n' print(printedTable) tableData = [['apples', 'oranges', 'cherries', 'banana'], ['Alice', 'Bob', 'Carol', 'David'], ['dogs', 'cats', 'moose', 'goose']] printTable(tableData)
def print_table(tableList): """Prints the list of list of strings with each column right justified""" col_width = 0 for row in tableList: col_width = max(colWidth, max([len(x) for x in row])) col_width += 1 printed_table = '' table_list = [[row[i] for row in tableList] for i in range(len(tableList[0]))] for row in tableList: for item in row: printed_table += item.rjust(colWidth, ' ') printed_table += '\n' print(printedTable) table_data = [['apples', 'oranges', 'cherries', 'banana'], ['Alice', 'Bob', 'Carol', 'David'], ['dogs', 'cats', 'moose', 'goose']] print_table(tableData)
class Contact: def __init__(self, first_name = None, last_name = None, mobile_phone = None): self.first_name = first_name self.last_name = last_name self.mobile_phone = mobile_phone
class Contact: def __init__(self, first_name=None, last_name=None, mobile_phone=None): self.first_name = first_name self.last_name = last_name self.mobile_phone = mobile_phone
class Solution(object): def shortestToChar(self, S, C): """ :type S: str :type C: str :rtype: List[int] """ pl = [] ret = [0] * len(S) for i in range(0, len(S)): if S[i] == C: pl.append(i) for i in range(0, len(S)): minx = 10000000 for l in range(0, len(pl)): minx = min(minx, abs(pl[l] - i)) ret[i] = minx return ret if __name__ == "__main__": S = "loveleetcode" C = 'e' ret = Solution().shortestToChar(S, C) print(ret)
class Solution(object): def shortest_to_char(self, S, C): """ :type S: str :type C: str :rtype: List[int] """ pl = [] ret = [0] * len(S) for i in range(0, len(S)): if S[i] == C: pl.append(i) for i in range(0, len(S)): minx = 10000000 for l in range(0, len(pl)): minx = min(minx, abs(pl[l] - i)) ret[i] = minx return ret if __name__ == '__main__': s = 'loveleetcode' c = 'e' ret = solution().shortestToChar(S, C) print(ret)
# Optional solution with tidy data representation (providing x and y) monthly_victim_counts_melt = monthly_victim_counts.reset_index().melt( id_vars="datetime", var_name="victim_type", value_name="count" ) sns.relplot( data=monthly_victim_counts_melt, x="datetime", y="count", hue="victim_type", kind="line", palette="colorblind", height=3, aspect=4, )
monthly_victim_counts_melt = monthly_victim_counts.reset_index().melt(id_vars='datetime', var_name='victim_type', value_name='count') sns.relplot(data=monthly_victim_counts_melt, x='datetime', y='count', hue='victim_type', kind='line', palette='colorblind', height=3, aspect=4)
def findSmallest(arr): smallest = arr[0] smallest_index = 0 for i in range(1, len(arr)): if arr[i] < smallest: smallest = arr[i] smallest_index = i return smallest_index def selection_sort(arr): newarr = [] for i in range(len(arr)): smallest_index = findSmallest(arr) newarr.append(arr.pop(smallest_index)) return newarr test_arr = [5, 3, 6, 1, 0, 0, 2, 10] print(selection_sort(test_arr))
def find_smallest(arr): smallest = arr[0] smallest_index = 0 for i in range(1, len(arr)): if arr[i] < smallest: smallest = arr[i] smallest_index = i return smallest_index def selection_sort(arr): newarr = [] for i in range(len(arr)): smallest_index = find_smallest(arr) newarr.append(arr.pop(smallest_index)) return newarr test_arr = [5, 3, 6, 1, 0, 0, 2, 10] print(selection_sort(test_arr))
{ 'Hello World':'Salve Mondo', 'Welcome to web2py':'Ciao da wek2py', }
{'Hello World': 'Salve Mondo', 'Welcome to web2py': 'Ciao da wek2py'}
domain='https://monbot.hopto.org' apm_id='admin' apm_pw='New1234!' apm_url='https://monbot.hopto.org:3000' db_host='monbot.hopto.org' db_user='izyrtm' db_pw='new1234!' db_datadbase='monbot'
domain = 'https://monbot.hopto.org' apm_id = 'admin' apm_pw = 'New1234!' apm_url = 'https://monbot.hopto.org:3000' db_host = 'monbot.hopto.org' db_user = 'izyrtm' db_pw = 'new1234!' db_datadbase = 'monbot'
def norm(x, ord=None, axis=None): # TODO(beam2d): Implement it raise NotImplementedError def cond(x, p=None): # TODO(beam2d): Implement it raise NotImplementedError def det(a): # TODO(beam2d): Implement it raise NotImplementedError def matrix_rank(M, tol=None): # TODO(beam2d): Implement it raise NotImplementedError def slogdet(a): # TODO(beam2d): Implement it raise NotImplementedError def trace(a, offset=0, axis1=0, axis2=1, dtype=None, out=None): """Returns the sum along the diagonals of an array. It computes the sum along the diagonals at ``axis1`` and ``axis2``. Args: a (cupy.ndarray): Array to take trace. offset (int): Index of diagonals. Zero indicates the main diagonal, a positive value an upper diagonal, and a negative value a lower diagonal. axis1 (int): The first axis along which the trace is taken. axis2 (int): The second axis along which the trace is taken. dtype: Data type specifier of the output. out (cupy.ndarray): Output array. Returns: cupy.ndarray: The trace of ``a`` along axes ``(axis1, axis2)``. .. seealso:: :func:`numpy.trace` """ d = a.diagonal(offset, axis1, axis2) return d.sum(-1, dtype, out, False)
def norm(x, ord=None, axis=None): raise NotImplementedError def cond(x, p=None): raise NotImplementedError def det(a): raise NotImplementedError def matrix_rank(M, tol=None): raise NotImplementedError def slogdet(a): raise NotImplementedError def trace(a, offset=0, axis1=0, axis2=1, dtype=None, out=None): """Returns the sum along the diagonals of an array. It computes the sum along the diagonals at ``axis1`` and ``axis2``. Args: a (cupy.ndarray): Array to take trace. offset (int): Index of diagonals. Zero indicates the main diagonal, a positive value an upper diagonal, and a negative value a lower diagonal. axis1 (int): The first axis along which the trace is taken. axis2 (int): The second axis along which the trace is taken. dtype: Data type specifier of the output. out (cupy.ndarray): Output array. Returns: cupy.ndarray: The trace of ``a`` along axes ``(axis1, axis2)``. .. seealso:: :func:`numpy.trace` """ d = a.diagonal(offset, axis1, axis2) return d.sum(-1, dtype, out, False)
def load(): with open("input") as f: yield next(f).strip() next(f) for x in f: yield x.strip().split(" -> ") def pair_insertion(): data = list(load()) polymer, rules = list(data[0]), dict(data[1:]) for _ in range(10): new_polymer = [polymer[0]] for i in range(len(polymer) - 1): pair = polymer[i] + polymer[i + 1] new_polymer.extend((rules[pair], polymer[i + 1])) polymer = new_polymer histogram = {} for e in polymer: histogram[e] = histogram.get(e, 0) + 1 return max(histogram.values()) - min(histogram.values()) print(pair_insertion())
def load(): with open('input') as f: yield next(f).strip() next(f) for x in f: yield x.strip().split(' -> ') def pair_insertion(): data = list(load()) (polymer, rules) = (list(data[0]), dict(data[1:])) for _ in range(10): new_polymer = [polymer[0]] for i in range(len(polymer) - 1): pair = polymer[i] + polymer[i + 1] new_polymer.extend((rules[pair], polymer[i + 1])) polymer = new_polymer histogram = {} for e in polymer: histogram[e] = histogram.get(e, 0) + 1 return max(histogram.values()) - min(histogram.values()) print(pair_insertion())
def compChooseWord(hand, wordList, n): """ Given a hand and a wordList, find the word that gives the maximum value score, and return it. This word should be calculated by considering all the words in the wordList. If no words in the wordList can be made from the hand, return None. hand: dictionary (string -> int) wordList: list (string) returns: string or None """ maxScore = 0 bestWord = None for word in wordList: if isValidWord(word, hand, wordList) == True: wordScore = getWordScore(word, n) if wordScore > maxScore: maxScore = wordScore bestWord = word return bestWord def compPlayHand(hand, wordList, n): """ Allows the computer to play the given hand, following the same procedure as playHand, except instead of the user choosing a word, the computer chooses it. 1) The hand is displayed. 2) The computer chooses a word. 3) After every valid word: the word and the score for that word is displayed, the remaining letters in the hand are displayed, and the computer chooses another word. 4) The sum of the word scores is displayed when the hand finishes. 5) The hand finishes when the computer has exhausted its possible choices (i.e. compChooseWord returns None). """ totalScore = 0 while calculateHandlen(hand) > 0: print ('Current Hand: ' ), displayHand(hand) word = compChooseWord(hand, wordList, n) if word == None: print ('Total score: ' + str(totalScore) + ' points.') break else: totalScore = getWordScore(word, n) + totalScore print ('"' + str(word) + '"' + ' earned ' + str(getWordScore(word, n)) + ' points. Total: ' + str(totalScore) + ' points') hand = updateHand(hand, word) if calculateHandlen(hand) == 0: print ('Total score: ' + str(totalScore) + ' points.') else: print (' ')
def comp_choose_word(hand, wordList, n): """ Given a hand and a wordList, find the word that gives the maximum value score, and return it. This word should be calculated by considering all the words in the wordList. If no words in the wordList can be made from the hand, return None. hand: dictionary (string -> int) wordList: list (string) returns: string or None """ max_score = 0 best_word = None for word in wordList: if is_valid_word(word, hand, wordList) == True: word_score = get_word_score(word, n) if wordScore > maxScore: max_score = wordScore best_word = word return bestWord def comp_play_hand(hand, wordList, n): """ Allows the computer to play the given hand, following the same procedure as playHand, except instead of the user choosing a word, the computer chooses it. 1) The hand is displayed. 2) The computer chooses a word. 3) After every valid word: the word and the score for that word is displayed, the remaining letters in the hand are displayed, and the computer chooses another word. 4) The sum of the word scores is displayed when the hand finishes. 5) The hand finishes when the computer has exhausted its possible choices (i.e. compChooseWord returns None). """ total_score = 0 while calculate_handlen(hand) > 0: (print('Current Hand: '),) display_hand(hand) word = comp_choose_word(hand, wordList, n) if word == None: print('Total score: ' + str(totalScore) + ' points.') break else: total_score = get_word_score(word, n) + totalScore print('"' + str(word) + '"' + ' earned ' + str(get_word_score(word, n)) + ' points. Total: ' + str(totalScore) + ' points') hand = update_hand(hand, word) if calculate_handlen(hand) == 0: print('Total score: ' + str(totalScore) + ' points.') else: print(' ')
class Colors: END = '\033[0m' ERROR = '\033[91m[ERROR] ' INFO = '\033[94m[INFO] ' WARN = '\033[93m[WARN] ' def get_color(msg_type): if msg_type == 'ERROR': return Colors.ERROR elif msg_type == 'INFO': return Colors.INFO elif msg_type == 'WARN': return Colors.WARN else: return Colors.END def get_msg(msg, msg_type=None): color = get_color(msg_type) msg = ''.join([color, msg, Colors.END]) return msg def print_msg(msg, msg_type=None): msg = get_msg(msg, msg_type) print(msg)
class Colors: end = '\x1b[0m' error = '\x1b[91m[ERROR] ' info = '\x1b[94m[INFO] ' warn = '\x1b[93m[WARN] ' def get_color(msg_type): if msg_type == 'ERROR': return Colors.ERROR elif msg_type == 'INFO': return Colors.INFO elif msg_type == 'WARN': return Colors.WARN else: return Colors.END def get_msg(msg, msg_type=None): color = get_color(msg_type) msg = ''.join([color, msg, Colors.END]) return msg def print_msg(msg, msg_type=None): msg = get_msg(msg, msg_type) print(msg)
def naive_string_matching(t, w, n, m): for i in range(n - m + 1): j = 0 while j < m and t[i + j + 1] == w[j + 1]: j = j + 1 if j == m: return True return False
def naive_string_matching(t, w, n, m): for i in range(n - m + 1): j = 0 while j < m and t[i + j + 1] == w[j + 1]: j = j + 1 if j == m: return True return False
# Leo colorizer control file for kivy mode. # This file is in the public domain. # Properties for kivy mode. properties = { "ignoreWhitespace": "false", "lineComment": "#", } # Attributes dict for kivy_main ruleset. kivy_main_attributes_dict = { "default": "null", "digit_re": "", "escape": "", "highlight_digits": "true", "ignore_case": "true", "no_word_sep": "", } # Dictionary of attributes dictionaries for kivy mode. attributesDictDict = { "kivy_main": kivy_main_attributes_dict, } # Keywords dict for kivy_main ruleset. kivy_main_keywords_dict = { "app": "keyword2", "args": "keyword2", "canvas": "keyword1", "id": "keyword1", "root": "keyword2", "self": "keyword2", "size": "keyword1", "text": "keyword1", "x": "keyword1", "y": "keyword1", } # Dictionary of keywords dictionaries for kivy mode. keywordsDictDict = { "kivy_main": kivy_main_keywords_dict, } # Rules for kivy_main ruleset. def kivy_rule0(colorer, s, i): return colorer.match_eol_span(s, i, kind="comment1", seq="#", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="", exclude_match=False) def kivy_rule1(colorer, s, i): return colorer.match_span(s, i, kind="literal1", begin="\"", end="\"", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="kivy::literal_one",exclude_match=False, no_escape=False, no_line_break=False, no_word_break=False) def kivy_rule2(colorer, s, i): return colorer.match_keywords(s, i) # Rules dict for kivy_main ruleset. rulesDict1 = { "\"": [kivy_rule1,], "#": [kivy_rule0,], "0": [kivy_rule2,], "1": [kivy_rule2,], "2": [kivy_rule2,], "3": [kivy_rule2,], "4": [kivy_rule2,], "5": [kivy_rule2,], "6": [kivy_rule2,], "7": [kivy_rule2,], "8": [kivy_rule2,], "9": [kivy_rule2,], "@": [kivy_rule2,], "A": [kivy_rule2,], "B": [kivy_rule2,], "C": [kivy_rule2,], "D": [kivy_rule2,], "E": [kivy_rule2,], "F": [kivy_rule2,], "G": [kivy_rule2,], "H": [kivy_rule2,], "I": [kivy_rule2,], "J": [kivy_rule2,], "K": [kivy_rule2,], "L": [kivy_rule2,], "M": [kivy_rule2,], "N": [kivy_rule2,], "O": [kivy_rule2,], "P": [kivy_rule2,], "Q": [kivy_rule2,], "R": [kivy_rule2,], "S": [kivy_rule2,], "T": [kivy_rule2,], "U": [kivy_rule2,], "V": [kivy_rule2,], "W": [kivy_rule2,], "X": [kivy_rule2,], "Y": [kivy_rule2,], "Z": [kivy_rule2,], "a": [kivy_rule2,], "b": [kivy_rule2,], "c": [kivy_rule2,], "d": [kivy_rule2,], "e": [kivy_rule2,], "f": [kivy_rule2,], "g": [kivy_rule2,], "h": [kivy_rule2,], "i": [kivy_rule2,], "j": [kivy_rule2,], "k": [kivy_rule2,], "l": [kivy_rule2,], "m": [kivy_rule2,], "n": [kivy_rule2,], "o": [kivy_rule2,], "p": [kivy_rule2,], "q": [kivy_rule2,], "r": [kivy_rule2,], "s": [kivy_rule2,], "t": [kivy_rule2,], "u": [kivy_rule2,], "v": [kivy_rule2,], "w": [kivy_rule2,], "x": [kivy_rule2,], "y": [kivy_rule2,], "z": [kivy_rule2,], } # x.rulesDictDict for kivy mode. rulesDictDict = { "kivy_main": rulesDict1, } # Import dict for kivy mode. importDict = {}
properties = {'ignoreWhitespace': 'false', 'lineComment': '#'} kivy_main_attributes_dict = {'default': 'null', 'digit_re': '', 'escape': '', 'highlight_digits': 'true', 'ignore_case': 'true', 'no_word_sep': ''} attributes_dict_dict = {'kivy_main': kivy_main_attributes_dict} kivy_main_keywords_dict = {'app': 'keyword2', 'args': 'keyword2', 'canvas': 'keyword1', 'id': 'keyword1', 'root': 'keyword2', 'self': 'keyword2', 'size': 'keyword1', 'text': 'keyword1', 'x': 'keyword1', 'y': 'keyword1'} keywords_dict_dict = {'kivy_main': kivy_main_keywords_dict} def kivy_rule0(colorer, s, i): return colorer.match_eol_span(s, i, kind='comment1', seq='#', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='', exclude_match=False) def kivy_rule1(colorer, s, i): return colorer.match_span(s, i, kind='literal1', begin='"', end='"', at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate='kivy::literal_one', exclude_match=False, no_escape=False, no_line_break=False, no_word_break=False) def kivy_rule2(colorer, s, i): return colorer.match_keywords(s, i) rules_dict1 = {'"': [kivy_rule1], '#': [kivy_rule0], '0': [kivy_rule2], '1': [kivy_rule2], '2': [kivy_rule2], '3': [kivy_rule2], '4': [kivy_rule2], '5': [kivy_rule2], '6': [kivy_rule2], '7': [kivy_rule2], '8': [kivy_rule2], '9': [kivy_rule2], '@': [kivy_rule2], 'A': [kivy_rule2], 'B': [kivy_rule2], 'C': [kivy_rule2], 'D': [kivy_rule2], 'E': [kivy_rule2], 'F': [kivy_rule2], 'G': [kivy_rule2], 'H': [kivy_rule2], 'I': [kivy_rule2], 'J': [kivy_rule2], 'K': [kivy_rule2], 'L': [kivy_rule2], 'M': [kivy_rule2], 'N': [kivy_rule2], 'O': [kivy_rule2], 'P': [kivy_rule2], 'Q': [kivy_rule2], 'R': [kivy_rule2], 'S': [kivy_rule2], 'T': [kivy_rule2], 'U': [kivy_rule2], 'V': [kivy_rule2], 'W': [kivy_rule2], 'X': [kivy_rule2], 'Y': [kivy_rule2], 'Z': [kivy_rule2], 'a': [kivy_rule2], 'b': [kivy_rule2], 'c': [kivy_rule2], 'd': [kivy_rule2], 'e': [kivy_rule2], 'f': [kivy_rule2], 'g': [kivy_rule2], 'h': [kivy_rule2], 'i': [kivy_rule2], 'j': [kivy_rule2], 'k': [kivy_rule2], 'l': [kivy_rule2], 'm': [kivy_rule2], 'n': [kivy_rule2], 'o': [kivy_rule2], 'p': [kivy_rule2], 'q': [kivy_rule2], 'r': [kivy_rule2], 's': [kivy_rule2], 't': [kivy_rule2], 'u': [kivy_rule2], 'v': [kivy_rule2], 'w': [kivy_rule2], 'x': [kivy_rule2], 'y': [kivy_rule2], 'z': [kivy_rule2]} rules_dict_dict = {'kivy_main': rulesDict1} import_dict = {}
""" Information on the Rozier Cipher can be found at: https://www.dcode.fr/rozier-cipher ROZIER.py Written by: MrLukeKR Updated: 16/10/2020 """ # The Rozier cipher needs a string based key, which can be constant for ease # or changed for each message, for better security constant_key = "DCODE" def encrypt(plaintext: str, key: str=constant_key): """ Encrypts a plaintext string using the Rozier cipher and a constant key. Optionally, the function can accept a different key as a parameter. """ # Convert plaintext to upper case plaintext = plaintext.upper() # Initialise the ciphertext string to the empty string ciphertext = "" # Iterate over every letter in the plaintext string for index, letter in enumerate(plaintext): # Get the first and second letters of the key at index of letter, # using modulus to allow for a key to be repeated first_key = key[index % len(key)] second_key = key[(index + 1) % len(key)] # Get the position in the alphabet of the current plaintext letter. # Negating the ASCII value of capital A allows us to convert from # an ASCII code to alphabet position. letter_position = ord(letter) - ord('A') # Convert the first and second key values to ASCII codes first_key_value = ord(first_key) second_key_value = ord(second_key) # Use the first and second key ASCII codes to determine the distance # between the two letters. Negative values indicate that the ciphertext # letter moves to the right of the current letter and positive values # indicate a move to the left key_distance = second_key_value - first_key_value # Calculate the ciphertext letter by adding the original plaintext # letter to the key distance derived from the two letters from the key. # Modulus is applied to this to keep the letter within the bounds of # the alphabet (numbers and special characters are not supported). # This is added to the ASCII code for capital A to convert from # alphabet space back into an ASCII code cipher_letter_value = ord('A') + ((letter_position + key_distance) % 26) # Convert the ASCII code to a character cipher_letter = chr(cipher_letter_value) # Add the character to the total ciphertext string ciphertext += cipher_letter return ciphertext def decrypt(ciphertext: str, key: str=constant_key): """ Decrypts a ciphertext string using the Rozier cipher and a constant key. Optionally, the function can accept a different key as a parameter. """ # Convert ciphertext to upper case ciphertext = ciphertext.upper() # Initialise the plaintext string to the empty string plaintext = "" # Iterate over every letter in the ciphertext string for index, letter in enumerate(ciphertext): # Get the first and second letters of the key at index of letter, using # modulus to allow for a key to be repeated first_key = key[index % len(key)] second_key = key[(index + 1) % len(key)] # Get the position in the alphabet of the current ciphertext letter. # Negating the ASCII value of capital A allows us to convert from # an ASCII code to alphabet position. letter_position = ord(letter) - ord('A') # Convert the first and second key values to ASCII codes first_key_value = ord(first_key) second_key_value = ord(second_key) # Use the first and second key ASCII codes to determine the distance # between the two letters. Negative values indicate that the plaintext # letter moves to the right of the current letter and positive values # indicate a move to the left key_distance = second_key_value - first_key_value # Calculate the plaintext letter by subtracting the key distance derived # from the two letters from the key, from the original ciphertext letter # position. # Modulus is applied to this to keep the letter within the bounds of # the alphabet (numbers and special characters are not supported). # This is added to the ASCII code for capital A to convert from # alphabet space back into an ASCII code plain_letter_value = ord('A') + ((letter_position - key_distance) % 26) # Convert the ASCII code to a character plain_letter = chr(plain_letter_value) # Add the character to the total plaintext string plaintext += plain_letter return plaintext
""" Information on the Rozier Cipher can be found at: https://www.dcode.fr/rozier-cipher ROZIER.py Written by: MrLukeKR Updated: 16/10/2020 """ constant_key = 'DCODE' def encrypt(plaintext: str, key: str=constant_key): """ Encrypts a plaintext string using the Rozier cipher and a constant key. Optionally, the function can accept a different key as a parameter. """ plaintext = plaintext.upper() ciphertext = '' for (index, letter) in enumerate(plaintext): first_key = key[index % len(key)] second_key = key[(index + 1) % len(key)] letter_position = ord(letter) - ord('A') first_key_value = ord(first_key) second_key_value = ord(second_key) key_distance = second_key_value - first_key_value cipher_letter_value = ord('A') + (letter_position + key_distance) % 26 cipher_letter = chr(cipher_letter_value) ciphertext += cipher_letter return ciphertext def decrypt(ciphertext: str, key: str=constant_key): """ Decrypts a ciphertext string using the Rozier cipher and a constant key. Optionally, the function can accept a different key as a parameter. """ ciphertext = ciphertext.upper() plaintext = '' for (index, letter) in enumerate(ciphertext): first_key = key[index % len(key)] second_key = key[(index + 1) % len(key)] letter_position = ord(letter) - ord('A') first_key_value = ord(first_key) second_key_value = ord(second_key) key_distance = second_key_value - first_key_value plain_letter_value = ord('A') + (letter_position - key_distance) % 26 plain_letter = chr(plain_letter_value) plaintext += plain_letter return plaintext
""" Title: 0035 - Search Insert Position Tags: Binary Search Time: O(logn) Space: O(1) Source: https://leetcode.com/problems/search-insert-position/ Difficulty: Easy """ class Solution(object): def searchInsert(self, nums, target): """ :type nums: List[int] :type target: int :rtype: int """ low = 0 high = len(nums) - 1 while low <= high: mid = (low + high) / 2 if target == nums[mid]: return mid elif target < nums[mid]: high = mid -1 else: low = mid + 1 print(low, mid, high) return low
""" Title: 0035 - Search Insert Position Tags: Binary Search Time: O(logn) Space: O(1) Source: https://leetcode.com/problems/search-insert-position/ Difficulty: Easy """ class Solution(object): def search_insert(self, nums, target): """ :type nums: List[int] :type target: int :rtype: int """ low = 0 high = len(nums) - 1 while low <= high: mid = (low + high) / 2 if target == nums[mid]: return mid elif target < nums[mid]: high = mid - 1 else: low = mid + 1 print(low, mid, high) return low
"""Class static method test""" class TestClass(): """Test class""" def __init__(self, a=1, b=2): self.a = a self.b = b def add(self): return self.a + self.b @staticmethod def static_add(a, b): return 2 * a + 2 * b def add2(self): return self.static_add(self.a, self.b) if __name__ == '__main__': C = TestClass(a=1, b=2) print(C.add()) print(C.add2())
"""Class static method test""" class Testclass: """Test class""" def __init__(self, a=1, b=2): self.a = a self.b = b def add(self): return self.a + self.b @staticmethod def static_add(a, b): return 2 * a + 2 * b def add2(self): return self.static_add(self.a, self.b) if __name__ == '__main__': c = test_class(a=1, b=2) print(C.add()) print(C.add2())
# -*- coding: utf-8 -*- def case_insensitive_string(string, available, default=None): if string is None: return default _available = [each.lower() for each in available] try: index = _available.index(f"{string}".lower()) except ValueError: raise ValueError(f"unrecognised input ('{string}') - must be in {available}") else: return available[index] def listing_type(entry): if entry is None: return "" available_listing_types = ["Sale", "Rent", "Share", "Sold", "NewHomes"] _alt = [each.lower() for each in available_listing_types] try: index = _alt.index(str(entry).lower()) except ValueError: raise ValueError("listing type must be one of: {}".format( ", ".join(available_listing_types))) else: return available_listing_types[index] def property_types(entries): if entries is None: return [""] available_property_types = [ "AcreageSemiRural", "ApartmentUnitFlat", "BlockOfUnits", "CarSpace", "DevelopmentSite", "Duplex", "Farm", "NewHomeDesigns", "House", "NewHouseLand", "NewLand", "NewApartments", "Penthouse", "RetirementVillage", "Rural", "SemiDetached", "SpecialistFarm", "Studio", "Terrace", "Townhouse", "VacantLand", "Villa"] _lower_pt = [each.lower() for each in available_property_types] if isinstance(entries, (str, unicode)): entries = [entries] validated_entries = [] for entry in entries: try: index = _lower_pt.index(str(entry).lower()) except IndexError: raise ValueError( "Unrecognised property type '{}'. Available types: {}".format( entry, ", ".join(available_property_types))) validated_entries.append(available_property_types[index]) return validated_entries def listing_attributes(entries): if entries is None: return [""] available_listing_attributes = ["HasPhotos", "HasPrice", "NotUpForAuction", "NotUnderContract", "MarkedAsNew"] _lower_la = [each.lower() for each in available_listing_attributes] if isinstance(entries, (str, unicode)): entries = [entries] validated_entries = [] for entry in entries: try: index = _lower_la.index(str(entry).lower()) except IndexError: raise ValueError( "Unrecognised listing attribute {}. Available attributes: {}"\ .format(entry, ", ".join(available_listing_attributes))) validated_entries.append(available_listing_attributes[index]) return validated_entries def integer_range(entry, default_value=-1): entry = entry or default_value # Allow a single value to be given. if isinstance(entry, int) or entry == default_value: return (entry, entry) if len(entry) > 2: raise ValueError("only lower and upper range can be given, not a list") return tuple(sorted(entry)) def city(string, **kwargs): cities = ("Sydney", "Melbourne", "Brisbane", "Adelaide", "Canberra") return case_insensitive_string(string, cities, **kwargs) def advertiser_ids(entries): if entries is None: return [""] if isinstance(entries, (str, unicode)): entries = [entries] return entries
def case_insensitive_string(string, available, default=None): if string is None: return default _available = [each.lower() for each in available] try: index = _available.index(f'{string}'.lower()) except ValueError: raise value_error(f"unrecognised input ('{string}') - must be in {available}") else: return available[index] def listing_type(entry): if entry is None: return '' available_listing_types = ['Sale', 'Rent', 'Share', 'Sold', 'NewHomes'] _alt = [each.lower() for each in available_listing_types] try: index = _alt.index(str(entry).lower()) except ValueError: raise value_error('listing type must be one of: {}'.format(', '.join(available_listing_types))) else: return available_listing_types[index] def property_types(entries): if entries is None: return [''] available_property_types = ['AcreageSemiRural', 'ApartmentUnitFlat', 'BlockOfUnits', 'CarSpace', 'DevelopmentSite', 'Duplex', 'Farm', 'NewHomeDesigns', 'House', 'NewHouseLand', 'NewLand', 'NewApartments', 'Penthouse', 'RetirementVillage', 'Rural', 'SemiDetached', 'SpecialistFarm', 'Studio', 'Terrace', 'Townhouse', 'VacantLand', 'Villa'] _lower_pt = [each.lower() for each in available_property_types] if isinstance(entries, (str, unicode)): entries = [entries] validated_entries = [] for entry in entries: try: index = _lower_pt.index(str(entry).lower()) except IndexError: raise value_error("Unrecognised property type '{}'. Available types: {}".format(entry, ', '.join(available_property_types))) validated_entries.append(available_property_types[index]) return validated_entries def listing_attributes(entries): if entries is None: return [''] available_listing_attributes = ['HasPhotos', 'HasPrice', 'NotUpForAuction', 'NotUnderContract', 'MarkedAsNew'] _lower_la = [each.lower() for each in available_listing_attributes] if isinstance(entries, (str, unicode)): entries = [entries] validated_entries = [] for entry in entries: try: index = _lower_la.index(str(entry).lower()) except IndexError: raise value_error('Unrecognised listing attribute {}. Available attributes: {}'.format(entry, ', '.join(available_listing_attributes))) validated_entries.append(available_listing_attributes[index]) return validated_entries def integer_range(entry, default_value=-1): entry = entry or default_value if isinstance(entry, int) or entry == default_value: return (entry, entry) if len(entry) > 2: raise value_error('only lower and upper range can be given, not a list') return tuple(sorted(entry)) def city(string, **kwargs): cities = ('Sydney', 'Melbourne', 'Brisbane', 'Adelaide', 'Canberra') return case_insensitive_string(string, cities, **kwargs) def advertiser_ids(entries): if entries is None: return [''] if isinstance(entries, (str, unicode)): entries = [entries] return entries
begin_unit comment|'# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory' nl|'\n' comment|'# All Rights Reserved' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' comment|'# a copy of the License at' nl|'\n' comment|'#' nl|'\n' comment|'# http://www.apache.org/licenses/LICENSE-2.0' nl|'\n' comment|'#' nl|'\n' comment|'# Unless required by applicable law or agreed to in writing, software' nl|'\n' comment|'# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT' nl|'\n' comment|'# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the' nl|'\n' comment|'# License for the specific language governing permissions and limitations' nl|'\n' comment|'# under the License.' nl|'\n' nl|'\n' name|'import' name|'os' newline|'\n' nl|'\n' name|'from' name|'oslo_concurrency' name|'import' name|'processutils' newline|'\n' name|'from' name|'oslo_log' name|'import' name|'log' name|'as' name|'logging' newline|'\n' name|'from' name|'oslo_utils' name|'import' name|'excutils' newline|'\n' nl|'\n' name|'from' name|'nova' op|'.' name|'i18n' name|'import' name|'_LE' newline|'\n' name|'from' name|'nova' op|'.' name|'virt' op|'.' name|'libvirt' name|'import' name|'utils' newline|'\n' nl|'\n' nl|'\n' DECL|variable|LOG name|'LOG' op|'=' name|'logging' op|'.' name|'getLogger' op|'(' name|'__name__' op|')' newline|'\n' nl|'\n' DECL|variable|_dmcrypt_suffix name|'_dmcrypt_suffix' op|'=' string|"'-dmcrypt'" newline|'\n' nl|'\n' nl|'\n' DECL|function|volume_name name|'def' name|'volume_name' op|'(' name|'base' op|')' op|':' newline|'\n' indent|' ' string|'"""Returns the suffixed dmcrypt volume name.\n\n This is to avoid collisions with similarly named device mapper names for\n LVM volumes\n """' newline|'\n' name|'return' name|'base' op|'+' name|'_dmcrypt_suffix' newline|'\n' nl|'\n' nl|'\n' DECL|function|is_encrypted dedent|'' name|'def' name|'is_encrypted' op|'(' name|'path' op|')' op|':' newline|'\n' indent|' ' string|'"""Returns true if the path corresponds to an encrypted disk."""' newline|'\n' name|'if' name|'path' op|'.' name|'startswith' op|'(' string|"'/dev/mapper'" op|')' op|':' newline|'\n' indent|' ' name|'return' name|'path' op|'.' name|'rpartition' op|'(' string|"'/'" op|')' op|'[' number|'2' op|']' op|'.' name|'endswith' op|'(' name|'_dmcrypt_suffix' op|')' newline|'\n' dedent|'' name|'else' op|':' newline|'\n' indent|' ' name|'return' name|'False' newline|'\n' nl|'\n' nl|'\n' DECL|function|create_volume dedent|'' dedent|'' name|'def' name|'create_volume' op|'(' name|'target' op|',' name|'device' op|',' name|'cipher' op|',' name|'key_size' op|',' name|'key' op|')' op|':' newline|'\n' indent|' ' string|'"""Sets up a dmcrypt mapping\n\n :param target: device mapper logical device name\n :param device: underlying block device\n :param cipher: encryption cipher string digestible by cryptsetup\n :param key_size: encryption key size\n :param key: encryption key as an array of unsigned bytes\n """' newline|'\n' name|'cmd' op|'=' op|'(' string|"'cryptsetup'" op|',' nl|'\n' string|"'create'" op|',' nl|'\n' name|'target' op|',' nl|'\n' name|'device' op|',' nl|'\n' string|"'--cipher='" op|'+' name|'cipher' op|',' nl|'\n' string|"'--key-size='" op|'+' name|'str' op|'(' name|'key_size' op|')' op|',' nl|'\n' string|"'--key-file=-'" op|')' newline|'\n' name|'key' op|'=' string|"''" op|'.' name|'join' op|'(' name|'map' op|'(' name|'lambda' name|'byte' op|':' string|'"%02x"' op|'%' name|'byte' op|',' name|'key' op|')' op|')' newline|'\n' name|'try' op|':' newline|'\n' indent|' ' name|'utils' op|'.' name|'execute' op|'(' op|'*' name|'cmd' op|',' name|'process_input' op|'=' name|'key' op|',' name|'run_as_root' op|'=' name|'True' op|')' newline|'\n' dedent|'' name|'except' name|'processutils' op|'.' name|'ProcessExecutionError' name|'as' name|'e' op|':' newline|'\n' indent|' ' name|'with' name|'excutils' op|'.' name|'save_and_reraise_exception' op|'(' op|')' op|':' newline|'\n' indent|' ' name|'LOG' op|'.' name|'error' op|'(' name|'_LE' op|'(' string|'"Could not start encryption for disk %(device)s: "' nl|'\n' string|'"%(exception)s"' op|')' op|',' op|'{' string|"'device'" op|':' name|'device' op|',' string|"'exception'" op|':' name|'e' op|'}' op|')' newline|'\n' nl|'\n' nl|'\n' DECL|function|delete_volume dedent|'' dedent|'' dedent|'' name|'def' name|'delete_volume' op|'(' name|'target' op|')' op|':' newline|'\n' indent|' ' string|'"""Deletes a dmcrypt mapping\n\n :param target: name of the mapped logical device\n """' newline|'\n' name|'try' op|':' newline|'\n' indent|' ' name|'utils' op|'.' name|'execute' op|'(' string|"'cryptsetup'" op|',' string|"'remove'" op|',' name|'target' op|',' name|'run_as_root' op|'=' name|'True' op|')' newline|'\n' dedent|'' name|'except' name|'processutils' op|'.' name|'ProcessExecutionError' name|'as' name|'e' op|':' newline|'\n' comment|'# cryptsetup returns 4 when attempting to destroy a non-existent' nl|'\n' comment|'# dm-crypt device. It indicates that the device is invalid, which' nl|'\n' comment|'# means that the device is invalid (i.e., it has already been' nl|'\n' comment|'# destroyed).' nl|'\n' indent|' ' name|'if' name|'e' op|'.' name|'exit_code' op|'==' number|'4' op|':' newline|'\n' indent|' ' name|'LOG' op|'.' name|'debug' op|'(' string|'"Ignoring exit code 4, volume already destroyed"' op|')' newline|'\n' dedent|'' name|'else' op|':' newline|'\n' indent|' ' name|'with' name|'excutils' op|'.' name|'save_and_reraise_exception' op|'(' op|')' op|':' newline|'\n' indent|' ' name|'LOG' op|'.' name|'error' op|'(' name|'_LE' op|'(' string|'"Could not disconnect encrypted volume "' nl|'\n' string|'"%(volume)s. If dm-crypt device is still active "' nl|'\n' string|'"it will have to be destroyed manually for "' nl|'\n' string|'"cleanup to succeed."' op|')' op|',' op|'{' string|"'volume'" op|':' name|'target' op|'}' op|')' newline|'\n' nl|'\n' nl|'\n' DECL|function|list_volumes dedent|'' dedent|'' dedent|'' dedent|'' name|'def' name|'list_volumes' op|'(' op|')' op|':' newline|'\n' indent|' ' string|'"""Function enumerates encrypted volumes."""' newline|'\n' name|'return' op|'[' name|'dmdev' name|'for' name|'dmdev' name|'in' name|'os' op|'.' name|'listdir' op|'(' string|"'/dev/mapper'" op|')' nl|'\n' name|'if' name|'dmdev' op|'.' name|'endswith' op|'(' string|"'-dmcrypt'" op|')' op|']' newline|'\n' dedent|'' endmarker|'' end_unit
begin_unit comment | '# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory' nl | '\n' comment | '# All Rights Reserved' nl | '\n' comment | '#' nl | '\n' comment | '# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl | '\n' comment | '# not use this file except in compliance with the License. You may obtain' nl | '\n' comment | '# a copy of the License at' nl | '\n' comment | '#' nl | '\n' comment | '# http://www.apache.org/licenses/LICENSE-2.0' nl | '\n' comment | '#' nl | '\n' comment | '# Unless required by applicable law or agreed to in writing, software' nl | '\n' comment | '# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT' nl | '\n' comment | '# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the' nl | '\n' comment | '# License for the specific language governing permissions and limitations' nl | '\n' comment | '# under the License.' nl | '\n' nl | '\n' name | 'import' name | 'os' newline | '\n' nl | '\n' name | 'from' name | 'oslo_concurrency' name | 'import' name | 'processutils' newline | '\n' name | 'from' name | 'oslo_log' name | 'import' name | 'log' name | 'as' name | 'logging' newline | '\n' name | 'from' name | 'oslo_utils' name | 'import' name | 'excutils' newline | '\n' nl | '\n' name | 'from' name | 'nova' op | '.' name | 'i18n' name | 'import' name | '_LE' newline | '\n' name | 'from' name | 'nova' op | '.' name | 'virt' op | '.' name | 'libvirt' name | 'import' name | 'utils' newline | '\n' nl | '\n' nl | '\n' DECL | variable | LOG name | 'LOG' op | '=' name | 'logging' op | '.' name | 'getLogger' op | '(' name | '__name__' op | ')' newline | '\n' nl | '\n' DECL | variable | _dmcrypt_suffix name | '_dmcrypt_suffix' op | '=' string | "'-dmcrypt'" newline | '\n' nl | '\n' nl | '\n' DECL | function | volume_name name | 'def' name | 'volume_name' op | '(' name | 'base' op | ')' op | ':' newline | '\n' indent | ' ' string | '"""Returns the suffixed dmcrypt volume name.\n\n This is to avoid collisions with similarly named device mapper names for\n LVM volumes\n """' newline | '\n' name | 'return' name | 'base' op | '+' name | '_dmcrypt_suffix' newline | '\n' nl | '\n' nl | '\n' DECL | function | is_encrypted dedent | '' name | 'def' name | 'is_encrypted' op | '(' name | 'path' op | ')' op | ':' newline | '\n' indent | ' ' string | '"""Returns true if the path corresponds to an encrypted disk."""' newline | '\n' name | 'if' name | 'path' op | '.' name | 'startswith' op | '(' string | "'/dev/mapper'" op | ')' op | ':' newline | '\n' indent | ' ' name | 'return' name | 'path' op | '.' name | 'rpartition' op | '(' string | "'/'" op | ')' op | '[' number | '2' op | ']' op | '.' name | 'endswith' op | '(' name | '_dmcrypt_suffix' op | ')' newline | '\n' dedent | '' name | 'else' op | ':' newline | '\n' indent | ' ' name | 'return' name | 'False' newline | '\n' nl | '\n' nl | '\n' DECL | function | create_volume dedent | '' dedent | '' name | 'def' name | 'create_volume' op | '(' name | 'target' op | ',' name | 'device' op | ',' name | 'cipher' op | ',' name | 'key_size' op | ',' name | 'key' op | ')' op | ':' newline | '\n' indent | ' ' string | '"""Sets up a dmcrypt mapping\n\n :param target: device mapper logical device name\n :param device: underlying block device\n :param cipher: encryption cipher string digestible by cryptsetup\n :param key_size: encryption key size\n :param key: encryption key as an array of unsigned bytes\n """' newline | '\n' name | 'cmd' op | '=' op | '(' string | "'cryptsetup'" op | ',' nl | '\n' string | "'create'" op | ',' nl | '\n' name | 'target' op | ',' nl | '\n' name | 'device' op | ',' nl | '\n' string | "'--cipher='" op | '+' name | 'cipher' op | ',' nl | '\n' string | "'--key-size='" op | '+' name | 'str' op | '(' name | 'key_size' op | ')' op | ',' nl | '\n' string | "'--key-file=-'" op | ')' newline | '\n' name | 'key' op | '=' string | "''" op | '.' name | 'join' op | '(' name | 'map' op | '(' name | 'lambda' name | 'byte' op | ':' string | '"%02x"' op | '%' name | 'byte' op | ',' name | 'key' op | ')' op | ')' newline | '\n' name | 'try' op | ':' newline | '\n' indent | ' ' name | 'utils' op | '.' name | 'execute' op | '(' op | '*' name | 'cmd' op | ',' name | 'process_input' op | '=' name | 'key' op | ',' name | 'run_as_root' op | '=' name | 'True' op | ')' newline | '\n' dedent | '' name | 'except' name | 'processutils' op | '.' name | 'ProcessExecutionError' name | 'as' name | 'e' op | ':' newline | '\n' indent | ' ' name | 'with' name | 'excutils' op | '.' name | 'save_and_reraise_exception' op | '(' op | ')' op | ':' newline | '\n' indent | ' ' name | 'LOG' op | '.' name | 'error' op | '(' name | '_LE' op | '(' string | '"Could not start encryption for disk %(device)s: "' nl | '\n' string | '"%(exception)s"' op | ')' op | ',' op | '{' string | "'device'" op | ':' name | 'device' op | ',' string | "'exception'" op | ':' name | 'e' op | '}' op | ')' newline | '\n' nl | '\n' nl | '\n' DECL | function | delete_volume dedent | '' dedent | '' dedent | '' name | 'def' name | 'delete_volume' op | '(' name | 'target' op | ')' op | ':' newline | '\n' indent | ' ' string | '"""Deletes a dmcrypt mapping\n\n :param target: name of the mapped logical device\n """' newline | '\n' name | 'try' op | ':' newline | '\n' indent | ' ' name | 'utils' op | '.' name | 'execute' op | '(' string | "'cryptsetup'" op | ',' string | "'remove'" op | ',' name | 'target' op | ',' name | 'run_as_root' op | '=' name | 'True' op | ')' newline | '\n' dedent | '' name | 'except' name | 'processutils' op | '.' name | 'ProcessExecutionError' name | 'as' name | 'e' op | ':' newline | '\n' comment | '# cryptsetup returns 4 when attempting to destroy a non-existent' nl | '\n' comment | '# dm-crypt device. It indicates that the device is invalid, which' nl | '\n' comment | '# means that the device is invalid (i.e., it has already been' nl | '\n' comment | '# destroyed).' nl | '\n' indent | ' ' name | 'if' name | 'e' op | '.' name | 'exit_code' op | '==' number | '4' op | ':' newline | '\n' indent | ' ' name | 'LOG' op | '.' name | 'debug' op | '(' string | '"Ignoring exit code 4, volume already destroyed"' op | ')' newline | '\n' dedent | '' name | 'else' op | ':' newline | '\n' indent | ' ' name | 'with' name | 'excutils' op | '.' name | 'save_and_reraise_exception' op | '(' op | ')' op | ':' newline | '\n' indent | ' ' name | 'LOG' op | '.' name | 'error' op | '(' name | '_LE' op | '(' string | '"Could not disconnect encrypted volume "' nl | '\n' string | '"%(volume)s. If dm-crypt device is still active "' nl | '\n' string | '"it will have to be destroyed manually for "' nl | '\n' string | '"cleanup to succeed."' op | ')' op | ',' op | '{' string | "'volume'" op | ':' name | 'target' op | '}' op | ')' newline | '\n' nl | '\n' nl | '\n' DECL | function | list_volumes dedent | '' dedent | '' dedent | '' dedent | '' name | 'def' name | 'list_volumes' op | '(' op | ')' op | ':' newline | '\n' indent | ' ' string | '"""Function enumerates encrypted volumes."""' newline | '\n' name | 'return' op | '[' name | 'dmdev' name | 'for' name | 'dmdev' name | 'in' name | 'os' op | '.' name | 'listdir' op | '(' string | "'/dev/mapper'" op | ')' nl | '\n' name | 'if' name | 'dmdev' op | '.' name | 'endswith' op | '(' string | "'-dmcrypt'" op | ')' op | ']' newline | '\n' dedent | '' endmarker | '' end_unit
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @Time : 2019/5/5 12:39 AM @Author : sweetcs @Site : @File : config.py @Software: PyCharm """ DEBUG=True HOST="0.0.0.0" PORT=9292
""" @Time : 2019/5/5 12:39 AM @Author : sweetcs @Site : @File : config.py @Software: PyCharm """ debug = True host = '0.0.0.0' port = 9292
# What should be printing the next snippet of code? intNum = 10 negativeNum = -5 testString = "Hello " testList = [1, 2, 3] print(intNum * 5) print(intNum - negativeNum) print(testString + 'World') print(testString * 2) print(testString[-1]) print(testString[1:]) print(testList + testList) # The sum of each three first numbers of each list should be resulted in the last element of each list matrix = [ [1, 1, 1, 3], [2, 2, 2, 7], [3, 3, 3, 9], [4, 4, 4, 13] ] matrix[1][-1] = sum(matrix[1][:-1]) matrix[-1][-1] = sum(matrix[-1][:-1]) print(matrix) # Reverse string str[::-1] testString = "eoD hnoJ,01" testString = testString[::-1] print(testString) n = 0 while n < 10: if (n % 2) == 0: print(n, 'even number') else: print(n, 'odd number') n = n + 1
int_num = 10 negative_num = -5 test_string = 'Hello ' test_list = [1, 2, 3] print(intNum * 5) print(intNum - negativeNum) print(testString + 'World') print(testString * 2) print(testString[-1]) print(testString[1:]) print(testList + testList) matrix = [[1, 1, 1, 3], [2, 2, 2, 7], [3, 3, 3, 9], [4, 4, 4, 13]] matrix[1][-1] = sum(matrix[1][:-1]) matrix[-1][-1] = sum(matrix[-1][:-1]) print(matrix) test_string = 'eoD hnoJ,01' test_string = testString[::-1] print(testString) n = 0 while n < 10: if n % 2 == 0: print(n, 'even number') else: print(n, 'odd number') n = n + 1
# THIS FILE IS GENERATED FROM NUMPY SETUP.PY short_version = '1.9.0' version = '1.9.0' full_version = '1.9.0' git_revision = '07601a64cdfeb1c0247bde1294ad6380413cab66' release = True if not release: version = full_version
short_version = '1.9.0' version = '1.9.0' full_version = '1.9.0' git_revision = '07601a64cdfeb1c0247bde1294ad6380413cab66' release = True if not release: version = full_version
"""Given a string and a pattern, find all anagrams of the pattern in the given string. Write a function to return a list of starting indices of the anagrams of the pattern in the given string.""" """Example: String="ppqp", Pattern="pq", Output = [1, 2] """ def find_string_anagrams(str1, pattern): result_indexes = [] window_start, matched = 0, 0 char_frequency = {} for char in pattern: if char not in char_frequency: char_frequency[char] = 0 char_frequency[char] += 1 for window_end in range(len(str1)): right_char = str1[window_end] if right_char in char_frequency: char_frequency[right_char] -= 1 if char_frequency[right_char] == 0: matched += 1 if matched == len(pattern): result_indexes.append(window_start) if window_end >= len(pattern) - 1: left_char = str1[window_start] window_start += 1 if left_char in char_frequency: if char_frequency[left_char] == 0: matched -= 1 char_frequency[left_char] += 1 return result_indexes
"""Given a string and a pattern, find all anagrams of the pattern in the given string. Write a function to return a list of starting indices of the anagrams of the pattern in the given string.""" 'Example: String="ppqp", Pattern="pq", Output = [1, 2] ' def find_string_anagrams(str1, pattern): result_indexes = [] (window_start, matched) = (0, 0) char_frequency = {} for char in pattern: if char not in char_frequency: char_frequency[char] = 0 char_frequency[char] += 1 for window_end in range(len(str1)): right_char = str1[window_end] if right_char in char_frequency: char_frequency[right_char] -= 1 if char_frequency[right_char] == 0: matched += 1 if matched == len(pattern): result_indexes.append(window_start) if window_end >= len(pattern) - 1: left_char = str1[window_start] window_start += 1 if left_char in char_frequency: if char_frequency[left_char] == 0: matched -= 1 char_frequency[left_char] += 1 return result_indexes