content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# 1401 - Warriors of Perion sm.setSpeakerID(1022000) # Dances with Balrog response = sm.sendAskYesNo("So you want to become a Warrior?") if response: sm.completeQuestNoRewards(parentID) sm.jobAdvance(100) sm.resetAP(False, 100) sm.giveItem(1302182) sm.sendSayOkay("You are now a #bWarrior#k.")
sm.setSpeakerID(1022000) response = sm.sendAskYesNo('So you want to become a Warrior?') if response: sm.completeQuestNoRewards(parentID) sm.jobAdvance(100) sm.resetAP(False, 100) sm.giveItem(1302182) sm.sendSayOkay('You are now a #bWarrior#k.')
sm.setSpeakerID(1033210) # Great Spirit response = sm.sendAskYesNo("Are you ready to take on great power?") if response: sm.startQuest(parentID) sm.dispose()
sm.setSpeakerID(1033210) response = sm.sendAskYesNo('Are you ready to take on great power?') if response: sm.startQuest(parentID) sm.dispose()
# Ground station location lat = 0.0 lon = 0.0 alt = 0 min_elevation = 5.0 # in degrees, in urban or heavily wooded areas, increase as appropriate # Change this to false if you don't want the realtime receiver to plot anything realtime_plotting = True
lat = 0.0 lon = 0.0 alt = 0 min_elevation = 5.0 realtime_plotting = True
inc="docs/floatlib.inc" f=open(inc,'r+') data=f.readlines() f.close() d=[] for i in data: if not i.startswith(" ") and not i.startswith("#") and not i.startswith("."): i=i.split(';')[0] i=i.split('=')[0] i=i.strip() if len(i)!=0: d+=[': .db "'+i.upper()+',0" \ .dw '+i+'\n'] d=sorted(d) s='.dw '+str(len(d))+'\n' for i in range(len(d)): s+='.dw equ_'+str(i)+'\n' d[i]='equ_'+str(i)+d[i] d=['#include "'+inc+'"\n','#define equb(x,y) .db 8,x,9 \ .db y\n','#define equ(x,y) .db 6,x,7 \ .dw y\n',s]+d f=open('asmcompequ.z80','w+') f.writelines(d) f.close()
inc = 'docs/floatlib.inc' f = open(inc, 'r+') data = f.readlines() f.close() d = [] for i in data: if not i.startswith(' ') and (not i.startswith('#')) and (not i.startswith('.')): i = i.split(';')[0] i = i.split('=')[0] i = i.strip() if len(i) != 0: d += [': .db "' + i.upper() + ',0" \\ .dw ' + i + '\n'] d = sorted(d) s = '.dw ' + str(len(d)) + '\n' for i in range(len(d)): s += '.dw equ_' + str(i) + '\n' d[i] = 'equ_' + str(i) + d[i] d = ['#include "' + inc + '"\n', '#define equb(x,y) .db 8,x,9 \\ .db y\n', '#define equ(x,y) .db 6,x,7 \\ .dw y\n', s] + d f = open('asmcompequ.z80', 'w+') f.writelines(d) f.close()
# General TITLE = "Home Control" # Security config PASSWORD = "1234" SECRET = "81dc9bdb52d04dc20036dbd8313ed055" # Server config HOST = "0.0.0.0" PORT = 8000 DEBUG = False # Switch list SWITCHES = [ { "name": "Room", "system": 8, "device": 1, "icon": "ion-ios-lightbulb", }, { "name": "Desk", "system": 16, "device": 2, "icon": "ion-ios-lightbulb", }, { "name": "Bed", "system": 8, "device": 3, "icon": "ion-ios-lightbulb", }, { "name": "Fan", "system": 16, "device": 1, "icon": "ion-nuclear", }, ] # Misc COOKIE = "simplehomeautomation" ENABLE_CUSTOM_CODES = True
title = 'Home Control' password = '1234' secret = '81dc9bdb52d04dc20036dbd8313ed055' host = '0.0.0.0' port = 8000 debug = False switches = [{'name': 'Room', 'system': 8, 'device': 1, 'icon': 'ion-ios-lightbulb'}, {'name': 'Desk', 'system': 16, 'device': 2, 'icon': 'ion-ios-lightbulb'}, {'name': 'Bed', 'system': 8, 'device': 3, 'icon': 'ion-ios-lightbulb'}, {'name': 'Fan', 'system': 16, 'device': 1, 'icon': 'ion-nuclear'}] cookie = 'simplehomeautomation' enable_custom_codes = True
# Question 1. # Function to print username def hello_name(user_name): print(f"hello_{user_name}!") hello_name('Shakti') # Question 2. # Function to odd numbers from 1-100 def first_odds(): num = 0 while(num<100): num += 1 if(num % 2 != 0): print(num) else: continue print(first_odds()) # Question 3. # Function to return MAX number in a list def max_num_in_list(a_list): max_num = 0 for num in a_list: if(num > max_num): max_num = num # Print the current max_num # print(max_num) else: continue return max_num print(max_num_in_list([2,5,-3,10,70,23,89,-66,9,100,54,5,8,44])) # Question 4. # Function to return a leap year def is_leap_year(a_year): if(((a_year % 4 == 0) and (a_year % 100 != 0)) or (a_year % 400 == 0)): return True else: return False print(is_leap_year(1924)) # Question 5. # Function to check if numbers in a list are consecutive def is_consecutive(a_list): # Sort the given list sorted_list = sorted(a_list) # Create a test list using min and max+1 (as range excludes the last number) of "a_list" test_list = list(range(min(a_list), max(a_list)+1)) # print(sorted_list) # print(range_list) if sorted_list == test_list: return True else: return False print(is_consecutive([11,15,12,16,14,13,19,20,17,18]))
def hello_name(user_name): print(f'hello_{user_name}!') hello_name('Shakti') def first_odds(): num = 0 while num < 100: num += 1 if num % 2 != 0: print(num) else: continue print(first_odds()) def max_num_in_list(a_list): max_num = 0 for num in a_list: if num > max_num: max_num = num else: continue return max_num print(max_num_in_list([2, 5, -3, 10, 70, 23, 89, -66, 9, 100, 54, 5, 8, 44])) def is_leap_year(a_year): if a_year % 4 == 0 and a_year % 100 != 0 or a_year % 400 == 0: return True else: return False print(is_leap_year(1924)) def is_consecutive(a_list): sorted_list = sorted(a_list) test_list = list(range(min(a_list), max(a_list) + 1)) if sorted_list == test_list: return True else: return False print(is_consecutive([11, 15, 12, 16, 14, 13, 19, 20, 17, 18]))
################################ # # # James Bachelder # # CWCT - Python # # M01 Programming Assignment 2 # # 18 June 2021 # # # ################################ print('Guido van Rossum') print('20 February 1991') print('Benevolent dictator for life')
print('Guido van Rossum') print('20 February 1991') print('Benevolent dictator for life')
# Where memories will be temporarily kept. #SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/staticfuzz.db' # Database for memories. # # Use a sqlite database file on disk: # # SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/staticfuzz.db' # # Use sqlite memory database (never touches disk): SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:' # Port to listen on when serving PORT = 5000 DEBUG = True SECRET_KEY = 'BETTER CHANGE ME' # If a database is fresh, this will be # the first memory in it. FIRST_MESSAGE = u'scream into the void' # Images will be scaled down (maintaining # aspect ratio) to fit inside these dimensions. THUMB_MAX_HEIGHT = 360 THUMB_MAX_WIDTH = 360 # Images are indexed to a random number of colors # between MIN_COLORS and MAX_COLORS. MIN_COLORS = 2 MAX_COLORS = 10 # How long to wait before the server checks for new # memories/sends an event. # # The time to wait between each iteration in the # server event loop. How long before the server # checks for new memories and sends a new event. SLEEP_RATE = 0.2 # When EventSource (javascript) is disconnected # from the server, it will wait these many MS # before trying to connect to it again. RETRY_TIME_MS = 3000 # If you submit `/login lain` (or whatever your # secret is) it will log you in (refresh to see) # and you can delete memories. WHISPER_SECRET = 'lain' # Maximum number of characters for memories. MAX_CHARACTERS = 140 # If this is enabled an HTML audio player will # appear in the header and loop an MP3. # BACKGROUND_MP3 = '/static/background.mp3' # If this is enabled the specified file is used # as a notification for new messages. NOTIFICATION_SOUND = '/static/notification.ogg' # If this is enabled, the specified file is used # as a sound for errors. ERROR_SOUND = '/static/error.ogg' # Localization, Text, Messages # A bunch of string values. DEITY_GREET = "Make everyone forget" LOGIN_FAIL = "I don't think so." # this should probably be ERROR_ DEITY_GOODBYE = "Memory is your mistress." # Error messages ERROR_TOO_LONG = u"Too long!" ERROR_UNORIGINAL = u"Unoriginal!" ERROR_RATE_EXCEEDED = u"Not so fast!" ERROR_DANBOORU = u"No matches!" # Used for backgrounds right now! Path to directory # of images to rotate. RANDOM_IMAGE_DIRECTORY = "static/backgrounds/" # This is the placeholder used in the memory diamond # (text input) for submitting memories. PLACEHOLDER = "tell me a memory"
sqlalchemy_database_uri = 'sqlite:///:memory:' port = 5000 debug = True secret_key = 'BETTER CHANGE ME' first_message = u'scream into the void' thumb_max_height = 360 thumb_max_width = 360 min_colors = 2 max_colors = 10 sleep_rate = 0.2 retry_time_ms = 3000 whisper_secret = 'lain' max_characters = 140 notification_sound = '/static/notification.ogg' error_sound = '/static/error.ogg' deity_greet = 'Make everyone forget' login_fail = "I don't think so." deity_goodbye = 'Memory is your mistress.' error_too_long = u'Too long!' error_unoriginal = u'Unoriginal!' error_rate_exceeded = u'Not so fast!' error_danbooru = u'No matches!' random_image_directory = 'static/backgrounds/' placeholder = 'tell me a memory'
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/test_nbdev.ipynb (unless otherwise specified). __all__ = ['test_nbdev_func'] # Cell def test_nbdev_func(): return 42
__all__ = ['test_nbdev_func'] def test_nbdev_func(): return 42
class Shopping: def __init__(self, shop): self.shop = shop self.cart = {} def add_cart(self, item, quantity): if item in self.cart: self.cart[item] += quantity else: self.cart[item] = quantity def remove_cart(self, item, quantity): if item in self.cart: self.cart[item] -= quantity if self.cart[item] <= 0: self.cart.pop(item)
class Shopping: def __init__(self, shop): self.shop = shop self.cart = {} def add_cart(self, item, quantity): if item in self.cart: self.cart[item] += quantity else: self.cart[item] = quantity def remove_cart(self, item, quantity): if item in self.cart: self.cart[item] -= quantity if self.cart[item] <= 0: self.cart.pop(item)
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.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, '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.0, '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.398842, '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.690649, '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.396107, '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': 1.4856, '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.394239, '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.65294, '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.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0144583, '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.104552, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.106928, '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.104552, 'Execution Unit/Register Files/Runtime Dynamic': 0.121386, '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.252641, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.661894, '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': 2.87694, '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.00420062, '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.00420062, '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.00371035, '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.00146457, '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.00153603, '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.0136476, '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.0384308, '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.102793, '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': 6.43323, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.348134, '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.34913, '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': 8.96874, 'Instruction Fetch Unit/Runtime Dynamic': 0.852135, '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.0110794, 'L2/Runtime Dynamic': 0.00353944, '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.72764, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.2019, '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.0805741, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0805741, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 4.10967, 'Load Store Unit/Runtime Dynamic': 1.67983, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.198682, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.397364, '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.0705129, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0706297, '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.399995, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0572173, '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.680396, 'Memory Management Unit/Runtime Dynamic': 0.127847, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 23.9845, '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.0, '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.0203946, '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.207867, '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.228261, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 5.76856, '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.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, '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.0, '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.174315, '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.281163, '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.141922, '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.597399, '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.199365, '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.21299, '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.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00731154, '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.0528716, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0540733, '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.0528716, 'Execution Unit/Register Files/Runtime Dynamic': 0.0613848, '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.111386, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.291762, '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.55861, '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.00233622, '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.00233622, '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.0021177, '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.000865114, '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.000776767, '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.00756691, '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.0194391, '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.051982, '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.30651, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.175856, '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.176554, '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.68549, 'Instruction Fetch Unit/Runtime Dynamic': 0.431399, '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.00567966, 'L2/Runtime Dynamic': 0.00181095, '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.49482, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.606984, '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.0406895, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0406894, '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.68696, 'Load Store Unit/Runtime Dynamic': 0.848339, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.100333, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.200666, '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.0356086, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0356682, '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.205586, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0289046, '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.422865, 'Memory Management Unit/Runtime Dynamic': 0.0645729, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.6035, '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.0, '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.00786459, '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.0889693, '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.0968338, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.00157, '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.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, '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.0, '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.174456, '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.281392, '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.142037, '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.597885, '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.199528, '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.21331, '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.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00731748, '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.0529148, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0541173, '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.0529148, 'Execution Unit/Register Files/Runtime Dynamic': 0.0614348, '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.111477, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.292084, '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.55947, '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.00233642, '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.00233642, '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.00211788, '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.000865185, '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.000777399, '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.00756812, '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.0194409, '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.0520243, '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.3092, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.175885, '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.176698, '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.68831, 'Instruction Fetch Unit/Runtime Dynamic': 0.431617, '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.00569493, 'L2/Runtime Dynamic': 0.0018099, '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.49708, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.608061, '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.0407628, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0407627, '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.68957, 'Load Store Unit/Runtime Dynamic': 0.849851, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.100514, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.201028, '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.0356728, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0357325, '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.205754, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0289097, '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.423142, 'Memory Management Unit/Runtime Dynamic': 0.0646422, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.6095, '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.0, '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.00787099, '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.0890453, '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.0969163, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.00431, '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.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, '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.0, '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.171484, '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.276597, '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.139617, '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.587698, '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.196128, '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.20665, '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.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0071928, '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.0520131, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0531952, '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.0520131, 'Execution Unit/Register Files/Runtime Dynamic': 0.060388, '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.109577, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.287067, '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.54322, '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.00230096, '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.00230096, '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.00208598, '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.000852284, '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.000764153, '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.00745207, '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.0191372, '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.0511379, '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.25281, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.173547, '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.173687, '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.62919, 'Instruction Fetch Unit/Runtime Dynamic': 0.424962, '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.00553716, 'L2/Runtime Dynamic': 0.00176953, '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.47472, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.597268, '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.0400394, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0400393, '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.6638, 'Load Store Unit/Runtime Dynamic': 0.834767, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0987304, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.19746, '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.0350397, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0350981, '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.202248, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0285234, '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.418549, 'Memory Management Unit/Runtime Dynamic': 0.0636215, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.5132, '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.0, '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.00773688, '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.0875208, '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.0952577, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.9636, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 0.3897204590469652, 'Runtime Dynamic': 0.3897204590469652, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.0236227, 'Runtime Dynamic': 0.0134307, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 73.7343, 'Peak Power': 106.847, 'Runtime Dynamic': 14.7515, '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': 73.7107, 'Total Cores/Runtime Dynamic': 14.738, '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.0236227, 'Total L3s/Runtime Dynamic': 0.0134307, '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.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, '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.0, '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.398842, '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.690649, '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.396107, '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': 1.4856, '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.394239, '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.65294, '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.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0144583, '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.104552, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.106928, '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.104552, 'Execution Unit/Register Files/Runtime Dynamic': 0.121386, '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.252641, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.661894, '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': 2.87694, '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.00420062, '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.00420062, '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.00371035, '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.00146457, '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.00153603, '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.0136476, '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.0384308, '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.102793, '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': 6.43323, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.348134, '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.34913, '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': 8.96874, 'Instruction Fetch Unit/Runtime Dynamic': 0.852135, '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.0110794, 'L2/Runtime Dynamic': 0.00353944, '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.72764, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.2019, '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.0805741, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0805741, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 4.10967, 'Load Store Unit/Runtime Dynamic': 1.67983, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.198682, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.397364, '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.0705129, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0706297, '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.399995, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0572173, '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.680396, 'Memory Management Unit/Runtime Dynamic': 0.127847, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 23.9845, '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.0, '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.0203946, '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.207867, '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.228261, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 5.76856, '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.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, '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.0, '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.174315, '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.281163, '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.141922, '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.597399, '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.199365, '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.21299, '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.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00731154, '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.0528716, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0540733, '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.0528716, 'Execution Unit/Register Files/Runtime Dynamic': 0.0613848, '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.111386, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.291762, '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.55861, '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.00233622, '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.00233622, '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.0021177, '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.000865114, '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.000776767, '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.00756691, '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.0194391, '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.051982, '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.30651, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.175856, '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.176554, '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.68549, 'Instruction Fetch Unit/Runtime Dynamic': 0.431399, '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.00567966, 'L2/Runtime Dynamic': 0.00181095, '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.49482, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.606984, '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.0406895, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0406894, '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.68696, 'Load Store Unit/Runtime Dynamic': 0.848339, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.100333, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.200666, '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.0356086, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0356682, '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.205586, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0289046, '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.422865, 'Memory Management Unit/Runtime Dynamic': 0.0645729, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.6035, '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.0, '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.00786459, '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.0889693, '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.0968338, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.00157, '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.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, '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.0, '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.174456, '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.281392, '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.142037, '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.597885, '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.199528, '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.21331, '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.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00731748, '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.0529148, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0541173, '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.0529148, 'Execution Unit/Register Files/Runtime Dynamic': 0.0614348, '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.111477, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.292084, '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.55947, '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.00233642, '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.00233642, '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.00211788, '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.000865185, '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.000777399, '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.00756812, '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.0194409, '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.0520243, '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.3092, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.175885, '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.176698, '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.68831, 'Instruction Fetch Unit/Runtime Dynamic': 0.431617, '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.00569493, 'L2/Runtime Dynamic': 0.0018099, '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.49708, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.608061, '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.0407628, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0407627, '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.68957, 'Load Store Unit/Runtime Dynamic': 0.849851, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.100514, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.201028, '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.0356728, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0357325, '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.205754, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0289097, '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.423142, 'Memory Management Unit/Runtime Dynamic': 0.0646422, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.6095, '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.0, '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.00787099, '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.0890453, '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.0969163, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.00431, '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.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, '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.0, '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.171484, '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.276597, '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.139617, '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.587698, '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.196128, '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.20665, '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.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0071928, '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.0520131, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0531952, '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.0520131, 'Execution Unit/Register Files/Runtime Dynamic': 0.060388, '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.109577, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.287067, '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.54322, '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.00230096, '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.00230096, '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.00208598, '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.000852284, '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.000764153, '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.00745207, '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.0191372, '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.0511379, '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.25281, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.173547, '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.173687, '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.62919, 'Instruction Fetch Unit/Runtime Dynamic': 0.424962, '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.00553716, 'L2/Runtime Dynamic': 0.00176953, '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.47472, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.597268, '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.0400394, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0400393, '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.6638, 'Load Store Unit/Runtime Dynamic': 0.834767, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0987304, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.19746, '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.0350397, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0350981, '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.202248, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0285234, '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.418549, 'Memory Management Unit/Runtime Dynamic': 0.0636215, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.5132, '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.0, '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.00773688, '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.0875208, '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.0952577, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.9636, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 0.3897204590469652, 'Runtime Dynamic': 0.3897204590469652, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.0236227, 'Runtime Dynamic': 0.0134307, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 73.7343, 'Peak Power': 106.847, 'Runtime Dynamic': 14.7515, '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': 73.7107, 'Total Cores/Runtime Dynamic': 14.738, '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.0236227, 'Total L3s/Runtime Dynamic': 0.0134307, '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}}
# -*- coding: utf-8 -*- __all__ = [ "contact_us", "contact_us_thank_you", "feedback", "landing", "how_to_set_up_in_the_uk", "how_we_help_you_expand", "hpo", "hpo_contact_us", "hpo_contact_us_thank_you", "pixels", "uk_setup_guide_pages", ]
__all__ = ['contact_us', 'contact_us_thank_you', 'feedback', 'landing', 'how_to_set_up_in_the_uk', 'how_we_help_you_expand', 'hpo', 'hpo_contact_us', 'hpo_contact_us_thank_you', 'pixels', 'uk_setup_guide_pages']
a=0 while a!=2002: a=int(input()) if a== 2002: print('Acesso Permitido') else: print('Senha Invalida')
a = 0 while a != 2002: a = int(input()) if a == 2002: print('Acesso Permitido') else: print('Senha Invalida')
# -*- coding: utf-8 -*- # @Time : 2018/5/23 20:53 # @Author : xiaoke # @Email : 976249817@qq.com # @File : my_test.py print(range(1)) for i in range(1): print(i)
print(range(1)) for i in range(1): print(i)
model = dict( type='StaticUnconditionalGAN', generator=dict(type='WGANGPGenerator', noise_size=128, out_scale=128), discriminator=dict( type='WGANGPDiscriminator', in_channel=3, in_scale=128, conv_module_cfg=dict( conv_cfg=None, kernel_size=3, stride=1, padding=1, bias=True, act_cfg=dict(type='LeakyReLU', negative_slope=0.2), norm_cfg=dict(type='GN'), order=('conv', 'norm', 'act'))), gan_loss=dict(type='GANLoss', gan_type='wgan'), disc_auxiliary_loss=[ dict( type='GradientPenaltyLoss', loss_weight=10, norm_mode='HWC', data_info=dict( discriminator='disc', real_data='real_imgs', fake_data='fake_imgs')) ]) train_cfg = dict(disc_steps=5) test_cfg = None optimizer = dict( generator=dict(type='Adam', lr=0.0001, betas=(0.5, 0.9)), discriminator=dict(type='Adam', lr=0.0001, betas=(0.5, 0.9)))
model = dict(type='StaticUnconditionalGAN', generator=dict(type='WGANGPGenerator', noise_size=128, out_scale=128), discriminator=dict(type='WGANGPDiscriminator', in_channel=3, in_scale=128, conv_module_cfg=dict(conv_cfg=None, kernel_size=3, stride=1, padding=1, bias=True, act_cfg=dict(type='LeakyReLU', negative_slope=0.2), norm_cfg=dict(type='GN'), order=('conv', 'norm', 'act'))), gan_loss=dict(type='GANLoss', gan_type='wgan'), disc_auxiliary_loss=[dict(type='GradientPenaltyLoss', loss_weight=10, norm_mode='HWC', data_info=dict(discriminator='disc', real_data='real_imgs', fake_data='fake_imgs'))]) train_cfg = dict(disc_steps=5) test_cfg = None optimizer = dict(generator=dict(type='Adam', lr=0.0001, betas=(0.5, 0.9)), discriminator=dict(type='Adam', lr=0.0001, betas=(0.5, 0.9)))
# not yet finished N = int(input()) input() for _ in range(int(input())): A, F = int(input()), int(input()) try: input() except EOFError: pass
n = int(input()) input() for _ in range(int(input())): (a, f) = (int(input()), int(input())) try: input() except EOFError: pass
def minion_game(string): # your code goes here vowels = "AEIOU" kevsc = 0 stusc = 0 for i in range(len(string)): if string[i] in vowels: kevsc += (len(string) - i) else: stusc += (len(string) - i) if kevsc > stusc: print("Kevin", kevsc) elif kevsc < stusc: print("Stuart", stusc) else: print("Draw")
def minion_game(string): vowels = 'AEIOU' kevsc = 0 stusc = 0 for i in range(len(string)): if string[i] in vowels: kevsc += len(string) - i else: stusc += len(string) - i if kevsc > stusc: print('Kevin', kevsc) elif kevsc < stusc: print('Stuart', stusc) else: print('Draw')
class TreeNode: def __init__(self, x): self.val = x self.left = self.right = None class Solution: def isSymmetric(self, root): def isSym(left, right): if left is None or right is None: return left == right if left.val != right.val: return False return isSym(left.left, right.right) and isSym(left.right, right.left) return isSym(root, root)
class Treenode: def __init__(self, x): self.val = x self.left = self.right = None class Solution: def is_symmetric(self, root): def is_sym(left, right): if left is None or right is None: return left == right if left.val != right.val: return False return is_sym(left.left, right.right) and is_sym(left.right, right.left) return is_sym(root, root)
ncases = int(input()) for _ in range(ncases): X, Y, Z = map(int, input().split()) A = [X, Y] B = [X, Z] C = [Y, Z] found = False for a in A: for b in B: for c in C: if X == max(a, b) and Y == max(a, c) and Z == max(b, c): print("YES") print(a, b, c) found = True break else: continue break else: continue break if not found: print("NO")
ncases = int(input()) for _ in range(ncases): (x, y, z) = map(int, input().split()) a = [X, Y] b = [X, Z] c = [Y, Z] found = False for a in A: for b in B: for c in C: if X == max(a, b) and Y == max(a, c) and (Z == max(b, c)): print('YES') print(a, b, c) found = True break else: continue break else: continue break if not found: print('NO')
# lambda function is a different type function which does not have name # and is only used to return values # lambda functions are exclusively used to operate on inputs and return outputs def add(x, y): return x+y print(add(5, 7)) # OR def add_lambda(x, y): return x+y print(add_lambda(10, 10)) # Real Usage of Lambda function def double(x): return x*2 seq = [1, 2, 3, 4, 5] doubled = [double(x) for x in seq] print(doubled) # OR doubled_lambda = list(map(lambda x: x*2, seq)) print(doubled_lambda)
def add(x, y): return x + y print(add(5, 7)) def add_lambda(x, y): return x + y print(add_lambda(10, 10)) def double(x): return x * 2 seq = [1, 2, 3, 4, 5] doubled = [double(x) for x in seq] print(doubled) doubled_lambda = list(map(lambda x: x * 2, seq)) print(doubled_lambda)
def maximum(values): large = None for value in values: if large is None or value > large: large = value return large print(maximum([9,10,100]))
def maximum(values): large = None for value in values: if large is None or value > large: large = value return large print(maximum([9, 10, 100]))
def save_txt(file): saida = open('cache/data.txt','w') for line in file: saida.write(str(line.replace('\n',''))+'\n') saida.close()
def save_txt(file): saida = open('cache/data.txt', 'w') for line in file: saida.write(str(line.replace('\n', '')) + '\n') saida.close()
f = open("Q2/inputs.txt","r") z = f.readlines() c = d = 0 for i in z: #print(i) a,b = i.split() if a == "forward": c += int(b) elif a == "down": d += int(b) else: d -= int(b) print(c*d) c = d = 0 aim = 0 for i in z: #print(i) a,b = i.split() if a == "forward": c += int(b) d += aim*int(b) elif a == "down": #d += int(b) aim += int(b) else: #d -= int(b) aim -= int(b) print(c*d) submarine = [ " |_ ", " _____|~ |____ ", " ( -- ~~~~--_ ", " ~~~~~~~~~~~~~~~~~~~'`" ] f = open("Q2/inputs2.txt","r") commands = f.readlines() submarine = [ " _| ", " ____| ~|_____ ", " _------ -- )", "/'------------------- ", ] ocean = [[*"~"*50]for _ in range(10)] current_cord = [0,0] for i in range(len(submarine)): for j in range(len(submarine[i])): ocean[i][j] = submarine[i][j] for i in ocean: print("".join(i)) ocean = [[*"~"*50]for _ in range(10)] for cmd in commands: print(cmd) action, num = cmd.split() if action == "forward": current_cord[1] += int(num) elif action == "up": current_cord[0] += int(num) else: current_cord[0] -= int(num) for i in range(len(submarine)): for j in range(len(submarine[i])): ocean[i+current_cord[0]][j+current_cord[1]] = submarine[i][j] for i in ocean: print("".join(i)) ocean = [[*"~"*50]for _ in range(10)] f = open("Q2/inputs.txt","r") commands = f.readlines() a = [((j[0][0]=="f")*int(j[1]), (j[0][0]!="f")*([-1,1][j[0][0]=="d"]*int(j[1]))) for i in commands if (j:=i.split())] print(__import__("math").prod([sum(i) for i in zip(*a)])) a = [((i.split()[0][0]=="f")*int(i.split()[1]),(i.split()[0][0]!="f")*([-1,1][i.split()[0][0]=="d"]*int(i.split()[1])))for i in open("inputs.txt").readlines()] print(__import__("math").prod([sum(i)for i in zip(*[((i.split()[0][0]=="f")*int(i.split()[1]),(i.split()[0][0]!="f")*([-1,1][i.split()[0][0]=="d"]*int(i.split()[1])))for i in open("inputs.txt").readlines()])])) # submarine = [ # " _| ", # " ____| ~|_____ ", # " _------ -- )", # "/'------------------- ",] # ocean = [[*"~"*50]for _ in range(10)] # for cmd in commands: # print(cmd) # action, num = cmd.split() # if action == "forward": # current_cord[1] += int(num) # elif action == "up": # current_cord[0] += int(num) # else: # current_cord[0] -= int(num) # for i in range(len(submarine)): # for j in range(len(submarine[i])): # ocean[i+current_cord[0]][j+current_cord[1]] = submarine[i][j] # for i in ocean: # print("".join(i)) # ocean = [[*"~"*50]for _ in range(10)]
f = open('Q2/inputs.txt', 'r') z = f.readlines() c = d = 0 for i in z: (a, b) = i.split() if a == 'forward': c += int(b) elif a == 'down': d += int(b) else: d -= int(b) print(c * d) c = d = 0 aim = 0 for i in z: (a, b) = i.split() if a == 'forward': c += int(b) d += aim * int(b) elif a == 'down': aim += int(b) else: aim -= int(b) print(c * d) submarine = [' |_ ', ' _____|~ |____ ', ' ( -- ~~~~--_ ', " ~~~~~~~~~~~~~~~~~~~'`"] f = open('Q2/inputs2.txt', 'r') commands = f.readlines() submarine = [' _| ', ' ____| ~|_____ ', ' _------ -- )', "/'------------------- "] ocean = [[*'~' * 50] for _ in range(10)] current_cord = [0, 0] for i in range(len(submarine)): for j in range(len(submarine[i])): ocean[i][j] = submarine[i][j] for i in ocean: print(''.join(i)) ocean = [[*'~' * 50] for _ in range(10)] for cmd in commands: print(cmd) (action, num) = cmd.split() if action == 'forward': current_cord[1] += int(num) elif action == 'up': current_cord[0] += int(num) else: current_cord[0] -= int(num) for i in range(len(submarine)): for j in range(len(submarine[i])): ocean[i + current_cord[0]][j + current_cord[1]] = submarine[i][j] for i in ocean: print(''.join(i)) ocean = [[*'~' * 50] for _ in range(10)] f = open('Q2/inputs.txt', 'r') commands = f.readlines() a = [((j[0][0] == 'f') * int(j[1]), (j[0][0] != 'f') * ([-1, 1][j[0][0] == 'd'] * int(j[1]))) for i in commands if (j := i.split())] print(__import__('math').prod([sum(i) for i in zip(*a)])) a = [((i.split()[0][0] == 'f') * int(i.split()[1]), (i.split()[0][0] != 'f') * ([-1, 1][i.split()[0][0] == 'd'] * int(i.split()[1]))) for i in open('inputs.txt').readlines()] print(__import__('math').prod([sum(i) for i in zip(*[((i.split()[0][0] == 'f') * int(i.split()[1]), (i.split()[0][0] != 'f') * ([-1, 1][i.split()[0][0] == 'd'] * int(i.split()[1]))) for i in open('inputs.txt').readlines()])]))
#when we cretae a tuple , we normally assign values to it this is called packing a tuple fruits=("apple","banana","cherry") (green,yellow,red)= fruits print(green) print(yellow) print(red) #The number of variable must match the number of values in tuple if not , you must use an asterisk to collect the remeaing value as a list #Using Asterisk (green, yellow ,*red)=fruits print(green) print(yellow) print(red)
fruits = ('apple', 'banana', 'cherry') (green, yellow, red) = fruits print(green) print(yellow) print(red) (green, yellow, *red) = fruits print(green) print(yellow) print(red)
def solution(board: list, moves: list) -> int: # board: 2d array # moves: column stack = [] answer = 0 row = len(board) for m in moves: for i in range(row): if board[i][m-1]: if not stack: stack.append(board[i][m-1]) else: if stack[-1] == board[i][m-1]: stack.pop() answer += 2 else: stack.append(board[i][m-1]) board[i][m-1] = 0 break return answer
def solution(board: list, moves: list) -> int: stack = [] answer = 0 row = len(board) for m in moves: for i in range(row): if board[i][m - 1]: if not stack: stack.append(board[i][m - 1]) elif stack[-1] == board[i][m - 1]: stack.pop() answer += 2 else: stack.append(board[i][m - 1]) board[i][m - 1] = 0 break return answer
''' The Vector class of Section 2.3.3 provides a constructor that takes an integer d, and produces a d-dimensional vector with all coordinates equal to 0. Another convenient form for creating a new vector would be to send the constructor a parameter that is some iterable type representing a sequence of numbers, and to create a vector with dimension equal to the length of that sequence and coordinates equal to the sequence values. For example, Vector([4, 7, 5]) would produce a three-dimensional vector with coordinates <4,7,5>. Modify the constructor so that either of these forms is acceptable; that is, if a single integer is sent, it produces a vector of that dimension with all zeros, but if a sequence of numbers is provided,it produces a vector with coordinates based on that sequence. ''' class Vector: '''Represent a vector in a multidimensional space.''' def __init__(self, vector=None): '''Create vector-dimensional vector of zeros.or create a vector as pass in argument''' if type(vector) is int: self.coords = [0]*vector else: self.coords = vector
""" The Vector class of Section 2.3.3 provides a constructor that takes an integer d, and produces a d-dimensional vector with all coordinates equal to 0. Another convenient form for creating a new vector would be to send the constructor a parameter that is some iterable type representing a sequence of numbers, and to create a vector with dimension equal to the length of that sequence and coordinates equal to the sequence values. For example, Vector([4, 7, 5]) would produce a three-dimensional vector with coordinates <4,7,5>. Modify the constructor so that either of these forms is acceptable; that is, if a single integer is sent, it produces a vector of that dimension with all zeros, but if a sequence of numbers is provided,it produces a vector with coordinates based on that sequence. """ class Vector: """Represent a vector in a multidimensional space.""" def __init__(self, vector=None): """Create vector-dimensional vector of zeros.or create a vector as pass in argument""" if type(vector) is int: self.coords = [0] * vector else: self.coords = vector
def sort(words): # write your code here... return print(sort( ['hi', 'bye'] )) print(sort( ['abc', 'def'] )) print(sort( ['hi', 'bye', 'def', 'abc'] )) print(sort( ['add', 'some', 'more', 'words', 'here!'] ))
def sort(words): return print(sort(['hi', 'bye'])) print(sort(['abc', 'def'])) print(sort(['hi', 'bye', 'def', 'abc'])) print(sort(['add', 'some', 'more', 'words', 'here!']))
PATHS_TO_BACKUP = ['C:\\', 'd:\\'] #case sensetive EXCLUDED_PATHS = ['C:\\Program Files (x86)', 'C:\\Program Files', 'C:\\Windows'] BACKUP_DESTINATION = 'PCBACKUP' PROGRESS_INTERNALS = 1 DRIVE_SCAN_PAGE_SIZE = 100 WORKERS = 30 UPLOAD_RETRIES = 3 LOG_LEVEL = 'INFO' # DEBUG, INFO, ERROR FULL_SYNC_EVERY = 14 * 24 * 60 * 60 #Test values PATHS_TO_BACKUP = ['C:\\drive-backup', 'C:\\ATI'] BACKUP_DESTINATION = 'PCBACKUPTEMP' WORKERS = 3 DRIVE_SCAN_PAGE_SIZE = 2 LOG_LEVEL = 'DEBUG' FULL_SYNC_EVERY = 1 * 60
paths_to_backup = ['C:\\', 'd:\\'] excluded_paths = ['C:\\Program Files (x86)', 'C:\\Program Files', 'C:\\Windows'] backup_destination = 'PCBACKUP' progress_internals = 1 drive_scan_page_size = 100 workers = 30 upload_retries = 3 log_level = 'INFO' full_sync_every = 14 * 24 * 60 * 60 paths_to_backup = ['C:\\drive-backup', 'C:\\ATI'] backup_destination = 'PCBACKUPTEMP' workers = 3 drive_scan_page_size = 2 log_level = 'DEBUG' full_sync_every = 1 * 60
def main(): n = int(input()) vec = None for _ in range(n): current_vec = [int(x) for x in input().split()] if vec == None: vec = [0] * len(current_vec) vec = [vec[i] + current_vec[i] for i in range(len(current_vec))] print("NO") if set(vec) != set([0]) else print("YES") main()
def main(): n = int(input()) vec = None for _ in range(n): current_vec = [int(x) for x in input().split()] if vec == None: vec = [0] * len(current_vec) vec = [vec[i] + current_vec[i] for i in range(len(current_vec))] print('NO') if set(vec) != set([0]) else print('YES') main()
def meia_noite(h, m, s): ts=((h*60)*60)+(m*60)+s r=ts-0 return r h=int(input()) m=int(input()) s=int(input()) t=meia_noite(h, m,s) def mensagem(msg): print(msg) def main(): mensagem(t) if __name__=='__main__': main()
def meia_noite(h, m, s): ts = h * 60 * 60 + m * 60 + s r = ts - 0 return r h = int(input()) m = int(input()) s = int(input()) t = meia_noite(h, m, s) def mensagem(msg): print(msg) def main(): mensagem(t) if __name__ == '__main__': main()
def ciSono(parola,lettere): i = 0 lunghezza = (len(parola))-1 while i < lunghezza: a = parola[lunghezza] if a in lettere: return True lunghezza = lunghezza-1 return False def usaSolo(parola,lettere): if ciSono(parola,lettere) == True: if parola in lettere: return True else: return False lettere = ['s'] print(ciSono('ciao',lettere)) print(usaSolo('ciao',lettere))
def ci_sono(parola, lettere): i = 0 lunghezza = len(parola) - 1 while i < lunghezza: a = parola[lunghezza] if a in lettere: return True lunghezza = lunghezza - 1 return False def usa_solo(parola, lettere): if ci_sono(parola, lettere) == True: if parola in lettere: return True else: return False lettere = ['s'] print(ci_sono('ciao', lettere)) print(usa_solo('ciao', lettere))
def var_args(name, *args): print(name) print(args) def var_args2(name, **kwargs): print(name) print(kwargs['description'], kwargs['feedback']) var_args('Mark', 'loves python', None, True) var_args2('Mark', description="loves python", feedback=None)
def var_args(name, *args): print(name) print(args) def var_args2(name, **kwargs): print(name) print(kwargs['description'], kwargs['feedback']) var_args('Mark', 'loves python', None, True) var_args2('Mark', description='loves python', feedback=None)
'''Take the following Python code that stores a string: str = 'X-DSPAM-Confidence: 0.8475 ' Use "find" and string slicing to extract the portion of the string after the colon character and then use the "float" function to convert the extracted string into a floating point number. ''' str = 'X-DSPAM-Confidence: 0.8475 ' npos = str.find(':') n = str[npos+1:] print('>' + n + '<') f = float(n.strip()) print(f)
"""Take the following Python code that stores a string: str = 'X-DSPAM-Confidence: 0.8475 ' Use "find" and string slicing to extract the portion of the string after the colon character and then use the "float" function to convert the extracted string into a floating point number. """ str = 'X-DSPAM-Confidence: 0.8475 ' npos = str.find(':') n = str[npos + 1:] print('>' + n + '<') f = float(n.strip()) print(f)
def main(): ran = range(3) for i in ran: path = 'class'+str(i)+'/' f = open(path+'word.db','w') f.close() f = open('dictionary','w') f.close() f = open('dictionary2','w') f.close() if __name__=='__main__': main()
def main(): ran = range(3) for i in ran: path = 'class' + str(i) + '/' f = open(path + 'word.db', 'w') f.close() f = open('dictionary', 'w') f.close() f = open('dictionary2', 'w') f.close() if __name__ == '__main__': main()
# Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'test_app', 'product_name': 'Test App', 'type': 'executable', 'mac_bundle': 1, 'sources': [ 'main.c', ], 'xcode_settings': { 'INFOPLIST_FILE': 'TestApp-Info.plist', }, }, { 'target_name': 'test_app_postbuilds', 'product_name': 'Test App 2', 'type': 'executable', 'mac_bundle': 1, 'sources': [ 'main.c', ], 'xcode_settings': { 'INFOPLIST_FILE': 'TestApp-Info.plist', }, 'postbuilds': [ { 'postbuild_name': 'Postbuild that touches the app binary', 'action': [ './delay-touch.sh', '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}', ], }, ], }, { 'target_name': 'test_framework_postbuilds', 'product_name': 'Test Framework', 'type': 'shared_library', 'mac_bundle': 1, 'sources': [ 'empty.c', ], 'postbuilds': [ { 'postbuild_name': 'Postbuild that touches the framework binary', 'action': [ './delay-touch.sh', '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}', ], }, ], }, ], }
{'targets': [{'target_name': 'test_app', 'product_name': 'Test App', 'type': 'executable', 'mac_bundle': 1, 'sources': ['main.c'], 'xcode_settings': {'INFOPLIST_FILE': 'TestApp-Info.plist'}}, {'target_name': 'test_app_postbuilds', 'product_name': 'Test App 2', 'type': 'executable', 'mac_bundle': 1, 'sources': ['main.c'], 'xcode_settings': {'INFOPLIST_FILE': 'TestApp-Info.plist'}, 'postbuilds': [{'postbuild_name': 'Postbuild that touches the app binary', 'action': ['./delay-touch.sh', '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}']}]}, {'target_name': 'test_framework_postbuilds', 'product_name': 'Test Framework', 'type': 'shared_library', 'mac_bundle': 1, 'sources': ['empty.c'], 'postbuilds': [{'postbuild_name': 'Postbuild that touches the framework binary', 'action': ['./delay-touch.sh', '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}']}]}]}
# This file is part of Project Deity. # Copyright 2020-2021, Frostflake (L.A.) # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. equippable_item_types = ["Accessory", "Helmet", "Ring", "Weapon", "Armor", "Shield", "Gloves", "Legs", "Boots"] # Returns False if nothing was done # Returns True if item was equipped to an empty slot successfully # Returns the item ID of the previously equipped item otherwise async def equip_item(cursor, follower_id, slot_num): # What inventory item are we equipping? cursor.execute('''SELECT item_id FROM "project-deity".follower_inventories WHERE follower_id = %s AND slot_num = %s;''', (follower_id, slot_num)) item_id = cursor.fetchone()["item_id"] # What class is the item? cursor.execute('''SELECT class_type FROM "project-deity".player_items WHERE id = %s;''', (item_id, )) class_type = cursor.fetchone()["class_type"] # Is this a piece of equipment? if class_type not in equippable_item_types: return False # Is there an item equipped in this slot? cursor.execute('''SELECT * FROM "project-deity".follower_equipment WHERE follower_id = %s;''', (follower_id, )) old_item = cursor.fetchone()[class_type.lower()] # Handle inventory management if old_item is not None: # Return item to inventory. We can reuse the # equipping item's slot so we don't need to # worry about inventory space. cursor.execute('''UPDATE "project-deity".follower_inventories SET item_id = %s WHERE follower_id = %s AND slot_num = %s;''', (item_id, follower_id, slot_num)) else: # If we aren't reusing the inventory slot, then # we need to remove the item we're equipping # from the inventory. cursor.execute('''DELETE FROM "project-deity".follower_inventories WHERE follower_id = %s AND slot_num = %s;''', (follower_id, slot_num)) # Equip new item # Yes, yes, string concatination for SQL is a sin # but in this case it's not user input, it's from # equippable_item_types up above cursor.execute('''UPDATE "project-deity".follower_equipment SET ''' + class_type.lower() + ''' = %s WHERE follower_id = %s;''', (item_id, follower_id)) # Return status if old_item is None: return True return old_item
equippable_item_types = ['Accessory', 'Helmet', 'Ring', 'Weapon', 'Armor', 'Shield', 'Gloves', 'Legs', 'Boots'] async def equip_item(cursor, follower_id, slot_num): cursor.execute('SELECT item_id\n FROM "project-deity".follower_inventories\n WHERE follower_id = %s\n AND slot_num = %s;', (follower_id, slot_num)) item_id = cursor.fetchone()['item_id'] cursor.execute('SELECT class_type\n FROM "project-deity".player_items\n WHERE id = %s;', (item_id,)) class_type = cursor.fetchone()['class_type'] if class_type not in equippable_item_types: return False cursor.execute('SELECT *\n FROM "project-deity".follower_equipment\n WHERE follower_id = %s;', (follower_id,)) old_item = cursor.fetchone()[class_type.lower()] if old_item is not None: cursor.execute('UPDATE "project-deity".follower_inventories\n SET item_id = %s\n WHERE follower_id = %s\n AND slot_num = %s;', (item_id, follower_id, slot_num)) else: cursor.execute('DELETE FROM "project-deity".follower_inventories\n WHERE follower_id = %s\n AND slot_num = %s;', (follower_id, slot_num)) cursor.execute('UPDATE "project-deity".follower_equipment\n SET ' + class_type.lower() + ' = %s\n WHERE follower_id = %s;', (item_id, follower_id)) if old_item is None: return True return old_item
# # PySNMP MIB module FOUNDRY-MAC-VLAN-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/FOUNDRY-MAC-VLAN-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:01:17 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") MibIdentifier, Integer32, Gauge32, ObjectIdentity, Bits, TimeTicks, Unsigned32, iso, ModuleIdentity, IpAddress, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "Integer32", "Gauge32", "ObjectIdentity", "Bits", "TimeTicks", "Unsigned32", "iso", "ModuleIdentity", "IpAddress", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "NotificationType") TextualConvention, DisplayString, MacAddress, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "MacAddress", "RowStatus") fdryMacVlanMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32)) fdryMacVlanMIB.setRevisions(('2010-06-02 00:00', '2008-12-17 00:00',)) if mibBuilder.loadTexts: fdryMacVlanMIB.setLastUpdated('201006020000Z') if mibBuilder.loadTexts: fdryMacVlanMIB.setOrganization('Brocade Communications Systems, Inc.') fdryMacVlanGlobalObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 1)) fdryMacVlanTableObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2)) fdryMacVlanGlobalClearOper = MibScalar((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("valid", 0), ("clear", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: fdryMacVlanGlobalClearOper.setStatus('current') fdryMacVlanGlobalDynConfigState = MibScalar((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: fdryMacVlanGlobalDynConfigState.setStatus('current') fdryMacVlanPortMemberTable = MibTable((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 1), ) if mibBuilder.loadTexts: fdryMacVlanPortMemberTable.setStatus('current') fdryMacVlanPortMemberEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 1, 1), ).setIndexNames((0, "FOUNDRY-MAC-VLAN-MIB", "fdryMacVlanPortMemberVLanId"), (0, "FOUNDRY-MAC-VLAN-MIB", "fdryMacVlanPortMemberPortId")) if mibBuilder.loadTexts: fdryMacVlanPortMemberEntry.setStatus('current') fdryMacVlanPortMemberVLanId = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4095))) if mibBuilder.loadTexts: fdryMacVlanPortMemberVLanId.setStatus('current') fdryMacVlanPortMemberPortId = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 1, 1, 2), InterfaceIndex()) if mibBuilder.loadTexts: fdryMacVlanPortMemberPortId.setStatus('current') fdryMacVlanPortMemberRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 1, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: fdryMacVlanPortMemberRowStatus.setStatus('current') fdryMacVlanIfTable = MibTable((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2), ) if mibBuilder.loadTexts: fdryMacVlanIfTable.setStatus('current') fdryMacVlanIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2, 1), ).setIndexNames((0, "FOUNDRY-MAC-VLAN-MIB", "fdryMacVlanIfIndex")) if mibBuilder.loadTexts: fdryMacVlanIfEntry.setStatus('current') fdryMacVlanIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: fdryMacVlanIfIndex.setStatus('current') fdryMacVlanIfEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: fdryMacVlanIfEnable.setStatus('current') fdryMacVlanIfMaxEntry = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 32)).clone(2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: fdryMacVlanIfMaxEntry.setStatus('current') fdryMacVlanIfClearOper = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("valid", 0), ("clear", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: fdryMacVlanIfClearOper.setStatus('current') fdryMacVlanIfClearConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("valid", 0), ("clear", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: fdryMacVlanIfClearConfig.setStatus('current') fdryMacBasedVlanTable = MibTable((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 3), ) if mibBuilder.loadTexts: fdryMacBasedVlanTable.setStatus('current') fdryMacBasedVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 3, 1), ).setIndexNames((0, "FOUNDRY-MAC-VLAN-MIB", "fdryMacVlanIfIndex"), (0, "FOUNDRY-MAC-VLAN-MIB", "fdryMacBasedVlanId"), (0, "FOUNDRY-MAC-VLAN-MIB", "fdryMacBasedVlanMac")) if mibBuilder.loadTexts: fdryMacBasedVlanEntry.setStatus('current') fdryMacBasedVlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4095))) if mibBuilder.loadTexts: fdryMacBasedVlanId.setStatus('current') fdryMacBasedVlanMac = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 3, 1, 2), MacAddress()) if mibBuilder.loadTexts: fdryMacBasedVlanMac.setStatus('current') fdryMacBasedVlanPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readcreate") if mibBuilder.loadTexts: fdryMacBasedVlanPriority.setStatus('current') fdryMacBasedVlanRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 3, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: fdryMacBasedVlanRowStatus.setStatus('current') mibBuilder.exportSymbols("FOUNDRY-MAC-VLAN-MIB", fdryMacBasedVlanEntry=fdryMacBasedVlanEntry, fdryMacVlanPortMemberRowStatus=fdryMacVlanPortMemberRowStatus, fdryMacVlanIfMaxEntry=fdryMacVlanIfMaxEntry, fdryMacVlanIfClearConfig=fdryMacVlanIfClearConfig, fdryMacVlanMIB=fdryMacVlanMIB, fdryMacVlanGlobalDynConfigState=fdryMacVlanGlobalDynConfigState, fdryMacVlanIfEntry=fdryMacVlanIfEntry, fdryMacVlanTableObjects=fdryMacVlanTableObjects, fdryMacVlanIfIndex=fdryMacVlanIfIndex, fdryMacBasedVlanPriority=fdryMacBasedVlanPriority, fdryMacVlanPortMemberPortId=fdryMacVlanPortMemberPortId, fdryMacVlanIfClearOper=fdryMacVlanIfClearOper, fdryMacVlanGlobalObjects=fdryMacVlanGlobalObjects, PYSNMP_MODULE_ID=fdryMacVlanMIB, fdryMacBasedVlanId=fdryMacBasedVlanId, fdryMacVlanGlobalClearOper=fdryMacVlanGlobalClearOper, fdryMacBasedVlanMac=fdryMacBasedVlanMac, fdryMacVlanIfEnable=fdryMacVlanIfEnable, fdryMacBasedVlanRowStatus=fdryMacBasedVlanRowStatus, fdryMacVlanPortMemberTable=fdryMacVlanPortMemberTable, fdryMacVlanPortMemberVLanId=fdryMacVlanPortMemberVLanId, fdryMacVlanIfTable=fdryMacVlanIfTable, fdryMacBasedVlanTable=fdryMacBasedVlanTable, fdryMacVlanPortMemberEntry=fdryMacVlanPortMemberEntry)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_size_constraint, constraints_union, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection') (interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (mib_identifier, integer32, gauge32, object_identity, bits, time_ticks, unsigned32, iso, module_identity, ip_address, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'Integer32', 'Gauge32', 'ObjectIdentity', 'Bits', 'TimeTicks', 'Unsigned32', 'iso', 'ModuleIdentity', 'IpAddress', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'NotificationType') (textual_convention, display_string, mac_address, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'MacAddress', 'RowStatus') fdry_mac_vlan_mib = module_identity((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32)) fdryMacVlanMIB.setRevisions(('2010-06-02 00:00', '2008-12-17 00:00')) if mibBuilder.loadTexts: fdryMacVlanMIB.setLastUpdated('201006020000Z') if mibBuilder.loadTexts: fdryMacVlanMIB.setOrganization('Brocade Communications Systems, Inc.') fdry_mac_vlan_global_objects = mib_identifier((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 1)) fdry_mac_vlan_table_objects = mib_identifier((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2)) fdry_mac_vlan_global_clear_oper = mib_scalar((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('valid', 0), ('clear', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: fdryMacVlanGlobalClearOper.setStatus('current') fdry_mac_vlan_global_dyn_config_state = mib_scalar((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: fdryMacVlanGlobalDynConfigState.setStatus('current') fdry_mac_vlan_port_member_table = mib_table((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 1)) if mibBuilder.loadTexts: fdryMacVlanPortMemberTable.setStatus('current') fdry_mac_vlan_port_member_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 1, 1)).setIndexNames((0, 'FOUNDRY-MAC-VLAN-MIB', 'fdryMacVlanPortMemberVLanId'), (0, 'FOUNDRY-MAC-VLAN-MIB', 'fdryMacVlanPortMemberPortId')) if mibBuilder.loadTexts: fdryMacVlanPortMemberEntry.setStatus('current') fdry_mac_vlan_port_member_v_lan_id = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4095))) if mibBuilder.loadTexts: fdryMacVlanPortMemberVLanId.setStatus('current') fdry_mac_vlan_port_member_port_id = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 1, 1, 2), interface_index()) if mibBuilder.loadTexts: fdryMacVlanPortMemberPortId.setStatus('current') fdry_mac_vlan_port_member_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 1, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: fdryMacVlanPortMemberRowStatus.setStatus('current') fdry_mac_vlan_if_table = mib_table((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2)) if mibBuilder.loadTexts: fdryMacVlanIfTable.setStatus('current') fdry_mac_vlan_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2, 1)).setIndexNames((0, 'FOUNDRY-MAC-VLAN-MIB', 'fdryMacVlanIfIndex')) if mibBuilder.loadTexts: fdryMacVlanIfEntry.setStatus('current') fdry_mac_vlan_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2, 1, 1), interface_index()) if mibBuilder.loadTexts: fdryMacVlanIfIndex.setStatus('current') fdry_mac_vlan_if_enable = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: fdryMacVlanIfEnable.setStatus('current') fdry_mac_vlan_if_max_entry = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(2, 32)).clone(2)).setMaxAccess('readwrite') if mibBuilder.loadTexts: fdryMacVlanIfMaxEntry.setStatus('current') fdry_mac_vlan_if_clear_oper = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('valid', 0), ('clear', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: fdryMacVlanIfClearOper.setStatus('current') fdry_mac_vlan_if_clear_config = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('valid', 0), ('clear', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: fdryMacVlanIfClearConfig.setStatus('current') fdry_mac_based_vlan_table = mib_table((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 3)) if mibBuilder.loadTexts: fdryMacBasedVlanTable.setStatus('current') fdry_mac_based_vlan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 3, 1)).setIndexNames((0, 'FOUNDRY-MAC-VLAN-MIB', 'fdryMacVlanIfIndex'), (0, 'FOUNDRY-MAC-VLAN-MIB', 'fdryMacBasedVlanId'), (0, 'FOUNDRY-MAC-VLAN-MIB', 'fdryMacBasedVlanMac')) if mibBuilder.loadTexts: fdryMacBasedVlanEntry.setStatus('current') fdry_mac_based_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4095))) if mibBuilder.loadTexts: fdryMacBasedVlanId.setStatus('current') fdry_mac_based_vlan_mac = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 3, 1, 2), mac_address()) if mibBuilder.loadTexts: fdryMacBasedVlanMac.setStatus('current') fdry_mac_based_vlan_priority = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 3, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readcreate') if mibBuilder.loadTexts: fdryMacBasedVlanPriority.setStatus('current') fdry_mac_based_vlan_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 32, 2, 3, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: fdryMacBasedVlanRowStatus.setStatus('current') mibBuilder.exportSymbols('FOUNDRY-MAC-VLAN-MIB', fdryMacBasedVlanEntry=fdryMacBasedVlanEntry, fdryMacVlanPortMemberRowStatus=fdryMacVlanPortMemberRowStatus, fdryMacVlanIfMaxEntry=fdryMacVlanIfMaxEntry, fdryMacVlanIfClearConfig=fdryMacVlanIfClearConfig, fdryMacVlanMIB=fdryMacVlanMIB, fdryMacVlanGlobalDynConfigState=fdryMacVlanGlobalDynConfigState, fdryMacVlanIfEntry=fdryMacVlanIfEntry, fdryMacVlanTableObjects=fdryMacVlanTableObjects, fdryMacVlanIfIndex=fdryMacVlanIfIndex, fdryMacBasedVlanPriority=fdryMacBasedVlanPriority, fdryMacVlanPortMemberPortId=fdryMacVlanPortMemberPortId, fdryMacVlanIfClearOper=fdryMacVlanIfClearOper, fdryMacVlanGlobalObjects=fdryMacVlanGlobalObjects, PYSNMP_MODULE_ID=fdryMacVlanMIB, fdryMacBasedVlanId=fdryMacBasedVlanId, fdryMacVlanGlobalClearOper=fdryMacVlanGlobalClearOper, fdryMacBasedVlanMac=fdryMacBasedVlanMac, fdryMacVlanIfEnable=fdryMacVlanIfEnable, fdryMacBasedVlanRowStatus=fdryMacBasedVlanRowStatus, fdryMacVlanPortMemberTable=fdryMacVlanPortMemberTable, fdryMacVlanPortMemberVLanId=fdryMacVlanPortMemberVLanId, fdryMacVlanIfTable=fdryMacVlanIfTable, fdryMacBasedVlanTable=fdryMacBasedVlanTable, fdryMacVlanPortMemberEntry=fdryMacVlanPortMemberEntry)
def gridSearch(G, P): p_h, p_w = len(P), len(P[0]) search_h, search_w = len(G) - p_h + 1, len(G[0]) - p_w + 1 nrow_match = 0 for i in range(search_h): for j in range(search_w): if G[i][j:j+p_w] == P[0]: nrow_match += 1 # dfs for m in range(1, p_h): if G[i+m][j:j+p_w] == P[m]: nrow_match += 1 else: nrow_match = 0 break if nrow_match == p_h: return "YES" return "NO"
def grid_search(G, P): (p_h, p_w) = (len(P), len(P[0])) (search_h, search_w) = (len(G) - p_h + 1, len(G[0]) - p_w + 1) nrow_match = 0 for i in range(search_h): for j in range(search_w): if G[i][j:j + p_w] == P[0]: nrow_match += 1 for m in range(1, p_h): if G[i + m][j:j + p_w] == P[m]: nrow_match += 1 else: nrow_match = 0 break if nrow_match == p_h: return 'YES' return 'NO'
def create_matrix(size): return [input().split() for line in range(size)] def find_miner_start_position(matrix, size): for r in range(size): for c in range(size): if matrix[r][c] == "s": return r, c def find_total_coal(matrix): result = 0 for r in range(size): for c in range(size): if matrix[r][c] == "c": result += 1 return result def read_command(command, row, col, size): if command == "up": if row - 1 in range(size): row -= 1 elif command == "down": if row + 1 in range(size): row += 1 elif command == "left": if col - 1 in range(size): col -= 1 elif command == "right": if col + 1 in range(size): col += 1 return row, col def move_miner(matrix, row, col): return matrix[row][col] def element_is_end(element): if element == "e": return True def print_game_over(row, col): return f"Game over! ({row}, {col})" def element_is_coal(element, matrix, row, col): if element == "c": matrix[row][col] = "*" return True def collected_all_coals(coals_count, total_coal): if coals_count == total_coal: return True def print_collected_all_coals(row, col): return f"You collected all coals! ({row}, {col})" def print_remaining_coals(coals_count, total_coal, row, col): return f"{total_coal - coals_count} coals left. ({row}, {col})" def start_mining(matrix, miner_s_position, commands, size): total_coal = find_total_coal(matrix) coals_count = 0 r, c = miner_s_position for command in commands: r, c = read_command(command, r, c, size) element = move_miner(matrix, r, c) if element_is_end(element): return print_game_over(r, c) elif element_is_coal(element, matrix, r, c): coals_count += 1 if collected_all_coals(coals_count, total_coal): return print_collected_all_coals(r, c) return print_remaining_coals(coals_count, total_coal, r, c) size = int(input()) commands = input().split() # lines = [ # "* * * c *", # "* * * e *", # "* * c * *", # "s * * c *", # "* * c * *", # ] matrix = create_matrix(size) miner_start_position = find_miner_start_position(matrix, size) result = start_mining(matrix, miner_start_position, commands, size) print(result)
def create_matrix(size): return [input().split() for line in range(size)] def find_miner_start_position(matrix, size): for r in range(size): for c in range(size): if matrix[r][c] == 's': return (r, c) def find_total_coal(matrix): result = 0 for r in range(size): for c in range(size): if matrix[r][c] == 'c': result += 1 return result def read_command(command, row, col, size): if command == 'up': if row - 1 in range(size): row -= 1 elif command == 'down': if row + 1 in range(size): row += 1 elif command == 'left': if col - 1 in range(size): col -= 1 elif command == 'right': if col + 1 in range(size): col += 1 return (row, col) def move_miner(matrix, row, col): return matrix[row][col] def element_is_end(element): if element == 'e': return True def print_game_over(row, col): return f'Game over! ({row}, {col})' def element_is_coal(element, matrix, row, col): if element == 'c': matrix[row][col] = '*' return True def collected_all_coals(coals_count, total_coal): if coals_count == total_coal: return True def print_collected_all_coals(row, col): return f'You collected all coals! ({row}, {col})' def print_remaining_coals(coals_count, total_coal, row, col): return f'{total_coal - coals_count} coals left. ({row}, {col})' def start_mining(matrix, miner_s_position, commands, size): total_coal = find_total_coal(matrix) coals_count = 0 (r, c) = miner_s_position for command in commands: (r, c) = read_command(command, r, c, size) element = move_miner(matrix, r, c) if element_is_end(element): return print_game_over(r, c) elif element_is_coal(element, matrix, r, c): coals_count += 1 if collected_all_coals(coals_count, total_coal): return print_collected_all_coals(r, c) return print_remaining_coals(coals_count, total_coal, r, c) size = int(input()) commands = input().split() matrix = create_matrix(size) miner_start_position = find_miner_start_position(matrix, size) result = start_mining(matrix, miner_start_position, commands, size) print(result)
## Function 3 - multiplying two numbers ## 8 kyu ## https://www.codewars.com/kata/523b66342d0c301ae400003b def multiply(x,y): return x * y
def multiply(x, y): return x * y
# special websocket message types used for managing the connection # corresponds to constants at the top of websockets.js HELLO_TYPE = 'HELLO' GOT_HELLO_TYPE = 'GOT_HELLO' PING_TYPE = 'PING' PING_RESPONSE_TYPE = 'PING' RECONNECT_TYPE = 'RECONNECT' # use the value in this json field in the message to pick an # on_VALUE handler function ROUTING_KEY = 'type'
hello_type = 'HELLO' got_hello_type = 'GOT_HELLO' ping_type = 'PING' ping_response_type = 'PING' reconnect_type = 'RECONNECT' routing_key = 'type'
#----------* CHALLENGE 40 *---------- #Ask for a number below 50 and then count down from 50 to that number, making sure you show the number they entered in the output num = int(input("Enter a number below 50: ")) for i in range(50,num-1,-1): print(i)
num = int(input('Enter a number below 50: ')) for i in range(50, num - 1, -1): print(i)
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. DEPS = [ 'chromium', 'chromium_tests', 'depot_tools/tryserver', 'recipe_engine/platform', 'recipe_engine/properties', 'test_results', ] def RunSteps(api): api.chromium.set_config('chromium') api.test_results.set_config('public_server') test_runner = api.chromium_tests.create_test_runner( tests=[api.chromium_tests.steps.LocalGTestTest('base_unittests')], serialize_tests=api.properties.get('serialize_tests')) test_runner() def GenTests(api): yield ( api.test('failure') + api.properties( mastername='test_mastername', buildername='test_buildername', bot_id='test_bot_id', buildnumber=123) + api.override_step_data('base_unittests', retcode=1) ) yield ( api.test('serialize_tests') + api.properties( mastername='test_mastername', buildername='test_buildername', bot_id='test_bot_id', buildnumber=123, serialize_tests=True) + api.override_step_data('base_unittests', retcode=1) )
deps = ['chromium', 'chromium_tests', 'depot_tools/tryserver', 'recipe_engine/platform', 'recipe_engine/properties', 'test_results'] def run_steps(api): api.chromium.set_config('chromium') api.test_results.set_config('public_server') test_runner = api.chromium_tests.create_test_runner(tests=[api.chromium_tests.steps.LocalGTestTest('base_unittests')], serialize_tests=api.properties.get('serialize_tests')) test_runner() def gen_tests(api): yield (api.test('failure') + api.properties(mastername='test_mastername', buildername='test_buildername', bot_id='test_bot_id', buildnumber=123) + api.override_step_data('base_unittests', retcode=1)) yield (api.test('serialize_tests') + api.properties(mastername='test_mastername', buildername='test_buildername', bot_id='test_bot_id', buildnumber=123, serialize_tests=True) + api.override_step_data('base_unittests', retcode=1))
dp = [[0 for _ in range(101)] for _ in range(101)] def solve(n, m): if dp[n][m]: return dp[n][m] if m==0 or n==m: return 1 dp[n][m]=solve(n-1, m-1)+solve(n-1, m) return dp[n][m] n, m=map(int, input().split()) print(solve(n, m))
dp = [[0 for _ in range(101)] for _ in range(101)] def solve(n, m): if dp[n][m]: return dp[n][m] if m == 0 or n == m: return 1 dp[n][m] = solve(n - 1, m - 1) + solve(n - 1, m) return dp[n][m] (n, m) = map(int, input().split()) print(solve(n, m))
def test_captcha(app, start): app.account.captcha_off() def test_new_account(app): link = app.account.find_link_for_create_account() app.account.go_to_create_account_page(link) user = app.account.create_account() app.account.account_has_been_created() app.account.logout() app.account.login(user) app.account.logout()
def test_captcha(app, start): app.account.captcha_off() def test_new_account(app): link = app.account.find_link_for_create_account() app.account.go_to_create_account_page(link) user = app.account.create_account() app.account.account_has_been_created() app.account.logout() app.account.login(user) app.account.logout()
# SiteTool # 2019 APP_VERSION = '0.1.0'
app_version = '0.1.0'
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") def buildifier_deps_deps(): go_rules_dependencies() go_register_toolchains() gazelle_dependencies() protobuf_deps()
load('@io_bazel_rules_go//go:deps.bzl', 'go_register_toolchains', 'go_rules_dependencies') load('@bazel_gazelle//:deps.bzl', 'gazelle_dependencies') load('@com_google_protobuf//:protobuf_deps.bzl', 'protobuf_deps') def buildifier_deps_deps(): go_rules_dependencies() go_register_toolchains() gazelle_dependencies() protobuf_deps()
year = int(input()) is_hapyy_year = False while not is_hapyy_year: year += 1 str_year = str(year) set_year = set(str_year) if len(str_year) == len(set_year): is_hapyy_year = True print(year)
year = int(input()) is_hapyy_year = False while not is_hapyy_year: year += 1 str_year = str(year) set_year = set(str_year) if len(str_year) == len(set_year): is_hapyy_year = True print(year)
class Solution: def lengthOfLongestSubstring(self, s: str) -> int: len_ = 0 temp_list = [] for ch in s: if ch in temp_list: print(ch) len_ = max(len_, len(temp_list)) temp_list = temp_list[temp_list.index(ch)+1:] print(temp_list) temp_list.append(ch) else: temp_list.append(ch) len_=max(len_, len(temp_list)) return len_
class Solution: def length_of_longest_substring(self, s: str) -> int: len_ = 0 temp_list = [] for ch in s: if ch in temp_list: print(ch) len_ = max(len_, len(temp_list)) temp_list = temp_list[temp_list.index(ch) + 1:] print(temp_list) temp_list.append(ch) else: temp_list.append(ch) len_ = max(len_, len(temp_list)) return len_
geral = list() nomepeso = list() maiorpeso = list() while True: nomepeso.append(str(input('Nome: '))) nomepeso.append(int(input('Peso: '))) geral.append(nomepeso[:]) nomepeso.clear() sn = str(input('Deseja continuar? [S/N] ')) if sn in 'Nn': break for c in geral: maiorpeso.append(c[1]) print('O maior peso foi {}Kg de '.format(max(maiorpeso)),end=' ') for p in geral: if p[1] == max(maiorpeso): print(p[0],end=', ') print('\nOs mais leves foram {}'.format(min(maiorpeso)),end=' ') for p in geral: if p == min(maiorpeso): print(p[0])
geral = list() nomepeso = list() maiorpeso = list() while True: nomepeso.append(str(input('Nome: '))) nomepeso.append(int(input('Peso: '))) geral.append(nomepeso[:]) nomepeso.clear() sn = str(input('Deseja continuar? [S/N] ')) if sn in 'Nn': break for c in geral: maiorpeso.append(c[1]) print('O maior peso foi {}Kg de '.format(max(maiorpeso)), end=' ') for p in geral: if p[1] == max(maiorpeso): print(p[0], end=', ') print('\nOs mais leves foram {}'.format(min(maiorpeso)), end=' ') for p in geral: if p == min(maiorpeso): print(p[0])
#!/usr/bin/env python # coding: utf-8 # In[1]: test=float('inf') print('test>1',test>1) print('test>10',test>10) print('test>10',test>100) # In[7]: #To represent positive and negative infinity: # positive infinity p_inf = float("inf") # negative infinity n_inf = float("-inf") print("n_inf",n_inf <-10) # In[ ]:
test = float('inf') print('test>1', test > 1) print('test>10', test > 10) print('test>10', test > 100) p_inf = float('inf') n_inf = float('-inf') print('n_inf', n_inf < -10)
n = 1 c = 1 f = "-" print(f"{f*10}INICIO | DIGITE UM NUMERO NEGATIVO PARA SAIR{f*10}") while True: n = int(input("Informe um valor para ver sua tabuada: ")) c = 1 if n > 0: while n*11 != n*c: print(f"{n}x{c}={n*c}") c += 1 else: break print("FIM")
n = 1 c = 1 f = '-' print(f'{f * 10}INICIO | DIGITE UM NUMERO NEGATIVO PARA SAIR{f * 10}') while True: n = int(input('Informe um valor para ver sua tabuada: ')) c = 1 if n > 0: while n * 11 != n * c: print(f'{n}x{c}={n * c}') c += 1 else: break print('FIM')
def minimum2(L): min_1 = L[0] min_2 = L[1] if min_1 < min_2: min_1, min_2 = min_2, min_1 i = 0 while i < len(L): if L[i] < min_1: min_2, min_1 = min_1, L[i] elif L[i] < min_2 and L[i] > min_1: min_2 = L[i] i += 1 return min_2 print(minimum2([3,2,5,7,2]))
def minimum2(L): min_1 = L[0] min_2 = L[1] if min_1 < min_2: (min_1, min_2) = (min_2, min_1) i = 0 while i < len(L): if L[i] < min_1: (min_2, min_1) = (min_1, L[i]) elif L[i] < min_2 and L[i] > min_1: min_2 = L[i] i += 1 return min_2 print(minimum2([3, 2, 5, 7, 2]))
TEST_NAME = "030-trackingreview" BRANCH_NAME = [TEST_NAME + "-1", TEST_NAME + "-2"] UPSTREAM_NAME = [name + "-upstream" for name in BRANCH_NAME] SUMMARY = TEST_NAME ORIGINAL_SHA1 = "37bfd1ee7d301b364d0a8c716e9bca36efd5d139" REVIEWED_SHA1 = [] UPSTREAM_SHA1 = ["22afd9377add956e1e8d8dd6efa378fad9237532", "702c1b1a4043d8837e788317698cfc88c5570ff8"] def to(name): return testing.mailbox.ToRecipient("%s@example.org" % name) def about(subject): return testing.mailbox.WithSubject(subject) repository.run(["branch", UPSTREAM_NAME[0], UPSTREAM_SHA1[0]]) repository.run(["branch", UPSTREAM_NAME[1], UPSTREAM_SHA1[1]]) with repository.workcopy() as work: work.run(["checkout", "-b", BRANCH_NAME[0], UPSTREAM_SHA1[0]]) work.run(["cherry-pick", ORIGINAL_SHA1]) work.run(["push", "origin", "HEAD"]) REVIEWED_SHA1.append(work.run(["rev-parse", "HEAD"]).strip()) work.run(["checkout", "-b", BRANCH_NAME[1], UPSTREAM_SHA1[1]]) work.run(["cherry-pick", ORIGINAL_SHA1]) work.run(["push", "origin", "HEAD"]) REVIEWED_SHA1.append(work.run(["rev-parse", "HEAD"]).strip()) with_class = testing.expect.with_class extract_text = testing.expect.extract_text def check_tracking(branch_name, disabled=False): def check(document): class_names = ["tracking"] if disabled: class_names.append("disabled") p_tracking = document.find("p", attrs=with_class(*class_names)) testing.expect.check("tracking", extract_text(p_tracking)) if not disabled: testing.expect.check("tracking", p_tracking["class"]) code_branch = document.findAll("code", attrs=with_class("branch")) testing.expect.check(2, len(code_branch)) testing.expect.check(branch_name, extract_text(code_branch[1])) code_repository = document.findAll("code", attrs=with_class("repository")) testing.expect.check(2, len(code_repository)) testing.expect.check(repository.url, extract_text(code_repository[1])) return check SETTINGS = { "email.subjectLine.updatedReview.reviewRebased": "Rebased Review: %(summary)s" } with testing.utils.settings("alice", SETTINGS), frontend.signin("alice"): result = frontend.operation( "fetchremotebranch", data={ "repository_name": "critic", "remote": repository.url, "branch": BRANCH_NAME[0], "upstream": "refs/heads/" + UPSTREAM_NAME[0] }, expect={ "head_sha1": REVIEWED_SHA1[0], "upstream_sha1": UPSTREAM_SHA1[0] }) # Run a GC to make sure the objects fetched by /fetchremotebranch are # referenced and thus usable by the subsequent /submitreview operation. instance.gc("critic.git") commit_ids = result["commit_ids"] result = frontend.operation( "submitreview", data={ "repository": "critic", "branch": "r/" + TEST_NAME, "summary": SUMMARY, "commit_ids": commit_ids, "trackedbranch": { "remote": repository.url, "name": BRANCH_NAME[0] }}) review_id = result["review_id"] trackedbranch_id = result["trackedbranch_id"] mailbox.pop( accept=[to("alice"), about("New Review: " + SUMMARY)]) # Wait for the immediate fetch of the tracked branch that /submitreview # schedules. instance.synchronize_service("branchtracker") # Emulate a review rebase via /rebasetrackingreview. frontend.page( "r/%d" % review_id, expect={ "tracking": check_tracking(BRANCH_NAME[0]) }) frontend.page( "rebasetrackingreview", params={ "id": review_id }) result = frontend.operation( "fetchremotebranch", data={ "repository_name": "critic", "remote": repository.url, "branch": BRANCH_NAME[1], "upstream": "refs/heads/" + UPSTREAM_NAME[1] }, expect={ "head_sha1": REVIEWED_SHA1[1], "upstream_sha1": UPSTREAM_SHA1[1] }) # Run a GC to make sure the objects fetched by /fetchremotebranch are # referenced and thus usable by the subsequent /rebasetrackingreview # operation. instance.gc("critic.git") frontend.page( "rebasetrackingreview", params={ "id": review_id, "newbranch": BRANCH_NAME[1], "upstream": UPSTREAM_NAME[1], "newhead": REVIEWED_SHA1[1], "newupstream": UPSTREAM_SHA1[1] }) frontend.operation( "checkconflictsstatus", data={ "review_id": review_id, "new_head_sha1": REVIEWED_SHA1[1], "new_upstream_sha1": UPSTREAM_SHA1[1] }, expect={ "has_changes": False, "has_conflicts": False }) frontend.operation( "rebasereview", data={ "review_id": review_id, "new_head_sha1": REVIEWED_SHA1[1], "new_upstream_sha1": UPSTREAM_SHA1[1], "new_trackedbranch": BRANCH_NAME[1] }) frontend.page( "r/%d" % review_id, expect={ "tracking": check_tracking(BRANCH_NAME[1]) }) mailbox.pop( accept=[to("alice"), about("Rebased Review: " + SUMMARY)]) # Disable and enable the tracking. frontend.operation( "disabletrackedbranch", data={ "branch_id": trackedbranch_id }) frontend.page( "r/%d" % review_id, expect={ "tracking": check_tracking(BRANCH_NAME[1], disabled=True) }) frontend.operation( "enabletrackedbranch", data={ "branch_id": trackedbranch_id }) frontend.page( "r/%d" % review_id, expect={ "tracking": check_tracking(BRANCH_NAME[1]) })
test_name = '030-trackingreview' branch_name = [TEST_NAME + '-1', TEST_NAME + '-2'] upstream_name = [name + '-upstream' for name in BRANCH_NAME] summary = TEST_NAME original_sha1 = '37bfd1ee7d301b364d0a8c716e9bca36efd5d139' reviewed_sha1 = [] upstream_sha1 = ['22afd9377add956e1e8d8dd6efa378fad9237532', '702c1b1a4043d8837e788317698cfc88c5570ff8'] def to(name): return testing.mailbox.ToRecipient('%s@example.org' % name) def about(subject): return testing.mailbox.WithSubject(subject) repository.run(['branch', UPSTREAM_NAME[0], UPSTREAM_SHA1[0]]) repository.run(['branch', UPSTREAM_NAME[1], UPSTREAM_SHA1[1]]) with repository.workcopy() as work: work.run(['checkout', '-b', BRANCH_NAME[0], UPSTREAM_SHA1[0]]) work.run(['cherry-pick', ORIGINAL_SHA1]) work.run(['push', 'origin', 'HEAD']) REVIEWED_SHA1.append(work.run(['rev-parse', 'HEAD']).strip()) work.run(['checkout', '-b', BRANCH_NAME[1], UPSTREAM_SHA1[1]]) work.run(['cherry-pick', ORIGINAL_SHA1]) work.run(['push', 'origin', 'HEAD']) REVIEWED_SHA1.append(work.run(['rev-parse', 'HEAD']).strip()) with_class = testing.expect.with_class extract_text = testing.expect.extract_text def check_tracking(branch_name, disabled=False): def check(document): class_names = ['tracking'] if disabled: class_names.append('disabled') p_tracking = document.find('p', attrs=with_class(*class_names)) testing.expect.check('tracking', extract_text(p_tracking)) if not disabled: testing.expect.check('tracking', p_tracking['class']) code_branch = document.findAll('code', attrs=with_class('branch')) testing.expect.check(2, len(code_branch)) testing.expect.check(branch_name, extract_text(code_branch[1])) code_repository = document.findAll('code', attrs=with_class('repository')) testing.expect.check(2, len(code_repository)) testing.expect.check(repository.url, extract_text(code_repository[1])) return check settings = {'email.subjectLine.updatedReview.reviewRebased': 'Rebased Review: %(summary)s'} with testing.utils.settings('alice', SETTINGS), frontend.signin('alice'): result = frontend.operation('fetchremotebranch', data={'repository_name': 'critic', 'remote': repository.url, 'branch': BRANCH_NAME[0], 'upstream': 'refs/heads/' + UPSTREAM_NAME[0]}, expect={'head_sha1': REVIEWED_SHA1[0], 'upstream_sha1': UPSTREAM_SHA1[0]}) instance.gc('critic.git') commit_ids = result['commit_ids'] result = frontend.operation('submitreview', data={'repository': 'critic', 'branch': 'r/' + TEST_NAME, 'summary': SUMMARY, 'commit_ids': commit_ids, 'trackedbranch': {'remote': repository.url, 'name': BRANCH_NAME[0]}}) review_id = result['review_id'] trackedbranch_id = result['trackedbranch_id'] mailbox.pop(accept=[to('alice'), about('New Review: ' + SUMMARY)]) instance.synchronize_service('branchtracker') frontend.page('r/%d' % review_id, expect={'tracking': check_tracking(BRANCH_NAME[0])}) frontend.page('rebasetrackingreview', params={'id': review_id}) result = frontend.operation('fetchremotebranch', data={'repository_name': 'critic', 'remote': repository.url, 'branch': BRANCH_NAME[1], 'upstream': 'refs/heads/' + UPSTREAM_NAME[1]}, expect={'head_sha1': REVIEWED_SHA1[1], 'upstream_sha1': UPSTREAM_SHA1[1]}) instance.gc('critic.git') frontend.page('rebasetrackingreview', params={'id': review_id, 'newbranch': BRANCH_NAME[1], 'upstream': UPSTREAM_NAME[1], 'newhead': REVIEWED_SHA1[1], 'newupstream': UPSTREAM_SHA1[1]}) frontend.operation('checkconflictsstatus', data={'review_id': review_id, 'new_head_sha1': REVIEWED_SHA1[1], 'new_upstream_sha1': UPSTREAM_SHA1[1]}, expect={'has_changes': False, 'has_conflicts': False}) frontend.operation('rebasereview', data={'review_id': review_id, 'new_head_sha1': REVIEWED_SHA1[1], 'new_upstream_sha1': UPSTREAM_SHA1[1], 'new_trackedbranch': BRANCH_NAME[1]}) frontend.page('r/%d' % review_id, expect={'tracking': check_tracking(BRANCH_NAME[1])}) mailbox.pop(accept=[to('alice'), about('Rebased Review: ' + SUMMARY)]) frontend.operation('disabletrackedbranch', data={'branch_id': trackedbranch_id}) frontend.page('r/%d' % review_id, expect={'tracking': check_tracking(BRANCH_NAME[1], disabled=True)}) frontend.operation('enabletrackedbranch', data={'branch_id': trackedbranch_id}) frontend.page('r/%d' % review_id, expect={'tracking': check_tracking(BRANCH_NAME[1])})
def check_goldbach_for_num(n,primes_set) : '''gets an even integer- n, and a set of primes- primes_set. Returns whether there're two primes which their sum is n''' for prime in primes_set : if ((p < n) and ((n - prime) in primes_set)): return True return False
def check_goldbach_for_num(n, primes_set): """gets an even integer- n, and a set of primes- primes_set. Returns whether there're two primes which their sum is n""" for prime in primes_set: if p < n and n - prime in primes_set: return True return False
#!/usr/bin/env python #******************** # retroSpeak vocabulary # retroSpeak is a Raspberry Pi controlled speech synthesizer using the vintage # SP0256-AL2 chip, and MCP23S17 SPI controlled port expander. # # Vocabulary based on example wordlists in the Archer/Radioshack SP0256 datasheet # with typos corrected and a few additions - it's a slightly quirky list, # extended to allow creating a speaking calendar/clock # # The datasheet is available here: http://www.cpcwiki.eu/imgs/3/35/Sp0256al2_datasheet.pdf # # vocabulary is a simple Python dictionary # # To use it, simply import vocabulary into your Python script, and get the allophones for # the words by using something like word=vocabulary['cognitive'] # # Also a dictionary of numbers is available so num=numbers[1] will return the allophones for 'one' # daysOfMonth[1] will return allophones for 'first' and daysOfMonth[31] 'thirty first' # daysOfWeek[0] will return allophones for 'monday' and daysOfWeek[6] 'sunday' # # As this is based heavily on work in the public domain work, this code is relased as public domain. # #******************** vocabulary = { 'a':'EY', 'alarm':'AX LL AR MM', 'am':'AE AE PA2 MM', 'and':'AE AE NN1 PA2 DD1', 'april':'EY PA3 PP RR2 IH IH LL', 'ate':'EY PA3 TT2', 'august':'AO AO PA2 GG2 AX SS PA3 TT1', 'b':'BB2 IY', 'bathe':'BB2 EY DH2', 'bather':'BB2 EY DH2 ER1', 'bathing':'BB2 EY DH2 IH NG', 'beer':'BB2 YR', 'bread':'BB1 RR2 EH EH PA1 DD1', 'by':'BB2 AA AY', 'c':'SS SS IY', 'calendar':'KK1 AE AE LL EH NN1 PA2 DD2 ER1', 'check':'CH EH EH PA3 KK2', 'checked':'CH EH EH PA3 KK2 PA2 TT2', 'checker':'CH EH EH PA3 KK1 ER1', 'checkers':'CH EH EH PA3 KK1 ER1 ZZ', 'checking':'CH EH EH PA3 KK1 IH NG', 'checks':'CH EH EH PA3 KK1 SS', 'clock':'KK1 LL AA AA PA3 KK2', 'clown':'KK1 LL AW NN1', 'cognitive':'KK3 AA AA GG3 NN1 IH PA3 TT2 IH VV', 'collide':'KK3 AX LL AY DD1', 'computer':'KK1 AX MM PP YY1 UW1 TT2 ER1', 'cookie':'KK3 UH KK1 IY', 'coop':'KK3 UW2 PA3 PP', 'correct':'KK1 ER2 EH EH PA2 KK2 PA2 TT1', 'corrected':'KK1 ER2 EH EH PA2 KK2 PA2 TT2 IH PA2 DD1', 'correcting':'KK1 ER2 EH EH PA2 KK2 PA2 TT2 IH NG', 'corrects':'KK1 ER2 EH EH PA2 KK2 PA2 TT1 SS', 'crown':'KK1 RR2 AW NN1', 'd':'DD2 IY', 'date':'DD2 EY PA3 TT2', 'daughter':'DD2 AO TT2 ER1', 'day':'DD2 EH EY', 'december':'DD2 IY SS SS EH EH MM PA1 BB2 ER1', 'divided':'DD2 IH VV AY PA2 DD2 IH PA2 DD1', 'e':'IY', 'eight':'EY PA3 TT2', 'eighteen':'EY PA2 PA3 TT2 IY NN1', 'eighteenth':'EY PA2 PA3 TT2 IY NN1 PA2 TH', 'eighth':'EY PA3 TT2 PA2 TH', 'eighty':'EY PA3 TT2 IY', 'eleven':'IH LL EH EH VV IH NN1', 'eleventh':'IH LL EH EH VV IH NN1 PA2 TH', 'emotional':'IY MM OW SH AX NN1 AX EL', 'engage':'EH EH PA1 NN1 GG1 EY PA2 JH', 'engagement':'EH EH PA1 NN1 GG1 EY PA2 JH MM EH EH NN1 PA2 PA3 TT2 ', 'engages':'EH EH PA1 NN1 GG1 EY PA2 JH IH ZZ', 'engaging':'EH EH PA1 NN1 GG1 EY PA2 JH IH NG', 'enrage':'EH NN1 RR1 EY PA2 JH', 'enraged':'EH NN1 RR1 EY PA2 JH PA2 DD1', 'enrages':'EH NN1 RR1 EY PA2 JH IH ZZ', 'enraging':'EH NN1 RR1 EY PA2 JH IH NG', 'equal':'IY PA2 PA3 KK3 WH AX EL', 'equals':'IY PA2 PA3 KK3 WH AX EL ZZ', 'error':'EH XR OR', 'escape':'EH SS SS PA3 KK1 EY PA3 PP', 'escaped':'EH SS SS PA3 KK1 EY PA3 PP PA2 TT2', 'escapes':'EH SS SS PA3 KK1 EY PA3 PP ZZ', 'escaping':'EH SS SS PA3 KK1 EY PA3 PP IH NG', 'extent':'EH KK1 SS TT2 EH EH NN1 TT2', 'f':'EH EH FF FF', 'february':'FF EH EH PA1 BB1 RR2 UW2 XR IY', 'fifteen':'FF IH FF PA2 PA3 TT2 IY NN1', 'fifteenth':'FF IH FF PA2 PA3 TT2 IY NN1 PA2 TH', 'fifth':'FF IH FF FF PA3 TH', 'fifty':'FF FF IH FF FF PA2 PA3 TT2 IY', 'fir':'FF ER2', 'first':'FF ER2 SS PA2 TT2', 'five':'FF FF AY VV', 'for':'FF FF OR', 'fore':'FF FF OR', 'forty':'FF OR PA3 TT2 IY', 'four':'FF FF OR', 'fourteen':'FF OR PA2 PA3 TT2 IY NN1', 'fourteenth':'FF OR PA2 PA3 TT2 IY NN1 PA2 TH', 'fourth':'FF FF OR PA2 TH', 'freeze':'FF FF RR1 IY ZZ', 'freezer':'FF FF RR1 IY ZZ ER1', 'freezers':'FF FF RR1 IY ZZ ER1 ZZ', 'freezing':'FF FF RR1 IY ZZ IH NG', 'friday':'FF RR2 AY PA2 DD2 EY', 'frozen':'FF FF RR1 OW ZZ EH NN1', 'g':'JH IY', 'gauge':'GG1 EY PA2 JH', 'gauged':'GG1 EY PA2 JH PA2 DD1', 'gauges':'GG1 EY PA2 JH IH ZZ', 'gauging':'GG1 EY PA2 JH IH NG', 'h':'EY PA2 PA3 CH', 'hello':'HH1 EH LL AX OW', 'hour':'AW ER1', 'hundred':'HH2 AX AX NN1 PA2 DD2 RR2 IH IH PA1 DD1', 'i':'AA AY', 'infinitive':'IH NN1 FF FF IH IH NN1 IH PA2 PA3 TT2 IH VV', 'intrigue':'IH NN1 PA3 TT2 RR2 IY PA1 GG3', 'intrigued':'IH NN1 PA3 TT2 RR2 IY PA1 GG3 PA2 DD1', 'intrigues':'IH NN1 PA3 TT2 RR2 IY PA1 GG3 ZZ', 'intriguing':'IH NN1 PA3 TT2 RR2 IY PA1 GG3 IH NG', 'investigate':'IH IH NN1 VV EH EH SS PA2 PA3 TT2 IH PA1 GG1 EY PA2 TT2', 'investigated':'IH IH NN1 VV EH EH SS PA2 PA3 TT2 IH PA1 GG1 EY PA2 TT2 IH PA2 DD1', 'investigates':'IH IH NN1 VV EH EH SS PA2 PA3 TT2 IH PA1 GG1 EY PA2 TT1 SS', 'investigating':'IH IH NN1 VV EH EH SS PA2 PA3 TT2 IH PA1 GG1 EY PA2 TT2 IH NG', 'investigator':'IH IH NN1 VV EH EH SS PA2 PA3 TT2 IH PA1 GG1 EY PA2 TT2 ER1', 'investigators':'IH IH NN1 VV EH EH SS PA2 PA3 TT2 IH PA1 GG1 EY PA2 TT2 ER1 ZZ', 'is':'IH IH ZZ', 'j':'JH EH EY', 'january':'JH AE AE NN1 YY2 XR IY', 'july':'JH UW1 LL AY', 'june':'JH UW2 NN1', 'k':'KK1 EH EY', 'key':'KK1 IY', 'l':'EH EH EL', 'legislate':'LL EH EH PA2 JH IH SS SS LL EY PA2 PA3 TT2', 'legislated':'LL EH EH PA2 JH IH SS SS LL EY PA2 PA3 TT2 IH DD1', 'legislates':'LL EH EH PA2 JH IH SS SS LL EY PA2 PA3 TT1 SS', 'legislating':'LL EH EH PA2 JH IH SS SS LL EY PA2 PA3 TT2 IH NG', 'legislature':'LL EH EH PA2 JH IH SS SS LL EY PA2 PA3 CH ER1', 'letter':'LL EH EH PA3 TT2 ER1', 'litter':'LL IH IH PA3 TT2 ER1', 'little':'LL IH IH PA3 TT2 EL', 'm':'EH EH MM', 'march':'MM AR PA3 CH', 'may':'MM EY', 'memories':'MM EH EH MM ER2 IY ZZ', 'memory':'MM EH EH MM ER2 IY', 'million':'MM IH IH LL YY1 AX NN1', 'minute':'MM IH NN1 IH PA3 TT2', 'monday':'MM AX AX NN1 PA2 DD2 EY', 'month':'MM AX NN1 TH', 'n':'EH EH NN1', 'nine':'NN1 AA AY NN1', 'nineteen':'NN1 AY NN1 PA2 PA3 TT2 IY NN1', 'nineteenth':'NN1 AY NN1 PA2 PA3 TT2 IY NN1 PA2 TH', 'ninth':'NN1 AY NN1 PA2 TH', 'ninety':'NN1 AY NN1 PA3 TT2 IY', 'nip':'NN1 IH IH PA2 PA3 PP', 'nipped':'NN1 IH IH PA2 PA3 PP PA3 TT2', 'nipping':'NN1 IH IH PA2 PA3 PP IH NG', 'nips':'NN1 IH IH PA2 PA3 PP SS', 'no':'NN2 AX OW', 'november':'NN2 OW VV EH EH MM PA1 BB2 BB2 ER1', 'o':'OW', 'of':'AA AA VV', 'october':'AA PA2 KK2 PA3 TT2 OW PA1 BB2 ER1', 'one':'WW AX AX NN1', 'p':'PP IY', 'physical':'FF FF IH ZZ IH PA3 KK1 AX EL', 'pi':'PP AA AA AY', 'pin':'PP IH IH NN1', 'pinned':'PP IH IH NN1 PA2 DD1', 'pinning':'PP IH IH NN1 IH NG', 'pins':'PP IH IH NN1 ZZ', 'pledge':'PP LL EH EH PA3 JH', 'pledged':'PP LL EH EH PA3 JH PA2 DD1', 'pledges':'PP LL EH EH PA3 JH IH ZZ', 'pledging':'PP LL EH EH PA3 JH IH NG', 'plus':'PP LL AX AX SS SS', 'q':'KK1 YY1 UW2', 'r':'AR', 'raspberry':'RR1 AX SS SS PA3 BB1 ER2 RR2 IY', 'ray':'RR1 EH EY', 'rays':'RR1 EH EY ZZ', 'ready':'RR1 EH EH PA1 DD2 IY', 'red':'RR1 EH EH PA1 DD1', 'robot':'RR1 OW PA2 BB2 AA PA3 TT2', 'robots':'RR1 OW PA2 BB2 AA PA3 TT1 SS', 's':'EH EH SS SS', 'saturday':'SS SS AE PA3 TT2 ER1 PA2 DD2 EY', 'score':'SS SS PA3 KK3 OR', 'second':'SS SS EH PA3 KK1 IH NN1 PA2 DD1', 'sensitive':'SS SS EH EH NN1 SS SS IH PA2 PA3 TT2 IH VV', 'sensitivity':'SS SS EH EH NN1 SS SS IH PA2 PA3 TT2 IH VV IH PA2 PA3 TT2 IY', 'september':'SS SS EH PA3 PP PA3 TT2 EH EH MM PA1 BB2 ER1', 'seven':'SS SS EH EH VV IH NN1', 'seventeen':'SS SS EH VV TH NN1 PA2 PA3 TT2 IY NN1', 'seventeenth':'SS SS EH VV TH NN1 PA2 PA3 TT2 IY NN1 PA2 TH', 'seventh':'SS SS EH VV TH NN1 PA2 TH', 'seventy':'SS SS EH VV IH NN1 PA2 PA3 TT2 IY', 'sincere':'SS SS IH IH NN1 SS SS YR', 'sincerely':'SS SS IH IH NN1 SS SS YR LL IY', 'sincerity':'SS SS IH IH NN1 SS SS EH EH RR1 IH PA2 PA3 TT2 IY', 'sister':'SS SS IH IH SS PA3 TT2 ER1', 'six':'SS SS IH IH PA3 KK2 SS', 'sixteen':'SS SS IH PA3 KK2 SS PA2 PA3 TT2 IY NN1', 'sixteenth':'SS SS IH PA3 KK2 SS PA2 PA3 TT2 IY NN1 PA2 TH', 'sixth':'SS SS IH PA3 KK2 SS PA2 TH', 'sixty':'SS SS IH PA3 KK2 SS PA2 PA3 TT2 IY', 'speak':'SS SS PA3 PP IY PA3 KK2', 'spell':'SS SS PA3 PP EH EH EL', 'spelled':'SS SS PA3 PP EH EH EL PA3 DD1', 'speller':'SS SS PA3 PP EH EH EL ER2', 'spellers':'SS SS PA3 PP EH EH EL ER2 ZZ', 'spelling':'SS SS PA3 PP EH EH EL IH NG', 'spells':'SS SS PA3 PP EH EH EL ZZ', 'start':'SS SS PA3 TT2 AR PA3 TT2', 'started':'SS SS PA3 TT2 AR PA3 TT2 IH PA1 DD2', 'starter':'SS SS PA3 TT2 AR PA3 TT2 ER1', 'starting':'SS SS PA3 TT2 AR PA3 TT2 IH NG', 'starts':'SS SS PA3 TT2 AR PA3 TT1 SS', 'stop':'SS SS PA3 TT1 AA AA PA3 PP', 'stopped':'SS SS PA3 TT1 AA AA PA3 PP PA3 TT2', 'stopper':'SS SS PA3 TT1 AA AA PA3 PP ER1', 'stopping':'SS SS PA3 TT1 AA AA PA3 PP IH NG', 'stops':'SS SS PA3 TT1 AA AA PA3 PP SS', 'subject (noun)':'SS SS AX AX PA2 BB1 PA2 JH EH PA3 KK2 PA3 TT2', 'subject (verb)':'SS SS AX PA2 BB1 PA2 JH EH EH PA3 KK2 PA3 TT2', 'sunday':'SS SS AX AX NN1 PA2 DD2 EY', 'sweat':'SS SS WW EH EH PA3 TT2', 'sweated':'SS SS WW EH EH PA3 TT2 IH PA3 DD1', 'sweater':'SS SS WW EH EH PA3 TT2 ER1', 'sweaters':'SS SS WW EH EH PA3 TT2 ER1 ZZ', 'sweating':'SS SS WW EH EH PA3 TT2 IH NG', 'sweats':'SS SS WW EH EH PA3 TT2 SS', 'switch':'SS SS WH IH IH PA3 CH', 'switched':'SS SS WH IH IH PA3 CH PA3 TT2', 'switches':'SS SS WH IH IH PA3 CH IH ZZ', 'switching':'SS SS WH IH IH PA3 CH IH NG', 'system':'SS SS IH IH SS SS PA3 TT2 EH MM', 'systems':'SS SS IH IH SS SS PA3 TT2 EH MM ZZ', 't':'TT2 IY', 'talk':'TT2 AO AO PA2 KK2', 'talked':'TT2 AO AO PA3 KK2 PA3 TT2', 'talker':'TT2 AO AO PA3 KK1 ER1', 'talkers':'TT2 AO AO PA3 KK1 ER1 ZZ', 'talking':'TT2 AO AO PA3 KK1 IH NG', 'talks':'TT2 AO AO PA2 KK2 SS', 'ten':'TT2 EH EH NN1', 'tenth':'TT2 EH EH NN1 PA2 TH', 'the':'DH1 PA3 IY', 'then':'DH1 EH EH NN1', 'third':'TH ER1 PA2 DD1', 'thirteen':'TH ER1 PA2 PA3 TT2 IY NN1', 'thirteenth':'TH ER1 PA2 PA3 TT2 IY NN1 PA2 TH', 'thirty':'TH ER2 PA2 PA3 TT2 IY', 'thirtieth':'TH ER2 PA2 PA3 TT2 IY PA2 EH TH', 'thousand':'TH AA AW ZZ TH PA1 PA1 NN1 DD1', 'thread':'TH RR1 EH EH PA2 DD1', 'threaded':'TH RR1 EH EH PA2 DD2 IH PA2 DD1', 'threader':'TH RR1 EH EH PA2 DD2 ER1', 'threaders':'TH RR1 EH EH PA2 DD2 ER1 ZZ', 'threading':'TH RR1 EH EH PA2 DD2 IH NG', 'threads':'TH RR1 EH EH PA2 DD2 ZZ', 'three':'TH RR1 IY', 'thursday':'TH ER2 ZZ PA2 DD2 EY', 'time':'TT2 AA AY MM', 'times':'TT2 AA AY MM ZZ', 'to':'TT2 UW2', 'today':'TT2 UW2 PA3 DD2 EY', 'too':'TT2 UW2', 'tuesday':'TT2 UW2 ZZ PA2 DD2 EY', 'twelve':'TT2 WH EH EH LL VV', 'twelfth':'TT2 WH EH EH LL FF PA2 TH', 'twenty':'TT2 WH EH EH NN1 PA2 PA3 TT2 IY', 'twentieth':'TT2 WH EH EH NN1 PA2 PA3 TT2 IY PA2 EH TH', 'two':'TT2 UW2', 'u':'YY1 UW2', 'uncle':'AX NG PA3 KK3 EL', 'v':'VV IY', 'w':'DD2 AX PA2 BB2 EL YY1 UW2', 'wednesday':'WW EH EH NN1 ZZ PA2 DD2 EY', 'whale':'WW EY EL', 'whaler':'WW EY LL ER1', 'whalers':'WW EY LL ER1 ZZ', 'whales':'WW EY EL ZZ', 'whaling':'WW EY LL IH NG', 'won':'WW AX AX NN1', 'x':'EH EH PA3 KK2 SS SS', 'y':'WW AY', 'year':'YY2 YR', 'yes':'YY2 EH EH SS SS', # 'z':'ZZ IY', 'z':'ZZ EH EH PA2 DD1',# I'm in the UK! 'zero':'ZZ YR OW', } daysOfWeek = [ vocabulary['monday'],vocabulary['tuesday'],vocabulary['wednesday'], vocabulary['thursday'],vocabulary['friday'],vocabulary['saturday'],vocabulary['sunday'] ] daysOfMonth = [ '', vocabulary['first'],vocabulary['second'],vocabulary['third'], vocabulary['fourth'],vocabulary['fifth'],vocabulary['sixth'], vocabulary['seventh'],vocabulary['eighth'],vocabulary['ninth'], vocabulary['tenth'],vocabulary['eleventh'],vocabulary['twelfth'], vocabulary['thirteenth'],vocabulary['fourteenth'],vocabulary['fifteenth'], vocabulary['sixteenth'],vocabulary['seventeenth'],vocabulary['eighteenth'], vocabulary['nineteenth'],vocabulary['twentieth'], vocabulary['twenty']+'PA2'+vocabulary['first'], vocabulary['twenty']+'PA2'+vocabulary['second'], vocabulary['twenty']+'PA2'+vocabulary['third'], vocabulary['twenty']+'PA2'+vocabulary['fourth'], vocabulary['twenty']+'PA2'+vocabulary['fifth'], vocabulary['twenty']+'PA2'+vocabulary['sixth'], vocabulary['twenty']+'PA2'+vocabulary['seventh'], vocabulary['twenty']+'PA2'+vocabulary['eighth'], vocabulary['twenty']+'PA2'+vocabulary['ninth'], vocabulary['thirtieth'], vocabulary['thirty']+'PA2'+vocabulary['first'] ] numbers = { 1:vocabulary['one'], 2:vocabulary['two'], 3:vocabulary['three'], 4:vocabulary['four'], 5:vocabulary['five'], 6:vocabulary['six'], 7:vocabulary['seven'], 8:vocabulary['eight'], 9:vocabulary['nine'], 10:vocabulary['ten'], 11:vocabulary['eleven'], 12:vocabulary['twelve'], 13:vocabulary['thirteen'], 14:vocabulary['fourteen'], 15:vocabulary['fifteen'], 16:vocabulary['sixteen'], 17:vocabulary['seventeen'], 18:vocabulary['eighteen'], 19:vocabulary['nineteen'], 20:vocabulary['twenty'], 30:vocabulary['thirty'], 40:vocabulary['forty'], 50:vocabulary['fifty'], 60:vocabulary['sixty'], 70:vocabulary['seventy'], 80:vocabulary['eighty'], 90:vocabulary['ninety'], 100:vocabulary['hundred'], 1000:vocabulary['thousand'], 1000000:vocabulary['million'] }
vocabulary = {'a': 'EY', 'alarm': 'AX LL AR MM', 'am': 'AE AE PA2 MM', 'and': 'AE AE NN1 PA2 DD1', 'april': 'EY PA3 PP RR2 IH IH LL', 'ate': 'EY PA3 TT2', 'august': 'AO AO PA2 GG2 AX SS PA3 TT1', 'b': 'BB2 IY', 'bathe': 'BB2 EY DH2', 'bather': 'BB2 EY DH2 ER1', 'bathing': 'BB2 EY DH2 IH NG', 'beer': 'BB2 YR', 'bread': 'BB1 RR2 EH EH PA1 DD1', 'by': 'BB2 AA AY', 'c': 'SS SS IY', 'calendar': 'KK1 AE AE LL EH NN1 PA2 DD2 ER1', 'check': 'CH EH EH PA3 KK2', 'checked': 'CH EH EH PA3 KK2 PA2 TT2', 'checker': 'CH EH EH PA3 KK1 ER1', 'checkers': 'CH EH EH PA3 KK1 ER1 ZZ', 'checking': 'CH EH EH PA3 KK1 IH NG', 'checks': 'CH EH EH PA3 KK1 SS', 'clock': 'KK1 LL AA AA PA3 KK2', 'clown': 'KK1 LL AW NN1', 'cognitive': 'KK3 AA AA GG3 NN1 IH PA3 TT2 IH VV', 'collide': 'KK3 AX LL AY DD1', 'computer': 'KK1 AX MM PP YY1 UW1 TT2 ER1', 'cookie': 'KK3 UH KK1 IY', 'coop': 'KK3 UW2 PA3 PP', 'correct': 'KK1 ER2 EH EH PA2 KK2 PA2 TT1', 'corrected': 'KK1 ER2 EH EH PA2 KK2 PA2 TT2 IH PA2 DD1', 'correcting': 'KK1 ER2 EH EH PA2 KK2 PA2 TT2 IH NG', 'corrects': 'KK1 ER2 EH EH PA2 KK2 PA2 TT1 SS', 'crown': 'KK1 RR2 AW NN1', 'd': 'DD2 IY', 'date': 'DD2 EY PA3 TT2', 'daughter': 'DD2 AO TT2 ER1', 'day': 'DD2 EH EY', 'december': 'DD2 IY SS SS EH EH MM PA1 BB2 ER1', 'divided': 'DD2 IH VV AY PA2 DD2 IH PA2 DD1', 'e': 'IY', 'eight': 'EY PA3 TT2', 'eighteen': 'EY PA2 PA3 TT2 IY NN1', 'eighteenth': 'EY PA2 PA3 TT2 IY NN1 PA2 TH', 'eighth': 'EY PA3 TT2 PA2 TH', 'eighty': 'EY PA3 TT2 IY', 'eleven': 'IH LL EH EH VV IH NN1', 'eleventh': 'IH LL EH EH VV IH NN1 PA2 TH', 'emotional': 'IY MM OW SH AX NN1 AX EL', 'engage': 'EH EH PA1 NN1 GG1 EY PA2 JH', 'engagement': 'EH EH PA1 NN1 GG1 EY PA2 JH MM EH EH NN1 PA2 PA3 TT2 ', 'engages': 'EH EH PA1 NN1 GG1 EY PA2 JH IH ZZ', 'engaging': 'EH EH PA1 NN1 GG1 EY PA2 JH IH NG', 'enrage': 'EH NN1 RR1 EY PA2 JH', 'enraged': 'EH NN1 RR1 EY PA2 JH PA2 DD1', 'enrages': 'EH NN1 RR1 EY PA2 JH IH ZZ', 'enraging': 'EH NN1 RR1 EY PA2 JH IH NG', 'equal': 'IY PA2 PA3 KK3 WH AX EL', 'equals': 'IY PA2 PA3 KK3 WH AX EL ZZ', 'error': 'EH XR OR', 'escape': 'EH SS SS PA3 KK1 EY PA3 PP', 'escaped': 'EH SS SS PA3 KK1 EY PA3 PP PA2 TT2', 'escapes': 'EH SS SS PA3 KK1 EY PA3 PP ZZ', 'escaping': 'EH SS SS PA3 KK1 EY PA3 PP IH NG', 'extent': 'EH KK1 SS TT2 EH EH NN1 TT2', 'f': 'EH EH FF FF', 'february': 'FF EH EH PA1 BB1 RR2 UW2 XR IY', 'fifteen': 'FF IH FF PA2 PA3 TT2 IY NN1', 'fifteenth': 'FF IH FF PA2 PA3 TT2 IY NN1 PA2 TH', 'fifth': 'FF IH FF FF PA3 TH', 'fifty': 'FF FF IH FF FF PA2 PA3 TT2 IY', 'fir': 'FF ER2', 'first': 'FF ER2 SS PA2 TT2', 'five': 'FF FF AY VV', 'for': 'FF FF OR', 'fore': 'FF FF OR', 'forty': 'FF OR PA3 TT2 IY', 'four': 'FF FF OR', 'fourteen': 'FF OR PA2 PA3 TT2 IY NN1', 'fourteenth': 'FF OR PA2 PA3 TT2 IY NN1 PA2 TH', 'fourth': 'FF FF OR PA2 TH', 'freeze': 'FF FF RR1 IY ZZ', 'freezer': 'FF FF RR1 IY ZZ ER1', 'freezers': 'FF FF RR1 IY ZZ ER1 ZZ', 'freezing': 'FF FF RR1 IY ZZ IH NG', 'friday': 'FF RR2 AY PA2 DD2 EY', 'frozen': 'FF FF RR1 OW ZZ EH NN1', 'g': 'JH IY', 'gauge': 'GG1 EY PA2 JH', 'gauged': 'GG1 EY PA2 JH PA2 DD1', 'gauges': 'GG1 EY PA2 JH IH ZZ', 'gauging': 'GG1 EY PA2 JH IH NG', 'h': 'EY PA2 PA3 CH', 'hello': 'HH1 EH LL AX OW', 'hour': 'AW ER1', 'hundred': 'HH2 AX AX NN1 PA2 DD2 RR2 IH IH PA1 DD1', 'i': 'AA AY', 'infinitive': 'IH NN1 FF FF IH IH NN1 IH PA2 PA3 TT2 IH VV', 'intrigue': 'IH NN1 PA3 TT2 RR2 IY PA1 GG3', 'intrigued': 'IH NN1 PA3 TT2 RR2 IY PA1 GG3 PA2 DD1', 'intrigues': 'IH NN1 PA3 TT2 RR2 IY PA1 GG3 ZZ', 'intriguing': 'IH NN1 PA3 TT2 RR2 IY PA1 GG3 IH NG', 'investigate': 'IH IH NN1 VV EH EH SS PA2 PA3 TT2 IH PA1 GG1 EY PA2 TT2', 'investigated': 'IH IH NN1 VV EH EH SS PA2 PA3 TT2 IH PA1 GG1 EY PA2 TT2 IH PA2 DD1', 'investigates': 'IH IH NN1 VV EH EH SS PA2 PA3 TT2 IH PA1 GG1 EY PA2 TT1 SS', 'investigating': 'IH IH NN1 VV EH EH SS PA2 PA3 TT2 IH PA1 GG1 EY PA2 TT2 IH NG', 'investigator': 'IH IH NN1 VV EH EH SS PA2 PA3 TT2 IH PA1 GG1 EY PA2 TT2 ER1', 'investigators': 'IH IH NN1 VV EH EH SS PA2 PA3 TT2 IH PA1 GG1 EY PA2 TT2 ER1 ZZ', 'is': 'IH IH ZZ', 'j': 'JH EH EY', 'january': 'JH AE AE NN1 YY2 XR IY', 'july': 'JH UW1 LL AY', 'june': 'JH UW2 NN1', 'k': 'KK1 EH EY', 'key': 'KK1 IY', 'l': 'EH EH EL', 'legislate': 'LL EH EH PA2 JH IH SS SS LL EY PA2 PA3 TT2', 'legislated': 'LL EH EH PA2 JH IH SS SS LL EY PA2 PA3 TT2 IH DD1', 'legislates': 'LL EH EH PA2 JH IH SS SS LL EY PA2 PA3 TT1 SS', 'legislating': 'LL EH EH PA2 JH IH SS SS LL EY PA2 PA3 TT2 IH NG', 'legislature': 'LL EH EH PA2 JH IH SS SS LL EY PA2 PA3 CH ER1', 'letter': 'LL EH EH PA3 TT2 ER1', 'litter': 'LL IH IH PA3 TT2 ER1', 'little': 'LL IH IH PA3 TT2 EL', 'm': 'EH EH MM', 'march': 'MM AR PA3 CH', 'may': 'MM EY', 'memories': 'MM EH EH MM ER2 IY ZZ', 'memory': 'MM EH EH MM ER2 IY', 'million': 'MM IH IH LL YY1 AX NN1', 'minute': 'MM IH NN1 IH PA3 TT2', 'monday': 'MM AX AX NN1 PA2 DD2 EY', 'month': 'MM AX NN1 TH', 'n': 'EH EH NN1', 'nine': 'NN1 AA AY NN1', 'nineteen': 'NN1 AY NN1 PA2 PA3 TT2 IY NN1', 'nineteenth': 'NN1 AY NN1 PA2 PA3 TT2 IY NN1 PA2 TH', 'ninth': 'NN1 AY NN1 PA2 TH', 'ninety': 'NN1 AY NN1 PA3 TT2 IY', 'nip': 'NN1 IH IH PA2 PA3 PP', 'nipped': 'NN1 IH IH PA2 PA3 PP PA3 TT2', 'nipping': 'NN1 IH IH PA2 PA3 PP IH NG', 'nips': 'NN1 IH IH PA2 PA3 PP SS', 'no': 'NN2 AX OW', 'november': 'NN2 OW VV EH EH MM PA1 BB2 BB2 ER1', 'o': 'OW', 'of': 'AA AA VV', 'october': 'AA PA2 KK2 PA3 TT2 OW PA1 BB2 ER1', 'one': 'WW AX AX NN1', 'p': 'PP IY', 'physical': 'FF FF IH ZZ IH PA3 KK1 AX EL', 'pi': 'PP AA AA AY', 'pin': 'PP IH IH NN1', 'pinned': 'PP IH IH NN1 PA2 DD1', 'pinning': 'PP IH IH NN1 IH NG', 'pins': 'PP IH IH NN1 ZZ', 'pledge': 'PP LL EH EH PA3 JH', 'pledged': 'PP LL EH EH PA3 JH PA2 DD1', 'pledges': 'PP LL EH EH PA3 JH IH ZZ', 'pledging': 'PP LL EH EH PA3 JH IH NG', 'plus': 'PP LL AX AX SS SS', 'q': 'KK1 YY1 UW2', 'r': 'AR', 'raspberry': 'RR1 AX SS SS PA3 BB1 ER2 RR2 IY', 'ray': 'RR1 EH EY', 'rays': 'RR1 EH EY ZZ', 'ready': 'RR1 EH EH PA1 DD2 IY', 'red': 'RR1 EH EH PA1 DD1', 'robot': 'RR1 OW PA2 BB2 AA PA3 TT2', 'robots': 'RR1 OW PA2 BB2 AA PA3 TT1 SS', 's': 'EH EH SS SS', 'saturday': 'SS SS AE PA3 TT2 ER1 PA2 DD2 EY', 'score': 'SS SS PA3 KK3 OR', 'second': 'SS SS EH PA3 KK1 IH NN1 PA2 DD1', 'sensitive': 'SS SS EH EH NN1 SS SS IH PA2 PA3 TT2 IH VV', 'sensitivity': 'SS SS EH EH NN1 SS SS IH PA2 PA3 TT2 IH VV IH PA2 PA3 TT2 IY', 'september': 'SS SS EH PA3 PP PA3 TT2 EH EH MM PA1 BB2 ER1', 'seven': 'SS SS EH EH VV IH NN1', 'seventeen': 'SS SS EH VV TH NN1 PA2 PA3 TT2 IY NN1', 'seventeenth': 'SS SS EH VV TH NN1 PA2 PA3 TT2 IY NN1 PA2 TH', 'seventh': 'SS SS EH VV TH NN1 PA2 TH', 'seventy': 'SS SS EH VV IH NN1 PA2 PA3 TT2 IY', 'sincere': 'SS SS IH IH NN1 SS SS YR', 'sincerely': 'SS SS IH IH NN1 SS SS YR LL IY', 'sincerity': 'SS SS IH IH NN1 SS SS EH EH RR1 IH PA2 PA3 TT2 IY', 'sister': 'SS SS IH IH SS PA3 TT2 ER1', 'six': 'SS SS IH IH PA3 KK2 SS', 'sixteen': 'SS SS IH PA3 KK2 SS PA2 PA3 TT2 IY NN1', 'sixteenth': 'SS SS IH PA3 KK2 SS PA2 PA3 TT2 IY NN1 PA2 TH', 'sixth': 'SS SS IH PA3 KK2 SS PA2 TH', 'sixty': 'SS SS IH PA3 KK2 SS PA2 PA3 TT2 IY', 'speak': 'SS SS PA3 PP IY PA3 KK2', 'spell': 'SS SS PA3 PP EH EH EL', 'spelled': 'SS SS PA3 PP EH EH EL PA3 DD1', 'speller': 'SS SS PA3 PP EH EH EL ER2', 'spellers': 'SS SS PA3 PP EH EH EL ER2 ZZ', 'spelling': 'SS SS PA3 PP EH EH EL IH NG', 'spells': 'SS SS PA3 PP EH EH EL ZZ', 'start': 'SS SS PA3 TT2 AR PA3 TT2', 'started': 'SS SS PA3 TT2 AR PA3 TT2 IH PA1 DD2', 'starter': 'SS SS PA3 TT2 AR PA3 TT2 ER1', 'starting': 'SS SS PA3 TT2 AR PA3 TT2 IH NG', 'starts': 'SS SS PA3 TT2 AR PA3 TT1 SS', 'stop': 'SS SS PA3 TT1 AA AA PA3 PP', 'stopped': 'SS SS PA3 TT1 AA AA PA3 PP PA3 TT2', 'stopper': 'SS SS PA3 TT1 AA AA PA3 PP ER1', 'stopping': 'SS SS PA3 TT1 AA AA PA3 PP IH NG', 'stops': 'SS SS PA3 TT1 AA AA PA3 PP SS', 'subject (noun)': 'SS SS AX AX PA2 BB1 PA2 JH EH PA3 KK2 PA3 TT2', 'subject (verb)': 'SS SS AX PA2 BB1 PA2 JH EH EH PA3 KK2 PA3 TT2', 'sunday': 'SS SS AX AX NN1 PA2 DD2 EY', 'sweat': 'SS SS WW EH EH PA3 TT2', 'sweated': 'SS SS WW EH EH PA3 TT2 IH PA3 DD1', 'sweater': 'SS SS WW EH EH PA3 TT2 ER1', 'sweaters': 'SS SS WW EH EH PA3 TT2 ER1 ZZ', 'sweating': 'SS SS WW EH EH PA3 TT2 IH NG', 'sweats': 'SS SS WW EH EH PA3 TT2 SS', 'switch': 'SS SS WH IH IH PA3 CH', 'switched': 'SS SS WH IH IH PA3 CH PA3 TT2', 'switches': 'SS SS WH IH IH PA3 CH IH ZZ', 'switching': 'SS SS WH IH IH PA3 CH IH NG', 'system': 'SS SS IH IH SS SS PA3 TT2 EH MM', 'systems': 'SS SS IH IH SS SS PA3 TT2 EH MM ZZ', 't': 'TT2 IY', 'talk': 'TT2 AO AO PA2 KK2', 'talked': 'TT2 AO AO PA3 KK2 PA3 TT2', 'talker': 'TT2 AO AO PA3 KK1 ER1', 'talkers': 'TT2 AO AO PA3 KK1 ER1 ZZ', 'talking': 'TT2 AO AO PA3 KK1 IH NG', 'talks': 'TT2 AO AO PA2 KK2 SS', 'ten': 'TT2 EH EH NN1', 'tenth': 'TT2 EH EH NN1 PA2 TH', 'the': 'DH1 PA3 IY', 'then': 'DH1 EH EH NN1', 'third': 'TH ER1 PA2 DD1', 'thirteen': 'TH ER1 PA2 PA3 TT2 IY NN1', 'thirteenth': 'TH ER1 PA2 PA3 TT2 IY NN1 PA2 TH', 'thirty': 'TH ER2 PA2 PA3 TT2 IY', 'thirtieth': 'TH ER2 PA2 PA3 TT2 IY PA2 EH TH', 'thousand': 'TH AA AW ZZ TH PA1 PA1 NN1 DD1', 'thread': 'TH RR1 EH EH PA2 DD1', 'threaded': 'TH RR1 EH EH PA2 DD2 IH PA2 DD1', 'threader': 'TH RR1 EH EH PA2 DD2 ER1', 'threaders': 'TH RR1 EH EH PA2 DD2 ER1 ZZ', 'threading': 'TH RR1 EH EH PA2 DD2 IH NG', 'threads': 'TH RR1 EH EH PA2 DD2 ZZ', 'three': 'TH RR1 IY', 'thursday': 'TH ER2 ZZ PA2 DD2 EY', 'time': 'TT2 AA AY MM', 'times': 'TT2 AA AY MM ZZ', 'to': 'TT2 UW2', 'today': 'TT2 UW2 PA3 DD2 EY', 'too': 'TT2 UW2', 'tuesday': 'TT2 UW2 ZZ PA2 DD2 EY', 'twelve': 'TT2 WH EH EH LL VV', 'twelfth': 'TT2 WH EH EH LL FF PA2 TH', 'twenty': 'TT2 WH EH EH NN1 PA2 PA3 TT2 IY', 'twentieth': 'TT2 WH EH EH NN1 PA2 PA3 TT2 IY PA2 EH TH', 'two': 'TT2 UW2', 'u': 'YY1 UW2', 'uncle': 'AX NG PA3 KK3 EL', 'v': 'VV IY', 'w': 'DD2 AX PA2 BB2 EL YY1 UW2', 'wednesday': 'WW EH EH NN1 ZZ PA2 DD2 EY', 'whale': 'WW EY EL', 'whaler': 'WW EY LL ER1', 'whalers': 'WW EY LL ER1 ZZ', 'whales': 'WW EY EL ZZ', 'whaling': 'WW EY LL IH NG', 'won': 'WW AX AX NN1', 'x': 'EH EH PA3 KK2 SS SS', 'y': 'WW AY', 'year': 'YY2 YR', 'yes': 'YY2 EH EH SS SS', 'z': 'ZZ EH EH PA2 DD1', 'zero': 'ZZ YR OW'} days_of_week = [vocabulary['monday'], vocabulary['tuesday'], vocabulary['wednesday'], vocabulary['thursday'], vocabulary['friday'], vocabulary['saturday'], vocabulary['sunday']] days_of_month = ['', vocabulary['first'], vocabulary['second'], vocabulary['third'], vocabulary['fourth'], vocabulary['fifth'], vocabulary['sixth'], vocabulary['seventh'], vocabulary['eighth'], vocabulary['ninth'], vocabulary['tenth'], vocabulary['eleventh'], vocabulary['twelfth'], vocabulary['thirteenth'], vocabulary['fourteenth'], vocabulary['fifteenth'], vocabulary['sixteenth'], vocabulary['seventeenth'], vocabulary['eighteenth'], vocabulary['nineteenth'], vocabulary['twentieth'], vocabulary['twenty'] + 'PA2' + vocabulary['first'], vocabulary['twenty'] + 'PA2' + vocabulary['second'], vocabulary['twenty'] + 'PA2' + vocabulary['third'], vocabulary['twenty'] + 'PA2' + vocabulary['fourth'], vocabulary['twenty'] + 'PA2' + vocabulary['fifth'], vocabulary['twenty'] + 'PA2' + vocabulary['sixth'], vocabulary['twenty'] + 'PA2' + vocabulary['seventh'], vocabulary['twenty'] + 'PA2' + vocabulary['eighth'], vocabulary['twenty'] + 'PA2' + vocabulary['ninth'], vocabulary['thirtieth'], vocabulary['thirty'] + 'PA2' + vocabulary['first']] numbers = {1: vocabulary['one'], 2: vocabulary['two'], 3: vocabulary['three'], 4: vocabulary['four'], 5: vocabulary['five'], 6: vocabulary['six'], 7: vocabulary['seven'], 8: vocabulary['eight'], 9: vocabulary['nine'], 10: vocabulary['ten'], 11: vocabulary['eleven'], 12: vocabulary['twelve'], 13: vocabulary['thirteen'], 14: vocabulary['fourteen'], 15: vocabulary['fifteen'], 16: vocabulary['sixteen'], 17: vocabulary['seventeen'], 18: vocabulary['eighteen'], 19: vocabulary['nineteen'], 20: vocabulary['twenty'], 30: vocabulary['thirty'], 40: vocabulary['forty'], 50: vocabulary['fifty'], 60: vocabulary['sixty'], 70: vocabulary['seventy'], 80: vocabulary['eighty'], 90: vocabulary['ninety'], 100: vocabulary['hundred'], 1000: vocabulary['thousand'], 1000000: vocabulary['million']}
def create_tables(cursor,fileName): file = open(fileName) sql = file.readline() while sql: cursor.execute(sql) sql = file.readline() file.close()
def create_tables(cursor, fileName): file = open(fileName) sql = file.readline() while sql: cursor.execute(sql) sql = file.readline() file.close()
# Date: 2020/11/05 # Author: Luis Marquez # Description: # ## # # def square(): #DEFINING EPSILON (MARGIN OF ERROR) epsilon = 0.01 #DEFINING STEP (HOW MUCH I CAN APPROXIMATE IN EACH STEP) step = epsilon**2 #DEFINFING ANSWER answer = 0.0 #DEFINING OBJECTIVE (TO CALCULATE SQUARE) objective = int(input(f"\nType an integer number.\nNumber: ")) print(f"\n") while ((abs(answer**2 - objective) >= epsilon) and (answer <= objective)): # print(f"abs(answer**2 - objective) = {abs(answer**2 - objective)}\nanswer = {answer}\n") answer += step if (abs(answer**2 - objective) >= epsilon): print(f"We didn't find the square of the number {objective}") else: print(f"The square of {objective} is {answer}") #RUN(): ON THIS FUNCTION WE'LL RUN OUR CODE def run(): square() #MAIN(): MAIN FUNCTION if __name__ == "__main__": run()
def square(): epsilon = 0.01 step = epsilon ** 2 answer = 0.0 objective = int(input(f'\nType an integer number.\nNumber: ')) print(f'\n') while abs(answer ** 2 - objective) >= epsilon and answer <= objective: answer += step if abs(answer ** 2 - objective) >= epsilon: print(f"We didn't find the square of the number {objective}") else: print(f'The square of {objective} is {answer}') def run(): square() if __name__ == '__main__': run()
#!/usr/bin/python3 with open('data') as f: lines = f.readlines() n = 0 for i in range(len(lines)-1): if int(lines[i]) < int(lines[i+1]): n += 1 print('python3, day 1, part 1 :', n)
with open('data') as f: lines = f.readlines() n = 0 for i in range(len(lines) - 1): if int(lines[i]) < int(lines[i + 1]): n += 1 print('python3, day 1, part 1 :', n)
height= float(input("Please Enter your height : ")) weight= int(input("Please Enter your weight : ")) BMI=weight/height ** 2 print("your BMI is : " + str(BMI))
height = float(input('Please Enter your height : ')) weight = int(input('Please Enter your weight : ')) bmi = weight / height ** 2 print('your BMI is : ' + str(BMI))
# rin, kn_x, kn_y = input().split(), input().split(), input().split() # def s(kn_t, axis): # b_s = list(()) # for e_i, e_v in enumerate([int(a) for a in kn_t]): # if e_i==0: b_s.append(e_v) # elif e_i==len(kn_t)-1: b_s.append(int(rin[axis])-e_v) # else: b_s.append(e_v-int(kn_t[e_i-1])) # b_s.sort(reverse=True) # return [b_s[0], b_s[1]] # b_sx, b_sy = s(kn_x, 0), s(kn_y, 1) # b_c = [b_sx[0]*b_sy[0], b_sx[0]*b_sy[1], b_sx[1]*b_sy[0], b_sx[1]*b_sy[1]] # b_c.sort(reverse=True) # print(b_c[0], b_c[1]) # Passed # 75% unknown error rin, kn_x, kn_y, areas = [int(a) for a in input().split()], [0], [0], list(()) kn_x.extend([int(b) for b in input().split()]) kn_y.extend([int(c) for c in input().split()]) kn_x.append(rin[0]) kn_y.append(rin[1]) for ex in range(1,len(kn_x)): for ey in range(1,len(kn_y)): areas.append((kn_x[ex]-kn_x[ex-1])*(kn_y[ey]-kn_y[ey-1])) areas.sort(reverse=True) print(areas[0], areas[1]) # Passed
(rin, kn_x, kn_y, areas) = ([int(a) for a in input().split()], [0], [0], list(())) kn_x.extend([int(b) for b in input().split()]) kn_y.extend([int(c) for c in input().split()]) kn_x.append(rin[0]) kn_y.append(rin[1]) for ex in range(1, len(kn_x)): for ey in range(1, len(kn_y)): areas.append((kn_x[ex] - kn_x[ex - 1]) * (kn_y[ey] - kn_y[ey - 1])) areas.sort(reverse=True) print(areas[0], areas[1])
# # PySNMP MIB module HPN-ICF-MAC-INFORMATION-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-MAC-INFORMATION-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:40:07 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint") hpnicfCommon, = mibBuilder.importSymbols("HPN-ICF-OID-MIB", "hpnicfCommon") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Unsigned32, IpAddress, Gauge32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, TimeTicks, Counter32, Bits, ObjectIdentity, Integer32, Counter64, NotificationType, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "IpAddress", "Gauge32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "TimeTicks", "Counter32", "Bits", "ObjectIdentity", "Integer32", "Counter64", "NotificationType", "ModuleIdentity") MacAddress, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "TextualConvention", "DisplayString") hpnicfMACInformation = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87)) hpnicfMACInformation.setRevisions(('2007-12-28 19:12',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: hpnicfMACInformation.setRevisionsDescriptions(('The initial version of this MIB file.',)) if mibBuilder.loadTexts: hpnicfMACInformation.setLastUpdated('200712281912Z') if mibBuilder.loadTexts: hpnicfMACInformation.setOrganization('') if mibBuilder.loadTexts: hpnicfMACInformation.setContactInfo('') if mibBuilder.loadTexts: hpnicfMACInformation.setDescription('This MIB file is to provide the definition of the MAC Information general configuration. MAC Information feature is used to make that the changed MAC information in the monitored device is knowable in remote monitoring device.') class HpnicfMACInfoWorkMode(TextualConvention, Integer32): description = 'The working mode of the MAC Information feature.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("trap", 1), ("syslog", 2)) hpnicfMACInformationObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1)) hpnicfMACInformationMibGlobal = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1)) hpnicfMACInformationMIBTableTroop = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 2)) hpnicfMACInformationMibTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3)) hpnicfMACInformationMibTrapExt = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4)) hpnicfMACInformationEnabled = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfMACInformationEnabled.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationEnabled.setDescription('The value is a global setting. The feature will not work until the value is set to enabled(1). If the value is set to disabled(2), the feature will stop working even there are interfaces that have been enabled the feature.') hpnicfMACInformationcSendInterval = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 20000)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfMACInformationcSendInterval.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationcSendInterval.setDescription('The maximum interval that the device generate syslogs or traps. The unit is second.') hpnicfMACInformationLearntMACNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfMACInformationLearntMACNum.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationLearntMACNum.setDescription('The number of MAC addresses that learnt by the device since the hpnicfMACInformationEnabled is set to enabled(1) and hpnicfMACLearntEnable is set to enabled(1) at least on one interface. If the hpnicfMACInformationEnabled is set to disabled(2), the object will always return 0.') hpnicfMACInformationRemovedMACNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfMACInformationRemovedMACNum.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationRemovedMACNum.setDescription('The number of MAC addresses that removed by the device since the hpnicfMACInformationEnabled is set to enabled(1) and hpnicfMACRemovedEnable is set to enabled(1) at least on one interface. If the hpnicfMACInformationEnabled is set to disabled(2), the object will always return 0.') hpnicfMACInformationTrapSendNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfMACInformationTrapSendNum.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationTrapSendNum.setDescription('The number of traps that have been generated. This object is valid only when the hpnicfMACInfomationWorkMode is set to trap(1). If the hpnicfMACInfomationWorkMode is set to syslog(2), the object will always return 0.') hpnicfMACInformationSyslogSendNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfMACInformationSyslogSendNum.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationSyslogSendNum.setDescription('The number of syslogs that have been generated. This object is valid only when the hpnicfMACInfomationWorkMode is set to syslog(2). If the hpnicfMACInfomationWorkMode is set to trap(1), the object will always return 0.') hpnicfMACInformationCacheLen = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 1000)).clone(50)).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfMACInformationCacheLen.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationCacheLen.setDescription('The maximum queue lenth used to cache the changed MAC addresses information in the monitored device. If the value is set to 0, syslog or trap will generate as soon as there is a MAC address learnt or removed.') hpnicfMACInfomationWorkMode = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 8), HpnicfMACInfoWorkMode()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfMACInfomationWorkMode.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfomationWorkMode.setDescription('The working mode of MAC Information feature. If the object is set to trap(1), the device will use trap mode to notify the MAC address information and all properties of trap interrelated is valid. If the object is set to syslog(2), the device will use syslog mode to notify the MAC address information and all properties of trap interrelated is invalid.') hpnicfMACInfomationIfTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 2, 1), ) if mibBuilder.loadTexts: hpnicfMACInfomationIfTable.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfomationIfTable.setDescription('The table is used to enable or disable the MAC Information feature on interfaces.') hpnicfMACInfomationIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 2, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: hpnicfMACInfomationIfEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfomationIfEntry.setDescription('The entry of hpnicfMACInfomationIfTable.') hpnicfMACLearntEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfMACLearntEnable.setStatus('current') if mibBuilder.loadTexts: hpnicfMACLearntEnable.setDescription('If the object is set to enabled(1) on interface, the device will cache the MAC address information that learnt on the interface.') hpnicfMACRemovedEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfMACRemovedEnable.setStatus('current') if mibBuilder.loadTexts: hpnicfMACRemovedEnable.setDescription('If the object is set to enable(1) on interface, the device will cache the MAC address information that removed on the interface.') hpnicfMACInformationTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3, 0)) hpnicfMACInformationChangedTrap = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3, 0, 1)).setObjects(("HPN-ICF-MAC-INFORMATION-MIB", "hpnicfMACInfoTrapIndex"), ("HPN-ICF-MAC-INFORMATION-MIB", "hpnicfMACInfoTrapCount"), ("HPN-ICF-MAC-INFORMATION-MIB", "hpnicfMACInfoTrapMsg")) if mibBuilder.loadTexts: hpnicfMACInformationChangedTrap.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationChangedTrap.setDescription('When the cached number of MAC address information is reached the value specified by hpnicfMACInformationCacheLen, trap is generated and is sent to the remote monitoring device. The trap is also generated when the amount of time elapsed since the previous notification is greater than the interval value specified by hpnicfMACInformationcSendInterval and there is at least one cached MAC address information learnt or removed. The object is valid only when hpnicfMACInfomationWorkMode is set to trap(1). When the hpnicfMACInfomationWorkMode is set to syslog(2), No trap will be generated even hpnicfMACInformationEnabled is set to enabled(1) and the feature is enabled on interface.') hpnicfMACInformationTrapObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3, 2)) hpnicfMACInfoTrapIndex = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3, 2, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfMACInfoTrapIndex.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapIndex.setDescription('The sequence number of trap information. When it reaches the maximum value, it should be set to 1.') hpnicfMACInfoTrapCount = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3, 2, 2), Unsigned32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfMACInfoTrapCount.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapCount.setDescription('The cell number of the current trap information. The trap message may consists of more than one MAC address information. Each of the one MAC address information in one trap is called cell.') hpnicfMACInfoTrapMsg = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3, 2, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 254))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfMACInfoTrapMsg.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsg.setDescription("This object is the MAC information that learnt or removed in the monitored device. It can consists of more than one MAC information in the object. This object is in the format of '<cell1><cell2>...'. Each cell consists of 12 octets in the format of '<operationType><VLAN><MAC><MACtype><ifIndex>'. <operationType> is the reason type of MAC address changed and have size of 1 octet. It only supports the following values. 1 - MAC learnt. 2 - MAC removed. <VLAN> is the vlan number that correspond to the MAC address in MAC address table and has size of 2 octet. <MAC> is the MAC address and has size of 6 octets. <MACtype> is the MAC address type and has size of 1 octet. It only supports the following values. 0 - Unknown 1 - Learnt 2 - Config dynamic 3 - Config static 4 - Blackhole 5 - Security 6 - 802.1x 7 - MAC authentication 8 - Voice VLAN 9 - Reserved <ifIndex> is the index of the interface where the MAC address is learnt or removed and has size of 2 octets.") hpnicfMACInformationTrapsExt = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 0)) hpnicfMACInformationChangedTrapExt = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 0, 1)).setObjects(("HPN-ICF-MAC-INFORMATION-MIB", "hpnicfMACInfoTrapVerExt"), ("HPN-ICF-MAC-INFORMATION-MIB", "hpnicfMACInfoTrapIndexExt"), ("HPN-ICF-MAC-INFORMATION-MIB", "hpnicfMACInfoTrapCountExt"), ("HPN-ICF-MAC-INFORMATION-MIB", "hpnicfMACInfoTrapMsgExt")) if mibBuilder.loadTexts: hpnicfMACInformationChangedTrapExt.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationChangedTrapExt.setDescription('When the cached number of MAC address information is reached the value specified by hpnicfMACInformationCacheLen, trap is generated and is sent to the remote monitoring device. The trap is also generated when the amount of time elapsed since the previous notification is greater than the interval value specified by hpnicfMACInformationcSendInterval and there is at least one cached MAC address information learnt or removed. The object is valid only when hpnicfMACInfomationWorkMode is set to trap(1). When the hpnicfMACInfomationWorkMode is set to syslog(2), No trap will be generated even hpnicfMACInformationEnabled is set to enabled(1) and the feature is enabled on interface.') hpnicfMACInformationMovedTrap = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 0, 2)).setObjects(("HPN-ICF-MAC-INFORMATION-MIB", "hpnicfMACInfoTrapMsgMovedAddress"), ("HPN-ICF-MAC-INFORMATION-MIB", "hpnicfMACInfoTrapMsgMovedVlan"), ("HPN-ICF-MAC-INFORMATION-MIB", "hpnicfMACInfoTrapMsgMovedFromIf"), ("HPN-ICF-MAC-INFORMATION-MIB", "hpnicfMACInfoTrapMsgMovedToIf"), ("HPN-ICF-MAC-INFORMATION-MIB", "hpnicfMACInfoTrapMsgMovedCount")) if mibBuilder.loadTexts: hpnicfMACInformationMovedTrap.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationMovedTrap.setDescription('When the MAC address has been moved to another interface, trap is generated and is sent to the remote monitoring device.') hpnicfMACInformationTrapObjectsExt = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2)) hpnicfMACInfoTrapVerExt = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 1), Unsigned32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfMACInfoTrapVerExt.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapVerExt.setDescription('The version of trap information.') hpnicfMACInfoTrapIndexExt = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfMACInfoTrapIndexExt.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapIndexExt.setDescription('The sequence number of trap information. When it reaches the maximum value, it should be set to 1.') hpnicfMACInfoTrapCountExt = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 3), Unsigned32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfMACInfoTrapCountExt.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapCountExt.setDescription('The cell number of the current trap information. The trap message may consists of more than one MAC address information. Each of the one MAC address information in one trap is called cell.') hpnicfMACInfoTrapMsgExt = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 254))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgExt.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgExt.setDescription("This object is the MAC information that learnt or removed in the monitored device. It can consists of more than one MAC information in the object. This object is in the format of '<cell1><cell2>...'. Each cell consists of 14 octets in the format of '<operationType><VLAN><MAC><MACtype><ifIndex>'. <operationType> is the reason type of MAC address changed and have size of 1 octet. It only supports the following values. 1 - MAC learnt. 2 - MAC removed. <VLAN> is the vlan number that correspond to the MAC address in MAC address table and has size of 2 octet. <MAC> is the MAC address and has size of 6 octets. <MACtype> is the MAC address type and has size of 1 octet. It only supports the following values. 0 - Unknown 1 - Learnt 2 - Config dynamic 3 - Config static 4 - Blackhole 5 - Security 6 - 802.1x 7 - MAC authentication 8 - Voice VLAN 9 - Reserved <ifIndex> is the index of the interface where the MAC address is learnt or removed and has size of 4 octets.") hpnicfMACInfoTrapMsgMovedAddress = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 5), MacAddress()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedAddress.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedAddress.setDescription('The MAC address that is moved between interfaces.') hpnicfMACInfoTrapMsgMovedVlan = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedVlan.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedVlan.setDescription('The VLAN number in which the MAC address is moved.') hpnicfMACInfoTrapMsgMovedFromIf = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedFromIf.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedFromIf.setDescription('The index of the interface from which the MAC address is moved.') hpnicfMACInfoTrapMsgMovedToIf = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedToIf.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedToIf.setDescription('The index of the interface to which the MAC address is moved.') hpnicfMACInfoTrapMsgMovedCount = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 9), Counter32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedCount.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedCount.setDescription('The times for which the MAC address has been moved between the interfaces.') mibBuilder.exportSymbols("HPN-ICF-MAC-INFORMATION-MIB", hpnicfMACInformationMovedTrap=hpnicfMACInformationMovedTrap, hpnicfMACInfoTrapMsgMovedCount=hpnicfMACInfoTrapMsgMovedCount, hpnicfMACInformationEnabled=hpnicfMACInformationEnabled, hpnicfMACInformationTraps=hpnicfMACInformationTraps, hpnicfMACInformationTrapsExt=hpnicfMACInformationTrapsExt, hpnicfMACInfoTrapMsgMovedVlan=hpnicfMACInfoTrapMsgMovedVlan, hpnicfMACInformationLearntMACNum=hpnicfMACInformationLearntMACNum, hpnicfMACInfoTrapMsg=hpnicfMACInfoTrapMsg, hpnicfMACInformationMibGlobal=hpnicfMACInformationMibGlobal, hpnicfMACInformationRemovedMACNum=hpnicfMACInformationRemovedMACNum, hpnicfMACInfoTrapMsgMovedToIf=hpnicfMACInfoTrapMsgMovedToIf, hpnicfMACInformationMIBTableTroop=hpnicfMACInformationMIBTableTroop, hpnicfMACInformationTrapSendNum=hpnicfMACInformationTrapSendNum, hpnicfMACRemovedEnable=hpnicfMACRemovedEnable, hpnicfMACInformationChangedTrapExt=hpnicfMACInformationChangedTrapExt, hpnicfMACInfoTrapCountExt=hpnicfMACInfoTrapCountExt, hpnicfMACInfoTrapIndexExt=hpnicfMACInfoTrapIndexExt, hpnicfMACInfoTrapMsgMovedAddress=hpnicfMACInfoTrapMsgMovedAddress, hpnicfMACInformationSyslogSendNum=hpnicfMACInformationSyslogSendNum, hpnicfMACInfomationIfTable=hpnicfMACInfomationIfTable, hpnicfMACInfoTrapVerExt=hpnicfMACInfoTrapVerExt, hpnicfMACInfoTrapMsgMovedFromIf=hpnicfMACInfoTrapMsgMovedFromIf, hpnicfMACInformationTrapObjectsExt=hpnicfMACInformationTrapObjectsExt, hpnicfMACInfomationWorkMode=hpnicfMACInfomationWorkMode, hpnicfMACInformationMibTrap=hpnicfMACInformationMibTrap, hpnicfMACInfomationIfEntry=hpnicfMACInfomationIfEntry, hpnicfMACInfoTrapCount=hpnicfMACInfoTrapCount, hpnicfMACInformation=hpnicfMACInformation, hpnicfMACInformationTrapObjects=hpnicfMACInformationTrapObjects, hpnicfMACLearntEnable=hpnicfMACLearntEnable, hpnicfMACInformationObjects=hpnicfMACInformationObjects, hpnicfMACInformationChangedTrap=hpnicfMACInformationChangedTrap, PYSNMP_MODULE_ID=hpnicfMACInformation, hpnicfMACInformationMibTrapExt=hpnicfMACInformationMibTrapExt, hpnicfMACInformationCacheLen=hpnicfMACInformationCacheLen, hpnicfMACInfoTrapMsgExt=hpnicfMACInfoTrapMsgExt, hpnicfMACInformationcSendInterval=hpnicfMACInformationcSendInterval, hpnicfMACInfoTrapIndex=hpnicfMACInfoTrapIndex, HpnicfMACInfoWorkMode=HpnicfMACInfoWorkMode)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_size_constraint, constraints_intersection, constraints_union, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint') (hpnicf_common,) = mibBuilder.importSymbols('HPN-ICF-OID-MIB', 'hpnicfCommon') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (unsigned32, ip_address, gauge32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, time_ticks, counter32, bits, object_identity, integer32, counter64, notification_type, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'IpAddress', 'Gauge32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'TimeTicks', 'Counter32', 'Bits', 'ObjectIdentity', 'Integer32', 'Counter64', 'NotificationType', 'ModuleIdentity') (mac_address, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'MacAddress', 'TextualConvention', 'DisplayString') hpnicf_mac_information = module_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87)) hpnicfMACInformation.setRevisions(('2007-12-28 19:12',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: hpnicfMACInformation.setRevisionsDescriptions(('The initial version of this MIB file.',)) if mibBuilder.loadTexts: hpnicfMACInformation.setLastUpdated('200712281912Z') if mibBuilder.loadTexts: hpnicfMACInformation.setOrganization('') if mibBuilder.loadTexts: hpnicfMACInformation.setContactInfo('') if mibBuilder.loadTexts: hpnicfMACInformation.setDescription('This MIB file is to provide the definition of the MAC Information general configuration. MAC Information feature is used to make that the changed MAC information in the monitored device is knowable in remote monitoring device.') class Hpnicfmacinfoworkmode(TextualConvention, Integer32): description = 'The working mode of the MAC Information feature.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('trap', 1), ('syslog', 2)) hpnicf_mac_information_objects = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1)) hpnicf_mac_information_mib_global = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1)) hpnicf_mac_information_mib_table_troop = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 2)) hpnicf_mac_information_mib_trap = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3)) hpnicf_mac_information_mib_trap_ext = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4)) hpnicf_mac_information_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfMACInformationEnabled.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationEnabled.setDescription('The value is a global setting. The feature will not work until the value is set to enabled(1). If the value is set to disabled(2), the feature will stop working even there are interfaces that have been enabled the feature.') hpnicf_mac_informationc_send_interval = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 20000)).clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfMACInformationcSendInterval.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationcSendInterval.setDescription('The maximum interval that the device generate syslogs or traps. The unit is second.') hpnicf_mac_information_learnt_mac_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfMACInformationLearntMACNum.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationLearntMACNum.setDescription('The number of MAC addresses that learnt by the device since the hpnicfMACInformationEnabled is set to enabled(1) and hpnicfMACLearntEnable is set to enabled(1) at least on one interface. If the hpnicfMACInformationEnabled is set to disabled(2), the object will always return 0.') hpnicf_mac_information_removed_mac_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfMACInformationRemovedMACNum.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationRemovedMACNum.setDescription('The number of MAC addresses that removed by the device since the hpnicfMACInformationEnabled is set to enabled(1) and hpnicfMACRemovedEnable is set to enabled(1) at least on one interface. If the hpnicfMACInformationEnabled is set to disabled(2), the object will always return 0.') hpnicf_mac_information_trap_send_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfMACInformationTrapSendNum.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationTrapSendNum.setDescription('The number of traps that have been generated. This object is valid only when the hpnicfMACInfomationWorkMode is set to trap(1). If the hpnicfMACInfomationWorkMode is set to syslog(2), the object will always return 0.') hpnicf_mac_information_syslog_send_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfMACInformationSyslogSendNum.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationSyslogSendNum.setDescription('The number of syslogs that have been generated. This object is valid only when the hpnicfMACInfomationWorkMode is set to syslog(2). If the hpnicfMACInfomationWorkMode is set to trap(1), the object will always return 0.') hpnicf_mac_information_cache_len = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 1000)).clone(50)).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfMACInformationCacheLen.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationCacheLen.setDescription('The maximum queue lenth used to cache the changed MAC addresses information in the monitored device. If the value is set to 0, syslog or trap will generate as soon as there is a MAC address learnt or removed.') hpnicf_mac_infomation_work_mode = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 1, 8), hpnicf_mac_info_work_mode()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfMACInfomationWorkMode.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfomationWorkMode.setDescription('The working mode of MAC Information feature. If the object is set to trap(1), the device will use trap mode to notify the MAC address information and all properties of trap interrelated is valid. If the object is set to syslog(2), the device will use syslog mode to notify the MAC address information and all properties of trap interrelated is invalid.') hpnicf_mac_infomation_if_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 2, 1)) if mibBuilder.loadTexts: hpnicfMACInfomationIfTable.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfomationIfTable.setDescription('The table is used to enable or disable the MAC Information feature on interfaces.') hpnicf_mac_infomation_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 2, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: hpnicfMACInfomationIfEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfomationIfEntry.setDescription('The entry of hpnicfMACInfomationIfTable.') hpnicf_mac_learnt_enable = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 2, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfMACLearntEnable.setStatus('current') if mibBuilder.loadTexts: hpnicfMACLearntEnable.setDescription('If the object is set to enabled(1) on interface, the device will cache the MAC address information that learnt on the interface.') hpnicf_mac_removed_enable = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 2, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfMACRemovedEnable.setStatus('current') if mibBuilder.loadTexts: hpnicfMACRemovedEnable.setDescription('If the object is set to enable(1) on interface, the device will cache the MAC address information that removed on the interface.') hpnicf_mac_information_traps = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3, 0)) hpnicf_mac_information_changed_trap = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3, 0, 1)).setObjects(('HPN-ICF-MAC-INFORMATION-MIB', 'hpnicfMACInfoTrapIndex'), ('HPN-ICF-MAC-INFORMATION-MIB', 'hpnicfMACInfoTrapCount'), ('HPN-ICF-MAC-INFORMATION-MIB', 'hpnicfMACInfoTrapMsg')) if mibBuilder.loadTexts: hpnicfMACInformationChangedTrap.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationChangedTrap.setDescription('When the cached number of MAC address information is reached the value specified by hpnicfMACInformationCacheLen, trap is generated and is sent to the remote monitoring device. The trap is also generated when the amount of time elapsed since the previous notification is greater than the interval value specified by hpnicfMACInformationcSendInterval and there is at least one cached MAC address information learnt or removed. The object is valid only when hpnicfMACInfomationWorkMode is set to trap(1). When the hpnicfMACInfomationWorkMode is set to syslog(2), No trap will be generated even hpnicfMACInformationEnabled is set to enabled(1) and the feature is enabled on interface.') hpnicf_mac_information_trap_objects = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3, 2)) hpnicf_mac_info_trap_index = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3, 2, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfMACInfoTrapIndex.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapIndex.setDescription('The sequence number of trap information. When it reaches the maximum value, it should be set to 1.') hpnicf_mac_info_trap_count = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3, 2, 2), unsigned32()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfMACInfoTrapCount.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapCount.setDescription('The cell number of the current trap information. The trap message may consists of more than one MAC address information. Each of the one MAC address information in one trap is called cell.') hpnicf_mac_info_trap_msg = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 3, 2, 3), octet_string().subtype(subtypeSpec=value_size_constraint(1, 254))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsg.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsg.setDescription("This object is the MAC information that learnt or removed in the monitored device. It can consists of more than one MAC information in the object. This object is in the format of '<cell1><cell2>...'. Each cell consists of 12 octets in the format of '<operationType><VLAN><MAC><MACtype><ifIndex>'. <operationType> is the reason type of MAC address changed and have size of 1 octet. It only supports the following values. 1 - MAC learnt. 2 - MAC removed. <VLAN> is the vlan number that correspond to the MAC address in MAC address table and has size of 2 octet. <MAC> is the MAC address and has size of 6 octets. <MACtype> is the MAC address type and has size of 1 octet. It only supports the following values. 0 - Unknown 1 - Learnt 2 - Config dynamic 3 - Config static 4 - Blackhole 5 - Security 6 - 802.1x 7 - MAC authentication 8 - Voice VLAN 9 - Reserved <ifIndex> is the index of the interface where the MAC address is learnt or removed and has size of 2 octets.") hpnicf_mac_information_traps_ext = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 0)) hpnicf_mac_information_changed_trap_ext = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 0, 1)).setObjects(('HPN-ICF-MAC-INFORMATION-MIB', 'hpnicfMACInfoTrapVerExt'), ('HPN-ICF-MAC-INFORMATION-MIB', 'hpnicfMACInfoTrapIndexExt'), ('HPN-ICF-MAC-INFORMATION-MIB', 'hpnicfMACInfoTrapCountExt'), ('HPN-ICF-MAC-INFORMATION-MIB', 'hpnicfMACInfoTrapMsgExt')) if mibBuilder.loadTexts: hpnicfMACInformationChangedTrapExt.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationChangedTrapExt.setDescription('When the cached number of MAC address information is reached the value specified by hpnicfMACInformationCacheLen, trap is generated and is sent to the remote monitoring device. The trap is also generated when the amount of time elapsed since the previous notification is greater than the interval value specified by hpnicfMACInformationcSendInterval and there is at least one cached MAC address information learnt or removed. The object is valid only when hpnicfMACInfomationWorkMode is set to trap(1). When the hpnicfMACInfomationWorkMode is set to syslog(2), No trap will be generated even hpnicfMACInformationEnabled is set to enabled(1) and the feature is enabled on interface.') hpnicf_mac_information_moved_trap = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 0, 2)).setObjects(('HPN-ICF-MAC-INFORMATION-MIB', 'hpnicfMACInfoTrapMsgMovedAddress'), ('HPN-ICF-MAC-INFORMATION-MIB', 'hpnicfMACInfoTrapMsgMovedVlan'), ('HPN-ICF-MAC-INFORMATION-MIB', 'hpnicfMACInfoTrapMsgMovedFromIf'), ('HPN-ICF-MAC-INFORMATION-MIB', 'hpnicfMACInfoTrapMsgMovedToIf'), ('HPN-ICF-MAC-INFORMATION-MIB', 'hpnicfMACInfoTrapMsgMovedCount')) if mibBuilder.loadTexts: hpnicfMACInformationMovedTrap.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInformationMovedTrap.setDescription('When the MAC address has been moved to another interface, trap is generated and is sent to the remote monitoring device.') hpnicf_mac_information_trap_objects_ext = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2)) hpnicf_mac_info_trap_ver_ext = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 1), unsigned32()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfMACInfoTrapVerExt.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapVerExt.setDescription('The version of trap information.') hpnicf_mac_info_trap_index_ext = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfMACInfoTrapIndexExt.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapIndexExt.setDescription('The sequence number of trap information. When it reaches the maximum value, it should be set to 1.') hpnicf_mac_info_trap_count_ext = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 3), unsigned32()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfMACInfoTrapCountExt.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapCountExt.setDescription('The cell number of the current trap information. The trap message may consists of more than one MAC address information. Each of the one MAC address information in one trap is called cell.') hpnicf_mac_info_trap_msg_ext = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 4), octet_string().subtype(subtypeSpec=value_size_constraint(1, 254))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgExt.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgExt.setDescription("This object is the MAC information that learnt or removed in the monitored device. It can consists of more than one MAC information in the object. This object is in the format of '<cell1><cell2>...'. Each cell consists of 14 octets in the format of '<operationType><VLAN><MAC><MACtype><ifIndex>'. <operationType> is the reason type of MAC address changed and have size of 1 octet. It only supports the following values. 1 - MAC learnt. 2 - MAC removed. <VLAN> is the vlan number that correspond to the MAC address in MAC address table and has size of 2 octet. <MAC> is the MAC address and has size of 6 octets. <MACtype> is the MAC address type and has size of 1 octet. It only supports the following values. 0 - Unknown 1 - Learnt 2 - Config dynamic 3 - Config static 4 - Blackhole 5 - Security 6 - 802.1x 7 - MAC authentication 8 - Voice VLAN 9 - Reserved <ifIndex> is the index of the interface where the MAC address is learnt or removed and has size of 4 octets.") hpnicf_mac_info_trap_msg_moved_address = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 5), mac_address()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedAddress.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedAddress.setDescription('The MAC address that is moved between interfaces.') hpnicf_mac_info_trap_msg_moved_vlan = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedVlan.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedVlan.setDescription('The VLAN number in which the MAC address is moved.') hpnicf_mac_info_trap_msg_moved_from_if = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedFromIf.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedFromIf.setDescription('The index of the interface from which the MAC address is moved.') hpnicf_mac_info_trap_msg_moved_to_if = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 8), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedToIf.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedToIf.setDescription('The index of the interface to which the MAC address is moved.') hpnicf_mac_info_trap_msg_moved_count = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 87, 1, 4, 2, 9), counter32()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedCount.setStatus('current') if mibBuilder.loadTexts: hpnicfMACInfoTrapMsgMovedCount.setDescription('The times for which the MAC address has been moved between the interfaces.') mibBuilder.exportSymbols('HPN-ICF-MAC-INFORMATION-MIB', hpnicfMACInformationMovedTrap=hpnicfMACInformationMovedTrap, hpnicfMACInfoTrapMsgMovedCount=hpnicfMACInfoTrapMsgMovedCount, hpnicfMACInformationEnabled=hpnicfMACInformationEnabled, hpnicfMACInformationTraps=hpnicfMACInformationTraps, hpnicfMACInformationTrapsExt=hpnicfMACInformationTrapsExt, hpnicfMACInfoTrapMsgMovedVlan=hpnicfMACInfoTrapMsgMovedVlan, hpnicfMACInformationLearntMACNum=hpnicfMACInformationLearntMACNum, hpnicfMACInfoTrapMsg=hpnicfMACInfoTrapMsg, hpnicfMACInformationMibGlobal=hpnicfMACInformationMibGlobal, hpnicfMACInformationRemovedMACNum=hpnicfMACInformationRemovedMACNum, hpnicfMACInfoTrapMsgMovedToIf=hpnicfMACInfoTrapMsgMovedToIf, hpnicfMACInformationMIBTableTroop=hpnicfMACInformationMIBTableTroop, hpnicfMACInformationTrapSendNum=hpnicfMACInformationTrapSendNum, hpnicfMACRemovedEnable=hpnicfMACRemovedEnable, hpnicfMACInformationChangedTrapExt=hpnicfMACInformationChangedTrapExt, hpnicfMACInfoTrapCountExt=hpnicfMACInfoTrapCountExt, hpnicfMACInfoTrapIndexExt=hpnicfMACInfoTrapIndexExt, hpnicfMACInfoTrapMsgMovedAddress=hpnicfMACInfoTrapMsgMovedAddress, hpnicfMACInformationSyslogSendNum=hpnicfMACInformationSyslogSendNum, hpnicfMACInfomationIfTable=hpnicfMACInfomationIfTable, hpnicfMACInfoTrapVerExt=hpnicfMACInfoTrapVerExt, hpnicfMACInfoTrapMsgMovedFromIf=hpnicfMACInfoTrapMsgMovedFromIf, hpnicfMACInformationTrapObjectsExt=hpnicfMACInformationTrapObjectsExt, hpnicfMACInfomationWorkMode=hpnicfMACInfomationWorkMode, hpnicfMACInformationMibTrap=hpnicfMACInformationMibTrap, hpnicfMACInfomationIfEntry=hpnicfMACInfomationIfEntry, hpnicfMACInfoTrapCount=hpnicfMACInfoTrapCount, hpnicfMACInformation=hpnicfMACInformation, hpnicfMACInformationTrapObjects=hpnicfMACInformationTrapObjects, hpnicfMACLearntEnable=hpnicfMACLearntEnable, hpnicfMACInformationObjects=hpnicfMACInformationObjects, hpnicfMACInformationChangedTrap=hpnicfMACInformationChangedTrap, PYSNMP_MODULE_ID=hpnicfMACInformation, hpnicfMACInformationMibTrapExt=hpnicfMACInformationMibTrapExt, hpnicfMACInformationCacheLen=hpnicfMACInformationCacheLen, hpnicfMACInfoTrapMsgExt=hpnicfMACInfoTrapMsgExt, hpnicfMACInformationcSendInterval=hpnicfMACInformationcSendInterval, hpnicfMACInfoTrapIndex=hpnicfMACInfoTrapIndex, HpnicfMACInfoWorkMode=HpnicfMACInfoWorkMode)
# -*- coding:utf-8 -*- # -------------------------------------------------------- # Copyright (C), 2016-2021, lizhe, All rights reserved # -------------------------------------------------------- # @Name: constant.py # @Author: lizhe # @Created: 2021/11/18 - 22:08 # -------------------------------------------------------- dlc = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 12: 9, 16: 10, 20: 11, 24: 12, 32: 13, 48: 14, 64: 15 }
dlc = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 12: 9, 16: 10, 20: 11, 24: 12, 32: 13, 48: 14, 64: 15}
# Fibonacci numbers # 1, 1, 2, 3, 5, 8, 13, 21, ... def fibonacci(limit): nums = [] currnum = 0 nextnum = 1 while currnum < limit: currnum, nextnum = nextnum, nextnum + currnum nums.append(currnum) return nums print('via lists') for n in fibonacci(100): print(n, end=', ') print() def fibonacci_co(): currnum = 0 nextnum = 1 while True: currnum, nextnum = nextnum, nextnum + currnum yield currnum print('via yield') for n in fibonacci_co(): if n > 5000: break print(n, end=', ')
def fibonacci(limit): nums = [] currnum = 0 nextnum = 1 while currnum < limit: (currnum, nextnum) = (nextnum, nextnum + currnum) nums.append(currnum) return nums print('via lists') for n in fibonacci(100): print(n, end=', ') print() def fibonacci_co(): currnum = 0 nextnum = 1 while True: (currnum, nextnum) = (nextnum, nextnum + currnum) yield currnum print('via yield') for n in fibonacci_co(): if n > 5000: break print(n, end=', ')
text = "X-DSPAM-Confidence: 0.8475" fiveposition = text.find("5") # print(fiveposition) zeroposition = text.find("0") # print(zeroposition) number = text[zeroposition:] print(float(number))
text = 'X-DSPAM-Confidence: 0.8475' fiveposition = text.find('5') zeroposition = text.find('0') number = text[zeroposition:] print(float(number))
MORSE_ALPHABET = { "A": ".-", "B": "-...", "C": "-.-.", "D": "-..", "E": ".", "F": "..-.", "G": "--.", "H": "....", "I": "..", "J": ".---", "K": "-.-", "L": ".-..", "M": "--", "N": "-.", "O": "---", "P": ".--.", "Q": "--.-", "R": ".-.", "S": "...", "T": "-", "U": "..-", "V": "...-", "W": ".--", "X": "-..-", "Y": "-.--", "Z": "--..", " ": "/", "1": ".----", "2": "..---", "3": "...--", "4": "....-", "5": ".....", "6": "-....", "7": "--...", "8": "---..", "9": "----.", "0": "-----", ".": ".-.-.-", ",": "--..--", ":": "---...", "?": "..--..", "'": ".----.", "-": "-....-", "/": "-..-.", "@": ".--.-.", "=": "-...-", } INVERSE_MORSE_ALPHABET = dict((v, k) for (k, v) in MORSE_ALPHABET.items()) def decode_morse(code, position_in_string=0): if position_in_string < len(code): morse_letter = "" for key, char in enumerate(code[position_in_string:]): if char == " ": position_in_string = key + position_in_string + 1 letter = INVERSE_MORSE_ALPHABET[morse_letter] return letter + decode_morse(code, position_in_string) else: morse_letter += char else: return "" def encode_morse(message): encoded_message = "" for char in message: encoded_message += MORSE_ALPHABET.get(char.upper(), "") + " " return encoded_message
morse_alphabet = {'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', 'F': '..-.', 'G': '--.', 'H': '....', 'I': '..', 'J': '.---', 'K': '-.-', 'L': '.-..', 'M': '--', 'N': '-.', 'O': '---', 'P': '.--.', 'Q': '--.-', 'R': '.-.', 'S': '...', 'T': '-', 'U': '..-', 'V': '...-', 'W': '.--', 'X': '-..-', 'Y': '-.--', 'Z': '--..', ' ': '/', '1': '.----', '2': '..---', '3': '...--', '4': '....-', '5': '.....', '6': '-....', '7': '--...', '8': '---..', '9': '----.', '0': '-----', '.': '.-.-.-', ',': '--..--', ':': '---...', '?': '..--..', "'": '.----.', '-': '-....-', '/': '-..-.', '@': '.--.-.', '=': '-...-'} inverse_morse_alphabet = dict(((v, k) for (k, v) in MORSE_ALPHABET.items())) def decode_morse(code, position_in_string=0): if position_in_string < len(code): morse_letter = '' for (key, char) in enumerate(code[position_in_string:]): if char == ' ': position_in_string = key + position_in_string + 1 letter = INVERSE_MORSE_ALPHABET[morse_letter] return letter + decode_morse(code, position_in_string) else: morse_letter += char else: return '' def encode_morse(message): encoded_message = '' for char in message: encoded_message += MORSE_ALPHABET.get(char.upper(), '') + ' ' return encoded_message
cookies = input("hoeveel koekjes wil je maken") sugar = (1.5 / 48) * int(cookies) butter = (1 / 48) * int(cookies) flour = (2.75 / 48) * int(cookies) print ("suiker: ", sugar, "\n", "boter: ", butter, "\n", "bloem: ", flour)
cookies = input('hoeveel koekjes wil je maken') sugar = 1.5 / 48 * int(cookies) butter = 1 / 48 * int(cookies) flour = 2.75 / 48 * int(cookies) print('suiker: ', sugar, '\n', 'boter: ', butter, '\n', 'bloem: ', flour)
__author__ = "Sunrit Jana" __email__ = "warriordefenderz@gmail.com" __version__ = "0.1.0" __license__ = "MIT License" __copyright__ = "Copyright 2021 Sunrit Jana"
__author__ = 'Sunrit Jana' __email__ = 'warriordefenderz@gmail.com' __version__ = '0.1.0' __license__ = 'MIT License' __copyright__ = 'Copyright 2021 Sunrit Jana'
def swap(array, i, j): temp = array[i] array[i] = array[j] array[j] = temp def bubble_sort(array): for i in range(len(array)): for j in range(len(array)-1, i, -1): if array[j-1] > array[j]: swap(array, j-1, j) return array if __name__ == "__main__": print(bubble_sort([5,4,8,10,6,3,2,1]))
def swap(array, i, j): temp = array[i] array[i] = array[j] array[j] = temp def bubble_sort(array): for i in range(len(array)): for j in range(len(array) - 1, i, -1): if array[j - 1] > array[j]: swap(array, j - 1, j) return array if __name__ == '__main__': print(bubble_sort([5, 4, 8, 10, 6, 3, 2, 1]))
__packagename__ = "sira" __description__ = "Systemic Infrastructure Resilience Analysis" __url__ = "https://github.com/GeoscienceAustralia/sira" __version__ = "0.1.0" __author__ = "Geoscience Australia" __email__ = "maruf.rahman@ga.gov.au" __license__ = "Apache License, Version 2.0" __copyright__ = "2020 %s" % __author__
__packagename__ = 'sira' __description__ = 'Systemic Infrastructure Resilience Analysis' __url__ = 'https://github.com/GeoscienceAustralia/sira' __version__ = '0.1.0' __author__ = 'Geoscience Australia' __email__ = 'maruf.rahman@ga.gov.au' __license__ = 'Apache License, Version 2.0' __copyright__ = '2020 %s' % __author__
def singleton(clazz): assert clazz assert type(clazz) == type clazz.instance = clazz() clazz.INSTANCE = clazz.instance return clazz #
def singleton(clazz): assert clazz assert type(clazz) == type clazz.instance = clazz() clazz.INSTANCE = clazz.instance return clazz
class StartupPlugin: pass class EventHandlerPlugin: pass class TemplatePlugin: pass class SettingsPlugin: pass class SimpleApiPlugin: pass class AssetPlugin: pass
class Startupplugin: pass class Eventhandlerplugin: pass class Templateplugin: pass class Settingsplugin: pass class Simpleapiplugin: pass class Assetplugin: pass
#!/usr/bin/env python3 -tt print(2+3) print("hello") print("after commit")
print(2 + 3) print('hello') print('after commit')
#start reading file with datarefs file = open("datarefex.txt") line = file.read().replace("\n", "\n") print(len(line)) #end reading file with datarefs #convert into proper amount of parts separated_string = line.splitlines() print(len(separated_string)) #end string2 = '"' string ='": { "prefix": "' string4 = '", "body": [ "' string3 = '" ], "description": "WIP" },' my_new_list = [string2 + x + string + x + string4 + x + string3 for x in separated_string] print(my_new_list) my_lst = my_new_list my_lst_str = ''.join(map(str, my_lst)) print(my_lst_str) with open('afterconv.txt', 'w') as f: f.write(my_lst_str)
file = open('datarefex.txt') line = file.read().replace('\n', '\n') print(len(line)) separated_string = line.splitlines() print(len(separated_string)) string2 = '"' string = '": { "prefix": "' string4 = '", "body": [ "' string3 = '" ], "description": "WIP" },' my_new_list = [string2 + x + string + x + string4 + x + string3 for x in separated_string] print(my_new_list) my_lst = my_new_list my_lst_str = ''.join(map(str, my_lst)) print(my_lst_str) with open('afterconv.txt', 'w') as f: f.write(my_lst_str)
#!/usr/bin/python class ListNode(object): def __init__(self, x): self.val = x self.next = None class Solution(object): def addTwoNumbers(self, l1, l2): carry = 0 ret = ListNode(0) curr = ret while l1 != None or l2 != None or carry != 0: if l1 == None and l2 == None: val = carry elif l1 == None: val = l2.val + carry elif l2 == None: val = l1.val + carry else: val = l1.val + l2.val + carry carry = 0 if val >= 10: val = val - 10 carry = 1 carr.val = val if l1 != None: l1 = l1.next if l2 != None: l2 = l2.next if l1 != None or l2 != None or carry != 0: nextnode = ListNode(0) curr.next = nextnode curr = nextnode return ret
class Listnode(object): def __init__(self, x): self.val = x self.next = None class Solution(object): def add_two_numbers(self, l1, l2): carry = 0 ret = list_node(0) curr = ret while l1 != None or l2 != None or carry != 0: if l1 == None and l2 == None: val = carry elif l1 == None: val = l2.val + carry elif l2 == None: val = l1.val + carry else: val = l1.val + l2.val + carry carry = 0 if val >= 10: val = val - 10 carry = 1 carr.val = val if l1 != None: l1 = l1.next if l2 != None: l2 = l2.next if l1 != None or l2 != None or carry != 0: nextnode = list_node(0) curr.next = nextnode curr = nextnode return ret
#program to convert a byte string to a list of integers. word = b'Darlington' print() print(list(word)) print() # the reverse operation n = [68,97,114] print(bytes(n))
word = b'Darlington' print() print(list(word)) print() n = [68, 97, 114] print(bytes(n))
class Solution: def addBinary(self, a: str, b: str) -> str: a = int(a, 2) b = int(b, 2) result = a + b result = bin(result) return (result[2:])
class Solution: def add_binary(self, a: str, b: str) -> str: a = int(a, 2) b = int(b, 2) result = a + b result = bin(result) return result[2:]
a=[1,4,5, 67,6] print(a) print(a[3]) print("The index 0 element before changing ", a[0]) a[0]= 7 print("The index 0 element after changing ", a[0]) print(a) # we can create a list with diff data types b=[4,"dishant" , False, 8.7] print(b) # LIST SLICING names=["harry", "dishant", "kanta", 45] print(names[0:2]) print(names[-4:-1]) print(names[4:0:-1]) print(names[4::-1]) list1= [1,2,3,4,5,6,7,8,9] print(list1[2::-1]) #to get the first number dont input the second condition
a = [1, 4, 5, 67, 6] print(a) print(a[3]) print('The index 0 element before changing ', a[0]) a[0] = 7 print('The index 0 element after changing ', a[0]) print(a) b = [4, 'dishant', False, 8.7] print(b) names = ['harry', 'dishant', 'kanta', 45] print(names[0:2]) print(names[-4:-1]) print(names[4:0:-1]) print(names[4::-1]) list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9] print(list1[2::-1])
programs = {} test_amount = 2000 def create_entry(string): number, connections = string.split(" <-> ") number = int(number) connections = list(map(int, connections.split(", "))) programs[number] = [None, connections] def get_group_mem(group): programs[group][0] = group for x in range(0, test_amount): test_connections(group) return(sum(map(lambda p: int(programs[p][0] == group), programs))) def test_connections(group): for p in programs: if programs[p][0] is not None: continue for c in programs[p][1]: if programs[c][0] == group: programs[p][0] = group continue def get_groups(): n = 0 groups = {} for n in range(0, len(programs)): if programs[n][0] is not None: continue print(n) groups[n] = get_group_mem(n) test_amount = len(programs) - sum(groups.values()) return(groups)
programs = {} test_amount = 2000 def create_entry(string): (number, connections) = string.split(' <-> ') number = int(number) connections = list(map(int, connections.split(', '))) programs[number] = [None, connections] def get_group_mem(group): programs[group][0] = group for x in range(0, test_amount): test_connections(group) return sum(map(lambda p: int(programs[p][0] == group), programs)) def test_connections(group): for p in programs: if programs[p][0] is not None: continue for c in programs[p][1]: if programs[c][0] == group: programs[p][0] = group continue def get_groups(): n = 0 groups = {} for n in range(0, len(programs)): if programs[n][0] is not None: continue print(n) groups[n] = get_group_mem(n) test_amount = len(programs) - sum(groups.values()) return groups
#Dado un string, escribir una funcion que cambie todos los espacios por guiones. string='Hola Mundo hola mundo HOLA MUNDO Hola Mundo hola mundo HOLA MUNDO Hola Mundo hola mundo HOLA MUNDO Hola Mundo hola mundo HOLA MUNDO Hola Mundo hola mundo HOLA MUNDO Hola Mundo hola mundo HOLA MUNDO Hola Mundo hola mundo HOLA MUNDO' mi_string = string.replace(' ', '-') print(mi_string)
string = 'Hola Mundo hola mundo HOLA MUNDO Hola Mundo hola mundo HOLA MUNDO Hola Mundo hola mundo HOLA MUNDO Hola Mundo hola mundo HOLA MUNDO Hola Mundo hola mundo HOLA MUNDO Hola Mundo hola mundo HOLA MUNDO Hola Mundo hola mundo HOLA MUNDO' mi_string = string.replace(' ', '-') print(mi_string)
n=int(input("Enter a Number: ")) p=0 temp=n while(temp > 0): p = p+1 temp = temp // 10 sum=0 temp=n while(temp > 0): rem = temp % 10 sum = sum + (rem**p) temp = temp // 10 if(n==sum): print("Armstrong") else: print("Not Armstrong")
n = int(input('Enter a Number: ')) p = 0 temp = n while temp > 0: p = p + 1 temp = temp // 10 sum = 0 temp = n while temp > 0: rem = temp % 10 sum = sum + rem ** p temp = temp // 10 if n == sum: print('Armstrong') else: print('Not Armstrong')
# Generated by rpcgen.py at Mon Mar 8 11:09:57 2004 __all__ = ['MNTPATHLEN', 'MNTNAMLEN', 'FHSIZE2', 'FHSIZE3', 'MNT3_OK', 'MNT3ERR_PERM', 'MNT3ERR_NOENT', 'MNT3ERR_IO', 'MNT3ERR_ACCES', 'MNT3ERR_NOTDIR', 'MNT3ERR_INVAL', 'MNT3ERR_NAMETOOLONG', 'MNT3ERR_NOTSUPP', 'MNT3ERR_SERVERFAULT', 'mountstat3_id', 'MOUNTPROC_NULL', 'MOUNTPROC_MNT', 'MOUNTPROC_DUMP', 'MOUNTPROC_UMNT', 'MOUNTPROC_UMNTALL', 'MOUNTPROC_EXPORT', 'MOUNTPROC_EXPORTALL', 'MOUNT_V1', 'MOUNTPROC3_NULL', 'MOUNTPROC3_MNT', 'MOUNTPROC3_DUMP', 'MOUNTPROC3_UMNT', 'MOUNTPROC3_UMNTALL', 'MOUNTPROC3_EXPORT', 'MOUNT_V3', 'MOUNT_PROGRAM'] FALSE = 0 TRUE = 1 MNTPATHLEN = 1024 MNTNAMLEN = 255 FHSIZE2 = 32 FHSIZE3 = 64 MNT3_OK = 0 MNT3ERR_PERM = 1 MNT3ERR_NOENT = 2 MNT3ERR_IO = 5 MNT3ERR_ACCES = 13 MNT3ERR_NOTDIR = 20 MNT3ERR_INVAL = 22 MNT3ERR_NAMETOOLONG = 63 MNT3ERR_NOTSUPP = 10004 MNT3ERR_SERVERFAULT = 10006 mountstat3_id = { MNT3_OK: "MNT3_OK", MNT3ERR_PERM: "MNT3ERR_PERM", MNT3ERR_NOENT: "MNT3ERR_NOENT", MNT3ERR_IO: "MNT3ERR_IO", MNT3ERR_ACCES: "MNT3ERR_ACCES", MNT3ERR_NOTDIR: "MNT3ERR_NOTDIR", MNT3ERR_INVAL: "MNT3ERR_INVAL", MNT3ERR_NAMETOOLONG: "MNT3ERR_NAMETOOLONG", MNT3ERR_NOTSUPP: "MNT3ERR_NOTSUPP", MNT3ERR_SERVERFAULT: "MNT3ERR_SERVERFAULT" } MOUNTPROC_NULL = 0 MOUNTPROC_MNT = 1 MOUNTPROC_DUMP = 2 MOUNTPROC_UMNT = 3 MOUNTPROC_UMNTALL = 4 MOUNTPROC_EXPORT = 5 MOUNTPROC_EXPORTALL = 6 MOUNT_V1 = 1 MOUNTPROC3_NULL = 0 MOUNTPROC3_MNT = 1 MOUNTPROC3_DUMP = 2 MOUNTPROC3_UMNT = 3 MOUNTPROC3_UMNTALL = 4 MOUNTPROC3_EXPORT = 5 MOUNT_V3 = 3 MOUNT_PROGRAM = 100005
__all__ = ['MNTPATHLEN', 'MNTNAMLEN', 'FHSIZE2', 'FHSIZE3', 'MNT3_OK', 'MNT3ERR_PERM', 'MNT3ERR_NOENT', 'MNT3ERR_IO', 'MNT3ERR_ACCES', 'MNT3ERR_NOTDIR', 'MNT3ERR_INVAL', 'MNT3ERR_NAMETOOLONG', 'MNT3ERR_NOTSUPP', 'MNT3ERR_SERVERFAULT', 'mountstat3_id', 'MOUNTPROC_NULL', 'MOUNTPROC_MNT', 'MOUNTPROC_DUMP', 'MOUNTPROC_UMNT', 'MOUNTPROC_UMNTALL', 'MOUNTPROC_EXPORT', 'MOUNTPROC_EXPORTALL', 'MOUNT_V1', 'MOUNTPROC3_NULL', 'MOUNTPROC3_MNT', 'MOUNTPROC3_DUMP', 'MOUNTPROC3_UMNT', 'MOUNTPROC3_UMNTALL', 'MOUNTPROC3_EXPORT', 'MOUNT_V3', 'MOUNT_PROGRAM'] false = 0 true = 1 mntpathlen = 1024 mntnamlen = 255 fhsize2 = 32 fhsize3 = 64 mnt3_ok = 0 mnt3_err_perm = 1 mnt3_err_noent = 2 mnt3_err_io = 5 mnt3_err_acces = 13 mnt3_err_notdir = 20 mnt3_err_inval = 22 mnt3_err_nametoolong = 63 mnt3_err_notsupp = 10004 mnt3_err_serverfault = 10006 mountstat3_id = {MNT3_OK: 'MNT3_OK', MNT3ERR_PERM: 'MNT3ERR_PERM', MNT3ERR_NOENT: 'MNT3ERR_NOENT', MNT3ERR_IO: 'MNT3ERR_IO', MNT3ERR_ACCES: 'MNT3ERR_ACCES', MNT3ERR_NOTDIR: 'MNT3ERR_NOTDIR', MNT3ERR_INVAL: 'MNT3ERR_INVAL', MNT3ERR_NAMETOOLONG: 'MNT3ERR_NAMETOOLONG', MNT3ERR_NOTSUPP: 'MNT3ERR_NOTSUPP', MNT3ERR_SERVERFAULT: 'MNT3ERR_SERVERFAULT'} mountproc_null = 0 mountproc_mnt = 1 mountproc_dump = 2 mountproc_umnt = 3 mountproc_umntall = 4 mountproc_export = 5 mountproc_exportall = 6 mount_v1 = 1 mountproc3_null = 0 mountproc3_mnt = 1 mountproc3_dump = 2 mountproc3_umnt = 3 mountproc3_umntall = 4 mountproc3_export = 5 mount_v3 = 3 mount_program = 100005
for _ in range(int(input())): n = int(input()) s = input() if '.' not in s: print("0") continue if '*' not in s: print("0") continue if s.count('*')==1: print("0") continue count = s.count('*') if count%2==0: mid = count//2 else: mid = (count//2) + 1 mid_pos = 0 count_star = 0 for i in range(n): if s[i]=="*": count_star += 1 if count_star == mid: mid_pos = i break ans = 0 #print(mid_pos) for i in range(n): if s[i]=='*': ans += abs(i-mid_pos) #print(ans) if count%2!=0: ans -= (mid-1)*mid else: ans -= ((mid-1)*mid)//2 + (mid*(mid+1))//2 print(ans)
for _ in range(int(input())): n = int(input()) s = input() if '.' not in s: print('0') continue if '*' not in s: print('0') continue if s.count('*') == 1: print('0') continue count = s.count('*') if count % 2 == 0: mid = count // 2 else: mid = count // 2 + 1 mid_pos = 0 count_star = 0 for i in range(n): if s[i] == '*': count_star += 1 if count_star == mid: mid_pos = i break ans = 0 for i in range(n): if s[i] == '*': ans += abs(i - mid_pos) if count % 2 != 0: ans -= (mid - 1) * mid else: ans -= (mid - 1) * mid // 2 + mid * (mid + 1) // 2 print(ans)
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"StopExecution": "00_core.ipynb", "skip": "00_core.ipynb", "run_all": "00_core.ipynb", "set_google_application_credentials": "00_core.ipynb", "PROJECT_ID": "01_constants.ipynb", "LOCATION": "01_constants.ipynb", "SERVICE_ACCOUNT_KEY_FILE_NAME": "01_constants.ipynb", "GCS_BUCKET": "01_constants.ipynb", "GCS_FOLDER": "01_constants.ipynb", "PRIVATE_GCS_BUCKET": "01_constants.ipynb", "URL": "01_constants.ipynb", "DATASET_ID": "01_constants.ipynb", "TABLE_ID": "01_constants.ipynb", "BATCH_SIZE": "01_constants.ipynb", "FULL_TRAINING_DATASET_SIZE": "01_constants.ipynb", "FULL_VALIDATION_DATASET_SIZE": "01_constants.ipynb", "SMALL_TRAINING_DATASET_SIZE": "01_constants.ipynb", "SMALL_VALIDATION_DATASET_SIZE": "01_constants.ipynb", "TINY_TRAINING_DATASET_SIZE": "01_constants.ipynb", "TINY_VALIDATION_DATASET_SIZE": "01_constants.ipynb", "CSV_SCHEMA": "01_constants.ipynb", "DATASET_SIZE_TYPE": "01_constants.ipynb", "DATASET_SOURCE_TYPE": "01_constants.ipynb", "DATASET_TYPE": "01_constants.ipynb", "EMBEDDINGS_MODE_TYPE": "01_constants.ipynb", "create_bigquery_dataset_if_necessary": "03_data_import.ipynb", "load_data_into_bigquery": "03_data_import.ipynb", "get_file_names_with_validation_split": "03_data_import.ipynb", "get_dataset_size": "04_data_reader.ipynb", "get_steps_per_epoch": "04_data_reader.ipynb", "get_max_steps": "04_data_reader.ipynb", "get_mean_and_std_dicts": "04_data_reader.ipynb", "get_vocabulary_size_dict": "04_data_reader.ipynb", "get_corpus_dict": "04_data_reader.ipynb", "corpus_to_lookuptable": "04_data_reader.ipynb", "get_corpus": "04_data_reader.ipynb", "transform_row": "04_data_reader.ipynb", "get_bigquery_table_name": "04_data_reader.ipynb", "read_bigquery": "04_data_reader.ipynb", "read_gcs": "04_data_reader.ipynb", "get_dataset": "04_data_reader.ipynb", "TrainTimeCallback": "05_trainer.ipynb", "PlotLossesCallback": "05_trainer.ipynb", "create_categorical_feature_column_with_hash_bucket": "05_trainer.ipynb", "create_categorical_feature_column_with_vocabulary_list": "05_trainer.ipynb", "create_embedding": "05_trainer.ipynb", "create_linear_feature_columns": "05_trainer.ipynb", "create_categorical_embeddings_feature_columns": "05_trainer.ipynb", "create_feature_columns": "05_trainer.ipynb", "create_keras_model_sequential": "05_trainer.ipynb", "train_and_evaluate_keras_model": "05_trainer.ipynb", "train_and_evaluate_keras": "05_trainer.ipynb", "keras_hp_search": "05_trainer.ipynb", "train_and_evaluate_estimator": "05_trainer.ipynb", "train_and_evaluate_keras_small": "index.ipynb", "train_and_evaluate_estimator_small": "index.ipynb", "run_keras_hp_search": "index.ipynb"} modules = ["core.py", "constants.py", "data_import.py", "data_reader.py", "trainer.py", "index.py", "setup.py"] doc_url = "https://all.github.io/criteo_nbdev/" git_url = "https://github.com/all/criteo_nbdev/tree/master/" def custom_doc_links(name): return None
__all__ = ['index', 'modules', 'custom_doc_links', 'git_url'] index = {'StopExecution': '00_core.ipynb', 'skip': '00_core.ipynb', 'run_all': '00_core.ipynb', 'set_google_application_credentials': '00_core.ipynb', 'PROJECT_ID': '01_constants.ipynb', 'LOCATION': '01_constants.ipynb', 'SERVICE_ACCOUNT_KEY_FILE_NAME': '01_constants.ipynb', 'GCS_BUCKET': '01_constants.ipynb', 'GCS_FOLDER': '01_constants.ipynb', 'PRIVATE_GCS_BUCKET': '01_constants.ipynb', 'URL': '01_constants.ipynb', 'DATASET_ID': '01_constants.ipynb', 'TABLE_ID': '01_constants.ipynb', 'BATCH_SIZE': '01_constants.ipynb', 'FULL_TRAINING_DATASET_SIZE': '01_constants.ipynb', 'FULL_VALIDATION_DATASET_SIZE': '01_constants.ipynb', 'SMALL_TRAINING_DATASET_SIZE': '01_constants.ipynb', 'SMALL_VALIDATION_DATASET_SIZE': '01_constants.ipynb', 'TINY_TRAINING_DATASET_SIZE': '01_constants.ipynb', 'TINY_VALIDATION_DATASET_SIZE': '01_constants.ipynb', 'CSV_SCHEMA': '01_constants.ipynb', 'DATASET_SIZE_TYPE': '01_constants.ipynb', 'DATASET_SOURCE_TYPE': '01_constants.ipynb', 'DATASET_TYPE': '01_constants.ipynb', 'EMBEDDINGS_MODE_TYPE': '01_constants.ipynb', 'create_bigquery_dataset_if_necessary': '03_data_import.ipynb', 'load_data_into_bigquery': '03_data_import.ipynb', 'get_file_names_with_validation_split': '03_data_import.ipynb', 'get_dataset_size': '04_data_reader.ipynb', 'get_steps_per_epoch': '04_data_reader.ipynb', 'get_max_steps': '04_data_reader.ipynb', 'get_mean_and_std_dicts': '04_data_reader.ipynb', 'get_vocabulary_size_dict': '04_data_reader.ipynb', 'get_corpus_dict': '04_data_reader.ipynb', 'corpus_to_lookuptable': '04_data_reader.ipynb', 'get_corpus': '04_data_reader.ipynb', 'transform_row': '04_data_reader.ipynb', 'get_bigquery_table_name': '04_data_reader.ipynb', 'read_bigquery': '04_data_reader.ipynb', 'read_gcs': '04_data_reader.ipynb', 'get_dataset': '04_data_reader.ipynb', 'TrainTimeCallback': '05_trainer.ipynb', 'PlotLossesCallback': '05_trainer.ipynb', 'create_categorical_feature_column_with_hash_bucket': '05_trainer.ipynb', 'create_categorical_feature_column_with_vocabulary_list': '05_trainer.ipynb', 'create_embedding': '05_trainer.ipynb', 'create_linear_feature_columns': '05_trainer.ipynb', 'create_categorical_embeddings_feature_columns': '05_trainer.ipynb', 'create_feature_columns': '05_trainer.ipynb', 'create_keras_model_sequential': '05_trainer.ipynb', 'train_and_evaluate_keras_model': '05_trainer.ipynb', 'train_and_evaluate_keras': '05_trainer.ipynb', 'keras_hp_search': '05_trainer.ipynb', 'train_and_evaluate_estimator': '05_trainer.ipynb', 'train_and_evaluate_keras_small': 'index.ipynb', 'train_and_evaluate_estimator_small': 'index.ipynb', 'run_keras_hp_search': 'index.ipynb'} modules = ['core.py', 'constants.py', 'data_import.py', 'data_reader.py', 'trainer.py', 'index.py', 'setup.py'] doc_url = 'https://all.github.io/criteo_nbdev/' git_url = 'https://github.com/all/criteo_nbdev/tree/master/' def custom_doc_links(name): return None
if __name__ == '__main__': n = int(input()) result = [] for _ in range(n): operator, *operands = input().split() operands = [int(x) for x in operands] if (operator == 'insert'): result.insert(operands[0], operands[1]) elif (operator == 'remove'): result.remove(operands[0]) elif (operator == 'append'): result.append(operands[0]) elif (operator == 'print'): print(result) elif (operator == 'sort'): result.sort() elif (operator == 'pop'): result.pop() else: result.reverse()
if __name__ == '__main__': n = int(input()) result = [] for _ in range(n): (operator, *operands) = input().split() operands = [int(x) for x in operands] if operator == 'insert': result.insert(operands[0], operands[1]) elif operator == 'remove': result.remove(operands[0]) elif operator == 'append': result.append(operands[0]) elif operator == 'print': print(result) elif operator == 'sort': result.sort() elif operator == 'pop': result.pop() else: result.reverse()
#!/usr/bin/env python3 # -*- coding: utf-8 -*- cornerBuffer = [] cornerSequence = [] class Corner: cornerCount = 0 cornerIndex = [] cornerColor = [] def solveCorner(self,sides,cornerPriority): cornerGoal = (sides['U'][0]=='U' and sides['U'][2]=='U' and sides['U'][6]=='U' and sides['U'][8]=='U' and sides['F'][0]=='F' and sides['F'][2]=='F' and sides['F'][6]=='F' and sides['F'][8]=='F' and sides['R'][0]=='R' and sides['R'][2]=='R' and sides['R'][6]=='R' and sides['R'][8]=='R' and sides['D'][0]=='D' and sides['D'][2]=='D' and sides['D'][6]=='D' and sides['D'][8]=='D' and sides['B'][0]=='B' and sides['B'][2]=='B' and sides['B'][6]=='B' and sides['B'][8]=='B' and sides['L'][0]=='L' and sides['L'][2]=='L' and sides['L'][6]=='L' and sides['L'][8]=='L') if (cornerGoal): print('Corners are already solved!') else: if ((sides['L'][0]=='L' and sides['U'][0]=='U' and sides['B'][2]=='B') or (sides['L'][0]=='U' and sides['U'][0]=='B' and sides['B'][2]=='L') or (sides['L'][0]=='B' and sides['U'][0]=='L' and sides['B'][2]=='U')): cornerBuffer = self.cornerBufferChange(sides,cornerPriority) self.cornerCount = self.cornerCount + 1 if not ((sides['L'][0]=='L' and sides['U'][0]=='U' and sides['B'][2]=='B') or (sides['L'][0]=='U' and sides['U'][0]=='B' and sides['B'][2]=='L') or (sides['L'][0]=='B' and sides['U'][0]=='L' and sides['B'][2]=='U')): cornerBuffer = [sides['L'][0], sides['U'][0], sides['B'][2]] while(1): cornerGoalbuffer = (sides['U'][2]=='U' and sides['U'][6]=='U' and sides['U'][8]=='U' and sides['F'][0]=='F' and sides['F'][2]=='F' and sides['F'][6]=='F' and sides['F'][8]=='F' and sides['R'][0]=='R' and sides['R'][2]=='R' and sides['R'][6]=='R' and sides['R'][8]=='R' and sides['D'][0]=='D' and sides['D'][2]=='D' and sides['D'][6]=='D' and sides['D'][8]=='D' and sides['B'][0]=='B' and sides['B'][6]=='B' and sides['B'][8]=='B' and sides['L'][2]=='L' and sides['L'][6]=='L' and sides['L'][8]=='L') if (cornerGoalbuffer): sides['L'][0] = 'L' sides['U'][0] = 'U' sides['B'][2] = 'B' if not(self.cornerCount%2==0): sidesCopy = sides.copy() parity = [sidesCopy['U'][3], sidesCopy['L'][1], sidesCopy['U'][1], sidesCopy['B'][1]] sides['U'][1] = parity[0] sides['B'][1] = parity[1] sides['U'][3] = parity[2] sides['L'][1] = parity[3] #print('Corners are solved!') #print(sides) break face = [cornerBuffer[0], cornerBuffer[1], cornerBuffer[2]] prevBuffer = cornerBuffer if ((sides['L'][0]=='L' and sides['U'][0]=='U' and sides['B'][2]=='B') or (sides['L'][0]=='U' and sides['U'][0]=='B' and sides['B'][2]=='L') or (sides['L'][0]=='B' and sides['U'][0]=='L' and sides['B'][2]=='U')): cornerBuffer = self.cornerBufferChange(sides,cornerPriority) else: cornerSequence.append(cornerBuffer) self.cornerColor.append(cornerBuffer) index = self.getCornerIndex(cornerBuffer) self.cornerIndex.append([cornerBuffer[0],index[0],cornerBuffer[1],index[1],cornerBuffer[2],index[2]]) cornerBuffer = [sides[cornerBuffer[0]][index[0]],sides[cornerBuffer[1]][index[1]],sides[cornerBuffer[2]][index[2]]] #update buffer sides[prevBuffer[0]][index[0]] = prevBuffer[0] sides[prevBuffer[1]][index[1]] = prevBuffer[1] sides[prevBuffer[2]][index[2]] = prevBuffer[2] sides['L'][0] = cornerBuffer[0] sides['U'][0] = cornerBuffer[1] sides['B'][2] = cornerBuffer[2] self.cornerCount = self.cornerCount + 1 return sides def cornerBufferChange(self,sides,cornerPriority): sidesCopy = sides.copy() a1 = '' a2 = 0 b1 = '' b2 = 0 c1 = '' c2 = 0 if not (sides[cornerPriority[0][0]][cornerPriority[0][1]]=='U' and sides[cornerPriority[0][2]][cornerPriority[0][3]]=='R' and sides[cornerPriority[0][4]][cornerPriority[0][5]]=='B'): a1 = 'U' a2 = 2 b1 = 'R' b2 = 2 c1 = 'B' c2 = 0 cornerBuffer = ['U','R','B'] cornerSequence.append(cornerBuffer) elif not (sides[cornerPriority[1][0]][cornerPriority[1][1]]=='U' and sides[cornerPriority[1][2]][cornerPriority[1][3]]=='L' and sides[cornerPriority[1][4]][cornerPriority[1][5]]=='F'): a1 = 'U' a2 = 6 b1 = 'L' b2 = 2 c1 = 'F' c2 = 0 cornerBuffer = ['U','L','F'] cornerSequence.append(cornerBuffer) elif not (sides[cornerPriority[2][0]][cornerPriority[2][1]]=='U' and sides[cornerPriority[2][2]][cornerPriority[2][3]]=='F' and sides[cornerPriority[2][4]][cornerPriority[2][5]]=='R'): a1 = 'U' a2 = 8 b1 = 'F' b2 = 2 c1 = 'R' c2 = 0 cornerBuffer = ['U','F','R'] cornerSequence.append(cornerBuffer) elif not (sides[cornerPriority[3][0]][cornerPriority[3][1]]=='D' and sides[cornerPriority[3][2]][cornerPriority[3][3]]=='F' and sides[cornerPriority[3][4]][cornerPriority[3][5]]=='L'): a1 = 'D' a2 = 0 b1 = 'F' b2 = 6 c1 = 'L' c2 = 8 cornerBuffer = ['D','F','L'] cornerSequence.append(cornerBuffer) elif not (sides[cornerPriority[4][0]][cornerPriority[4][1]]=='D' and sides[cornerPriority[4][2]][cornerPriority[4][3]]=='R' and sides[cornerPriority[4][4]][cornerPriority[4][5]]=='F'): a1 = 'D' a2 = 2 b1 = 'R' b2 = 6 c1 = 'F' c2 = 8 cornerBuffer = ['D','R','F'] cornerSequence.append(cornerBuffer) elif not (sides[cornerPriority[5][0]][cornerPriority[5][1]]=='D' and sides[cornerPriority[5][2]][cornerPriority[5][3]]=='L' and sides[cornerPriority[5][4]][cornerPriority[5][5]]=='B'): a1 = 'D' a2 = 6 b1 = 'L' b2 = 6 c1 = 'B' c2 = 8 cornerBuffer = ['D','L','B'] cornerSequence.append(cornerBuffer) elif not (sides[cornerPriority[6][0]][cornerPriority[6][1]]=='D' and sides[cornerPriority[6][2]][cornerPriority[6][3]]=='B' and sides[cornerPriority[6][4]][cornerPriority[6][5]]=='R'): a1 = 'D' a2 = 8 b1 = 'B' b2 = 6 c1 = 'R' c2 = 8 cornerBuffer = ['D','B','R'] cornerSequence.append(cornerBuffer) index = self.getCornerIndex(cornerBuffer) self.cornerIndex.append([cornerBuffer[0],index[0],cornerBuffer[1],index[1],cornerBuffer[2],index[2]]) swap = [sidesCopy['L'][0], sidesCopy['U'][0], sidesCopy['B'][2], sidesCopy[a1][a2], sidesCopy[b1][b2], sidesCopy[c1][c2]] cornerBuffer = [sides[a1][a2],sides[b1][b2],sides[c1][c2]] if (sides['L'][0]=='L' and sides['U'][0]=='U' and sides['B'][2]=='B'): self.cornerColor.append(['L','U','B']) elif (sides['L'][0]=='U' and sides['U'][0]=='B' and sides['B'][2]=='L'): self.cornerColor.append(['U','B','L']) elif (sides['L'][0]=='B' and sides['U'][0]=='L' and sides['B'][2]=='U'): self.cornerColor.append(['B','L','U']) sides[a1][a2] = swap[0] sides[b1][b2] = swap[1] sides[c1][c2] = swap[2] sides['L'][0] = swap[3] sides['U'][0] = swap[4] sides['B'][2] = swap[5] return cornerBuffer def getCornerIndex(self,cornerBuffer): if cornerBuffer[0]=='U': if cornerBuffer[1]=='R': if cornerBuffer[2]=='F': index = [8,0,2] elif cornerBuffer[2]=='B': index = [2,2,0] elif cornerBuffer[1]=='F': if cornerBuffer[2]=='R': index = [8,2,0] elif cornerBuffer[2]=='L': index = [6,0,2] elif cornerBuffer[1]=='B': if cornerBuffer[2]=='R': index = [2,0,2] elif cornerBuffer[2]=='L': index = [0,2,0] elif cornerBuffer[1]=='L': if cornerBuffer[2]=='F': index = [6,2,0] elif cornerBuffer[2]=='B': index = [0,0,2] elif cornerBuffer[0]=='F': if cornerBuffer[1]=='U': if cornerBuffer[2]=='R': index = [2,8,0] elif cornerBuffer[2]=='L': index = [0,6,2] elif cornerBuffer[1]=='R': if cornerBuffer[2]=='U': index = [2,0,8] elif cornerBuffer[2]=='D': index = [8,6,2] elif cornerBuffer[1]=='D': if cornerBuffer[2]=='R': index = [8,2,6] elif cornerBuffer[2]=='L': index = [6,0,8] elif cornerBuffer[1]=='L': if cornerBuffer[2]=='U': index = [0,2,6] elif cornerBuffer[2]=='D': index = [6,8,0] elif cornerBuffer[0]=='R': if cornerBuffer[1]=='U': if cornerBuffer[2]=='F': index = [0,8,2] elif cornerBuffer[2]=='B': index = [2,2,0] elif cornerBuffer[1]=='F': if cornerBuffer[2]=='U': index = [0,2,8] elif cornerBuffer[2]=='D': index = [6,8,2] elif cornerBuffer[1]=='D': if cornerBuffer[2]=='F': index = [6,2,8] elif cornerBuffer[2]=='B': index = [8,8,6] elif cornerBuffer[1]=='B': if cornerBuffer[2]=='U': index = [2,0,2] elif cornerBuffer[2]=='D': index = [8,6,8] elif cornerBuffer[0]=='D': if cornerBuffer[1]=='F': if cornerBuffer[2]=='R': index = [2,8,6] elif cornerBuffer[2]=='L': index = [0,6,8] elif cornerBuffer[1]=='R': if cornerBuffer[2]=='F': index = [2,6,8] elif cornerBuffer[2]=='B': index = [8,8,6] elif cornerBuffer[1]=='B': if cornerBuffer[2]=='R': index = [8,6,8] elif cornerBuffer[2]=='L': index = [6,8,6] elif cornerBuffer[1]=='L': if cornerBuffer[2]=='F': index = [0,8,6] elif cornerBuffer[2]=='B': index = [6,6,8] elif cornerBuffer[0]=='B': if cornerBuffer[1]=='U': if cornerBuffer[2]=='R': index = [0,2,2] elif cornerBuffer[2]=='L': index = [2,0,0] elif cornerBuffer[1]=='R': if cornerBuffer[2]=='U': index = [0,2,2] elif cornerBuffer[2]=='D': index = [6,8,8] elif cornerBuffer[1]=='D': if cornerBuffer[2]=='R': index = [6,8,8] elif cornerBuffer[2]=='L': index = [8,6,6] elif cornerBuffer[1]=='L': if cornerBuffer[2]=='U': index = [2,0,0] elif cornerBuffer[2]=='D': index = [8,6,6] elif cornerBuffer[0]=='L': if cornerBuffer[1]=='U': if cornerBuffer[2]=='F': index = [2,6,0] elif cornerBuffer[2]=='B': index = [0,0,2] elif cornerBuffer[1]=='F': if cornerBuffer[2]=='U': index = [2,0,6] elif cornerBuffer[2]=='D': index = [8,6,0] elif cornerBuffer[1]=='D': if cornerBuffer[2]=='F': index = [8,0,6] elif cornerBuffer[2]=='B': index = [6,6,8] elif cornerBuffer[1]=='B': if cornerBuffer[2]=='U': index = [0,2,0] elif cornerBuffer[2]=='D': index = [6,8,6] return index def getCornerSequence(self): return cornerSequence cubeCorners = Corner()
corner_buffer = [] corner_sequence = [] class Corner: corner_count = 0 corner_index = [] corner_color = [] def solve_corner(self, sides, cornerPriority): corner_goal = sides['U'][0] == 'U' and sides['U'][2] == 'U' and (sides['U'][6] == 'U') and (sides['U'][8] == 'U') and (sides['F'][0] == 'F') and (sides['F'][2] == 'F') and (sides['F'][6] == 'F') and (sides['F'][8] == 'F') and (sides['R'][0] == 'R') and (sides['R'][2] == 'R') and (sides['R'][6] == 'R') and (sides['R'][8] == 'R') and (sides['D'][0] == 'D') and (sides['D'][2] == 'D') and (sides['D'][6] == 'D') and (sides['D'][8] == 'D') and (sides['B'][0] == 'B') and (sides['B'][2] == 'B') and (sides['B'][6] == 'B') and (sides['B'][8] == 'B') and (sides['L'][0] == 'L') and (sides['L'][2] == 'L') and (sides['L'][6] == 'L') and (sides['L'][8] == 'L') if cornerGoal: print('Corners are already solved!') else: if sides['L'][0] == 'L' and sides['U'][0] == 'U' and (sides['B'][2] == 'B') or (sides['L'][0] == 'U' and sides['U'][0] == 'B' and (sides['B'][2] == 'L')) or (sides['L'][0] == 'B' and sides['U'][0] == 'L' and (sides['B'][2] == 'U')): corner_buffer = self.cornerBufferChange(sides, cornerPriority) self.cornerCount = self.cornerCount + 1 if not (sides['L'][0] == 'L' and sides['U'][0] == 'U' and (sides['B'][2] == 'B') or (sides['L'][0] == 'U' and sides['U'][0] == 'B' and (sides['B'][2] == 'L')) or (sides['L'][0] == 'B' and sides['U'][0] == 'L' and (sides['B'][2] == 'U'))): corner_buffer = [sides['L'][0], sides['U'][0], sides['B'][2]] while 1: corner_goalbuffer = sides['U'][2] == 'U' and sides['U'][6] == 'U' and (sides['U'][8] == 'U') and (sides['F'][0] == 'F') and (sides['F'][2] == 'F') and (sides['F'][6] == 'F') and (sides['F'][8] == 'F') and (sides['R'][0] == 'R') and (sides['R'][2] == 'R') and (sides['R'][6] == 'R') and (sides['R'][8] == 'R') and (sides['D'][0] == 'D') and (sides['D'][2] == 'D') and (sides['D'][6] == 'D') and (sides['D'][8] == 'D') and (sides['B'][0] == 'B') and (sides['B'][6] == 'B') and (sides['B'][8] == 'B') and (sides['L'][2] == 'L') and (sides['L'][6] == 'L') and (sides['L'][8] == 'L') if cornerGoalbuffer: sides['L'][0] = 'L' sides['U'][0] = 'U' sides['B'][2] = 'B' if not self.cornerCount % 2 == 0: sides_copy = sides.copy() parity = [sidesCopy['U'][3], sidesCopy['L'][1], sidesCopy['U'][1], sidesCopy['B'][1]] sides['U'][1] = parity[0] sides['B'][1] = parity[1] sides['U'][3] = parity[2] sides['L'][1] = parity[3] break face = [cornerBuffer[0], cornerBuffer[1], cornerBuffer[2]] prev_buffer = cornerBuffer if sides['L'][0] == 'L' and sides['U'][0] == 'U' and (sides['B'][2] == 'B') or (sides['L'][0] == 'U' and sides['U'][0] == 'B' and (sides['B'][2] == 'L')) or (sides['L'][0] == 'B' and sides['U'][0] == 'L' and (sides['B'][2] == 'U')): corner_buffer = self.cornerBufferChange(sides, cornerPriority) else: cornerSequence.append(cornerBuffer) self.cornerColor.append(cornerBuffer) index = self.getCornerIndex(cornerBuffer) self.cornerIndex.append([cornerBuffer[0], index[0], cornerBuffer[1], index[1], cornerBuffer[2], index[2]]) corner_buffer = [sides[cornerBuffer[0]][index[0]], sides[cornerBuffer[1]][index[1]], sides[cornerBuffer[2]][index[2]]] sides[prevBuffer[0]][index[0]] = prevBuffer[0] sides[prevBuffer[1]][index[1]] = prevBuffer[1] sides[prevBuffer[2]][index[2]] = prevBuffer[2] sides['L'][0] = cornerBuffer[0] sides['U'][0] = cornerBuffer[1] sides['B'][2] = cornerBuffer[2] self.cornerCount = self.cornerCount + 1 return sides def corner_buffer_change(self, sides, cornerPriority): sides_copy = sides.copy() a1 = '' a2 = 0 b1 = '' b2 = 0 c1 = '' c2 = 0 if not (sides[cornerPriority[0][0]][cornerPriority[0][1]] == 'U' and sides[cornerPriority[0][2]][cornerPriority[0][3]] == 'R' and (sides[cornerPriority[0][4]][cornerPriority[0][5]] == 'B')): a1 = 'U' a2 = 2 b1 = 'R' b2 = 2 c1 = 'B' c2 = 0 corner_buffer = ['U', 'R', 'B'] cornerSequence.append(cornerBuffer) elif not (sides[cornerPriority[1][0]][cornerPriority[1][1]] == 'U' and sides[cornerPriority[1][2]][cornerPriority[1][3]] == 'L' and (sides[cornerPriority[1][4]][cornerPriority[1][5]] == 'F')): a1 = 'U' a2 = 6 b1 = 'L' b2 = 2 c1 = 'F' c2 = 0 corner_buffer = ['U', 'L', 'F'] cornerSequence.append(cornerBuffer) elif not (sides[cornerPriority[2][0]][cornerPriority[2][1]] == 'U' and sides[cornerPriority[2][2]][cornerPriority[2][3]] == 'F' and (sides[cornerPriority[2][4]][cornerPriority[2][5]] == 'R')): a1 = 'U' a2 = 8 b1 = 'F' b2 = 2 c1 = 'R' c2 = 0 corner_buffer = ['U', 'F', 'R'] cornerSequence.append(cornerBuffer) elif not (sides[cornerPriority[3][0]][cornerPriority[3][1]] == 'D' and sides[cornerPriority[3][2]][cornerPriority[3][3]] == 'F' and (sides[cornerPriority[3][4]][cornerPriority[3][5]] == 'L')): a1 = 'D' a2 = 0 b1 = 'F' b2 = 6 c1 = 'L' c2 = 8 corner_buffer = ['D', 'F', 'L'] cornerSequence.append(cornerBuffer) elif not (sides[cornerPriority[4][0]][cornerPriority[4][1]] == 'D' and sides[cornerPriority[4][2]][cornerPriority[4][3]] == 'R' and (sides[cornerPriority[4][4]][cornerPriority[4][5]] == 'F')): a1 = 'D' a2 = 2 b1 = 'R' b2 = 6 c1 = 'F' c2 = 8 corner_buffer = ['D', 'R', 'F'] cornerSequence.append(cornerBuffer) elif not (sides[cornerPriority[5][0]][cornerPriority[5][1]] == 'D' and sides[cornerPriority[5][2]][cornerPriority[5][3]] == 'L' and (sides[cornerPriority[5][4]][cornerPriority[5][5]] == 'B')): a1 = 'D' a2 = 6 b1 = 'L' b2 = 6 c1 = 'B' c2 = 8 corner_buffer = ['D', 'L', 'B'] cornerSequence.append(cornerBuffer) elif not (sides[cornerPriority[6][0]][cornerPriority[6][1]] == 'D' and sides[cornerPriority[6][2]][cornerPriority[6][3]] == 'B' and (sides[cornerPriority[6][4]][cornerPriority[6][5]] == 'R')): a1 = 'D' a2 = 8 b1 = 'B' b2 = 6 c1 = 'R' c2 = 8 corner_buffer = ['D', 'B', 'R'] cornerSequence.append(cornerBuffer) index = self.getCornerIndex(cornerBuffer) self.cornerIndex.append([cornerBuffer[0], index[0], cornerBuffer[1], index[1], cornerBuffer[2], index[2]]) swap = [sidesCopy['L'][0], sidesCopy['U'][0], sidesCopy['B'][2], sidesCopy[a1][a2], sidesCopy[b1][b2], sidesCopy[c1][c2]] corner_buffer = [sides[a1][a2], sides[b1][b2], sides[c1][c2]] if sides['L'][0] == 'L' and sides['U'][0] == 'U' and (sides['B'][2] == 'B'): self.cornerColor.append(['L', 'U', 'B']) elif sides['L'][0] == 'U' and sides['U'][0] == 'B' and (sides['B'][2] == 'L'): self.cornerColor.append(['U', 'B', 'L']) elif sides['L'][0] == 'B' and sides['U'][0] == 'L' and (sides['B'][2] == 'U'): self.cornerColor.append(['B', 'L', 'U']) sides[a1][a2] = swap[0] sides[b1][b2] = swap[1] sides[c1][c2] = swap[2] sides['L'][0] = swap[3] sides['U'][0] = swap[4] sides['B'][2] = swap[5] return cornerBuffer def get_corner_index(self, cornerBuffer): if cornerBuffer[0] == 'U': if cornerBuffer[1] == 'R': if cornerBuffer[2] == 'F': index = [8, 0, 2] elif cornerBuffer[2] == 'B': index = [2, 2, 0] elif cornerBuffer[1] == 'F': if cornerBuffer[2] == 'R': index = [8, 2, 0] elif cornerBuffer[2] == 'L': index = [6, 0, 2] elif cornerBuffer[1] == 'B': if cornerBuffer[2] == 'R': index = [2, 0, 2] elif cornerBuffer[2] == 'L': index = [0, 2, 0] elif cornerBuffer[1] == 'L': if cornerBuffer[2] == 'F': index = [6, 2, 0] elif cornerBuffer[2] == 'B': index = [0, 0, 2] elif cornerBuffer[0] == 'F': if cornerBuffer[1] == 'U': if cornerBuffer[2] == 'R': index = [2, 8, 0] elif cornerBuffer[2] == 'L': index = [0, 6, 2] elif cornerBuffer[1] == 'R': if cornerBuffer[2] == 'U': index = [2, 0, 8] elif cornerBuffer[2] == 'D': index = [8, 6, 2] elif cornerBuffer[1] == 'D': if cornerBuffer[2] == 'R': index = [8, 2, 6] elif cornerBuffer[2] == 'L': index = [6, 0, 8] elif cornerBuffer[1] == 'L': if cornerBuffer[2] == 'U': index = [0, 2, 6] elif cornerBuffer[2] == 'D': index = [6, 8, 0] elif cornerBuffer[0] == 'R': if cornerBuffer[1] == 'U': if cornerBuffer[2] == 'F': index = [0, 8, 2] elif cornerBuffer[2] == 'B': index = [2, 2, 0] elif cornerBuffer[1] == 'F': if cornerBuffer[2] == 'U': index = [0, 2, 8] elif cornerBuffer[2] == 'D': index = [6, 8, 2] elif cornerBuffer[1] == 'D': if cornerBuffer[2] == 'F': index = [6, 2, 8] elif cornerBuffer[2] == 'B': index = [8, 8, 6] elif cornerBuffer[1] == 'B': if cornerBuffer[2] == 'U': index = [2, 0, 2] elif cornerBuffer[2] == 'D': index = [8, 6, 8] elif cornerBuffer[0] == 'D': if cornerBuffer[1] == 'F': if cornerBuffer[2] == 'R': index = [2, 8, 6] elif cornerBuffer[2] == 'L': index = [0, 6, 8] elif cornerBuffer[1] == 'R': if cornerBuffer[2] == 'F': index = [2, 6, 8] elif cornerBuffer[2] == 'B': index = [8, 8, 6] elif cornerBuffer[1] == 'B': if cornerBuffer[2] == 'R': index = [8, 6, 8] elif cornerBuffer[2] == 'L': index = [6, 8, 6] elif cornerBuffer[1] == 'L': if cornerBuffer[2] == 'F': index = [0, 8, 6] elif cornerBuffer[2] == 'B': index = [6, 6, 8] elif cornerBuffer[0] == 'B': if cornerBuffer[1] == 'U': if cornerBuffer[2] == 'R': index = [0, 2, 2] elif cornerBuffer[2] == 'L': index = [2, 0, 0] elif cornerBuffer[1] == 'R': if cornerBuffer[2] == 'U': index = [0, 2, 2] elif cornerBuffer[2] == 'D': index = [6, 8, 8] elif cornerBuffer[1] == 'D': if cornerBuffer[2] == 'R': index = [6, 8, 8] elif cornerBuffer[2] == 'L': index = [8, 6, 6] elif cornerBuffer[1] == 'L': if cornerBuffer[2] == 'U': index = [2, 0, 0] elif cornerBuffer[2] == 'D': index = [8, 6, 6] elif cornerBuffer[0] == 'L': if cornerBuffer[1] == 'U': if cornerBuffer[2] == 'F': index = [2, 6, 0] elif cornerBuffer[2] == 'B': index = [0, 0, 2] elif cornerBuffer[1] == 'F': if cornerBuffer[2] == 'U': index = [2, 0, 6] elif cornerBuffer[2] == 'D': index = [8, 6, 0] elif cornerBuffer[1] == 'D': if cornerBuffer[2] == 'F': index = [8, 0, 6] elif cornerBuffer[2] == 'B': index = [6, 6, 8] elif cornerBuffer[1] == 'B': if cornerBuffer[2] == 'U': index = [0, 2, 0] elif cornerBuffer[2] == 'D': index = [6, 8, 6] return index def get_corner_sequence(self): return cornerSequence cube_corners = corner()
# ======================== # Information # ======================== # Direct Link: https://www.hackerrank.com/challenges/30-scope/problem # Difficulty: Easy # Max Score: 30 # Language: Python # ======================== # Solution # ======================== class Difference: def __init__(self, a): self.__elements = a self.maximumDifference = 0 # Add your code here def computeDifference(self): l = len(a) for i in range(0, l): for j in range(i + 1, l): difference = abs(a[i] - a[j]) self.maximumDifference = max(difference, self.maximumDifference) # End of Difference class _ = input() a = [int(e) for e in input().split(' ')] d = Difference(a) d.computeDifference() print(d.maximumDifference)
class Difference: def __init__(self, a): self.__elements = a self.maximumDifference = 0 def compute_difference(self): l = len(a) for i in range(0, l): for j in range(i + 1, l): difference = abs(a[i] - a[j]) self.maximumDifference = max(difference, self.maximumDifference) _ = input() a = [int(e) for e in input().split(' ')] d = difference(a) d.computeDifference() print(d.maximumDifference)
class Solution: def numsSameConsecDiff(self, N: int, K: int) -> List[int]: ans = [i for i in range(1, 10)] if N == 1: return [0] + ans digits = 10 ** (N-1) while ans[0] / digits < 1: cur = ans.pop(0) last_digit = cur % 10 if K == 0: ans.append(cur * 10 + last_digit) else: if last_digit + K < 10: ans.append(cur * 10 + last_digit + K) if last_digit - K >= 0: ans.append(cur * 10 + last_digit - K) return ans
class Solution: def nums_same_consec_diff(self, N: int, K: int) -> List[int]: ans = [i for i in range(1, 10)] if N == 1: return [0] + ans digits = 10 ** (N - 1) while ans[0] / digits < 1: cur = ans.pop(0) last_digit = cur % 10 if K == 0: ans.append(cur * 10 + last_digit) else: if last_digit + K < 10: ans.append(cur * 10 + last_digit + K) if last_digit - K >= 0: ans.append(cur * 10 + last_digit - K) return ans
class Body: supported_characteristics = ['m', 'mass', 'J', 'inertia'] def __init__(self, options): for key in options.keys(): if key in Body.supported_characteristics: val = options[key] if key in ['m', 'mass']: self.mass = val elif key in ['J', 'inertia']: self.J = val else: Log.print('Not supported key:{}'.format(key))
class Body: supported_characteristics = ['m', 'mass', 'J', 'inertia'] def __init__(self, options): for key in options.keys(): if key in Body.supported_characteristics: val = options[key] if key in ['m', 'mass']: self.mass = val elif key in ['J', 'inertia']: self.J = val else: Log.print('Not supported key:{}'.format(key))
#!/usr/bin/env python3 # ## @file # cache_args.py # # Copyright (c) 2020, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ''' Contains the help and description strings for arguments in the cache command meta data. ''' COMMAND_DESCRIPTION = ('Manages local caching support for project repos. The goal of this feature ' 'is to improve clone performance') COMMAND_ENABLE_HELP = 'Enables caching support on the system.' COMMAND_DISABLE_HELP = 'Disables caching support on the system.' COMMAND_UPDATE_HELP = 'Update the repo cache for all cached projects.' COMMAND_INFO_HELP = 'Display the current cache information.' COMMAND_PROJECT_HELP = 'Project to add to the cache.'
""" Contains the help and description strings for arguments in the cache command meta data. """ command_description = 'Manages local caching support for project repos. The goal of this feature is to improve clone performance' command_enable_help = 'Enables caching support on the system.' command_disable_help = 'Disables caching support on the system.' command_update_help = 'Update the repo cache for all cached projects.' command_info_help = 'Display the current cache information.' command_project_help = 'Project to add to the cache.'
class Building(object): lock = MetalKey() def unlock(self): self.lock.attempt_unlock() class KeyCardMixin(object): lock = KeyCard() class ExcellaHQ(KeyCardMixin, Building): pass
class Building(object): lock = metal_key() def unlock(self): self.lock.attempt_unlock() class Keycardmixin(object): lock = key_card() class Excellahq(KeyCardMixin, Building): pass
def fibonacci(n): if n == 0: return 0 elif n==1: return 1 else: return fibonacci(n-1) + fibonacci(n-2) def test(): for i in range(15): print("fib[" + str(i) + "]: " + str(fibonacci(i))) test()
def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n - 1) + fibonacci(n - 2) def test(): for i in range(15): print('fib[' + str(i) + ']: ' + str(fibonacci(i))) test()
instruct = [] # keeps the splitted version of the instructions filename = input("Enter the filename: ") # gets the filename as the input print("Reading...") with open(filename) as f: # goes through the file line by line, and splits each line from the spaces, and adds them into instruct list for line in f: instruct.append(line.split(" ")) f.close() # goes through the instruct list, and separates the registers and immediate values from commas, and updates instruct list for x in range(len(instruct)): instruct[x][1] = instruct[x][1].split(",") # goes through the instruct list, and separates R letter, and its number which indicates the number of the register for x in range(len(instruct)): for t in range(len(instruct[x][1])): instruct[x][1][t] = instruct[x][1][t].split("R") # keeps the binary values of the instructions binary = [] # finds the instructions' opcodes, and adds them to binary list for i in range(len(instruct)): if instruct[i][0] == "AND": binary.append("0010") elif instruct[i][0] == "OR": binary.append("0000") elif instruct[i][0] == "ADD": binary.append("0100") elif instruct[i][0] == "LD": binary.append("0111") elif instruct[i][0] == "ST": binary.append("1000") elif instruct[i][0] == "ANDI": binary.append("0011") elif instruct[i][0] == "ORI": binary.append("0001") elif instruct[i][0] == "ADDI": binary.append("0101") elif instruct[i][0] == "JUMP": binary.append("0110") elif instruct[i][0] == "PUSH": binary.append("1001") elif instruct[i][0] == "POP": binary.append("1010") # temporary list to be used when transforming binOfNum into string p = [] # converts the immediate values, and the register numbers into binary code, and saves it into first binOfNum, then binary lists #goes through the instruct list for i in range(len(instruct)): t=0; for j in range(len(instruct[i][1])): # if the instruction has 3 arguments, then enters here, and sets the values of binOfNum and index if (len(instruct[i][1]))==3 or (len(instruct[i][1])==2 and instruct[i][1][0][0] == "") and t!=1: binOfNum = [0, 0, 0, 0] index = 3 t=1; # if the instruction has 2 arguments, then enters here, and sets the values of binOfNum and index elif len(instruct[i][1]) == 2: binOfNum = [0, 0, 0, 0, 0, 0, 0, 0] index = 7 # if the instructions has 1 arguments, then enters here elif len(instruct[i][1]) == 1: binOfNum = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] index = 11 # if the number represents the register number, then enters here if instruct[i][1][j][0] == "": # converts the string value in the instruct list into integer temp = int(instruct[i][1][j][1]) # finds the corresponding binary code for the temp number while temp!=0 and index>=0: binOfNum[index] = temp%2 temp = int(temp/2) index -= 1 # converts the binOfNum values into string, and passes it into p list, then adds it to the related binary list elements p = ''.join(str(e) for e in binOfNum) binary[i] = binary[i] + "" + p # if it is an immediate value, then enters here elif instruct[i][1][j][0] != "": # converts the value into integer temp = int(instruct[i][1][j][0]) # if the immediate value is larger than zero, enters here if temp > 0: # converts temp into binary code while temp != 0 and index>=0: binOfNum[index] = temp%2 temp = int(temp/2) index -= 1 # if the immdiate value is smaller than zero, enters here elif temp < 0: # finds its positive value temp2 = temp*-1 # gets the binary code of the positive version of temp while temp2!=0 and index >=0: binOfNum[index] = temp2%2 temp2 = int(temp2/2) index -=1 # two's complement process starts # inverts the binary code of the immediate value for t in range(len(binOfNum)): if binOfNum[t] == 0: binOfNum[t] = 1 elif binOfNum[t] == 1: binOfNum[t] = 0 # part where 1 is added # if the last bit is zero, it changes it into 1 if binOfNum[len(binOfNum)-1] == 0: binOfNum[len(binOfNum)-1] = 1 # if it's not zero, then enters here else: # finds the iterator value ite = len(binOfNum)-1 # goes until it finds an element with the value of zero while ite>=0 and binOfNum[ite]!=0: binOfNum[ite] = 0 ite -= 1 # when it finishes its job with the loop, changes the value of current binOfNum's value binOfNum[ite] = 1 # adds it into the corresponding element of the binary list p = ''.join(str(e) for e in binOfNum) binary[i] = binary[i] + "" + p # in this part binary values are transformed into hexadecimal values sum = 0 # keeps the sum of 4 bits to find its hexadecimal value hexa =[] # keeps the corresponding hexadecimal values of binary code sumStr = "" # if the hexadecimal value is a letter, then sumStr is used # goes through the binary list for i in range(len(binary)): hexa.append("") # evaluates the values according to their bits for j in range(len(binary[i])): # if the current element corresponds to the leftmost bit of a 4 bit group, # then it multiplies that bit value with 8, and adds it to sum if j%4 == 0 : sum=0 sum = sum + int(binary[i][j])*8 # if the current element corresponds to the second bit from the left of a 4 bit group, # then it multiplies that bit value with 4, and adds it to sum elif j%4 == 1 : sum = sum + int(binary[i][j])*4 # if the current element corresponds to the third bit from the left of a 4 bit group, # then it multiplies that bit with 2, and adds it to sum elif j%4 == 2 : sum = sum + int(binary[i][j])*2 # if the current element is the last bit of a 4 bit group, # then it multiplies the value of that bit with 1, and adds it to sum elif j%4 == 3 : sum = sum + int(binary[i][j])*1 # after we used the last bit of a 4 bit group, it enters here to calculate its hexadecimal equivalent if j%4 == 3 and j!= 0 : # enters here if the sum value is less than 10, and it is added to as a number if(sum < 10): hexa[i] = hexa[i] + "" +str(sum) # if sum is larger than 10, enters here to get its equivalent letter, and adds it as a string else: if sum==10: sumStr="A" elif sum==11: sumStr="B" elif sum==12: sumStr="C" elif sum==13: sumStr="D" elif sum==14: sumStr="E" elif sum==15: sumStr="F" hexa[i] = hexa[i] + sumStr print(hexa[i]) print("Writing...") # creates the file for logisim, and writes hexadecimal values into it dest = open("logisim_instructions","w") dest.write("v2.0 raw") dest.write("\n") for i in range(len(hexa)): dest.write(hexa[i]) dest.write(" ") dest.close() # creates the file for verilog, and writes hexadecimal values into it dest2 = open("verilog_instructions.hex","w") for i in range(len(hexa)): dest2.write(hexa[i]) dest2.write(" ") dest2.close()
instruct = [] filename = input('Enter the filename: ') print('Reading...') with open(filename) as f: for line in f: instruct.append(line.split(' ')) f.close() for x in range(len(instruct)): instruct[x][1] = instruct[x][1].split(',') for x in range(len(instruct)): for t in range(len(instruct[x][1])): instruct[x][1][t] = instruct[x][1][t].split('R') binary = [] for i in range(len(instruct)): if instruct[i][0] == 'AND': binary.append('0010') elif instruct[i][0] == 'OR': binary.append('0000') elif instruct[i][0] == 'ADD': binary.append('0100') elif instruct[i][0] == 'LD': binary.append('0111') elif instruct[i][0] == 'ST': binary.append('1000') elif instruct[i][0] == 'ANDI': binary.append('0011') elif instruct[i][0] == 'ORI': binary.append('0001') elif instruct[i][0] == 'ADDI': binary.append('0101') elif instruct[i][0] == 'JUMP': binary.append('0110') elif instruct[i][0] == 'PUSH': binary.append('1001') elif instruct[i][0] == 'POP': binary.append('1010') p = [] for i in range(len(instruct)): t = 0 for j in range(len(instruct[i][1])): if len(instruct[i][1]) == 3 or ((len(instruct[i][1]) == 2 and instruct[i][1][0][0] == '') and t != 1): bin_of_num = [0, 0, 0, 0] index = 3 t = 1 elif len(instruct[i][1]) == 2: bin_of_num = [0, 0, 0, 0, 0, 0, 0, 0] index = 7 elif len(instruct[i][1]) == 1: bin_of_num = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] index = 11 if instruct[i][1][j][0] == '': temp = int(instruct[i][1][j][1]) while temp != 0 and index >= 0: binOfNum[index] = temp % 2 temp = int(temp / 2) index -= 1 p = ''.join((str(e) for e in binOfNum)) binary[i] = binary[i] + '' + p elif instruct[i][1][j][0] != '': temp = int(instruct[i][1][j][0]) if temp > 0: while temp != 0 and index >= 0: binOfNum[index] = temp % 2 temp = int(temp / 2) index -= 1 elif temp < 0: temp2 = temp * -1 while temp2 != 0 and index >= 0: binOfNum[index] = temp2 % 2 temp2 = int(temp2 / 2) index -= 1 for t in range(len(binOfNum)): if binOfNum[t] == 0: binOfNum[t] = 1 elif binOfNum[t] == 1: binOfNum[t] = 0 if binOfNum[len(binOfNum) - 1] == 0: binOfNum[len(binOfNum) - 1] = 1 else: ite = len(binOfNum) - 1 while ite >= 0 and binOfNum[ite] != 0: binOfNum[ite] = 0 ite -= 1 binOfNum[ite] = 1 p = ''.join((str(e) for e in binOfNum)) binary[i] = binary[i] + '' + p sum = 0 hexa = [] sum_str = '' for i in range(len(binary)): hexa.append('') for j in range(len(binary[i])): if j % 4 == 0: sum = 0 sum = sum + int(binary[i][j]) * 8 elif j % 4 == 1: sum = sum + int(binary[i][j]) * 4 elif j % 4 == 2: sum = sum + int(binary[i][j]) * 2 elif j % 4 == 3: sum = sum + int(binary[i][j]) * 1 if j % 4 == 3 and j != 0: if sum < 10: hexa[i] = hexa[i] + '' + str(sum) else: if sum == 10: sum_str = 'A' elif sum == 11: sum_str = 'B' elif sum == 12: sum_str = 'C' elif sum == 13: sum_str = 'D' elif sum == 14: sum_str = 'E' elif sum == 15: sum_str = 'F' hexa[i] = hexa[i] + sumStr print(hexa[i]) print('Writing...') dest = open('logisim_instructions', 'w') dest.write('v2.0 raw') dest.write('\n') for i in range(len(hexa)): dest.write(hexa[i]) dest.write(' ') dest.close() dest2 = open('verilog_instructions.hex', 'w') for i in range(len(hexa)): dest2.write(hexa[i]) dest2.write(' ') dest2.close()
# # PySNMP MIB module RBN-ALARM-EXT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RBN-ALARM-EXT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:43:53 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) # alarmClearDateAndTime, alarmModelEntry, alarmListName, alarmClearIndex = mibBuilder.importSymbols("ALARM-MIB", "alarmClearDateAndTime", "alarmModelEntry", "alarmListName", "alarmClearIndex") ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint") rbnModules, = mibBuilder.importSymbols("RBN-SMI", "rbnModules") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, Unsigned32, iso, MibIdentifier, NotificationType, TimeTicks, ModuleIdentity, Bits, Gauge32, Counter32, IpAddress, Integer32, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "Unsigned32", "iso", "MibIdentifier", "NotificationType", "TimeTicks", "ModuleIdentity", "Bits", "Gauge32", "Counter32", "IpAddress", "Integer32", "ObjectIdentity") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") rbnAlarmExtMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 2352, 5, 53)) rbnAlarmExtMib.setRevisions(('2009-09-18 18:00',)) if mibBuilder.loadTexts: rbnAlarmExtMib.setLastUpdated('200909181800Z') if mibBuilder.loadTexts: rbnAlarmExtMib.setOrganization('Ericsson, Inc.') rbnAlarmObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1)) rbnAlarmModel = MibIdentifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 1)) rbnAlarmActive = MibIdentifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 2)) rbnAlarmClear = MibIdentifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3)) rbnAlarmModelTable = MibTable((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 1, 1), ) if mibBuilder.loadTexts: rbnAlarmModelTable.setStatus('current') rbnAlarmModelEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 1, 1, 1), ) alarmModelEntry.registerAugmentions(("RBN-ALARM-EXT-MIB", "rbnAlarmModelEntry")) rbnAlarmModelEntry.setIndexNames(*alarmModelEntry.getIndexNames()) if mibBuilder.loadTexts: rbnAlarmModelEntry.setStatus('current') rbnAlarmModelResourceIdx = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 1, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(3, 512), ))).setMaxAccess("readcreate") if mibBuilder.loadTexts: rbnAlarmModelResourceIdx.setStatus('current') rbnAlarmClearResourceTable = MibTable((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1), ) if mibBuilder.loadTexts: rbnAlarmClearResourceTable.setStatus('current') rbnAlarmClearResourceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1), ).setIndexNames((0, "ALARM-MIB", "alarmListName"), (0, "ALARM-MIB", "alarmClearDateAndTime"), (0, "ALARM-MIB", "alarmClearIndex")) if mibBuilder.loadTexts: rbnAlarmClearResourceEntry.setStatus('current') rbnAlarmClearResourceID = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 1), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnAlarmClearResourceID.setStatus('current') rbnAlarmClearResourceValueType = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("counter32", 1), ("unsigned32", 2), ("timeTicks", 3), ("integer32", 4), ("ipAddress", 5), ("octetString", 6), ("objectId", 7), ("counter64", 8)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnAlarmClearResourceValueType.setStatus('current') rbnAlarmClearResourceCounter32Val = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnAlarmClearResourceCounter32Val.setStatus('current') rbnAlarmClearResourceUnsigned32Val = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnAlarmClearResourceUnsigned32Val.setStatus('current') rbnAlarmClearResourceTimeTicksVal = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 6), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnAlarmClearResourceTimeTicksVal.setStatus('current') rbnAlarmClearResourceInteger32Val = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnAlarmClearResourceInteger32Val.setStatus('current') rbnAlarmClearResourceOctetStringVal = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnAlarmClearResourceOctetStringVal.setStatus('current') rbnAlarmClearResourceIpAddressVal = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 9), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnAlarmClearResourceIpAddressVal.setStatus('current') rbnAlarmClearResourceOidVal = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 10), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnAlarmClearResourceOidVal.setStatus('current') rbnAlarmClearResourceCounter64Val = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnAlarmClearResourceCounter64Val.setStatus('current') rbnAlarmExtConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 2)) rbnAlarmExtCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 2, 1)) rbnAlarmExtGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 2, 2)) rbnAlarmExtCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2352, 5, 53, 2, 1, 1)).setObjects(("RBN-ALARM-EXT-MIB", "rbnAlarmModelGroup"), ("RBN-ALARM-EXT-MIB", "rbnAlarmClearGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rbnAlarmExtCompliance = rbnAlarmExtCompliance.setStatus('current') rbnAlarmModelGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2352, 5, 53, 2, 2, 1)).setObjects(("RBN-ALARM-EXT-MIB", "rbnAlarmModelResourceIdx")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rbnAlarmModelGroup = rbnAlarmModelGroup.setStatus('current') rbnAlarmClearGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2352, 5, 53, 2, 2, 2)).setObjects(("RBN-ALARM-EXT-MIB", "rbnAlarmClearResourceID"), ("RBN-ALARM-EXT-MIB", "rbnAlarmClearResourceValueType"), ("RBN-ALARM-EXT-MIB", "rbnAlarmClearResourceCounter32Val"), ("RBN-ALARM-EXT-MIB", "rbnAlarmClearResourceUnsigned32Val"), ("RBN-ALARM-EXT-MIB", "rbnAlarmClearResourceTimeTicksVal"), ("RBN-ALARM-EXT-MIB", "rbnAlarmClearResourceInteger32Val"), ("RBN-ALARM-EXT-MIB", "rbnAlarmClearResourceOctetStringVal"), ("RBN-ALARM-EXT-MIB", "rbnAlarmClearResourceIpAddressVal"), ("RBN-ALARM-EXT-MIB", "rbnAlarmClearResourceOidVal"), ("RBN-ALARM-EXT-MIB", "rbnAlarmClearResourceCounter64Val")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rbnAlarmClearGroup = rbnAlarmClearGroup.setStatus('current') mibBuilder.exportSymbols("RBN-ALARM-EXT-MIB", rbnAlarmClearResourceUnsigned32Val=rbnAlarmClearResourceUnsigned32Val, rbnAlarmClearResourceOctetStringVal=rbnAlarmClearResourceOctetStringVal, rbnAlarmExtGroups=rbnAlarmExtGroups, rbnAlarmExtMib=rbnAlarmExtMib, rbnAlarmExtCompliances=rbnAlarmExtCompliances, rbnAlarmClearResourceTable=rbnAlarmClearResourceTable, rbnAlarmClearResourceID=rbnAlarmClearResourceID, rbnAlarmClearResourceOidVal=rbnAlarmClearResourceOidVal, rbnAlarmClearGroup=rbnAlarmClearGroup, rbnAlarmClearResourceInteger32Val=rbnAlarmClearResourceInteger32Val, rbnAlarmModelGroup=rbnAlarmModelGroup, rbnAlarmModel=rbnAlarmModel, rbnAlarmClearResourceTimeTicksVal=rbnAlarmClearResourceTimeTicksVal, rbnAlarmClearResourceCounter64Val=rbnAlarmClearResourceCounter64Val, rbnAlarmClear=rbnAlarmClear, rbnAlarmClearResourceValueType=rbnAlarmClearResourceValueType, rbnAlarmClearResourceIpAddressVal=rbnAlarmClearResourceIpAddressVal, rbnAlarmClearResourceCounter32Val=rbnAlarmClearResourceCounter32Val, rbnAlarmExtConformance=rbnAlarmExtConformance, PYSNMP_MODULE_ID=rbnAlarmExtMib, rbnAlarmModelResourceIdx=rbnAlarmModelResourceIdx, rbnAlarmExtCompliance=rbnAlarmExtCompliance, rbnAlarmObjects=rbnAlarmObjects, rbnAlarmClearResourceEntry=rbnAlarmClearResourceEntry, rbnAlarmModelTable=rbnAlarmModelTable, rbnAlarmActive=rbnAlarmActive, rbnAlarmModelEntry=rbnAlarmModelEntry)
(alarm_clear_date_and_time, alarm_model_entry, alarm_list_name, alarm_clear_index) = mibBuilder.importSymbols('ALARM-MIB', 'alarmClearDateAndTime', 'alarmModelEntry', 'alarmListName', 'alarmClearIndex') (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, constraints_intersection, value_range_constraint, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint') (rbn_modules,) = mibBuilder.importSymbols('RBN-SMI', 'rbnModules') (notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup') (mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, unsigned32, iso, mib_identifier, notification_type, time_ticks, module_identity, bits, gauge32, counter32, ip_address, integer32, object_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'Unsigned32', 'iso', 'MibIdentifier', 'NotificationType', 'TimeTicks', 'ModuleIdentity', 'Bits', 'Gauge32', 'Counter32', 'IpAddress', 'Integer32', 'ObjectIdentity') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') rbn_alarm_ext_mib = module_identity((1, 3, 6, 1, 4, 1, 2352, 5, 53)) rbnAlarmExtMib.setRevisions(('2009-09-18 18:00',)) if mibBuilder.loadTexts: rbnAlarmExtMib.setLastUpdated('200909181800Z') if mibBuilder.loadTexts: rbnAlarmExtMib.setOrganization('Ericsson, Inc.') rbn_alarm_objects = mib_identifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1)) rbn_alarm_model = mib_identifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 1)) rbn_alarm_active = mib_identifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 2)) rbn_alarm_clear = mib_identifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3)) rbn_alarm_model_table = mib_table((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 1, 1)) if mibBuilder.loadTexts: rbnAlarmModelTable.setStatus('current') rbn_alarm_model_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 1, 1, 1)) alarmModelEntry.registerAugmentions(('RBN-ALARM-EXT-MIB', 'rbnAlarmModelEntry')) rbnAlarmModelEntry.setIndexNames(*alarmModelEntry.getIndexNames()) if mibBuilder.loadTexts: rbnAlarmModelEntry.setStatus('current') rbn_alarm_model_resource_idx = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 1, 1, 1, 1), unsigned32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(3, 512)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: rbnAlarmModelResourceIdx.setStatus('current') rbn_alarm_clear_resource_table = mib_table((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1)) if mibBuilder.loadTexts: rbnAlarmClearResourceTable.setStatus('current') rbn_alarm_clear_resource_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1)).setIndexNames((0, 'ALARM-MIB', 'alarmListName'), (0, 'ALARM-MIB', 'alarmClearDateAndTime'), (0, 'ALARM-MIB', 'alarmClearIndex')) if mibBuilder.loadTexts: rbnAlarmClearResourceEntry.setStatus('current') rbn_alarm_clear_resource_id = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 1), object_identifier()).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnAlarmClearResourceID.setStatus('current') rbn_alarm_clear_resource_value_type = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('counter32', 1), ('unsigned32', 2), ('timeTicks', 3), ('integer32', 4), ('ipAddress', 5), ('octetString', 6), ('objectId', 7), ('counter64', 8)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnAlarmClearResourceValueType.setStatus('current') rbn_alarm_clear_resource_counter32_val = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnAlarmClearResourceCounter32Val.setStatus('current') rbn_alarm_clear_resource_unsigned32_val = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 5), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnAlarmClearResourceUnsigned32Val.setStatus('current') rbn_alarm_clear_resource_time_ticks_val = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 6), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnAlarmClearResourceTimeTicksVal.setStatus('current') rbn_alarm_clear_resource_integer32_val = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnAlarmClearResourceInteger32Val.setStatus('current') rbn_alarm_clear_resource_octet_string_val = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 8), octet_string().subtype(subtypeSpec=value_size_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnAlarmClearResourceOctetStringVal.setStatus('current') rbn_alarm_clear_resource_ip_address_val = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 9), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnAlarmClearResourceIpAddressVal.setStatus('current') rbn_alarm_clear_resource_oid_val = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 10), object_identifier()).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnAlarmClearResourceOidVal.setStatus('current') rbn_alarm_clear_resource_counter64_val = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 5, 53, 1, 3, 1, 1, 11), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnAlarmClearResourceCounter64Val.setStatus('current') rbn_alarm_ext_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 2)) rbn_alarm_ext_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 2, 1)) rbn_alarm_ext_groups = mib_identifier((1, 3, 6, 1, 4, 1, 2352, 5, 53, 2, 2)) rbn_alarm_ext_compliance = module_compliance((1, 3, 6, 1, 4, 1, 2352, 5, 53, 2, 1, 1)).setObjects(('RBN-ALARM-EXT-MIB', 'rbnAlarmModelGroup'), ('RBN-ALARM-EXT-MIB', 'rbnAlarmClearGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rbn_alarm_ext_compliance = rbnAlarmExtCompliance.setStatus('current') rbn_alarm_model_group = object_group((1, 3, 6, 1, 4, 1, 2352, 5, 53, 2, 2, 1)).setObjects(('RBN-ALARM-EXT-MIB', 'rbnAlarmModelResourceIdx')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rbn_alarm_model_group = rbnAlarmModelGroup.setStatus('current') rbn_alarm_clear_group = object_group((1, 3, 6, 1, 4, 1, 2352, 5, 53, 2, 2, 2)).setObjects(('RBN-ALARM-EXT-MIB', 'rbnAlarmClearResourceID'), ('RBN-ALARM-EXT-MIB', 'rbnAlarmClearResourceValueType'), ('RBN-ALARM-EXT-MIB', 'rbnAlarmClearResourceCounter32Val'), ('RBN-ALARM-EXT-MIB', 'rbnAlarmClearResourceUnsigned32Val'), ('RBN-ALARM-EXT-MIB', 'rbnAlarmClearResourceTimeTicksVal'), ('RBN-ALARM-EXT-MIB', 'rbnAlarmClearResourceInteger32Val'), ('RBN-ALARM-EXT-MIB', 'rbnAlarmClearResourceOctetStringVal'), ('RBN-ALARM-EXT-MIB', 'rbnAlarmClearResourceIpAddressVal'), ('RBN-ALARM-EXT-MIB', 'rbnAlarmClearResourceOidVal'), ('RBN-ALARM-EXT-MIB', 'rbnAlarmClearResourceCounter64Val')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rbn_alarm_clear_group = rbnAlarmClearGroup.setStatus('current') mibBuilder.exportSymbols('RBN-ALARM-EXT-MIB', rbnAlarmClearResourceUnsigned32Val=rbnAlarmClearResourceUnsigned32Val, rbnAlarmClearResourceOctetStringVal=rbnAlarmClearResourceOctetStringVal, rbnAlarmExtGroups=rbnAlarmExtGroups, rbnAlarmExtMib=rbnAlarmExtMib, rbnAlarmExtCompliances=rbnAlarmExtCompliances, rbnAlarmClearResourceTable=rbnAlarmClearResourceTable, rbnAlarmClearResourceID=rbnAlarmClearResourceID, rbnAlarmClearResourceOidVal=rbnAlarmClearResourceOidVal, rbnAlarmClearGroup=rbnAlarmClearGroup, rbnAlarmClearResourceInteger32Val=rbnAlarmClearResourceInteger32Val, rbnAlarmModelGroup=rbnAlarmModelGroup, rbnAlarmModel=rbnAlarmModel, rbnAlarmClearResourceTimeTicksVal=rbnAlarmClearResourceTimeTicksVal, rbnAlarmClearResourceCounter64Val=rbnAlarmClearResourceCounter64Val, rbnAlarmClear=rbnAlarmClear, rbnAlarmClearResourceValueType=rbnAlarmClearResourceValueType, rbnAlarmClearResourceIpAddressVal=rbnAlarmClearResourceIpAddressVal, rbnAlarmClearResourceCounter32Val=rbnAlarmClearResourceCounter32Val, rbnAlarmExtConformance=rbnAlarmExtConformance, PYSNMP_MODULE_ID=rbnAlarmExtMib, rbnAlarmModelResourceIdx=rbnAlarmModelResourceIdx, rbnAlarmExtCompliance=rbnAlarmExtCompliance, rbnAlarmObjects=rbnAlarmObjects, rbnAlarmClearResourceEntry=rbnAlarmClearResourceEntry, rbnAlarmModelTable=rbnAlarmModelTable, rbnAlarmActive=rbnAlarmActive, rbnAlarmModelEntry=rbnAlarmModelEntry)
#! /usr/bin/env python class StateUpdate: def __init__( self, position_update=None, phase_update=None, phase_level_update=None, small_phase_update=None, phase_correction_update=None, velocity_update=None, orientation_update=None, angular_speed_update=None, teleop_update=None ): self.position_update = position_update self.phase_update = phase_update self.phase_level_update = phase_level_update self.small_phase_update = small_phase_update self.phase_correction_update = phase_correction_update self.velocity_update = velocity_update self.orientation_update = orientation_update self.angular_speed_update = angular_speed_update self.teleop_update = teleop_update def __str__(self): return "phase update: {}, \ phase_level_update: {}, \ small_phase_update: {}, \ phase_correction_update: {}, \ position update: {}, \ orientation update: {}, \ velocity update: {}, \ angular speed update: {}".format( self.phase_update, self.phase_level_update, self.small_phase_update, self.phase_correction_update, self.position_update, self.orientation_update, self.velocity_update, self.angular_speed_update, )
class Stateupdate: def __init__(self, position_update=None, phase_update=None, phase_level_update=None, small_phase_update=None, phase_correction_update=None, velocity_update=None, orientation_update=None, angular_speed_update=None, teleop_update=None): self.position_update = position_update self.phase_update = phase_update self.phase_level_update = phase_level_update self.small_phase_update = small_phase_update self.phase_correction_update = phase_correction_update self.velocity_update = velocity_update self.orientation_update = orientation_update self.angular_speed_update = angular_speed_update self.teleop_update = teleop_update def __str__(self): return 'phase update: {}, phase_level_update: {}, small_phase_update: {}, phase_correction_update: {}, position update: {}, orientation update: {}, velocity update: {}, angular speed update: {}'.format(self.phase_update, self.phase_level_update, self.small_phase_update, self.phase_correction_update, self.position_update, self.orientation_update, self.velocity_update, self.angular_speed_update)
#!/usr/bin/env python3 def ntchange( variant_frame ): GC2CG = [] GC2TA = [] GC2AT = [] TA2AT = [] TA2GC = [] TA2CG = [] for ref, alt in zip(variant_frame['REF'], variant_frame['ALT']): ref = ref.upper() alt = alt.upper() if (ref == 'G' and alt == 'C') or (ref == 'C' and alt == 'G'): GC2CG.append(1) GC2TA.append(0) GC2AT.append(0) TA2AT.append(0) TA2GC.append(0) TA2CG.append(0) elif (ref == 'G' and alt == 'T') or (ref == 'C' and alt == 'A'): GC2CG.append(0) GC2TA.append(1) GC2AT.append(0) TA2AT.append(0) TA2GC.append(0) TA2CG.append(0) elif (ref == 'G' and alt == 'A') or (ref == 'C' and alt == 'T'): GC2CG.append(0) GC2TA.append(0) GC2AT.append(1) TA2AT.append(0) TA2GC.append(0) TA2CG.append(0) elif (ref == 'T' and alt == 'A') or (ref == 'A' and alt == 'T'): GC2CG.append(0) GC2TA.append(0) GC2AT.append(0) TA2AT.append(1) TA2GC.append(0) TA2CG.append(0) elif (ref == 'T' and alt == 'G') or (ref == 'A' and alt == 'C'): GC2CG.append(0) GC2TA.append(0) GC2AT.append(0) TA2AT.append(0) TA2GC.append(1) TA2CG.append(0) elif (ref == 'T' and alt == 'C') or (ref == 'A' and alt == 'G'): GC2CG.append(0) GC2TA.append(0) GC2AT.append(0) TA2AT.append(0) TA2GC.append(0) TA2CG.append(1) else: GC2CG.append(0) GC2TA.append(0) GC2AT.append(0) TA2AT.append(0) TA2GC.append(0) TA2CG.append(0) new_data = variant_frame.assign(GC2CG = GC2CG, GC2TA = GC2CG, GC2AT = GC2CG, TA2AT = GC2CG, TA2GC = GC2CG, TA2CG = GC2CG) return new_data
def ntchange(variant_frame): gc2_cg = [] gc2_ta = [] gc2_at = [] ta2_at = [] ta2_gc = [] ta2_cg = [] for (ref, alt) in zip(variant_frame['REF'], variant_frame['ALT']): ref = ref.upper() alt = alt.upper() if ref == 'G' and alt == 'C' or (ref == 'C' and alt == 'G'): GC2CG.append(1) GC2TA.append(0) GC2AT.append(0) TA2AT.append(0) TA2GC.append(0) TA2CG.append(0) elif ref == 'G' and alt == 'T' or (ref == 'C' and alt == 'A'): GC2CG.append(0) GC2TA.append(1) GC2AT.append(0) TA2AT.append(0) TA2GC.append(0) TA2CG.append(0) elif ref == 'G' and alt == 'A' or (ref == 'C' and alt == 'T'): GC2CG.append(0) GC2TA.append(0) GC2AT.append(1) TA2AT.append(0) TA2GC.append(0) TA2CG.append(0) elif ref == 'T' and alt == 'A' or (ref == 'A' and alt == 'T'): GC2CG.append(0) GC2TA.append(0) GC2AT.append(0) TA2AT.append(1) TA2GC.append(0) TA2CG.append(0) elif ref == 'T' and alt == 'G' or (ref == 'A' and alt == 'C'): GC2CG.append(0) GC2TA.append(0) GC2AT.append(0) TA2AT.append(0) TA2GC.append(1) TA2CG.append(0) elif ref == 'T' and alt == 'C' or (ref == 'A' and alt == 'G'): GC2CG.append(0) GC2TA.append(0) GC2AT.append(0) TA2AT.append(0) TA2GC.append(0) TA2CG.append(1) else: GC2CG.append(0) GC2TA.append(0) GC2AT.append(0) TA2AT.append(0) TA2GC.append(0) TA2CG.append(0) new_data = variant_frame.assign(GC2CG=GC2CG, GC2TA=GC2CG, GC2AT=GC2CG, TA2AT=GC2CG, TA2GC=GC2CG, TA2CG=GC2CG) return new_data
roster = (('ipns adrres one', 'Name one'), ('ipns adrres two', 'Name two'), ('etc', 'etc'))
roster = (('ipns adrres one', 'Name one'), ('ipns adrres two', 'Name two'), ('etc', 'etc'))
class Config(object): pass class ProdConfig(Config): DEBUG = False SQLALCHEMY_DATABASE_URI = ( "postgresql+psycopg2://test:password@postgres:5432/mex_polit_db" ) SQLALCHEMY_TRACK_MODIFICATIONS = False class DevConfig(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = ( "postgresql+psycopg2://test:password@localhost:5432/mex_polit_db" ) SQLALCHEMY_TRACK_MODIFICATIONS = False class TestConfig(Config): DEBUG = True DEBUG_TB_ENABLED = False SQLALCHEMY_DATABASE_URI = "sqlite:///:memory:" SQLALCHEMY_TRACK_MODIFICATIONS = False CACHE_TYPE = "null" WTF_CSRF_ENABLED = False
class Config(object): pass class Prodconfig(Config): debug = False sqlalchemy_database_uri = 'postgresql+psycopg2://test:password@postgres:5432/mex_polit_db' sqlalchemy_track_modifications = False class Devconfig(Config): debug = True sqlalchemy_database_uri = 'postgresql+psycopg2://test:password@localhost:5432/mex_polit_db' sqlalchemy_track_modifications = False class Testconfig(Config): debug = True debug_tb_enabled = False sqlalchemy_database_uri = 'sqlite:///:memory:' sqlalchemy_track_modifications = False cache_type = 'null' wtf_csrf_enabled = False
def test_construction(sm_config): assert True is sm_config.debug viewservice_config = sm_config.serviceconfigs['viewservice'] assert 99 == viewservice_config.flag
def test_construction(sm_config): assert True is sm_config.debug viewservice_config = sm_config.serviceconfigs['viewservice'] assert 99 == viewservice_config.flag
# Module is an abstraction of a candle, which is the data structure returned when requesting price history # data from the API. It also contains methods for analysis. class Candle(object): def __init__(self, json): self.openPrice = json['open'] self.closePrice = json['close'] self.lowPrice = json['low'] self.highPrice = json['high'] self.volume = json['volume'] self.datetime = json['datetime'] def PrintAttributes(self): print("Time: " + str(self.datetime) + "\tOpen: $" + str(self.openPrice) + "\tClose: $" + str(self.closePrice) + "\tLow: $" + str(self.lowPrice) + "\tHigh: $" + str(self.highPrice) + "\tVolume: " + str(self.volume))
class Candle(object): def __init__(self, json): self.openPrice = json['open'] self.closePrice = json['close'] self.lowPrice = json['low'] self.highPrice = json['high'] self.volume = json['volume'] self.datetime = json['datetime'] def print_attributes(self): print('Time: ' + str(self.datetime) + '\tOpen: $' + str(self.openPrice) + '\tClose: $' + str(self.closePrice) + '\tLow: $' + str(self.lowPrice) + '\tHigh: $' + str(self.highPrice) + '\tVolume: ' + str(self.volume))