content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
class Iterator(object): def __init__(self, iterable, looping: bool = False): self.iterable = iterable self.lastPos = 0 self.looping = looping def __next__(self): pos = self.lastPos self.lastPos += 1 if self.lastPos >= len(self.iterable): if self.looping: self.lastPos = 0 else: raise StopIteration return self.iterable[pos]
class Iterator(object): def __init__(self, iterable, looping: bool=False): self.iterable = iterable self.lastPos = 0 self.looping = looping def __next__(self): pos = self.lastPos self.lastPos += 1 if self.lastPos >= len(self.iterable): if self.looping: self.lastPos = 0 else: raise StopIteration return self.iterable[pos]
################################################################################## #### Runtime configuration ################################################################################## sampleCounter = 0 ################################################################################## #### General configuration ################################################################################## version = "1.0.2103.0401" ################################################################################## #### LCD configuration ################################################################################## lcdI2cExpanderType = "PCF8574" lcdI2cAddress = 0x27 lcdColumnCount = 20 lcdRowCount = 4
sample_counter = 0 version = '1.0.2103.0401' lcd_i2c_expander_type = 'PCF8574' lcd_i2c_address = 39 lcd_column_count = 20 lcd_row_count = 4
# REPLACE EVERYTHING IN CURLY BRACKETS {}, INCLUDING THE BRACKETS THEMSELVES. # THEN RENAME THIS FILE TO constants.py AND MOVE IT INTO YOUR PROJECT'S ROOT CONNECT_BASE_URL = '{YOUR BASE URL}/api/xml?action=' CONNECT_LOGIN = '{YOUR LOGIN}' CONNECT_PWD = '{YOUR PASSWORD}' # USERS YOU WANT TO BE ABLE TO EXCLUDE FROM REPORTS CONNECT_ADMIN_USERS = ['{USER1LOGIN}', '{USER2LOGIN}', '{USER3LOGIN}' ]
connect_base_url = '{YOUR BASE URL}/api/xml?action=' connect_login = '{YOUR LOGIN}' connect_pwd = '{YOUR PASSWORD}' connect_admin_users = ['{USER1LOGIN}', '{USER2LOGIN}', '{USER3LOGIN}']
# -*- coding: utf-8 -*- def crearCombinaciones(abecedario): for d1 in abecedario: for d2 in abecedario: for d3 in abecedario: for d4 in abecedario: #print(d1 + '' + d2 + '' + d3 + '' + d4) f.write(d1 + '' + d2 + '' + d3 + '' + d4) f.write('\n') abecedario = ['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'] f = open("dico.txt", "w") crearCombinaciones(abecedario) f.close()
def crear_combinaciones(abecedario): for d1 in abecedario: for d2 in abecedario: for d3 in abecedario: for d4 in abecedario: f.write(d1 + '' + d2 + '' + d3 + '' + d4) f.write('\n') abecedario = ['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'] f = open('dico.txt', 'w') crear_combinaciones(abecedario) f.close()
set_name(0x8009CFEC, "VID_OpenModule__Fv", SN_NOWARN) set_name(0x8009D0AC, "InitScreens__Fv", SN_NOWARN) set_name(0x8009D19C, "MEM_SetupMem__Fv", SN_NOWARN) set_name(0x8009D1C8, "SetupWorkRam__Fv", SN_NOWARN) set_name(0x8009D258, "SYSI_Init__Fv", SN_NOWARN) set_name(0x8009D364, "GM_Open__Fv", SN_NOWARN) set_name(0x8009D388, "PA_Open__Fv", SN_NOWARN) set_name(0x8009D3C0, "PAD_Open__Fv", SN_NOWARN) set_name(0x8009D404, "OVR_Open__Fv", SN_NOWARN) set_name(0x8009D424, "SCR_Open__Fv", SN_NOWARN) set_name(0x8009D454, "DEC_Open__Fv", SN_NOWARN)
set_name(2148126700, 'VID_OpenModule__Fv', SN_NOWARN) set_name(2148126892, 'InitScreens__Fv', SN_NOWARN) set_name(2148127132, 'MEM_SetupMem__Fv', SN_NOWARN) set_name(2148127176, 'SetupWorkRam__Fv', SN_NOWARN) set_name(2148127320, 'SYSI_Init__Fv', SN_NOWARN) set_name(2148127588, 'GM_Open__Fv', SN_NOWARN) set_name(2148127624, 'PA_Open__Fv', SN_NOWARN) set_name(2148127680, 'PAD_Open__Fv', SN_NOWARN) set_name(2148127748, 'OVR_Open__Fv', SN_NOWARN) set_name(2148127780, 'SCR_Open__Fv', SN_NOWARN) set_name(2148127828, 'DEC_Open__Fv', SN_NOWARN)
lr_scheduler = dict( name='poly_scheduler', epochs=30, power=0.9 )
lr_scheduler = dict(name='poly_scheduler', epochs=30, power=0.9)
size(800, 600) background(255) triangle(20, 20, 20, 50, 50, 20) triangle(200, 100, 200, 150, 300, 320) triangle(700, 500, 800, 550, 600, 600)
size(800, 600) background(255) triangle(20, 20, 20, 50, 50, 20) triangle(200, 100, 200, 150, 300, 320) triangle(700, 500, 800, 550, 600, 600)
#part 1 count = 0 expected_fields = {'byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid'} received_fields = set() with open("input.txt") as f: for line in f: if line != '\n': fields = {i[:3] for i in line.split(' ')} received_fields.update(fields) else: difference = expected_fields - received_fields if not difference: count += 1 received_fields.clear() print(count) #part 2 count = 0 expected_fields = {'byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid'} received_fields = set() received_pairs = {} with open("input.txt") as f: for line in f: if line != '\n': for pair in line.split(' '): key, value = pair.split(':') received_pairs[key.strip()] = value.strip() received_fields.add(key) else: difference = expected_fields - received_fields if not difference: rules = { 'byr': lambda x: 1920 <= int(x) <= 2002, 'iyr': lambda x: 2010 <= int(x) <= 2020, 'eyr': lambda x: 2020 <= int(x) <= 2030, 'hgt': lambda x: 150 <= int(x[:-2]) <= 193 if x[-2:] == 'cm' \ else 59 <= int(x[:-2]) <= 76 if x[-2:] == 'in' else False, 'hcl': lambda x: x[0] == '#' and len(x) == 7 and \ all(map(lambda y: '0' <= y <= '9' or 'a' <= y <= 'f', x[1:])), 'ecl': lambda x: x in {'amb', 'blu', 'brn', 'gry', 'grn', 'hzl', 'oth'}, 'pid': lambda x: len(x) == 9 and all(map(lambda y: '0' <= y <= '9', x)), 'cid': lambda x: True } for key in received_pairs: if not rules[key](received_pairs[key]): break else: count += 1 received_fields.clear() received_pairs.clear() print(count)
count = 0 expected_fields = {'byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid'} received_fields = set() with open('input.txt') as f: for line in f: if line != '\n': fields = {i[:3] for i in line.split(' ')} received_fields.update(fields) else: difference = expected_fields - received_fields if not difference: count += 1 received_fields.clear() print(count) count = 0 expected_fields = {'byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid'} received_fields = set() received_pairs = {} with open('input.txt') as f: for line in f: if line != '\n': for pair in line.split(' '): (key, value) = pair.split(':') received_pairs[key.strip()] = value.strip() received_fields.add(key) else: difference = expected_fields - received_fields if not difference: rules = {'byr': lambda x: 1920 <= int(x) <= 2002, 'iyr': lambda x: 2010 <= int(x) <= 2020, 'eyr': lambda x: 2020 <= int(x) <= 2030, 'hgt': lambda x: 150 <= int(x[:-2]) <= 193 if x[-2:] == 'cm' else 59 <= int(x[:-2]) <= 76 if x[-2:] == 'in' else False, 'hcl': lambda x: x[0] == '#' and len(x) == 7 and all(map(lambda y: '0' <= y <= '9' or 'a' <= y <= 'f', x[1:])), 'ecl': lambda x: x in {'amb', 'blu', 'brn', 'gry', 'grn', 'hzl', 'oth'}, 'pid': lambda x: len(x) == 9 and all(map(lambda y: '0' <= y <= '9', x)), 'cid': lambda x: True} for key in received_pairs: if not rules[key](received_pairs[key]): break else: count += 1 received_fields.clear() received_pairs.clear() print(count)
ACTION_CREATED = 'created' ACTION_UPDATED = 'updated' ACTION_DELETED = 'deleted' ACTION_OTHER = 'other' ACTION_CHOICES = ( (ACTION_CREATED, ACTION_CREATED), (ACTION_UPDATED, ACTION_UPDATED), (ACTION_DELETED, ACTION_DELETED), (ACTION_OTHER, ACTION_OTHER), ) LOG_LEVEL_CRITICAL = 'CRITICAL' LOG_LEVEL_ERROR = 'ERROR' LOG_LEVEL_WARNING = 'WARNING' LOG_LEVEL_INFO = 'INFO' LOG_LEVEL_DEBUG = 'DEBUG' LOG_LEVEL_NOTSET = 'NOTSET' LOG_LEVEL_CHOICES = ( (LOG_LEVEL_CRITICAL, LOG_LEVEL_CRITICAL), (LOG_LEVEL_ERROR, LOG_LEVEL_ERROR), (LOG_LEVEL_WARNING, LOG_LEVEL_WARNING), (LOG_LEVEL_INFO, LOG_LEVEL_INFO), (LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG), (LOG_LEVEL_NOTSET, LOG_LEVEL_NOTSET), )
action_created = 'created' action_updated = 'updated' action_deleted = 'deleted' action_other = 'other' action_choices = ((ACTION_CREATED, ACTION_CREATED), (ACTION_UPDATED, ACTION_UPDATED), (ACTION_DELETED, ACTION_DELETED), (ACTION_OTHER, ACTION_OTHER)) log_level_critical = 'CRITICAL' log_level_error = 'ERROR' log_level_warning = 'WARNING' log_level_info = 'INFO' log_level_debug = 'DEBUG' log_level_notset = 'NOTSET' log_level_choices = ((LOG_LEVEL_CRITICAL, LOG_LEVEL_CRITICAL), (LOG_LEVEL_ERROR, LOG_LEVEL_ERROR), (LOG_LEVEL_WARNING, LOG_LEVEL_WARNING), (LOG_LEVEL_INFO, LOG_LEVEL_INFO), (LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG), (LOG_LEVEL_NOTSET, LOG_LEVEL_NOTSET))
def interest(n, principle_amount): def years(x): return principle_amount + (n * principle_amount * x) / 100 return years principle = 100000 home_loan = interest(7, principle) # percentage of 7 personal_loan = interest(11, principle) # percentage of 11 print(home_loan(20)) # for 20 years print(personal_loan(3)) # for 3 years
def interest(n, principle_amount): def years(x): return principle_amount + n * principle_amount * x / 100 return years principle = 100000 home_loan = interest(7, principle) personal_loan = interest(11, principle) print(home_loan(20)) print(personal_loan(3))
class ProducerEvent: timestamp = 0 csvName = "" houseId = 0 deviceId = 0 id = 0 def __init__(self, timestamp, ids, csv_name): self.timestamp = int(timestamp) self.csvName = csv_name # ids_list = list(map(int, ids.replace("[", "").replace("]", "").replace("pv_producer", "").split(":"))) # self.houseId = int(ids_list[0]) # self.deviceId = int(ids_list[1]) ids_list = csv_name.split("_") self.houseId = int(ids_list[0]) self.deviceId = int(ids_list[1]) self.id = int(ids_list[2].split(".")[0]) def __str__(self): return "timestamp %r, csvName %r, houseId %r, deviceId %r, Id %r" %\ (self.timestamp, self.csvName, self.houseId, self.deviceId, self.id)
class Producerevent: timestamp = 0 csv_name = '' house_id = 0 device_id = 0 id = 0 def __init__(self, timestamp, ids, csv_name): self.timestamp = int(timestamp) self.csvName = csv_name ids_list = csv_name.split('_') self.houseId = int(ids_list[0]) self.deviceId = int(ids_list[1]) self.id = int(ids_list[2].split('.')[0]) def __str__(self): return 'timestamp %r, csvName %r, houseId %r, deviceId %r, Id %r' % (self.timestamp, self.csvName, self.houseId, self.deviceId, self.id)
# some mnemonics as specific to capstone CJMP_INS = ["je", "jne", "js", "jns", "jp", "jnp", "jo", "jno", "jl", "jle", "jg", "jge", "jb", "jbe", "ja", "jae", "jcxz", "jecxz", "jrcxz"] LOOP_INS = ["loop", "loopne", "loope"] JMP_INS = ["jmp", "ljmp"] CALL_INS = ["call", "lcall"] RET_INS = ["ret", "retn", "retf", "iret"] END_INS = ["ret", "retn", "retf", "iret", "int3"] REGS_32BIT = ["eax", "ebx", "ecx", "edx", "esi", "edi", "ebp", "esp"] DOUBLE_ZERO = bytearray(b"\x00\x00") DEFAULT_PROLOGUES = [ b"\x8B\xFF\x55\x8B\xEC", b"\x89\xFF\x55\x8B\xEC", b"\x55\x8B\xEC" ] # these cover 80%+ of manually confirmed function starts in the reference data set COMMON_PROLOGUES = { "5": { 32: { b"\x8B\xFF\x55\x8B\xEC": 5, # mov edi, edi, push ebp, mov ebp, esp b"\x89\xFF\x55\x8B\xEC": 3, # mov edi, edi, push ebp, mov ebp, esp }, 64: {} }, "3": { 32: { b"\x55\x8B\xEC": 3, # push ebp, mov ebp, esp }, 64: {} }, "2": { 32: { b"\x8B\xFF": 3, # mov edi, edi b"\xFF\x25": 3, # jmp dword ptr <addr> b"\x33\xC0": 2, # xor eax, eax b"\x83\xEC": 2, # sub esp, <byte> b"\x8B\x44": 2, # mov eax, dword ptr <esp + byte> b"\x81\xEC": 2, # sub esp, <byte> b"\x8D\x4D": 2, # lea ecx, dword ptr <ebp/esp +- byte> b"\x8D\x8D": 2, # lea ecx, dword ptr <ebp/esp +- byte> b"\xFF\x74": 2, # push dword ptr <addr> }, 64: {} }, "1": { 32: { b"\x6a": 3, # push <const byte> b"\x56": 3, # push esi b"\x53": 2, # push ebx b"\x51": 2, # push ecx b"\x57": 2, # push edi b"\xE8": 1, # call <offset> b"\xc3": 1 # ret }, 64: { b"\x40": 1, # x64 - push rxx b"\x44": 1, # x64 - mov rxx, ptr b"\x48": 1, # x64 - mov *, * b"\x33": 1, # xor, eax, * b"\x4c": 1, # x64 - mov reg, reg b"\xb8": 1, # mov reg, const b"\x8b": 1, # mov dword ptr, reg b"\x89": 1, # mov dword ptr, reg b"\x45": 1, # x64 - xor, reg, reg b"\xc3": 1 # retn } } } #TODO: 2018-06-27 expand the coverage in this list # https://stackoverflow.com/questions/25545470/long-multi-byte-nops-commonly-understood-macros-or-other-notation GAP_SEQUENCES = { 1: [ "\x90", # NOP1_OVERRIDE_NOP - AMD / nop - INTEL "\xCC" # int3 ], 2: [ b"\x66\x90", # NOP2_OVERRIDE_NOP - AMD / nop - INTEL b"\x8b\xc0", b"\x8b\xff", # mov edi, edi b"\x8d\x00", # lea eax, dword ptr [eax] b"\x86\xc0", # xchg al, al ], 3: [ b"\x0f\x1f\x00", # NOP3_OVERRIDE_NOP - AMD / nop - INTEL b"\x8d\x40\x00", # lea eax, dword ptr [eax] b"\x8d\x00\x00", # lea eax, dword ptr [eax] b"\x8d\x49\x00", # lea ecx, dword ptr [ecx] b"\x8d\x64\x24", # lea esp, dword ptr [esp] b"\x8d\x76\x00", b"\x66\x66\x90" ], 4: [ b"\x0f\x1f\x40\x00", # NOP4_OVERRIDE_NOP - AMD / nop - INTEL b"\x8d\x74\x26\x00", b"\x66\x66\x66\x90" ], 5: [ b"\x0f\x1f\x44\x00\x00", # NOP5_OVERRIDE_NOP - AMD / nop - INTEL b"\x90\x8d\x74\x26\x00" ], 6: [ b"\x66\x0f\x1f\x44\x00\x00", # NOP6_OVERRIDE_NOP - AMD / nop - INTEL b"\x8d\xb6\x00\x00\x00\x00" ], 7: [ b"\x0f\x1f\x80\x00\x00\x00\x00", # NOP7_OVERRIDE_NOP - AMD / nop - INTEL, b"\x8d\xb4\x26\x00\x00\x00\x00", b"\x8D\xBC\x27\x00\x00\x00\x00" ], 8: [ b"\x0f\x1f\x84\x00\x00\x00\x00\x00", # NOP8_OVERRIDE_NOP - AMD / nop - INTEL b"\x90\x8d\xb4\x26\x00\x00\x00\x00" ], 9: [ b"\x66\x0f\x1f\x84\x00\x00\x00\x00\x00", # NOP9_OVERRIDE_NOP - AMD / nop - INTEL b"\x89\xf6\x8d\xbc\x27\x00\x00\x00\x00" ], 10: [ b"\x66\x66\x0f\x1f\x84\x00\x00\x00\x00\x00", # NOP10_OVERRIDE_NOP - AMD b"\x8d\x76\x00\x8d\xbc\x27\x00\x00\x00\x00", b"\x66\x2e\x0f\x1f\x84\x00\x00\x00\x00\x00" ], 11: [ b"\x66\x66\x66\x0f\x1f\x84\x00\x00\x00\x00\x00", # NOP11_OVERRIDE_NOP - AMD b"\x8d\x74\x26\x00\x8d\xbc\x27\x00\x00\x00\x00", b"\x66\x66\x2e\x0f\x1f\x84\x00\x00\x00\x00\x00" ], 12: [ b"\x8d\xb6\x00\x00\x00\x00\x8d\xbf\x00\x00\x00\x00", b"\x66\x66\x66\x2e\x0f\x1f\x84\x00\x00\x00\x00\x00" ], 13: [ b"\x8d\xb6\x00\x00\x00\x00\x8d\xbc\x27\x00\x00\x00\x00", b"\x66\x66\x66\x66\x2e\x0f\x1f\x84\x00\x00\x00\x00\x00" ], 14: [ b"\x8d\xb4\x26\x00\x00\x00\x00\x8d\xbc\x27\x00\x00\x00\x00", b"\x66\x66\x66\x66\x66\x2e\x0f\x1f\x84\x00\x00\x00\x00\x00" ], 15: [ b"\x66\x66\x66\x66\x66\x66\x2e\x0f\x1f\x84\x00\x00\x00\x00\x00" ] } COMMON_START_BYTES = { "32": { "55": 8334, "6a": 758, "56": 756, "51": 312, "8d": 566, "83": 558, "53": 548 }, "64": { "48": 1341, "40": 349, "4c": 59, "33": 56, "44": 18, "45": 17, "e9": 16 } }
cjmp_ins = ['je', 'jne', 'js', 'jns', 'jp', 'jnp', 'jo', 'jno', 'jl', 'jle', 'jg', 'jge', 'jb', 'jbe', 'ja', 'jae', 'jcxz', 'jecxz', 'jrcxz'] loop_ins = ['loop', 'loopne', 'loope'] jmp_ins = ['jmp', 'ljmp'] call_ins = ['call', 'lcall'] ret_ins = ['ret', 'retn', 'retf', 'iret'] end_ins = ['ret', 'retn', 'retf', 'iret', 'int3'] regs_32_bit = ['eax', 'ebx', 'ecx', 'edx', 'esi', 'edi', 'ebp', 'esp'] double_zero = bytearray(b'\x00\x00') default_prologues = [b'\x8b\xffU\x8b\xec', b'\x89\xffU\x8b\xec', b'U\x8b\xec'] common_prologues = {'5': {32: {b'\x8b\xffU\x8b\xec': 5, b'\x89\xffU\x8b\xec': 3}, 64: {}}, '3': {32: {b'U\x8b\xec': 3}, 64: {}}, '2': {32: {b'\x8b\xff': 3, b'\xff%': 3, b'3\xc0': 2, b'\x83\xec': 2, b'\x8bD': 2, b'\x81\xec': 2, b'\x8dM': 2, b'\x8d\x8d': 2, b'\xfft': 2}, 64: {}}, '1': {32: {b'j': 3, b'V': 3, b'S': 2, b'Q': 2, b'W': 2, b'\xe8': 1, b'\xc3': 1}, 64: {b'@': 1, b'D': 1, b'H': 1, b'3': 1, b'L': 1, b'\xb8': 1, b'\x8b': 1, b'\x89': 1, b'E': 1, b'\xc3': 1}}} gap_sequences = {1: ['\x90', 'Ì'], 2: [b'f\x90', b'\x8b\xc0', b'\x8b\xff', b'\x8d\x00', b'\x86\xc0'], 3: [b'\x0f\x1f\x00', b'\x8d@\x00', b'\x8d\x00\x00', b'\x8dI\x00', b'\x8dd$', b'\x8dv\x00', b'ff\x90'], 4: [b'\x0f\x1f@\x00', b'\x8dt&\x00', b'fff\x90'], 5: [b'\x0f\x1fD\x00\x00', b'\x90\x8dt&\x00'], 6: [b'f\x0f\x1fD\x00\x00', b'\x8d\xb6\x00\x00\x00\x00'], 7: [b'\x0f\x1f\x80\x00\x00\x00\x00', b'\x8d\xb4&\x00\x00\x00\x00', b"\x8d\xbc'\x00\x00\x00\x00"], 8: [b'\x0f\x1f\x84\x00\x00\x00\x00\x00', b'\x90\x8d\xb4&\x00\x00\x00\x00'], 9: [b'f\x0f\x1f\x84\x00\x00\x00\x00\x00', b"\x89\xf6\x8d\xbc'\x00\x00\x00\x00"], 10: [b'ff\x0f\x1f\x84\x00\x00\x00\x00\x00', b"\x8dv\x00\x8d\xbc'\x00\x00\x00\x00", b'f.\x0f\x1f\x84\x00\x00\x00\x00\x00'], 11: [b'fff\x0f\x1f\x84\x00\x00\x00\x00\x00', b"\x8dt&\x00\x8d\xbc'\x00\x00\x00\x00", b'ff.\x0f\x1f\x84\x00\x00\x00\x00\x00'], 12: [b'\x8d\xb6\x00\x00\x00\x00\x8d\xbf\x00\x00\x00\x00', b'fff.\x0f\x1f\x84\x00\x00\x00\x00\x00'], 13: [b"\x8d\xb6\x00\x00\x00\x00\x8d\xbc'\x00\x00\x00\x00", b'ffff.\x0f\x1f\x84\x00\x00\x00\x00\x00'], 14: [b"\x8d\xb4&\x00\x00\x00\x00\x8d\xbc'\x00\x00\x00\x00", b'fffff.\x0f\x1f\x84\x00\x00\x00\x00\x00'], 15: [b'ffffff.\x0f\x1f\x84\x00\x00\x00\x00\x00']} common_start_bytes = {'32': {'55': 8334, '6a': 758, '56': 756, '51': 312, '8d': 566, '83': 558, '53': 548}, '64': {'48': 1341, '40': 349, '4c': 59, '33': 56, '44': 18, '45': 17, 'e9': 16}}
def main(): # input N = int(input()) # compute N = int(1.08*N) # output if N < 206: print('Yay!') elif N == 206: print('so-so') else: print(':(') if __name__ == '__main__': main()
def main(): n = int(input()) n = int(1.08 * N) if N < 206: print('Yay!') elif N == 206: print('so-so') else: print(':(') if __name__ == '__main__': main()
# -*- coding: utf-8 -*- strings = { 'test.fallback': 'A fallback string' }
strings = {'test.fallback': 'A fallback string'}
def climb_stairs2(n: int) -> int: if n == 1 or n == 2: return n n1 = 1 n2 = 2 t = 0 for i in range(3, n + 1): t = n1 + n2 n1 = n2 n2 = t return t class StairClimber: # total variable needed for the recursive solution total = 0 # recursive, mathy way that's slow for sufficiently big numbers def climb_stairs(self, n: int) -> int: if n == 0: self.total += 1 if n >= 1: self.climb_stairs(n - 1) if n >= 2: self.climb_stairs(n - 2) return self.total # standard, boring dynamic programming way print(climb_stairs2(3)) print(climb_stairs2(38))
def climb_stairs2(n: int) -> int: if n == 1 or n == 2: return n n1 = 1 n2 = 2 t = 0 for i in range(3, n + 1): t = n1 + n2 n1 = n2 n2 = t return t class Stairclimber: total = 0 def climb_stairs(self, n: int) -> int: if n == 0: self.total += 1 if n >= 1: self.climb_stairs(n - 1) if n >= 2: self.climb_stairs(n - 2) return self.total print(climb_stairs2(3)) print(climb_stairs2(38))
#!usr/bin/python # -*- coding:utf8 -*- def gen_func(): try: yield "http://projectesdu.com" except GeneratorExit: pass yield 2 yield 3 return "bobby" if __name__ == "__main__": gen = gen_func() next(gen) gen.close() next(gen)
def gen_func(): try: yield 'http://projectesdu.com' except GeneratorExit: pass yield 2 yield 3 return 'bobby' if __name__ == '__main__': gen = gen_func() next(gen) gen.close() next(gen)
list_images = [ ".jpeg",".jpg",".png",".gif",".webp",".tiff",".psd",".raw",".bmp",".heif",".indd",".svg",".ico" ] list_documents = [ ".doc",".txt",".pdf",".xlsx",".docx",".xls",".rtf",".md",".ods",".ppt",".pptx" ] list_videos = [ ".mp4",".m4v",".f4v",".f4a",".m4b",".m4r",".f4b",".mov",".3gp", ".3gp2",".3g2",".3gpp",".3gpp2",".ogg",".oga",".ogv",".ogx",".wmv", ".asf*",".webm",".flv",".avi",".QuickTime",".HDV",".OP1a",".OP-Atom",".MPEG-TS",".wav",".lxf",".gxf" ] list_audio = [ ".mp3",".wav",".m4a",".aac",".he-aac",".ac3",".eac3",".vorbis",".wma",".pcm" ] list_applications = [ ".exe",".lnk" ] list_codes = [ ".c",".py",".java",".cpp",".js",".html",".css",".php" ] list_archives = [ ".zip",".7-zip",".7z",".bz2",".gz",".rar",".tar" ] extensions = { "Images" : list_images, "Documents" : list_documents, "Videos" : list_videos, "Audio" : list_audio, "Applications" : list_applications, "Code" : list_codes, "Archives" : list_archives }
list_images = ['.jpeg', '.jpg', '.png', '.gif', '.webp', '.tiff', '.psd', '.raw', '.bmp', '.heif', '.indd', '.svg', '.ico'] list_documents = ['.doc', '.txt', '.pdf', '.xlsx', '.docx', '.xls', '.rtf', '.md', '.ods', '.ppt', '.pptx'] list_videos = ['.mp4', '.m4v', '.f4v', '.f4a', '.m4b', '.m4r', '.f4b', '.mov', '.3gp', '.3gp2', '.3g2', '.3gpp', '.3gpp2', '.ogg', '.oga', '.ogv', '.ogx', '.wmv', '.asf*', '.webm', '.flv', '.avi', '.QuickTime', '.HDV', '.OP1a', '.OP-Atom', '.MPEG-TS', '.wav', '.lxf', '.gxf'] list_audio = ['.mp3', '.wav', '.m4a', '.aac', '.he-aac', '.ac3', '.eac3', '.vorbis', '.wma', '.pcm'] list_applications = ['.exe', '.lnk'] list_codes = ['.c', '.py', '.java', '.cpp', '.js', '.html', '.css', '.php'] list_archives = ['.zip', '.7-zip', '.7z', '.bz2', '.gz', '.rar', '.tar'] extensions = {'Images': list_images, 'Documents': list_documents, 'Videos': list_videos, 'Audio': list_audio, 'Applications': list_applications, 'Code': list_codes, 'Archives': list_archives}
# Least Common Multiple (LCM) Calculator - Burak Karabey def LCM(x, y): if x > y: limit = x else: limit = y prime_numbers = [] # Start of Finding Prime Number if limit < 2: return prime_numbers.append(0) elif limit == 2: return prime_numbers.append(2) else: prime_numbers.append(2) for t in range(3, limit): find_prime = False for r in range(2, t): if t % r == 0: find_prime = True break if not find_prime: prime_numbers.append(t) prime_numbers.sort() # End of Finding Prime Number i = 0 least_common_multiple = 1 while x != 1 or y != 1: if x % prime_numbers[i] == 0 or y % prime_numbers[i] == 0: least_common_multiple = least_common_multiple * prime_numbers[i] if x % prime_numbers[i] == 0: x = x / prime_numbers[i] if y % prime_numbers[i] == 0: y = y / prime_numbers[i] else: i += 1 return print("LCM=", least_common_multiple) # USAGE LCM(12,15)
def lcm(x, y): if x > y: limit = x else: limit = y prime_numbers = [] if limit < 2: return prime_numbers.append(0) elif limit == 2: return prime_numbers.append(2) else: prime_numbers.append(2) for t in range(3, limit): find_prime = False for r in range(2, t): if t % r == 0: find_prime = True break if not find_prime: prime_numbers.append(t) prime_numbers.sort() i = 0 least_common_multiple = 1 while x != 1 or y != 1: if x % prime_numbers[i] == 0 or y % prime_numbers[i] == 0: least_common_multiple = least_common_multiple * prime_numbers[i] if x % prime_numbers[i] == 0: x = x / prime_numbers[i] if y % prime_numbers[i] == 0: y = y / prime_numbers[i] else: i += 1 return print('LCM=', least_common_multiple) lcm(12, 15)
def is_prime(n): if n <= 1: return False elif n <= 3: return True elif n % 2 == 0 or n % 3 == 0: return False i = 5 while i * i <= n: if n % i == 0 or n % (i + 2) == 0: return False i += 6 return True T = int(input()) for _ in range(T): if is_prime(int(input())): print("Prime") else: print("Not prime")
def is_prime(n): if n <= 1: return False elif n <= 3: return True elif n % 2 == 0 or n % 3 == 0: return False i = 5 while i * i <= n: if n % i == 0 or n % (i + 2) == 0: return False i += 6 return True t = int(input()) for _ in range(T): if is_prime(int(input())): print('Prime') else: print('Not prime')
#!/usr/bin/env python3 sum=0 a=1 while a<=100: sum +=a a+=1 print(sum)
sum = 0 a = 1 while a <= 100: sum += a a += 1 print(sum)
class PositionedObjectError(Exception): def __init__(self, *args): super().__init__(*args) class RelativePositionNotSettableError(PositionedObjectError): pass class RelativeXNotSettableError(RelativePositionNotSettableError): pass class RelativeYNotSettableError(RelativePositionNotSettableError): pass class Positioned(object): def __init__(self, relative_x=None, relative_y=None, *args, **kwargs): self._relative_x = None self._relative_y = None self.relative_x = relative_x self.relative_y = relative_y super().__init__(*args, **kwargs) @property def relative_x(self): if self._relative_x is None: return 0 return self._relative_x @relative_x.setter def relative_x(self, val): self._relative_x = val @property def relative_y(self): if self._relative_y is None: return 0 return self._relative_y @relative_y.setter def relative_y(self, val): self._relative_y = val
class Positionedobjecterror(Exception): def __init__(self, *args): super().__init__(*args) class Relativepositionnotsettableerror(PositionedObjectError): pass class Relativexnotsettableerror(RelativePositionNotSettableError): pass class Relativeynotsettableerror(RelativePositionNotSettableError): pass class Positioned(object): def __init__(self, relative_x=None, relative_y=None, *args, **kwargs): self._relative_x = None self._relative_y = None self.relative_x = relative_x self.relative_y = relative_y super().__init__(*args, **kwargs) @property def relative_x(self): if self._relative_x is None: return 0 return self._relative_x @relative_x.setter def relative_x(self, val): self._relative_x = val @property def relative_y(self): if self._relative_y is None: return 0 return self._relative_y @relative_y.setter def relative_y(self, val): self._relative_y = val
# Image types INTENSITY = 'intensity' LABEL = 'label' SAMPLING_MAP = 'sampling_map' # Keys for dataset samples PATH = 'path' TYPE = 'type' STEM = 'stem' DATA = 'data' AFFINE = 'affine' # For aggregator IMAGE = 'image' LOCATION = 'location' # In PyTorch convention CHANNELS_DIMENSION = 1 # Code repository REPO_URL = 'https://github.com/fepegar/torchio/' # Data repository DATA_REPO = 'https://github.com/fepegar/torchio-data/raw/master/data/'
intensity = 'intensity' label = 'label' sampling_map = 'sampling_map' path = 'path' type = 'type' stem = 'stem' data = 'data' affine = 'affine' image = 'image' location = 'location' channels_dimension = 1 repo_url = 'https://github.com/fepegar/torchio/' data_repo = 'https://github.com/fepegar/torchio-data/raw/master/data/'
#!/usr/local/bin/python3 # Copyright 2019 NineFx Inc. # Justin Baum # 3 June 2019 # Precis Code-Generator ReasonML # https://github.com/NineFX/smeagol/blob/master/spec/code_gen/precis_cp.txt fp = open('precis_cp.txt', 'r') ranges = [] line = fp.readline() code = "DISALLOWED" prev = "DISALLOWED" firstOccurence = 0 count = 0 while line: count += 1 line = fp.readline() if len(line) < 2: break linesplit = line.split(";") codepoint = int(linesplit[0]) code = linesplit[1][:-1] if code != prev: ranges.append([firstOccurence, codepoint - 1, prev]) firstOccurence = count prev = code ranges.append([firstOccurence, count, code]) # Binary Tree def splitHalf(listy): if(len(listy) <= 2): print("switch (point) { ") for item in listy: print("| point when (point >= " + str(item[0]) + ") && (point <= " + str(item[1]) + ") =>" + item[2]) print("| _point => DISALLOWED") print("}") return splitValue = listy[len(listy)//2] firstHalf = listy[:(len(listy))//2] secondHalf = listy[(len(listy))//2:] print("if (point < "+str(splitValue[0]) +")") print("{") splitHalf(firstHalf) print("} else {") splitHalf(secondHalf) print("}") splitHalf(ranges)
fp = open('precis_cp.txt', 'r') ranges = [] line = fp.readline() code = 'DISALLOWED' prev = 'DISALLOWED' first_occurence = 0 count = 0 while line: count += 1 line = fp.readline() if len(line) < 2: break linesplit = line.split(';') codepoint = int(linesplit[0]) code = linesplit[1][:-1] if code != prev: ranges.append([firstOccurence, codepoint - 1, prev]) first_occurence = count prev = code ranges.append([firstOccurence, count, code]) def split_half(listy): if len(listy) <= 2: print('switch (point) { ') for item in listy: print('| point when (point >= ' + str(item[0]) + ') && (point <= ' + str(item[1]) + ') =>' + item[2]) print('| _point => DISALLOWED') print('}') return split_value = listy[len(listy) // 2] first_half = listy[:len(listy) // 2] second_half = listy[len(listy) // 2:] print('if (point < ' + str(splitValue[0]) + ')') print('{') split_half(firstHalf) print('} else {') split_half(secondHalf) print('}') split_half(ranges)
# https://leetcode.com/problems/unique-morse-code-words/ class Solution: def uniqueMorseRepresentations(self, words: List[str]) -> int: dictx = {"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": "--.."} keys = {} for each in words: res = "" for i in range(0, len(each)): res += dictx[each[i]] if res in keys: keys[res] += 1 else: keys[res] = 1 return len(keys.values())
class Solution: def unique_morse_representations(self, words: List[str]) -> int: dictx = {'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': '--..'} keys = {} for each in words: res = '' for i in range(0, len(each)): res += dictx[each[i]] if res in keys: keys[res] += 1 else: keys[res] = 1 return len(keys.values())
class BadBatchRequestException(Exception): def __init__(self, org, repo, message=None): super() self.org = org self.repo = repo self.message = message class UnknownBatchOperationException(Exception): def __init__(self, org, repo, operation, message=None): super() self.org = org self.repo = repo self.operation = operation class StorageException(Exception): def __init__(self, org, repo, oid, operation, message=None): super() self.org = org self.repo = repo self.oid = oid self.operation = operation self.message = message class AuthException(Exception): def __init__(self, message=None): self.message = message
class Badbatchrequestexception(Exception): def __init__(self, org, repo, message=None): super() self.org = org self.repo = repo self.message = message class Unknownbatchoperationexception(Exception): def __init__(self, org, repo, operation, message=None): super() self.org = org self.repo = repo self.operation = operation class Storageexception(Exception): def __init__(self, org, repo, oid, operation, message=None): super() self.org = org self.repo = repo self.oid = oid self.operation = operation self.message = message class Authexception(Exception): def __init__(self, message=None): self.message = message
class Agent: def __init__(self, name): self.name = name def reset(self, state): # Completely resets the state of the Agent for a new game return def make_action(self, state): # Returns a valid move in (row, column) format where 0 <= row, column < board_len move = (0, 0) return move def update_state(self, move): # Update the internal state of an agent according to the move made by the opponent (if necessary) return @staticmethod def get_params(): # Get agent parameters from command line input and return in tuple form return ()
class Agent: def __init__(self, name): self.name = name def reset(self, state): return def make_action(self, state): move = (0, 0) return move def update_state(self, move): return @staticmethod def get_params(): return ()
# # PySNMP MIB module ONEACCESS-SYS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ONEACCESS-SYS-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:25:27 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection") oacExpIMSystem, oacMIBModules = mibBuilder.importSymbols("ONEACCESS-GLOBAL-REG", "oacExpIMSystem", "oacMIBModules") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") Bits, IpAddress, Gauge32, Integer32, TimeTicks, MibIdentifier, Unsigned32, Counter32, Counter64, iso, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "IpAddress", "Gauge32", "Integer32", "TimeTicks", "MibIdentifier", "Unsigned32", "Counter32", "Counter64", "iso", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "NotificationType") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") oacSysMIBModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 13191, 1, 100, 671)) oacSysMIBModule.setRevisions(('2014-05-05 00:01', '2011-06-15 00:00', '2010-12-14 00:01', '2010-08-11 10:00', '2010-07-08 10:00',)) if mibBuilder.loadTexts: oacSysMIBModule.setLastUpdated('201405050001Z') if mibBuilder.loadTexts: oacSysMIBModule.setOrganization(' OneAccess ') class OASysHwcClass(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2)) namedValues = NamedValues(("board", 0), ("cpu", 1), ("slot", 2)) class OASysHwcType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6)) namedValues = NamedValues(("mainboard", 0), ("microprocessor", 1), ("ram", 2), ("flash", 3), ("dsp", 4), ("uplink", 5), ("module", 6)) class OASysCoreType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3)) namedValues = NamedValues(("controlplane", 0), ("dataforwarding", 1), ("application", 2), ("mixed", 3)) oacExpIMSysStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1)) oacExpIMSysHardwareDescription = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2)) oacSysMemStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 1)) oacSysCpuStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2)) oacSysSecureCrashlogCount = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 100), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysSecureCrashlogCount.setStatus('current') oacSysStartCaused = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 200), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysStartCaused.setStatus('current') oacSysIMSysMainBoard = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1)) oacExpIMSysHwComponents = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2)) oacExpIMSysFactory = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 3)) oacSysIMSysMainIdentifier = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 1), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysIMSysMainIdentifier.setStatus('current') oacSysIMSysMainManufacturedIdentity = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysIMSysMainManufacturedIdentity.setStatus('current') oacSysIMSysMainManufacturedDate = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysIMSysMainManufacturedDate.setStatus('current') oacSysIMSysMainCPU = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysIMSysMainCPU.setStatus('current') oacSysIMSysMainBSPVersion = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysIMSysMainBSPVersion.setStatus('current') oacSysIMSysMainBootVersion = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysIMSysMainBootVersion.setStatus('current') oacSysIMSysMainBootDateCreation = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysIMSysMainBootDateCreation.setStatus('current') oacSysMemoryFree = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 1, 1), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysMemoryFree.setStatus('current') oacSysMemoryAllocated = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 1, 2), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysMemoryAllocated.setStatus('current') oacSysMemoryTotal = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysMemoryTotal.setStatus('current') oacSysMemoryUsed = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysMemoryUsed.setStatus('current') oacSysCpuUsed = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 1), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysCpuUsed.setStatus('current') oacSysCpuUsedCoresCount = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 2), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysCpuUsedCoresCount.setStatus('current') oacSysCpuUsedCoresTable = MibTable((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 3), ) if mibBuilder.loadTexts: oacSysCpuUsedCoresTable.setStatus('current') oacSysCpuUsedCoresEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 3, 1), ).setIndexNames((0, "ONEACCESS-SYS-MIB", "oacSysCpuUsedIndex")) if mibBuilder.loadTexts: oacSysCpuUsedCoresEntry.setStatus('current') oacSysCpuUsedIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 3, 1, 1), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysCpuUsedIndex.setStatus('current') oacSysCpuUsedCoreType = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 3, 1, 2), OASysCoreType()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysCpuUsedCoreType.setStatus('current') oacSysCpuUsedValue = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 3, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysCpuUsedValue.setStatus('current') oacSysCpuUsedOneMinuteValue = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 3, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysCpuUsedOneMinuteValue.setStatus('current') oacSysLastRebootCause = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacSysLastRebootCause.setStatus('current') oacExpIMSysHwComponentsCount = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 1), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacExpIMSysHwComponentsCount.setStatus('current') oacExpIMSysHwComponentsTable = MibTable((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2), ) if mibBuilder.loadTexts: oacExpIMSysHwComponentsTable.setStatus('current') oacExpIMSysHwComponentsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1), ).setIndexNames((0, "ONEACCESS-SYS-MIB", "oacExpIMSysHwcIndex")) if mibBuilder.loadTexts: oacExpIMSysHwComponentsEntry.setStatus('current') oacExpIMSysHwcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 1), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacExpIMSysHwcIndex.setStatus('current') oacExpIMSysHwcClass = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 2), OASysHwcClass()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacExpIMSysHwcClass.setStatus('current') oacExpIMSysHwcType = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 3), OASysHwcType()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacExpIMSysHwcType.setStatus('current') oacExpIMSysHwcDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacExpIMSysHwcDescription.setStatus('current') oacExpIMSysHwcSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacExpIMSysHwcSerialNumber.setStatus('current') oacExpIMSysHwcManufacturer = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacExpIMSysHwcManufacturer.setStatus('current') oacExpIMSysHwcManufacturedDate = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 10))).setMaxAccess("readonly") if mibBuilder.loadTexts: oacExpIMSysHwcManufacturedDate.setStatus('current') oacExpIMSysHwcProductName = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: oacExpIMSysHwcProductName.setStatus('current') oacExpIMSysFactorySupplierID = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 3, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 14))).setMaxAccess("readonly") if mibBuilder.loadTexts: oacExpIMSysFactorySupplierID.setStatus('current') oacExpIMSysFactoryProductSalesCode = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 3, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 22))).setMaxAccess("readonly") if mibBuilder.loadTexts: oacExpIMSysFactoryProductSalesCode.setStatus('current') oacExpIMSysFactoryHwRevision = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 3, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(2, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: oacExpIMSysFactoryHwRevision.setStatus('current') mibBuilder.exportSymbols("ONEACCESS-SYS-MIB", oacSysCpuUsed=oacSysCpuUsed, oacSysCpuUsedValue=oacSysCpuUsedValue, OASysCoreType=OASysCoreType, oacSysCpuUsedIndex=oacSysCpuUsedIndex, oacExpIMSysHwcManufacturedDate=oacExpIMSysHwcManufacturedDate, oacSysCpuUsedOneMinuteValue=oacSysCpuUsedOneMinuteValue, oacSysIMSysMainIdentifier=oacSysIMSysMainIdentifier, oacSysCpuUsedCoresEntry=oacSysCpuUsedCoresEntry, oacSysCpuStatistics=oacSysCpuStatistics, oacExpIMSysFactorySupplierID=oacExpIMSysFactorySupplierID, OASysHwcClass=OASysHwcClass, oacSysIMSysMainCPU=oacSysIMSysMainCPU, oacExpIMSysHwcProductName=oacExpIMSysHwcProductName, oacExpIMSysStatistics=oacExpIMSysStatistics, oacSysMemoryFree=oacSysMemoryFree, oacSysMIBModule=oacSysMIBModule, oacSysMemoryAllocated=oacSysMemoryAllocated, oacSysMemStatistics=oacSysMemStatistics, oacExpIMSysHwcSerialNumber=oacExpIMSysHwcSerialNumber, oacSysMemoryUsed=oacSysMemoryUsed, oacExpIMSysHwComponentsTable=oacExpIMSysHwComponentsTable, oacSysMemoryTotal=oacSysMemoryTotal, oacSysCpuUsedCoresTable=oacSysCpuUsedCoresTable, oacExpIMSysHardwareDescription=oacExpIMSysHardwareDescription, oacSysIMSysMainManufacturedIdentity=oacSysIMSysMainManufacturedIdentity, oacSysIMSysMainBoard=oacSysIMSysMainBoard, oacSysIMSysMainBootDateCreation=oacSysIMSysMainBootDateCreation, oacExpIMSysHwcDescription=oacExpIMSysHwcDescription, oacSysIMSysMainBootVersion=oacSysIMSysMainBootVersion, oacExpIMSysHwcClass=oacExpIMSysHwcClass, PYSNMP_MODULE_ID=oacSysMIBModule, oacSysCpuUsedCoreType=oacSysCpuUsedCoreType, oacExpIMSysHwComponentsCount=oacExpIMSysHwComponentsCount, oacExpIMSysFactoryProductSalesCode=oacExpIMSysFactoryProductSalesCode, oacSysIMSysMainBSPVersion=oacSysIMSysMainBSPVersion, oacSysStartCaused=oacSysStartCaused, oacExpIMSysHwComponents=oacExpIMSysHwComponents, oacExpIMSysFactory=oacExpIMSysFactory, oacSysIMSysMainManufacturedDate=oacSysIMSysMainManufacturedDate, oacSysCpuUsedCoresCount=oacSysCpuUsedCoresCount, oacExpIMSysHwcIndex=oacExpIMSysHwcIndex, OASysHwcType=OASysHwcType, oacSysLastRebootCause=oacSysLastRebootCause, oacExpIMSysFactoryHwRevision=oacExpIMSysFactoryHwRevision, oacExpIMSysHwComponentsEntry=oacExpIMSysHwComponentsEntry, oacExpIMSysHwcType=oacExpIMSysHwcType, oacExpIMSysHwcManufacturer=oacExpIMSysHwcManufacturer, oacSysSecureCrashlogCount=oacSysSecureCrashlogCount)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, single_value_constraint, constraints_union, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'ConstraintsIntersection') (oac_exp_im_system, oac_mib_modules) = mibBuilder.importSymbols('ONEACCESS-GLOBAL-REG', 'oacExpIMSystem', 'oacMIBModules') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (bits, ip_address, gauge32, integer32, time_ticks, mib_identifier, unsigned32, counter32, counter64, iso, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'IpAddress', 'Gauge32', 'Integer32', 'TimeTicks', 'MibIdentifier', 'Unsigned32', 'Counter32', 'Counter64', 'iso', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'NotificationType') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') oac_sys_mib_module = module_identity((1, 3, 6, 1, 4, 1, 13191, 1, 100, 671)) oacSysMIBModule.setRevisions(('2014-05-05 00:01', '2011-06-15 00:00', '2010-12-14 00:01', '2010-08-11 10:00', '2010-07-08 10:00')) if mibBuilder.loadTexts: oacSysMIBModule.setLastUpdated('201405050001Z') if mibBuilder.loadTexts: oacSysMIBModule.setOrganization(' OneAccess ') class Oasyshwcclass(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2)) named_values = named_values(('board', 0), ('cpu', 1), ('slot', 2)) class Oasyshwctype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6)) named_values = named_values(('mainboard', 0), ('microprocessor', 1), ('ram', 2), ('flash', 3), ('dsp', 4), ('uplink', 5), ('module', 6)) class Oasyscoretype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3)) named_values = named_values(('controlplane', 0), ('dataforwarding', 1), ('application', 2), ('mixed', 3)) oac_exp_im_sys_statistics = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1)) oac_exp_im_sys_hardware_description = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2)) oac_sys_mem_statistics = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 1)) oac_sys_cpu_statistics = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2)) oac_sys_secure_crashlog_count = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 100), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysSecureCrashlogCount.setStatus('current') oac_sys_start_caused = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 200), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysStartCaused.setStatus('current') oac_sys_im_sys_main_board = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1)) oac_exp_im_sys_hw_components = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2)) oac_exp_im_sys_factory = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 3)) oac_sys_im_sys_main_identifier = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 1), object_identifier()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysIMSysMainIdentifier.setStatus('current') oac_sys_im_sys_main_manufactured_identity = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysIMSysMainManufacturedIdentity.setStatus('current') oac_sys_im_sys_main_manufactured_date = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysIMSysMainManufacturedDate.setStatus('current') oac_sys_im_sys_main_cpu = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysIMSysMainCPU.setStatus('current') oac_sys_im_sys_main_bsp_version = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysIMSysMainBSPVersion.setStatus('current') oac_sys_im_sys_main_boot_version = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysIMSysMainBootVersion.setStatus('current') oac_sys_im_sys_main_boot_date_creation = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysIMSysMainBootDateCreation.setStatus('current') oac_sys_memory_free = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 1, 1), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysMemoryFree.setStatus('current') oac_sys_memory_allocated = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 1, 2), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysMemoryAllocated.setStatus('current') oac_sys_memory_total = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 1, 3), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysMemoryTotal.setStatus('current') oac_sys_memory_used = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysMemoryUsed.setStatus('current') oac_sys_cpu_used = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 1), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysCpuUsed.setStatus('current') oac_sys_cpu_used_cores_count = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 2), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysCpuUsedCoresCount.setStatus('current') oac_sys_cpu_used_cores_table = mib_table((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 3)) if mibBuilder.loadTexts: oacSysCpuUsedCoresTable.setStatus('current') oac_sys_cpu_used_cores_entry = mib_table_row((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 3, 1)).setIndexNames((0, 'ONEACCESS-SYS-MIB', 'oacSysCpuUsedIndex')) if mibBuilder.loadTexts: oacSysCpuUsedCoresEntry.setStatus('current') oac_sys_cpu_used_index = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 3, 1, 1), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysCpuUsedIndex.setStatus('current') oac_sys_cpu_used_core_type = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 3, 1, 2), oa_sys_core_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysCpuUsedCoreType.setStatus('current') oac_sys_cpu_used_value = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 3, 1, 3), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysCpuUsedValue.setStatus('current') oac_sys_cpu_used_one_minute_value = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 2, 3, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysCpuUsedOneMinuteValue.setStatus('current') oac_sys_last_reboot_cause = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 1, 3), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacSysLastRebootCause.setStatus('current') oac_exp_im_sys_hw_components_count = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 1), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacExpIMSysHwComponentsCount.setStatus('current') oac_exp_im_sys_hw_components_table = mib_table((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2)) if mibBuilder.loadTexts: oacExpIMSysHwComponentsTable.setStatus('current') oac_exp_im_sys_hw_components_entry = mib_table_row((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1)).setIndexNames((0, 'ONEACCESS-SYS-MIB', 'oacExpIMSysHwcIndex')) if mibBuilder.loadTexts: oacExpIMSysHwComponentsEntry.setStatus('current') oac_exp_im_sys_hwc_index = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 1), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacExpIMSysHwcIndex.setStatus('current') oac_exp_im_sys_hwc_class = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 2), oa_sys_hwc_class()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacExpIMSysHwcClass.setStatus('current') oac_exp_im_sys_hwc_type = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 3), oa_sys_hwc_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacExpIMSysHwcType.setStatus('current') oac_exp_im_sys_hwc_description = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 4), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacExpIMSysHwcDescription.setStatus('current') oac_exp_im_sys_hwc_serial_number = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 5), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacExpIMSysHwcSerialNumber.setStatus('current') oac_exp_im_sys_hwc_manufacturer = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 6), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: oacExpIMSysHwcManufacturer.setStatus('current') oac_exp_im_sys_hwc_manufactured_date = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 10))).setMaxAccess('readonly') if mibBuilder.loadTexts: oacExpIMSysHwcManufacturedDate.setStatus('current') oac_exp_im_sys_hwc_product_name = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 2, 2, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: oacExpIMSysHwcProductName.setStatus('current') oac_exp_im_sys_factory_supplier_id = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 3, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 14))).setMaxAccess('readonly') if mibBuilder.loadTexts: oacExpIMSysFactorySupplierID.setStatus('current') oac_exp_im_sys_factory_product_sales_code = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 3, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 22))).setMaxAccess('readonly') if mibBuilder.loadTexts: oacExpIMSysFactoryProductSalesCode.setStatus('current') oac_exp_im_sys_factory_hw_revision = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 3, 2, 3, 3), display_string().subtype(subtypeSpec=value_size_constraint(2, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: oacExpIMSysFactoryHwRevision.setStatus('current') mibBuilder.exportSymbols('ONEACCESS-SYS-MIB', oacSysCpuUsed=oacSysCpuUsed, oacSysCpuUsedValue=oacSysCpuUsedValue, OASysCoreType=OASysCoreType, oacSysCpuUsedIndex=oacSysCpuUsedIndex, oacExpIMSysHwcManufacturedDate=oacExpIMSysHwcManufacturedDate, oacSysCpuUsedOneMinuteValue=oacSysCpuUsedOneMinuteValue, oacSysIMSysMainIdentifier=oacSysIMSysMainIdentifier, oacSysCpuUsedCoresEntry=oacSysCpuUsedCoresEntry, oacSysCpuStatistics=oacSysCpuStatistics, oacExpIMSysFactorySupplierID=oacExpIMSysFactorySupplierID, OASysHwcClass=OASysHwcClass, oacSysIMSysMainCPU=oacSysIMSysMainCPU, oacExpIMSysHwcProductName=oacExpIMSysHwcProductName, oacExpIMSysStatistics=oacExpIMSysStatistics, oacSysMemoryFree=oacSysMemoryFree, oacSysMIBModule=oacSysMIBModule, oacSysMemoryAllocated=oacSysMemoryAllocated, oacSysMemStatistics=oacSysMemStatistics, oacExpIMSysHwcSerialNumber=oacExpIMSysHwcSerialNumber, oacSysMemoryUsed=oacSysMemoryUsed, oacExpIMSysHwComponentsTable=oacExpIMSysHwComponentsTable, oacSysMemoryTotal=oacSysMemoryTotal, oacSysCpuUsedCoresTable=oacSysCpuUsedCoresTable, oacExpIMSysHardwareDescription=oacExpIMSysHardwareDescription, oacSysIMSysMainManufacturedIdentity=oacSysIMSysMainManufacturedIdentity, oacSysIMSysMainBoard=oacSysIMSysMainBoard, oacSysIMSysMainBootDateCreation=oacSysIMSysMainBootDateCreation, oacExpIMSysHwcDescription=oacExpIMSysHwcDescription, oacSysIMSysMainBootVersion=oacSysIMSysMainBootVersion, oacExpIMSysHwcClass=oacExpIMSysHwcClass, PYSNMP_MODULE_ID=oacSysMIBModule, oacSysCpuUsedCoreType=oacSysCpuUsedCoreType, oacExpIMSysHwComponentsCount=oacExpIMSysHwComponentsCount, oacExpIMSysFactoryProductSalesCode=oacExpIMSysFactoryProductSalesCode, oacSysIMSysMainBSPVersion=oacSysIMSysMainBSPVersion, oacSysStartCaused=oacSysStartCaused, oacExpIMSysHwComponents=oacExpIMSysHwComponents, oacExpIMSysFactory=oacExpIMSysFactory, oacSysIMSysMainManufacturedDate=oacSysIMSysMainManufacturedDate, oacSysCpuUsedCoresCount=oacSysCpuUsedCoresCount, oacExpIMSysHwcIndex=oacExpIMSysHwcIndex, OASysHwcType=OASysHwcType, oacSysLastRebootCause=oacSysLastRebootCause, oacExpIMSysFactoryHwRevision=oacExpIMSysFactoryHwRevision, oacExpIMSysHwComponentsEntry=oacExpIMSysHwComponentsEntry, oacExpIMSysHwcType=oacExpIMSysHwcType, oacExpIMSysHwcManufacturer=oacExpIMSysHwcManufacturer, oacSysSecureCrashlogCount=oacSysSecureCrashlogCount)
TOKEN = b'd4r3d3v!l' def chall(): s = Sign() while True: choice = input("> ").rstrip() if choice == 'P': print("\nN : {}".format(hex(s.n))) print("\ne : {}".format(hex(s.e))) elif choice == 'S': try: msg = bytes.fromhex(input('msg to sign : ')) if TOKEN in msg: print('[!] NOT ALLOWED') else: m = bytes_to_long(msg) print("\nsignature : {}".format(hex(s.sign(m)))) #pow(msg,d,n) print('\n') except: print('\n[!] ERROR (invalid input)') elif choice == 'V': try: msg = bytes.fromhex(input("msg : ")) m = bytes_to_long(msg) signature = int(input("signature : "),16) if m < 0 or m > s.n: print('[!] ERROR') if s.verify(m, signature): #pow(sign, e, n) == msg if long_to_bytes(m) == TOKEN: print(SECRET) else: print('\n[+] Valid signature') else: print('\n[!]Invalid signature') except: print('\n[!] ERROR(invalid input)') elif choice == 'Q': print('OK BYE :)') exit(0) else: print('\n[*] SEE OPTIONS')
token = b'd4r3d3v!l' def chall(): s = sign() while True: choice = input('> ').rstrip() if choice == 'P': print('\nN : {}'.format(hex(s.n))) print('\ne : {}'.format(hex(s.e))) elif choice == 'S': try: msg = bytes.fromhex(input('msg to sign : ')) if TOKEN in msg: print('[!] NOT ALLOWED') else: m = bytes_to_long(msg) print('\nsignature : {}'.format(hex(s.sign(m)))) print('\n') except: print('\n[!] ERROR (invalid input)') elif choice == 'V': try: msg = bytes.fromhex(input('msg : ')) m = bytes_to_long(msg) signature = int(input('signature : '), 16) if m < 0 or m > s.n: print('[!] ERROR') if s.verify(m, signature): if long_to_bytes(m) == TOKEN: print(SECRET) else: print('\n[+] Valid signature') else: print('\n[!]Invalid signature') except: print('\n[!] ERROR(invalid input)') elif choice == 'Q': print('OK BYE :)') exit(0) else: print('\n[*] SEE OPTIONS')
# Python Class 2406 # Lesson 12 Problem 1 # Author: snowapple (471208) class Game: def __init__(self, n): '''__init__(n) -> Game creates an instance of the Game class''' if n% 2 == 0: #n has to be odd print('Please enter an odd n!') raise ValueError self.n = n #size of side of board self.board = [[0 for x in range(self.n)] for x in range(self.n)] #holds current state of the board, list of columns self.is_won = 0#is_won is 0 if game is not won, and 1 or 2 if won by player 1 or 2 respectively def __str__(self): '''__str__() -> str returns a str representation of the current state of the board''' ans = "" print_dict = {0:'. ', 1:'X ', 2:'O '} #On the board, these numbers represent the pieces for i in range(self.n):#row row = "" for j in range(self.n):#column row += print_dict[self.board[j][i]] #prints the board piece to where the player puts it ans = row + "\n" + ans title = "" for i in range(self.n): title += str(i) + " " ans = '\n' + title + '\n' +ans return ans def clear_board(self): '''clear_board() -> none clears the board by setting all entries to 0''' self.is_won = 0 self.board = [[0 for x in range(self.n)] for x in range(self.n)] def put(self,player_num,column):#takes care of errors '''put(player_num,column) -> boolean puts a piece of type player_num in the specified column, returns boolean which is true if the put was successful, otherwise false''' if self.is_won != 0: #if the game has been won print('Please start a new game as player ' + str(self.is_won) + ' has already won!') return False if player_num not in [1,2]: #if a valid player number is not entered print('Please enter 1 or 2 for the player number!') return False if column < 0 or column >= self.n: #if a valid column is not entered print('Please enter a valid column!') return False try: row = self.board[column].index(0) self.board[column][row]= player_num self.is_won = self.win_index(column,row) return True except ValueError: print('Column is full!') return False def win_index(self,column_index,row_index): '''win_index(column_index,row_index) -> int checks if piece at (column_index, row_index) is part of a connect 4 returns player_num if the piece is part of a connect4, and 0 otherwise''' #uses axis_check to check all of the axes player_num = self.board[column_index][row_index] #check up/down axis col = self.board[column_index] col_win = self.axis_check(col,row_index,player_num) #checks the row since it goes up/down if col_win != 0: #checks to see if won return col_win #check left/right axis row = [self.board[i][row_index] for i in range(self.n)] row_win = self.axis_check(row,column_index,player_num) #checks column since it goes left/right if row_win != 0: #checks to see if won return row_win #down-left/up-right diagonal axis axis = [player_num] index = 0 #down-left part curr_col_index = column_index - 1 #goes left so subtract one curr_row_index = row_index - 1 #goes down so subtract one while curr_row_index >= 0 and curr_col_index >= 0: #until you go to the most down-left part of the board axis = [self.board[curr_col_index][curr_row_index]] + axis curr_col_index -= 1 curr_row_index -= 1 index += 1 #up-right part curr_col_index = column_index + 1 #goes right so add one curr_row_index = row_index + 1 #goes up so add one while curr_row_index < self.n and curr_col_index < self.n: #until you go to the most up-right part of the board axis = axis +[self.board[curr_col_index][curr_row_index]] curr_col_index += 1 curr_row_index += 1 diag_win = self.axis_check(axis,index,player_num) if diag_win != 0: #checks to see if won return diag_win #up-left/down-right diagonal axis axis = [player_num] index = 0 #up-left part curr_col_index = column_index - 1 #goes left so minus one curr_row_index = row_index + 1 #goes up so plus one while curr_row_index < self.n and curr_col_index >= 0: #until you go to the most up-left part of the board axis = [self.board[curr_col_index][curr_row_index]] + axis curr_col_index -= 1 curr_row_index += 1 index += 1 #down-right part curr_col_index = column_index + 1 #goes right so plus one curr_row_index = row_index - 1 # goes down so minus one while curr_row_index >= 0 and curr_col_index < self.n: #until you go to the most down-right part of the board axis = axis +[self.board[curr_col_index][curr_row_index]] curr_col_index += 1 curr_row_index -= 1 diag_win = self.axis_check(axis,index,player_num) if diag_win != 0: #checks to see if won return diag_win return 0 def axis_check(self,axis, index, player_num): '''axis_check(axis, index, player_num) -> int checks if index in axis (list) is part of a connect4 returns player_num if the index is indeed part of a connect4 and 0 otherwise''' #takes the index and sees if the piece is part of a connect four and generalizes it for the four axes(up/down, left/right, two diagonals) down = index up = index for i in range(index,-1, -1): if axis[i] == player_num: down = i else: break for i in range(index,len(axis)): if axis[i] == player_num: up = i else: break if up - down + 1 >= 4: # print('Player ' + str(player_num) + ' has won the game!') return player_num return 0 game = Game(7) labels = {1:'X', 2:'O'} play = True while play: #setting up the board and players game.clear_board() name1 = input('Player ' + labels[1] + ' , enter your name: ') name2 = input('Player ' + labels[2] + ' , enter your name: ') names = {1:name1, 2:name2} print(game) turn = 1 while game.is_won == 0: success = False while not success: #until someone wins each player takes turns col_choice = int(input(names[turn] + ", you're " + labels[turn] + ". What column do you want to play in? ")) success = game.put(turn,col_choice) print(game) turn = turn % 2 +1 #to take turns between players print("Congratulations, " + names[game.is_won]+", you won!") #if players want to play again play_another = "" while play_another not in ['y','n']: play_another = input("Do you want to play another game? [Enter 'y' for yes, 'n' for no]: ") if play_another == 'n': play = False
class Game: def __init__(self, n): """__init__(n) -> Game creates an instance of the Game class""" if n % 2 == 0: print('Please enter an odd n!') raise ValueError self.n = n self.board = [[0 for x in range(self.n)] for x in range(self.n)] self.is_won = 0 def __str__(self): """__str__() -> str returns a str representation of the current state of the board""" ans = '' print_dict = {0: '. ', 1: 'X ', 2: 'O '} for i in range(self.n): row = '' for j in range(self.n): row += print_dict[self.board[j][i]] ans = row + '\n' + ans title = '' for i in range(self.n): title += str(i) + ' ' ans = '\n' + title + '\n' + ans return ans def clear_board(self): """clear_board() -> none clears the board by setting all entries to 0""" self.is_won = 0 self.board = [[0 for x in range(self.n)] for x in range(self.n)] def put(self, player_num, column): """put(player_num,column) -> boolean puts a piece of type player_num in the specified column, returns boolean which is true if the put was successful, otherwise false""" if self.is_won != 0: print('Please start a new game as player ' + str(self.is_won) + ' has already won!') return False if player_num not in [1, 2]: print('Please enter 1 or 2 for the player number!') return False if column < 0 or column >= self.n: print('Please enter a valid column!') return False try: row = self.board[column].index(0) self.board[column][row] = player_num self.is_won = self.win_index(column, row) return True except ValueError: print('Column is full!') return False def win_index(self, column_index, row_index): """win_index(column_index,row_index) -> int checks if piece at (column_index, row_index) is part of a connect 4 returns player_num if the piece is part of a connect4, and 0 otherwise""" player_num = self.board[column_index][row_index] col = self.board[column_index] col_win = self.axis_check(col, row_index, player_num) if col_win != 0: return col_win row = [self.board[i][row_index] for i in range(self.n)] row_win = self.axis_check(row, column_index, player_num) if row_win != 0: return row_win axis = [player_num] index = 0 curr_col_index = column_index - 1 curr_row_index = row_index - 1 while curr_row_index >= 0 and curr_col_index >= 0: axis = [self.board[curr_col_index][curr_row_index]] + axis curr_col_index -= 1 curr_row_index -= 1 index += 1 curr_col_index = column_index + 1 curr_row_index = row_index + 1 while curr_row_index < self.n and curr_col_index < self.n: axis = axis + [self.board[curr_col_index][curr_row_index]] curr_col_index += 1 curr_row_index += 1 diag_win = self.axis_check(axis, index, player_num) if diag_win != 0: return diag_win axis = [player_num] index = 0 curr_col_index = column_index - 1 curr_row_index = row_index + 1 while curr_row_index < self.n and curr_col_index >= 0: axis = [self.board[curr_col_index][curr_row_index]] + axis curr_col_index -= 1 curr_row_index += 1 index += 1 curr_col_index = column_index + 1 curr_row_index = row_index - 1 while curr_row_index >= 0 and curr_col_index < self.n: axis = axis + [self.board[curr_col_index][curr_row_index]] curr_col_index += 1 curr_row_index -= 1 diag_win = self.axis_check(axis, index, player_num) if diag_win != 0: return diag_win return 0 def axis_check(self, axis, index, player_num): """axis_check(axis, index, player_num) -> int checks if index in axis (list) is part of a connect4 returns player_num if the index is indeed part of a connect4 and 0 otherwise""" down = index up = index for i in range(index, -1, -1): if axis[i] == player_num: down = i else: break for i in range(index, len(axis)): if axis[i] == player_num: up = i else: break if up - down + 1 >= 4: return player_num return 0 game = game(7) labels = {1: 'X', 2: 'O'} play = True while play: game.clear_board() name1 = input('Player ' + labels[1] + ' , enter your name: ') name2 = input('Player ' + labels[2] + ' , enter your name: ') names = {1: name1, 2: name2} print(game) turn = 1 while game.is_won == 0: success = False while not success: col_choice = int(input(names[turn] + ", you're " + labels[turn] + '. What column do you want to play in? ')) success = game.put(turn, col_choice) print(game) turn = turn % 2 + 1 print('Congratulations, ' + names[game.is_won] + ', you won!') play_another = '' while play_another not in ['y', 'n']: play_another = input("Do you want to play another game? [Enter 'y' for yes, 'n' for no]: ") if play_another == 'n': play = False
def BFS(graph,root,p1,max1): checked = [] visited=[] energy=[] level=[] l=[] l.append(root) level.append(l) checked.append(root) inienergy=14600 threshold=10 l1=0 flag=0 energy.append(inienergy) while(len(checked)>0): l1=l1+1 #print "level"+str(l1) v=checked.pop(0) e1=energy.pop(0) while v in visited: #print "ll" if(len(checked)>0): v=checked.pop(0) if len(checked)==0: flag=1 break if(flag==1): break # print "kk" visited.append(v) l=[] #print str(v)+"-->" if(float(e1)/float(len(graph[v])) >= float(threshold)): for edge in graph[v]: #print edge if edge not in checked: checked.append(edge) energy.append(float(e1*A[v][edge]/(len(graph[v])*max1))) str1="v"+str(v)+","+"v"+str(edge)+","+"false"+","+str(A[v][edge])+","+"true\n" fil_out.write(str1) for edge in level[(len(level)-1)]: l=list(set(graph[edge])|set(l)) #print "l "+str(l) for i in range(len(level)): for j in level[i]: if j in l: l.remove(j) if len(l)>0: level.append(l) f = open('dsfull1.gdf') text=f.read() p1=text.split('\n') V=[] flag=0 for each_line in p1: l=each_line.split(',') if len(l)==2: if flag!=0: #print(l[0]) V.append(int(l[0][1:])) flag=1 else: break A = [[0 for x in range(len(V))] for x in range(len(V))] flag=0 max1=-1 for each_line in p1: l=each_line.split(',') if len(l)==5: if flag!=0: #print(l[0],l[1],l[3]) A[int(l[0][1:])][int(l[1][1:])]=float(l[3]) #if(float(l[3]>max)): # max1=float(l[3]) flag=1 else: continue #print max1 graph = [[] for x in range(len(V))] flag=0 i=0 x=0 for each_line in p1: l=each_line.split(',') if len(l)==5: if flag!=0: #print(l[0],l[1],l[3]) #A[int(l[0][1:])][int(l[1][1:])]=float(l[3]) graph[int(l[0][1:])].append(int(l[1][1:])) flag=1 else: continue root=154 #print(len(graph[root])) fil_out=open("sub5.gdf",'w') fil_out1=open("ds2.txt","w") fil_out.write("nodedef> name,label\n") for i in range(0,len(V)): fil_out.write(p1[i+1]+'\n') fil_out.write("edgedef>node1,node2,directed,weight,labelvisible\n") h=p1[root+1].split(',') fil_out1.write(str(h[1])+",") BFS(graph,root,p1,max1) fil_out.close() f.close()
def bfs(graph, root, p1, max1): checked = [] visited = [] energy = [] level = [] l = [] l.append(root) level.append(l) checked.append(root) inienergy = 14600 threshold = 10 l1 = 0 flag = 0 energy.append(inienergy) while len(checked) > 0: l1 = l1 + 1 v = checked.pop(0) e1 = energy.pop(0) while v in visited: if len(checked) > 0: v = checked.pop(0) if len(checked) == 0: flag = 1 break if flag == 1: break visited.append(v) l = [] if float(e1) / float(len(graph[v])) >= float(threshold): for edge in graph[v]: if edge not in checked: checked.append(edge) energy.append(float(e1 * A[v][edge] / (len(graph[v]) * max1))) str1 = 'v' + str(v) + ',' + 'v' + str(edge) + ',' + 'false' + ',' + str(A[v][edge]) + ',' + 'true\n' fil_out.write(str1) for edge in level[len(level) - 1]: l = list(set(graph[edge]) | set(l)) for i in range(len(level)): for j in level[i]: if j in l: l.remove(j) if len(l) > 0: level.append(l) f = open('dsfull1.gdf') text = f.read() p1 = text.split('\n') v = [] flag = 0 for each_line in p1: l = each_line.split(',') if len(l) == 2: if flag != 0: V.append(int(l[0][1:])) flag = 1 else: break a = [[0 for x in range(len(V))] for x in range(len(V))] flag = 0 max1 = -1 for each_line in p1: l = each_line.split(',') if len(l) == 5: if flag != 0: A[int(l[0][1:])][int(l[1][1:])] = float(l[3]) flag = 1 else: continue graph = [[] for x in range(len(V))] flag = 0 i = 0 x = 0 for each_line in p1: l = each_line.split(',') if len(l) == 5: if flag != 0: graph[int(l[0][1:])].append(int(l[1][1:])) flag = 1 else: continue root = 154 fil_out = open('sub5.gdf', 'w') fil_out1 = open('ds2.txt', 'w') fil_out.write('nodedef> name,label\n') for i in range(0, len(V)): fil_out.write(p1[i + 1] + '\n') fil_out.write('edgedef>node1,node2,directed,weight,labelvisible\n') h = p1[root + 1].split(',') fil_out1.write(str(h[1]) + ',') bfs(graph, root, p1, max1) fil_out.close() f.close()
s="this this is a a cat cat cat ram ram jai it" l=[] count=[] i=0 #j=0 str="" for i in s: #print(i,end="") if i==" ": if str in l: for j in range(len(l)): if str == l[j]: count[j] += 1 str="" continue else: l.append(str) count.append(1) str="" continue str=str+i print(l) print(count)
s = 'this this is a a cat cat cat ram ram jai it' l = [] count = [] i = 0 str = '' for i in s: if i == ' ': if str in l: for j in range(len(l)): if str == l[j]: count[j] += 1 str = '' continue else: l.append(str) count.append(1) str = '' continue str = str + i print(l) print(count)
class LRUCache: def __init__(self, capacity: int): self.db = dict() self.capacity = capacity self.time = 0 def get(self, key: int) -> int: if key in self.db: self.db[key][1] = self.time self.time += 1 return self.db[key][0] else: return -1 def put(self, key: int, value: int) -> None: if key in self.db: self.db[key] = [value, self.time] else: if len(self.db.keys()) < self.capacity: self.db[key] = [value, self.time] else: # evict LRU evict_key = sorted(self.db.items(), key=lambda x: x[1][1])[0][0] del self.db[evict_key] self.db[key] = [value, self.time] self.time += 1 # Your LRUCache object will be instantiated and called as such: # obj = LRUCache(capacity) # param_1 = obj.get(key) # obj.put(key,value)
class Lrucache: def __init__(self, capacity: int): self.db = dict() self.capacity = capacity self.time = 0 def get(self, key: int) -> int: if key in self.db: self.db[key][1] = self.time self.time += 1 return self.db[key][0] else: return -1 def put(self, key: int, value: int) -> None: if key in self.db: self.db[key] = [value, self.time] elif len(self.db.keys()) < self.capacity: self.db[key] = [value, self.time] else: evict_key = sorted(self.db.items(), key=lambda x: x[1][1])[0][0] del self.db[evict_key] self.db[key] = [value, self.time] self.time += 1
# 2021.04.14 # Problem Statement: # https://leetcode.com/problems/majority-element/ class Solution: def majorityElement(self, nums: List[int]) -> int: # trivial question, no need to explain if len(nums) == 1: return nums[0] dict = {} for element in nums: if element not in dict.keys(): dict[element] = 1 else: dict[element] = dict[element] + 1 if dict[element] >= (len(nums)//2 + 1): return element
class Solution: def majority_element(self, nums: List[int]) -> int: if len(nums) == 1: return nums[0] dict = {} for element in nums: if element not in dict.keys(): dict[element] = 1 else: dict[element] = dict[element] + 1 if dict[element] >= len(nums) // 2 + 1: return element
def ParseGraphVertexEdge(file): with open(file, 'r') as fw: read_data = fw.read() res = read_data.splitlines(False) def ParseV(v_str): ''' @type v_str: string :param v_str: :return: ''' return [int(i) for i in v_str.split()] v = int(res[0]) edges = [ParseV(vstr) for vstr in res[1:]] return v, edges if __name__ == '__main__': v, edges = ParseGraphVertexEdge('graph.in') print(v, edges)
def parse_graph_vertex_edge(file): with open(file, 'r') as fw: read_data = fw.read() res = read_data.splitlines(False) def parse_v(v_str): """ @type v_str: string :param v_str: :return: """ return [int(i) for i in v_str.split()] v = int(res[0]) edges = [parse_v(vstr) for vstr in res[1:]] return (v, edges) if __name__ == '__main__': (v, edges) = parse_graph_vertex_edge('graph.in') print(v, edges)
class Solution: def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float: n = len(nums1) m = len(nums2) if (n > m): return self.findMedianSortedArrays(nums2, nums1) start = 0 end = n realmidinmergedarray = (n + m + 1) // 2 while (start <= end): mid = (start + end) // 2 leftAsize = mid leftBsize = realmidinmergedarray - mid leftA = nums1[leftAsize - 1] if (leftAsize > 0) else float('-inf') leftB = nums2[leftAsize - 1] if (leftBsize > 0) else float('-inf') rightA = nums1[leftAsize] if (leftAsize < n) else float('inf') rightB = nums2[leftAsize] if (leftBsize < m) else float('inf') if leftA <= rightB and leftB <= rightA: if ((m + n) % 2 == 0): return (max(leftA, leftB) + min(rightA, rightB)) / 2.0 return max(leftA, leftB) elif (leftA > rightB): end = mid - 1 else: start = mid + 1 # Driver code ans = Solution() arr1 = [-5, 3, 6, 12, 15] arr2 = [-12, -10, -6, -3, 4, 10] print("Median of the two arrays is {}".format(ans.Median(arr1, arr2)))
class Solution: def find_median_sorted_arrays(self, nums1: List[int], nums2: List[int]) -> float: n = len(nums1) m = len(nums2) if n > m: return self.findMedianSortedArrays(nums2, nums1) start = 0 end = n realmidinmergedarray = (n + m + 1) // 2 while start <= end: mid = (start + end) // 2 left_asize = mid left_bsize = realmidinmergedarray - mid left_a = nums1[leftAsize - 1] if leftAsize > 0 else float('-inf') left_b = nums2[leftAsize - 1] if leftBsize > 0 else float('-inf') right_a = nums1[leftAsize] if leftAsize < n else float('inf') right_b = nums2[leftAsize] if leftBsize < m else float('inf') if leftA <= rightB and leftB <= rightA: if (m + n) % 2 == 0: return (max(leftA, leftB) + min(rightA, rightB)) / 2.0 return max(leftA, leftB) elif leftA > rightB: end = mid - 1 else: start = mid + 1 ans = solution() arr1 = [-5, 3, 6, 12, 15] arr2 = [-12, -10, -6, -3, 4, 10] print('Median of the two arrays is {}'.format(ans.Median(arr1, arr2)))
data_rows = [2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 16, 18, 20, 22, 24, 25, 27] data_rows_cool = [2, 3, 4, 6, 7, 8, 10, 12, 14] hig_temp_techs = [2, 7, 8, 13, 14, 16, 18, 20, 22] med_temp_techs = [3, 4, 5, 9, 10, 11] low_temp_techs = [24, 25] no_imput_rows_color = [232, 232, 232]
data_rows = [2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 16, 18, 20, 22, 24, 25, 27] data_rows_cool = [2, 3, 4, 6, 7, 8, 10, 12, 14] hig_temp_techs = [2, 7, 8, 13, 14, 16, 18, 20, 22] med_temp_techs = [3, 4, 5, 9, 10, 11] low_temp_techs = [24, 25] no_imput_rows_color = [232, 232, 232]
def letter_counter(token, word): count = 0 for letter in word: if letter == token: count = count + 1 else: continue return count
def letter_counter(token, word): count = 0 for letter in word: if letter == token: count = count + 1 else: continue return count
@React.command() async def redirect(ctx, *, url): await ctx.message.delete() try: embed = discord.Embed(color=int(json.load(open(f'./Themes/{json.load(open("config.json"))["theme"]}.json'))['embed_color'].replace('#', '0x'), 0), title='Redirect Checker') embed.set_thumbnail(url=json.load(open(f'./Themes/{json.load(open("config.json"))["theme"]}.json'))['embed_thumbnail_url']) embed.set_footer(text=json.load(open(f'./Themes/{json.load(open("config.json"))["theme"]}.json'))['embed_footer'], icon_url=json.load(open(f'./Themes/{json.load(open("config.json"))["theme"]}.json'))['embed_footer_url']) result = json.loads(requests.get(f"https://api.redirect-checker.net/?url={url}&timeout=5&maxhops=10&meta-refresh=1&format=json").text) for i in range(len(result['data'])): embed.add_field(name=f"__Redirect #{i + 1}__", value=f"{result['data'][i]['request']['info']['url']}", inline=False) await ctx.send(embed=embed, delete_after=json.load(open('config.json'))['delete_timeout']) except Exception as e: await ctx.send(f"Error: {e}")
@React.command() async def redirect(ctx, *, url): await ctx.message.delete() try: embed = discord.Embed(color=int(json.load(open(f"./Themes/{json.load(open('config.json'))['theme']}.json"))['embed_color'].replace('#', '0x'), 0), title='Redirect Checker') embed.set_thumbnail(url=json.load(open(f"./Themes/{json.load(open('config.json'))['theme']}.json"))['embed_thumbnail_url']) embed.set_footer(text=json.load(open(f"./Themes/{json.load(open('config.json'))['theme']}.json"))['embed_footer'], icon_url=json.load(open(f"./Themes/{json.load(open('config.json'))['theme']}.json"))['embed_footer_url']) result = json.loads(requests.get(f'https://api.redirect-checker.net/?url={url}&timeout=5&maxhops=10&meta-refresh=1&format=json').text) for i in range(len(result['data'])): embed.add_field(name=f'__Redirect #{i + 1}__', value=f"{result['data'][i]['request']['info']['url']}", inline=False) await ctx.send(embed=embed, delete_after=json.load(open('config.json'))['delete_timeout']) except Exception as e: await ctx.send(f'Error: {e}')
arq_entrada = open("FORMAT.FLC", 'r') conjunto_entradas = \ {'SISTEMA FUZZY': '', 'CONJUNTO FUZZY': '', 'GRANULARIDADE': 3, 'OPERADOR COMPOSICAO': '', 'OPERADOR AGREGACAO': '', 'INFERENCIA': '', 'REGRA': False, 'DEFAULT': ''} for linha in arq_entrada.readlines(): #print(linha) variavel = linha.split(':')[0] valor = linha.split(':')[1].split('#')[0] conjunto_entradas[variavel] = valor print(conjunto_entradas)
arq_entrada = open('FORMAT.FLC', 'r') conjunto_entradas = {'SISTEMA FUZZY': '', 'CONJUNTO FUZZY': '', 'GRANULARIDADE': 3, 'OPERADOR COMPOSICAO': '', 'OPERADOR AGREGACAO': '', 'INFERENCIA': '', 'REGRA': False, 'DEFAULT': ''} for linha in arq_entrada.readlines(): variavel = linha.split(':')[0] valor = linha.split(':')[1].split('#')[0] conjunto_entradas[variavel] = valor print(conjunto_entradas)
num = 1 num = 2 num = 3 num = 4 num = 5
num = 1 num = 2 num = 3 num = 4 num = 5
class Parser: def __init__(self, file_path): self.dottedproductions = {'S\'': [['.', 'S']]} file_program = self.read_program(file_path) self.terminals = file_program[0] self.nonTerminals = file_program[1] self.productions = {} self.transactions = file_program[2:] for elements in self.transactions: if elements[0] in self.productions: self.productions[elements[0]].append(elements[1:]) else: self.productions[elements[0]] = [elements[1:]] self.data = [self.terminals, self.nonTerminals, self.productions] dotted = self.dotMaker() self.initial_closure = {"S'": [dotted["S'"][0]]} self.closure(self.initial_closure, dotted, dotted["S'"][0]) def dotMaker(self): self.dottedproductions = {'S\'': [['.', 'S']]} for nonTerminal in self.productions: self.dottedproductions[nonTerminal] = [] for way in self.productions[nonTerminal]: self.dottedproductions[nonTerminal].append(["."] + way) return self.dottedproductions def closure(self, closure_map, transitions_map, transition_value): dot_index = transition_value.index(".") if dot_index + 1 == len(transition_value): return after_dot = transition_value[dot_index + 1] if after_dot in self.nonTerminals: non_terminal = after_dot if non_terminal not in closure_map: closure_map[non_terminal] = transitions_map[non_terminal] else: closure_map[non_terminal] += transitions_map[non_terminal] for transition in transitions_map[non_terminal]: self.closure(closure_map, transitions_map, transition) @staticmethod def shiftable(transition): dot_index = transition.index(".") if len(transition) > dot_index + 1: return True return False @staticmethod def shift_dot(transition): transition = transition[:] dot_index = transition.index(".") if not Parser.shiftable(transition): raise Exception("Should I shift it back ?") if len(transition) > dot_index + 2: remainder = transition[dot_index + 2:] else: remainder = [] transition = transition[:dot_index] + [transition[dot_index + 1]] + ["."] + remainder return transition def canonical_collection(self): self.idk = {} self.queue = [{ "state": self.initial_closure, "initial_dotted": self.dottedproductions, }] self.states = [] self.state_parents = {} while len(self.queue) > 0: self.goto_all(**self.queue.pop(0)) reduced = self.get_reduced() for k in reduced: red_k = list(reduced[k].keys()) if red_k[0] != "S'": trans = red_k + reduced[k][red_k[0]][0][:-1] reduce_index = self.transactions.index(trans) + 1 self.idk[k] = {terminal: f"r{reduce_index}" for terminal in self.terminals} self.idk[k]["$"] = f"r{reduce_index}" else: self.idk[k] = {"$": "accept"} del self.state_parents[0] for key in self.state_parents: parent = self.state_parents[key] if parent["parent_index"] in self.idk: self.idk[parent["parent_index"]][parent["before_dot"]] = key else: self.idk[parent["parent_index"]] = {parent["before_dot"]: key} table = {f"I{index}": self.idk[index] for index in range(len(self.states))} self.print_dict(table, "Table:") def goto_all(self, state, initial_dotted, parent=-1, parent_key="-1"): if state not in self.states: self.states.append(state) index = len(self.states) - 1 self.state_parents[index] = { "parent_index": parent, "before_dot": parent_key } {}.items() self.print_dict(state, f"state {index}") for key in state: for transition in state[key]: if self.shiftable(transition): self.goto_one(initial_dotted, key, transition, index) else: if parent in self.idk: self.idk[parent][parent_key] = self.states.index(state) else: self.idk[parent] = {parent_key: self.states.index(state)} def goto_one(self, initial_dotted, key, state, parent=-1): shifted_transition = self.shift_dot(state) closure_map = {key: [shifted_transition]} self.closure(closure_map, initial_dotted, shifted_transition) self.queue.append({ "state": closure_map, "initial_dotted": initial_dotted, "parent": parent, "parent_key": shifted_transition[shifted_transition.index(".") - 1] }) def get_reduced(self): self.reduced = {} for state in self.states: state_key = list(state.keys())[0] if len(state) == 1 and len(state[state_key]) and len(state[state_key][0]) \ and state[state_key][0][-1] == ".": self.reduced[self.states.index(state)] = state return self.reduced @staticmethod def read_program(file_path): file1 = open(file_path, 'r') lines = file1.readlines() file1.close() return [line.replace("\n", "").replace("\t", "").split(" ") for line in lines] @staticmethod def print_dict(hashmap, message=None, deepness=""): if message is not None: print(deepness + message) for key in hashmap: print(f"{deepness}{key} : {hashmap[key]}") def print_data(self, index=-1): if index == -1: exit() else: print(self.data[index - 1]) def print_production(self, non_terminal): data = self.data[2] if non_terminal in data: for row in data[non_terminal]: print(f"{non_terminal} -> {row}") else: print("Wrong non terminal!")
class Parser: def __init__(self, file_path): self.dottedproductions = {"S'": [['.', 'S']]} file_program = self.read_program(file_path) self.terminals = file_program[0] self.nonTerminals = file_program[1] self.productions = {} self.transactions = file_program[2:] for elements in self.transactions: if elements[0] in self.productions: self.productions[elements[0]].append(elements[1:]) else: self.productions[elements[0]] = [elements[1:]] self.data = [self.terminals, self.nonTerminals, self.productions] dotted = self.dotMaker() self.initial_closure = {"S'": [dotted["S'"][0]]} self.closure(self.initial_closure, dotted, dotted["S'"][0]) def dot_maker(self): self.dottedproductions = {"S'": [['.', 'S']]} for non_terminal in self.productions: self.dottedproductions[nonTerminal] = [] for way in self.productions[nonTerminal]: self.dottedproductions[nonTerminal].append(['.'] + way) return self.dottedproductions def closure(self, closure_map, transitions_map, transition_value): dot_index = transition_value.index('.') if dot_index + 1 == len(transition_value): return after_dot = transition_value[dot_index + 1] if after_dot in self.nonTerminals: non_terminal = after_dot if non_terminal not in closure_map: closure_map[non_terminal] = transitions_map[non_terminal] else: closure_map[non_terminal] += transitions_map[non_terminal] for transition in transitions_map[non_terminal]: self.closure(closure_map, transitions_map, transition) @staticmethod def shiftable(transition): dot_index = transition.index('.') if len(transition) > dot_index + 1: return True return False @staticmethod def shift_dot(transition): transition = transition[:] dot_index = transition.index('.') if not Parser.shiftable(transition): raise exception('Should I shift it back ?') if len(transition) > dot_index + 2: remainder = transition[dot_index + 2:] else: remainder = [] transition = transition[:dot_index] + [transition[dot_index + 1]] + ['.'] + remainder return transition def canonical_collection(self): self.idk = {} self.queue = [{'state': self.initial_closure, 'initial_dotted': self.dottedproductions}] self.states = [] self.state_parents = {} while len(self.queue) > 0: self.goto_all(**self.queue.pop(0)) reduced = self.get_reduced() for k in reduced: red_k = list(reduced[k].keys()) if red_k[0] != "S'": trans = red_k + reduced[k][red_k[0]][0][:-1] reduce_index = self.transactions.index(trans) + 1 self.idk[k] = {terminal: f'r{reduce_index}' for terminal in self.terminals} self.idk[k]['$'] = f'r{reduce_index}' else: self.idk[k] = {'$': 'accept'} del self.state_parents[0] for key in self.state_parents: parent = self.state_parents[key] if parent['parent_index'] in self.idk: self.idk[parent['parent_index']][parent['before_dot']] = key else: self.idk[parent['parent_index']] = {parent['before_dot']: key} table = {f'I{index}': self.idk[index] for index in range(len(self.states))} self.print_dict(table, 'Table:') def goto_all(self, state, initial_dotted, parent=-1, parent_key='-1'): if state not in self.states: self.states.append(state) index = len(self.states) - 1 self.state_parents[index] = {'parent_index': parent, 'before_dot': parent_key} {}.items() self.print_dict(state, f'state {index}') for key in state: for transition in state[key]: if self.shiftable(transition): self.goto_one(initial_dotted, key, transition, index) elif parent in self.idk: self.idk[parent][parent_key] = self.states.index(state) else: self.idk[parent] = {parent_key: self.states.index(state)} def goto_one(self, initial_dotted, key, state, parent=-1): shifted_transition = self.shift_dot(state) closure_map = {key: [shifted_transition]} self.closure(closure_map, initial_dotted, shifted_transition) self.queue.append({'state': closure_map, 'initial_dotted': initial_dotted, 'parent': parent, 'parent_key': shifted_transition[shifted_transition.index('.') - 1]}) def get_reduced(self): self.reduced = {} for state in self.states: state_key = list(state.keys())[0] if len(state) == 1 and len(state[state_key]) and len(state[state_key][0]) and (state[state_key][0][-1] == '.'): self.reduced[self.states.index(state)] = state return self.reduced @staticmethod def read_program(file_path): file1 = open(file_path, 'r') lines = file1.readlines() file1.close() return [line.replace('\n', '').replace('\t', '').split(' ') for line in lines] @staticmethod def print_dict(hashmap, message=None, deepness=''): if message is not None: print(deepness + message) for key in hashmap: print(f'{deepness}{key} : {hashmap[key]}') def print_data(self, index=-1): if index == -1: exit() else: print(self.data[index - 1]) def print_production(self, non_terminal): data = self.data[2] if non_terminal in data: for row in data[non_terminal]: print(f'{non_terminal} -> {row}') else: print('Wrong non terminal!')
class instancemethod(object): def __init__(self, func): self._func = func def __get__(self, obj, type_=None): return lambda *args, **kwargs: self._func(obj, *args, **kwargs) class Func(object): def __init__(self): pass def __call__(self, *args, **kwargs): return self, args, kwargs class A(object): def __init__(self): pass f1 = classmethod(Func()) f2 = instancemethod(Func()) a = A() print(a.f1(10, 20)) print(a.f2(10, 20)) print(A.f1(10, 20))
class Instancemethod(object): def __init__(self, func): self._func = func def __get__(self, obj, type_=None): return lambda *args, **kwargs: self._func(obj, *args, **kwargs) class Func(object): def __init__(self): pass def __call__(self, *args, **kwargs): return (self, args, kwargs) class A(object): def __init__(self): pass f1 = classmethod(func()) f2 = instancemethod(func()) a = a() print(a.f1(10, 20)) print(a.f2(10, 20)) print(A.f1(10, 20))
#!/usr/bin/env python # https://adventofcode.com/2020/day/1 # Topic: Report repair my_list = [] with open("../data/1.puzzle.txt") as fp: Lines = fp.readlines() for line in Lines: my_list.append(int(line)) my_list.sort() num1 = 0 num2 = 0 for idx, x in enumerate(my_list): for y in range(0, len(my_list) - idx): if x + my_list[len(my_list) - 1 - y] == 2020: num1 = x num2 = my_list[len(my_list) - 1 - y] sum = num1 * num2 assert sum == 121396 num3 = 0 for x in my_list: for y in my_list: for z in my_list: if x + y + z == 2020: num1 = x num2 = y num3 = z sum = num1 * num2 * num3 assert sum == 73616634
my_list = [] with open('../data/1.puzzle.txt') as fp: lines = fp.readlines() for line in Lines: my_list.append(int(line)) my_list.sort() num1 = 0 num2 = 0 for (idx, x) in enumerate(my_list): for y in range(0, len(my_list) - idx): if x + my_list[len(my_list) - 1 - y] == 2020: num1 = x num2 = my_list[len(my_list) - 1 - y] sum = num1 * num2 assert sum == 121396 num3 = 0 for x in my_list: for y in my_list: for z in my_list: if x + y + z == 2020: num1 = x num2 = y num3 = z sum = num1 * num2 * num3 assert sum == 73616634
class MasterConfig: def __init__(self, args): self.IP = args.ip self.PORT = args.port self.PERSISTENCE_DIR = args.persistence_dir self.SENDER_QUEUE_LENGTH = args.sender_queue_length self.SENDER_TIMEOUT = args.sender_timeout self.UI_PORT = args.ui_port self.CPU_PERCENT_THRESHOLD = 25.0
class Masterconfig: def __init__(self, args): self.IP = args.ip self.PORT = args.port self.PERSISTENCE_DIR = args.persistence_dir self.SENDER_QUEUE_LENGTH = args.sender_queue_length self.SENDER_TIMEOUT = args.sender_timeout self.UI_PORT = args.ui_port self.CPU_PERCENT_THRESHOLD = 25.0
'''knot> pytest tests ''' def test_noting(): assert True
"""knot> pytest tests """ def test_noting(): assert True
#******************************************************************** # Filename: SingletonPattern_With.Metaclass.py # Author: Javier Montenegro (https://javiermontenegro.github.io/) # Copyright: # Details: This code is the implementation of the singleton pattern. #********************************************************************* class MetaSingleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(MetaSingleton, cls).__call__(*args, **kwargs) return cls._instances[cls] class Logger(metaclass=MetaSingleton): pass if __name__ == "__main__": logger1 = Logger() logger2 = Logger() # Reffer to same object. print(logger1, logger2)
class Metasingleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(MetaSingleton, cls).__call__(*args, **kwargs) return cls._instances[cls] class Logger(metaclass=MetaSingleton): pass if __name__ == '__main__': logger1 = logger() logger2 = logger() print(logger1, logger2)
def junta_listas(listas): planarizada = [] for lista in listas: for e in lista: planarizada.append(e) return planarizada lista = [[1, 2, 3], [4, 5, 6], [7, 8], [9], [10]] print(junta_listas(lista))
def junta_listas(listas): planarizada = [] for lista in listas: for e in lista: planarizada.append(e) return planarizada lista = [[1, 2, 3], [4, 5, 6], [7, 8], [9], [10]] print(junta_listas(lista))
S = input() n = S.count("N") s = S.count("S") e = S.count("E") w = S.count("W") home = False if n and s: if e and w: print("Yes") elif not e and not w: print("Yes") else: print("No") elif not n and not s: if e and w: print("Yes") elif not e and not w: print("Yes") else: print("No") else: print("No")
s = input() n = S.count('N') s = S.count('S') e = S.count('E') w = S.count('W') home = False if n and s: if e and w: print('Yes') elif not e and (not w): print('Yes') else: print('No') elif not n and (not s): if e and w: print('Yes') elif not e and (not w): print('Yes') else: print('No') else: print('No')
# lec5prob9-semordnilap.py # edX MITx 6.00.1x # Introduction to Computer Science and Programming Using Python # Lecture 5, problem 9 # A semordnilap is a word or a phrase that spells a different word when backwards # ("semordnilap" is a semordnilap of "palindromes"). Here are some examples: # # nametag / gateman # dog / god # live / evil # desserts / stressed # # Write a recursive program, semordnilap, that takes in two words and says if # they are semordnilap. def semordnilap(str1, str2): ''' str1: a string str2: a string returns: True if str1 and str2 are semordnilap; False otherwise. ''' # Your code here # Check to see if both strings are empty if not (len(str1) or len(str2)): return True # Check to see if only one string is empty if not (len(str1) and len(str2)): return False # Check to see if first char of str1 = last of str2 # If not, no further comparison needed, return False if str1[0] != str2[-1]: return False return semordnilap(str1[1:], str2[:-1]) # Performing a semordnilap comparison using slicing notation, # but this is not valid for this assigment # elif str1 == str2[::-1]: # return True # Example of calling semordnilap() theResult = semordnilap('may', 'yam') print (str(theResult))
def semordnilap(str1, str2): """ str1: a string str2: a string returns: True if str1 and str2 are semordnilap; False otherwise. """ if not (len(str1) or len(str2)): return True if not (len(str1) and len(str2)): return False if str1[0] != str2[-1]: return False return semordnilap(str1[1:], str2[:-1]) the_result = semordnilap('may', 'yam') print(str(theResult))
__title__ = 'fobi.contrib.plugins.form_elements.fields.' \ 'hidden_model_object.default' __author__ = 'Artur Barseghyan <[email protected]>' __copyright__ = 'Copyright (c) 2014-2017 Artur Barseghyan' __license__ = 'GPL 2.0/LGPL 2.1' __all__ = ('IGNORED_MODELS',) IGNORED_MODELS = []
__title__ = 'fobi.contrib.plugins.form_elements.fields.hidden_model_object.default' __author__ = 'Artur Barseghyan <[email protected]>' __copyright__ = 'Copyright (c) 2014-2017 Artur Barseghyan' __license__ = 'GPL 2.0/LGPL 2.1' __all__ = ('IGNORED_MODELS',) ignored_models = []
# Description: Sequence Built-in Methods # Sequence Methods word = 'Hello' print(len(word[1:3])) # 2 print(ord('A')) # 65 print(chr(65)) # A print(str(65)) # 65 # Looping Sequence # 1. The position index and corresponding value can be retrieved at the same time using the enumerate() function. for i, v in enumerate(['tic', 'tac', 'toe']): print(i, v) # Looping Multiple Sequences # 1. To loop over two or more sequences at the same time, the entries can be paired with the zip() function. questions = ['name', 'quest', 'favorite color'] answers = ['lancelot', 'the holy grail', 'blue'] for q, a in zip(questions, answers): print('What is your {0}? It is {1}.'.format(q, a)) # Looping in Reverse Order for i in reversed(range(1, 10, 2)): print(i) # Looping in sorted order basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana'] for fruit in sorted(set(basket)): print(fruit)
word = 'Hello' print(len(word[1:3])) print(ord('A')) print(chr(65)) print(str(65)) for (i, v) in enumerate(['tic', 'tac', 'toe']): print(i, v) questions = ['name', 'quest', 'favorite color'] answers = ['lancelot', 'the holy grail', 'blue'] for (q, a) in zip(questions, answers): print('What is your {0}? It is {1}.'.format(q, a)) for i in reversed(range(1, 10, 2)): print(i) basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana'] for fruit in sorted(set(basket)): print(fruit)
__author__ = "Inada Naoki <[email protected]>" version_info = (1,4,2,'final',0) __version__ = "1.4.2"
__author__ = 'Inada Naoki <[email protected]>' version_info = (1, 4, 2, 'final', 0) __version__ = '1.4.2'
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.00614237, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.207513, '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.0303174, '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.144989, '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.251068, '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.143995, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.540052, '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.138668, '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.18734, '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.00572761, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00525596, '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.040423, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.038871, '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.0461506, 'Execution Unit/Register Files/Runtime Dynamic': 0.044127, '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.0993613, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.246254, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 1.44332, '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.00141613, '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.00141613, '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.00124171, '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.000485201, '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.000558386, '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.00463235, '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.0132827, '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.0373677, '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': 2.37691, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.117954, '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.126918, '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': 4.71254, 'Instruction Fetch Unit/Runtime Dynamic': 0.300154, '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.0873171, 'L2/Runtime Dynamic': 0.0261277, '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': 2.17728, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.491529, '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.0304163, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0304164, '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.32149, 'Load Store Unit/Runtime Dynamic': 0.671949, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0750014, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.150003, '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.0266182, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0279272, '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.147787, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0193444, '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.352303, 'Memory Management Unit/Runtime Dynamic': 0.0472716, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 17.2227, '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.0199827, '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.00765439, '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.0750745, '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.102712, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 2.59154, '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.00310047, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.205123, '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.0152966, '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.0679507, '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.109602, '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.0553234, '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.232876, '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.0753712, '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': 3.99799, '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.00288986, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00285016, '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.0218299, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0210787, '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.0247198, 'Execution Unit/Register Files/Runtime Dynamic': 0.0239288, '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.0467649, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.116768, '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': 0.984073, '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.000744305, '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.000744305, '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.000658387, '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.000260395, '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.000302797, '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.00244979, '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.00677554, '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.0202635, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.28893, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.060666, '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.0688238, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.57, 'Instruction Fetch Unit/Runtime Dynamic': 0.158979, '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.0446739, 'L2/Runtime Dynamic': 0.0144724, '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': 1.74675, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.267023, '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.0164876, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0164876, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 1.8246, 'Load Store Unit/Runtime Dynamic': 0.364822, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0406556, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.081311, '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.0144288, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0150982, '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.0801409, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.00994995, '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.261036, 'Memory Management Unit/Runtime Dynamic': 0.0250481, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.2878, '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.00760166, '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.00315826, '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.0346102, '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.0453702, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.59276, '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.00284541, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.204923, '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.0136698, '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.0702686, '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.113341, '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.0572105, '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.24082, '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.078271, '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.00094, '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.00258252, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00294738, '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.0224475, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0217977, '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.02503, 'Execution Unit/Register Files/Runtime Dynamic': 0.0247451, '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.0480021, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.118752, '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': 0.994617, '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.000832841, '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.000832841, '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.000733331, '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.00028822, '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.000313125, '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.00271214, '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.00770199, '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.0209547, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.33289, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0685893, '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.0711715, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.6161, 'Instruction Fetch Unit/Runtime Dynamic': 0.17113, '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.0420885, 'L2/Runtime Dynamic': 0.0122313, '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': 1.73161, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.256355, '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.0159978, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0159977, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 1.80715, 'Load Store Unit/Runtime Dynamic': 0.351248, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0394478, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.0788953, '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.0140001, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.014631, '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.0828745, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.011248, '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.263033, 'Memory Management Unit/Runtime Dynamic': 0.025879, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.3188, '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.0067936, '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.003253, '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.0356485, '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.0456951, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.6008, '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.00224742, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.204454, '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.0108716, '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.0730174, '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.117774, '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.0594486, '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.25024, '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.0818435, '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.00276, '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.00205387, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00306268, '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.0230397, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0226504, '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.0250936, 'Execution Unit/Register Files/Runtime Dynamic': 0.0257131, '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.0491003, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.12115, '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.00693, '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.000924954, '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.000924954, '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.000812503, '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.00031829, '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.000325375, '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.00298779, '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.00862293, '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.0217744, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.38504, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0787611, '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.0739556, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.67077, 'Instruction Fetch Unit/Runtime Dynamic': 0.186102, '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.0378135, 'L2/Runtime Dynamic': 0.00922845, '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': 1.71739, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.244396, '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.0155378, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0155378, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 1.79076, 'Load Store Unit/Runtime Dynamic': 0.336561, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0383135, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.0766271, '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.0135976, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0141645, '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.0861164, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0129149, '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.265584, 'Memory Management Unit/Runtime Dynamic': 0.0270794, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.3572, '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.00540304, '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.0033601, '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.0369423, '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.0457054, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.61161, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 6.846855329007461, 'Runtime Dynamic': 6.846855329007461, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.380719, 'Runtime Dynamic': 0.170717, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 57.5671, 'Peak Power': 90.6793, 'Runtime Dynamic': 7.56743, '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': 57.1864, 'Total Cores/Runtime Dynamic': 7.39671, '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.380719, 'Total L3s/Runtime Dynamic': 0.170717, '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.00614237, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.207513, '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.0303174, '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.144989, '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.251068, '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.143995, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.540052, '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.138668, '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.18734, '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.00572761, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00525596, '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.040423, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.038871, '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.0461506, 'Execution Unit/Register Files/Runtime Dynamic': 0.044127, '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.0993613, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.246254, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 1.44332, '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.00141613, '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.00141613, '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.00124171, '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.000485201, '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.000558386, '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.00463235, '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.0132827, '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.0373677, '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': 2.37691, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.117954, '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.126918, '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': 4.71254, 'Instruction Fetch Unit/Runtime Dynamic': 0.300154, '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.0873171, 'L2/Runtime Dynamic': 0.0261277, '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': 2.17728, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.491529, '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.0304163, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0304164, '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.32149, 'Load Store Unit/Runtime Dynamic': 0.671949, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0750014, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.150003, '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.0266182, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0279272, '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.147787, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0193444, '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.352303, 'Memory Management Unit/Runtime Dynamic': 0.0472716, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 17.2227, '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.0199827, '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.00765439, '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.0750745, '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.102712, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 2.59154, '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.00310047, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.205123, '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.0152966, '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.0679507, '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.109602, '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.0553234, '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.232876, '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.0753712, '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': 3.99799, '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.00288986, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00285016, '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.0218299, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0210787, '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.0247198, 'Execution Unit/Register Files/Runtime Dynamic': 0.0239288, '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.0467649, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.116768, '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': 0.984073, '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.000744305, '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.000744305, '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.000658387, '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.000260395, '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.000302797, '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.00244979, '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.00677554, '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.0202635, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.28893, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.060666, '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.0688238, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.57, 'Instruction Fetch Unit/Runtime Dynamic': 0.158979, '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.0446739, 'L2/Runtime Dynamic': 0.0144724, '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': 1.74675, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.267023, '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.0164876, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0164876, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 1.8246, 'Load Store Unit/Runtime Dynamic': 0.364822, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0406556, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.081311, '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.0144288, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0150982, '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.0801409, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.00994995, '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.261036, 'Memory Management Unit/Runtime Dynamic': 0.0250481, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.2878, '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.00760166, '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.00315826, '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.0346102, '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.0453702, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.59276, '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.00284541, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.204923, '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.0136698, '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.0702686, '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.113341, '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.0572105, '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.24082, '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.078271, '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.00094, '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.00258252, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00294738, '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.0224475, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0217977, '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.02503, 'Execution Unit/Register Files/Runtime Dynamic': 0.0247451, '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.0480021, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.118752, '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': 0.994617, '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.000832841, '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.000832841, '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.000733331, '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.00028822, '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.000313125, '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.00271214, '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.00770199, '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.0209547, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.33289, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0685893, '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.0711715, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.6161, 'Instruction Fetch Unit/Runtime Dynamic': 0.17113, '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.0420885, 'L2/Runtime Dynamic': 0.0122313, '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': 1.73161, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.256355, '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.0159978, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0159977, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 1.80715, 'Load Store Unit/Runtime Dynamic': 0.351248, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0394478, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.0788953, '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.0140001, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.014631, '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.0828745, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.011248, '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.263033, 'Memory Management Unit/Runtime Dynamic': 0.025879, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.3188, '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.0067936, '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.003253, '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.0356485, '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.0456951, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.6008, '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.00224742, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.204454, '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.0108716, '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.0730174, '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.117774, '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.0594486, '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.25024, '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.0818435, '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.00276, '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.00205387, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00306268, '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.0230397, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0226504, '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.0250936, 'Execution Unit/Register Files/Runtime Dynamic': 0.0257131, '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.0491003, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.12115, '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.00693, '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.000924954, '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.000924954, '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.000812503, '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.00031829, '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.000325375, '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.00298779, '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.00862293, '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.0217744, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.38504, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0787611, '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.0739556, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.67077, 'Instruction Fetch Unit/Runtime Dynamic': 0.186102, '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.0378135, 'L2/Runtime Dynamic': 0.00922845, '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': 1.71739, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.244396, '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.0155378, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0155378, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 1.79076, 'Load Store Unit/Runtime Dynamic': 0.336561, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0383135, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.0766271, '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.0135976, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0141645, '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.0861164, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0129149, '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.265584, 'Memory Management Unit/Runtime Dynamic': 0.0270794, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.3572, '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.00540304, '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.0033601, '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.0369423, '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.0457054, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.61161, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 6.846855329007461, 'Runtime Dynamic': 6.846855329007461, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.380719, 'Runtime Dynamic': 0.170717, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 57.5671, 'Peak Power': 90.6793, 'Runtime Dynamic': 7.56743, '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': 57.1864, 'Total Cores/Runtime Dynamic': 7.39671, '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.380719, 'Total L3s/Runtime Dynamic': 0.170717, '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}}
budget = float(input()) statists = int(input()) one_costume_price = float(input()) decor_price = 0.1 * budget costumes_price = statists * one_costume_price if statists >= 150: costumes_price -= 0.1 * costumes_price total_price = decor_price + costumes_price money_left = budget - total_price money_needed = total_price - budget if money_left < 0: print("Not enough money!") print(f"Wingard needs {money_needed:.2f} leva more.") else: print("Action!") print(f"Wingard starts filming with {money_left:.2f} leva left.")
budget = float(input()) statists = int(input()) one_costume_price = float(input()) decor_price = 0.1 * budget costumes_price = statists * one_costume_price if statists >= 150: costumes_price -= 0.1 * costumes_price total_price = decor_price + costumes_price money_left = budget - total_price money_needed = total_price - budget if money_left < 0: print('Not enough money!') print(f'Wingard needs {money_needed:.2f} leva more.') else: print('Action!') print(f'Wingard starts filming with {money_left:.2f} leva left.')
''' Created on Jan 19, 2016 @author: elefebvre '''
""" Created on Jan 19, 2016 @author: elefebvre """
a=int(input()) b=int(input()) if a>b:a,b=b,a for i in range(a+1,b): if i%5==2 or i%5==3:print(i)
a = int(input()) b = int(input()) if a > b: (a, b) = (b, a) for i in range(a + 1, b): if i % 5 == 2 or i % 5 == 3: print(i)
class Solution: def permute(self, nums: List[int]) -> List[List[int]]: res = [] def backtrack(nums, temp): if not nums: res.append(temp) return for i in range(len(nums)): backtrack(nums[:i]+nums[i+1:], temp+[nums[i]]) backtrack(nums, []) return res
class Solution: def permute(self, nums: List[int]) -> List[List[int]]: res = [] def backtrack(nums, temp): if not nums: res.append(temp) return for i in range(len(nums)): backtrack(nums[:i] + nums[i + 1:], temp + [nums[i]]) backtrack(nums, []) return res
class LibTiffPackage (Package): def __init__(self): Package.__init__(self, 'tiff', '4.0.9', configure_flags=[ ], sources=[ 'http://download.osgeo.org/libtiff/tiff-%{version}.tar.gz', ]) self.needs_lipo = True LibTiffPackage()
class Libtiffpackage(Package): def __init__(self): Package.__init__(self, 'tiff', '4.0.9', configure_flags=[], sources=['http://download.osgeo.org/libtiff/tiff-%{version}.tar.gz']) self.needs_lipo = True lib_tiff_package()
''' Encapsulation : Part 1 Encapsulation is the process of restricting access to methods and variables in a class in order to prevent direct data modification so that it prevents accidental data modification. Encapsulation basically allows the internal representation of an object to be hidden from the view outside of the objects definition. Public methods and variables can be accessed from anywhere within the program. Private methods and variables are accessible from their own class. Double underscore prefix before object name makes it private' Encapsulation Part 2: 40 Encapsulation Part: 3 70 ''' # class Cars: # def __init__(self,speed, color): # self.speed = speed # self.color = color # def set_speed(self,value): # self.speed = value # def get_speed(self): # return self.speed # Encapsulation Part 2: 40 # class Cars: # def __init__(self,speed, color): # self.speed = speed # self.color = color # def set_speed(self,value): # self.speed = value # def get_speed(self): # return self.speed # ford = Cars(250,"green") # nissan = Cars(300,"red") # toyota = Cars(350, "blue") # # ford.set_speed(450) # If I wanted to chang he value of the speed after the instantiantion, I can do that by using the name of the instance and the method. # ford.speed = 500 # I can also access the speed variable directly without the method and change the value. I'm able to do this because there is no encapsulation in place. # print(ford.get_speed()) # 500 # print(ford) # <__main__.Cars object at 0x000002AA04FC60A0> # print(ford.color) # green # Encapsulation Part: 3 70 class Cars: def __init__(self,speed, color): self.__speed = speed # The double underscore makes the variable 'speed' private. It is now difficult to change the value of the variable directly from outside the methods in the class. self.__color = color def set_speed(self,value): self.__speed = value def get_speed(self): return self.__speed ford = Cars(250,"green") nissan = Cars(300,"red") toyota = Cars(350, "blue") # ford.set_speed(450) # If I wanted to chang he value of the speed after the instantiantion, I can do that by using the name of the instance and the method. ford.speed = 500 # I can also access the speed variable directly without the method and change the value. I'm able to do this because there is no encapsulation in place. # print(ford.get_speed()) # 250 # print(ford) # <__main__.Cars object at 0x000002AA04FC60A0> # # print(ford.color) # Traceback (most recent call last): # # # File "/home/rich/CarlsHub/Comprehensive-Python/ClassFiles/OOP/Encapsulation.py", line 92, in <module> # # # print(ford.color) # green # # # AttributeError: 'Cars' object has no attribute 'color' # print(ford.__color) print(ford.get_speed()) # 250 print(ford.__color) # Traceback (most recent call last): # File "/home/rich/CarlsHub/Comprehensive-Python/ClassFiles/OOP/Encapsulation.py", line 100, in <module> # print(ford.__color) # <__main__.Cars object at 0x000002AA04FC60A0> # AttributeError: 'Cars' object has no attribute '__color'
""" Encapsulation : Part 1 Encapsulation is the process of restricting access to methods and variables in a class in order to prevent direct data modification so that it prevents accidental data modification. Encapsulation basically allows the internal representation of an object to be hidden from the view outside of the objects definition. Public methods and variables can be accessed from anywhere within the program. Private methods and variables are accessible from their own class. Double underscore prefix before object name makes it private' Encapsulation Part 2: 40 Encapsulation Part: 3 70 """ class Cars: def __init__(self, speed, color): self.__speed = speed self.__color = color def set_speed(self, value): self.__speed = value def get_speed(self): return self.__speed ford = cars(250, 'green') nissan = cars(300, 'red') toyota = cars(350, 'blue') ford.speed = 500 print(ford.get_speed()) print(ford.__color)
class UndefinedMockBehaviorError(Exception): pass class MethodWasNotCalledError(Exception): pass
class Undefinedmockbehaviorerror(Exception): pass class Methodwasnotcallederror(Exception): pass
class Solution: def decodeString(self, s: str) -> str: St = [] num = 0 curr = '' for c in s: if c.isdigit(): num = num*10 + int(c) elif c == '[': St.append([num, curr]) num = 0 curr = '' elif c == ']': count, prev = St.pop() curr = prev + count*curr else: curr += c return curr class Solution2: def decodeString(self, s: str) -> str: i = 0 def decode(s): nonlocal i result = [] while i < len(s) and s[i] != ']': if s[i].isdigit(): num = 0 while i < len(s) and s[i].isdigit(): num = num*10 + int(s[i]) i += 1 i += 1 temp = decode(s) i += 1 result += temp*num else: result.append(s[i]) i += 1 return result return ''.join(decode(s))
class Solution: def decode_string(self, s: str) -> str: st = [] num = 0 curr = '' for c in s: if c.isdigit(): num = num * 10 + int(c) elif c == '[': St.append([num, curr]) num = 0 curr = '' elif c == ']': (count, prev) = St.pop() curr = prev + count * curr else: curr += c return curr class Solution2: def decode_string(self, s: str) -> str: i = 0 def decode(s): nonlocal i result = [] while i < len(s) and s[i] != ']': if s[i].isdigit(): num = 0 while i < len(s) and s[i].isdigit(): num = num * 10 + int(s[i]) i += 1 i += 1 temp = decode(s) i += 1 result += temp * num else: result.append(s[i]) i += 1 return result return ''.join(decode(s))
# Belajar default argument value #defaul name berfungsi memberikan pengisian default pada parameter #sehingga pengisian parameter bersifat opsional def say_hello(nama="aris"): #menggunakan sama dengan lalu ketik default value nya print(f"Hello {nama}!") say_hello("karachi") say_hello() #akan error jika tidak default argumen tidak dipasang, tetapi jika dipasang maka akan keluar hasil yg default #bagaimana jika menggunakan lebih dari 1 parameter def says_hello(nama_pertama="uchiha", nama_kedua=""): #ketika ada 2 parameter, jika ingin dipasang defaul argument, maka harus 22nya dipasang print(f"Hello {nama_pertama}-{nama_kedua}!") says_hello("muhammad", "aris") #auto terpasang berurutan says_hello(nama_kedua="shishui") #ketik parameter lalu sama dengan, maka akan terpasang di parameter tsb says_hello(nama_kedua="uchiha", nama_pertama="madara") #pemasangan argumen parameter (ex: madara) boleh acak, ketika ada deklarasi parameternya says_hello(nama_kedua="obito")
def say_hello(nama='aris'): print(f'Hello {nama}!') say_hello('karachi') say_hello() def says_hello(nama_pertama='uchiha', nama_kedua=''): print(f'Hello {nama_pertama}-{nama_kedua}!') says_hello('muhammad', 'aris') says_hello(nama_kedua='shishui') says_hello(nama_kedua='uchiha', nama_pertama='madara') says_hello(nama_kedua='obito')
# getattr(object, name[, default]) class C: def A(self): pass print(getattr(C, 'A'))
class C: def a(self): pass print(getattr(C, 'A'))
# # Copyright (C) 2017 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # model model = Model() i1 = Input("op1", "TENSOR_FLOAT32", "{1, 2, 3, 2}") # input tensor 0 i2 = Input("op2", "TENSOR_FLOAT32", "{1, 2, 3, 2}") # input tensor 1 i3 = Input("op3", "TENSOR_FLOAT32", "{1, 2, 3, 2}") # input tensor 2 axis0 = Int32Scalar("axis0", 3) r = Output("result", "TENSOR_FLOAT32", "{1, 2, 3, 6}") # output model = model.Operation("CONCATENATION", i1, i2, i3, axis0).To(r) # Example 1. input0 = {i1: [-0.03203143, -0.0334147 , -0.02527265, 0.04576106, 0.08869292, 0.06428383, -0.06473722, -0.21933985, -0.05541003, -0.24157837, -0.16328812, -0.04581105], i2: [-0.0569439 , -0.15872048, 0.02965238, -0.12761882, -0.00185435, -0.03297619, 0.03581043, -0.12603407, 0.05999133, 0.00290503, 0.1727029 , 0.03342071], i3: [ 0.10992613, 0.09185287, 0.16433905, -0.00059073, -0.01480746, 0.0135175 , 0.07129054, -0.15095694, -0.04579685, -0.13260484, -0.10045543, 0.0647094 ]} output0 = {r: [-0.03203143, -0.0334147 , -0.0569439 , -0.15872048, 0.10992613, 0.09185287, -0.02527265, 0.04576106, 0.02965238, -0.12761882, 0.16433905, -0.00059073, 0.08869292, 0.06428383, -0.00185435, -0.03297619, -0.01480746, 0.0135175 , -0.06473722, -0.21933985, 0.03581043, -0.12603407, 0.07129054, -0.15095694, -0.05541003, -0.24157837, 0.05999133, 0.00290503, -0.04579685, -0.13260484, -0.16328812, -0.04581105, 0.1727029 , 0.03342071, -0.10045543, 0.0647094 ]} # Instantiate an example Example((input0, output0)) ''' # The above data was generated with the code below: with tf.Session() as sess: t1 = tf.random_normal([1, 2, 3, 2], stddev=0.1, dtype=tf.float32) t2 = tf.random_normal([1, 2, 3, 2], stddev=0.1, dtype=tf.float32) t3 = tf.random_normal([1, 2, 3, 2], stddev=0.1, dtype=tf.float32) c1 = tf.concat([t1, t2, t3], axis=3) print(c1) # print shape print( sess.run([tf.reshape(t1, [12]), tf.reshape(t2, [12]), tf.reshape(t3, [12]), tf.reshape(c1, [1*2*3*(2*3)])])) '''
model = model() i1 = input('op1', 'TENSOR_FLOAT32', '{1, 2, 3, 2}') i2 = input('op2', 'TENSOR_FLOAT32', '{1, 2, 3, 2}') i3 = input('op3', 'TENSOR_FLOAT32', '{1, 2, 3, 2}') axis0 = int32_scalar('axis0', 3) r = output('result', 'TENSOR_FLOAT32', '{1, 2, 3, 6}') model = model.Operation('CONCATENATION', i1, i2, i3, axis0).To(r) input0 = {i1: [-0.03203143, -0.0334147, -0.02527265, 0.04576106, 0.08869292, 0.06428383, -0.06473722, -0.21933985, -0.05541003, -0.24157837, -0.16328812, -0.04581105], i2: [-0.0569439, -0.15872048, 0.02965238, -0.12761882, -0.00185435, -0.03297619, 0.03581043, -0.12603407, 0.05999133, 0.00290503, 0.1727029, 0.03342071], i3: [0.10992613, 0.09185287, 0.16433905, -0.00059073, -0.01480746, 0.0135175, 0.07129054, -0.15095694, -0.04579685, -0.13260484, -0.10045543, 0.0647094]} output0 = {r: [-0.03203143, -0.0334147, -0.0569439, -0.15872048, 0.10992613, 0.09185287, -0.02527265, 0.04576106, 0.02965238, -0.12761882, 0.16433905, -0.00059073, 0.08869292, 0.06428383, -0.00185435, -0.03297619, -0.01480746, 0.0135175, -0.06473722, -0.21933985, 0.03581043, -0.12603407, 0.07129054, -0.15095694, -0.05541003, -0.24157837, 0.05999133, 0.00290503, -0.04579685, -0.13260484, -0.16328812, -0.04581105, 0.1727029, 0.03342071, -0.10045543, 0.0647094]} example((input0, output0)) '\n# The above data was generated with the code below:\n\nwith tf.Session() as sess:\n\n t1 = tf.random_normal([1, 2, 3, 2], stddev=0.1, dtype=tf.float32)\n t2 = tf.random_normal([1, 2, 3, 2], stddev=0.1, dtype=tf.float32)\n t3 = tf.random_normal([1, 2, 3, 2], stddev=0.1, dtype=tf.float32)\n c1 = tf.concat([t1, t2, t3], axis=3)\n\n print(c1) # print shape\n print( sess.run([tf.reshape(t1, [12]),\n tf.reshape(t2, [12]),\n tf.reshape(t3, [12]),\n tf.reshape(c1, [1*2*3*(2*3)])]))\n'
class PseudoData(dict): def __init__(self, name_func_dict, sweep): super(PseudoData, self).__init__() self.name_func_dict = name_func_dict self.sweep = sweep def __getitem__(self, key): if key in self.keys(): return dict.__getitem__(self, key) elif key in self.name_func_dict: func = self.name_func_dict[key]['func'] pcol = func(self.sweep.data, self.sweep.pdata, self.sweep.meta) self.__setitem__(key, pcol) return pcol else: return dict.__getitem__(self, key) def get_names(self): names = [k for k, v in self.name_func_dict.items() if 'func' in v] names.sort() return names
class Pseudodata(dict): def __init__(self, name_func_dict, sweep): super(PseudoData, self).__init__() self.name_func_dict = name_func_dict self.sweep = sweep def __getitem__(self, key): if key in self.keys(): return dict.__getitem__(self, key) elif key in self.name_func_dict: func = self.name_func_dict[key]['func'] pcol = func(self.sweep.data, self.sweep.pdata, self.sweep.meta) self.__setitem__(key, pcol) return pcol else: return dict.__getitem__(self, key) def get_names(self): names = [k for (k, v) in self.name_func_dict.items() if 'func' in v] names.sort() return names
# LAB EXERCISE 05 print('Lab Exercise 05 \n') # SETUP pop_tv_shows = [ {"Title": "WandaVision", "Creator": ["Jac Schaeffer"], "Rating": 8.2, "Genre": "Action"}, {"Title": "Attack on Titan", "Creator": ["Hajime Isayama"], "Rating": 8.9, "Genre": "Animation"}, {"Title": "Bridgerton", "Creator": ["Chris Van Dusen"], "Rating": 7.3, "Genre": "Drama"}, {"Title": "Game of Thrones", "Creator": ["David Benioff", "D.B. Weiss"], "Rating": 9.3, "Genre": "Action"}, {"Title": "The Mandalorian", "Creator": ["Jon Favreau"], "Rating": 8.8, "Genre": "Action"}, {"Title": "The Queen's Gambit", "Creator": ["Scott Frank", "Allan Scott"], "Rating": 8.6, "Genre": "Drama"}, {"Title": "Schitt's Creek", "Creator": ["Dan Levy", "Eugene Levy"], "Rating": 8.5, "Genre": "Comedy"}, {"Title": "The Equalizer", "Creator": ["Andrew W. Marlowe", "Terri Edda Miller"], "Rating": 4.3, "Genre": "Action"}, {"Title": "Your Honor", "Creator": ["Peter Moffat"], "Rating": 7.9, "Genre": "Crime"}, {"Title": "Cobra Kai", "Creator": ["Jon Hurwitz", "Hayden Schlossberg", "Josh Heald"] , "Rating": 8.6, "Genre": "Action"} ] # END SETUP # Problem 01 (4 points) print('/nProblem 01') action_shows = [] for show in pop_tv_shows: if show['Genre'] == 'Action': action_shows.append(show['Title']) print(f'Action show list:{action_shows}') # Problem 02 (4 points) print('/nProblem 02') high_rating = 0 highest_rated_show = None for show in pop_tv_shows: if show["Rating"] > high_rating: high_rating = show["Rating"] highest_rated_show = show["Title"] print(f'Highest rated show is {highest_rated_show} with a rating of {high_rating}') # Problem 03 (4 points) print('/nProblem 03') low_rating = 10 lowest_rated_show = None for show in pop_tv_shows: if show["Rating"] < low_rating and show['Genre'] != "Action": low_rating = show["Rating"] lowest_rated_show = show["Title"] print(f'Lowest rated non-action show is {lowest_rated_show} with a rating of {low_rating}') # Problem 04 (4 points) print('/nProblem 04') multiple_creators = [] for show in pop_tv_shows: if len(show["Creator"]) > 1: multiple_creators.append(show["Title"]) print(f'Show with multiple creators: {multiple_creators}') # Problem 05 (4 points) print('/nProblem 05') show_genre = [] for show in pop_tv_shows: if show['Genre'] not in ["Action", "Drama"] or show["Rating"] >= 9: item = {'Title': show['Title'], 'Genre': show['Genre']} show_genre.append(item) print(f'Show and genre: {show_genre}')
print('Lab Exercise 05 \n') pop_tv_shows = [{'Title': 'WandaVision', 'Creator': ['Jac Schaeffer'], 'Rating': 8.2, 'Genre': 'Action'}, {'Title': 'Attack on Titan', 'Creator': ['Hajime Isayama'], 'Rating': 8.9, 'Genre': 'Animation'}, {'Title': 'Bridgerton', 'Creator': ['Chris Van Dusen'], 'Rating': 7.3, 'Genre': 'Drama'}, {'Title': 'Game of Thrones', 'Creator': ['David Benioff', 'D.B. Weiss'], 'Rating': 9.3, 'Genre': 'Action'}, {'Title': 'The Mandalorian', 'Creator': ['Jon Favreau'], 'Rating': 8.8, 'Genre': 'Action'}, {'Title': "The Queen's Gambit", 'Creator': ['Scott Frank', 'Allan Scott'], 'Rating': 8.6, 'Genre': 'Drama'}, {'Title': "Schitt's Creek", 'Creator': ['Dan Levy', 'Eugene Levy'], 'Rating': 8.5, 'Genre': 'Comedy'}, {'Title': 'The Equalizer', 'Creator': ['Andrew W. Marlowe', 'Terri Edda Miller'], 'Rating': 4.3, 'Genre': 'Action'}, {'Title': 'Your Honor', 'Creator': ['Peter Moffat'], 'Rating': 7.9, 'Genre': 'Crime'}, {'Title': 'Cobra Kai', 'Creator': ['Jon Hurwitz', 'Hayden Schlossberg', 'Josh Heald'], 'Rating': 8.6, 'Genre': 'Action'}] print('/nProblem 01') action_shows = [] for show in pop_tv_shows: if show['Genre'] == 'Action': action_shows.append(show['Title']) print(f'Action show list:{action_shows}') print('/nProblem 02') high_rating = 0 highest_rated_show = None for show in pop_tv_shows: if show['Rating'] > high_rating: high_rating = show['Rating'] highest_rated_show = show['Title'] print(f'Highest rated show is {highest_rated_show} with a rating of {high_rating}') print('/nProblem 03') low_rating = 10 lowest_rated_show = None for show in pop_tv_shows: if show['Rating'] < low_rating and show['Genre'] != 'Action': low_rating = show['Rating'] lowest_rated_show = show['Title'] print(f'Lowest rated non-action show is {lowest_rated_show} with a rating of {low_rating}') print('/nProblem 04') multiple_creators = [] for show in pop_tv_shows: if len(show['Creator']) > 1: multiple_creators.append(show['Title']) print(f'Show with multiple creators: {multiple_creators}') print('/nProblem 05') show_genre = [] for show in pop_tv_shows: if show['Genre'] not in ['Action', 'Drama'] or show['Rating'] >= 9: item = {'Title': show['Title'], 'Genre': show['Genre']} show_genre.append(item) print(f'Show and genre: {show_genre}')
__author__ = 'chira' # "return" used for mathematical function composition def f(x): # x is an INPUT y = 2*x + 3 return y # y is an OUTPUT def g(x): # x is an INPUT y = pow(x,2) return y # y is an OUTPUT def h(x,y): # x and y are INPUTS z = pow(x,2) + 3*y; return z # z is an OUTPUT output = 0 # initializing a variable to store return values output = f(1) # return form "f" stored in output print("f(%d) = %d" %(1,output)) output = g(5) print("g(%d) = %d" %(5,output)) output = f(25) print("f(%d) = %d" %(25,output)) output = f(g(5)) # return form "g" is input to "f" print("f(g(%d)) = %d" %(5,output)) output = h(5,25) print("h(%d,%d) = %d" %(5,25,output)) output = h(f(1),g(5)) # returns form "f" and "g" are inputs to "h" print("h(f(%d),g(%d)) = %d" %(1,5,output))
__author__ = 'chira' def f(x): y = 2 * x + 3 return y def g(x): y = pow(x, 2) return y def h(x, y): z = pow(x, 2) + 3 * y return z output = 0 output = f(1) print('f(%d) = %d' % (1, output)) output = g(5) print('g(%d) = %d' % (5, output)) output = f(25) print('f(%d) = %d' % (25, output)) output = f(g(5)) print('f(g(%d)) = %d' % (5, output)) output = h(5, 25) print('h(%d,%d) = %d' % (5, 25, output)) output = h(f(1), g(5)) print('h(f(%d),g(%d)) = %d' % (1, 5, output))
def balancedSums(arr): if n == 1: return 'YES' sumL = 0 sumR = 0 i =0 j = n-1 while i <= j: if i ==j and sumL == sumR: return 'YES' elif sumL > sumR: sumR+=arr[j] j =j-1 else: sumL+=arr[i] i =i +1 return 'NO' arr = [0 ,0 ,2, 0] n = len(arr) print(balancedSums(arr))
def balanced_sums(arr): if n == 1: return 'YES' sum_l = 0 sum_r = 0 i = 0 j = n - 1 while i <= j: if i == j and sumL == sumR: return 'YES' elif sumL > sumR: sum_r += arr[j] j = j - 1 else: sum_l += arr[i] i = i + 1 return 'NO' arr = [0, 0, 2, 0] n = len(arr) print(balanced_sums(arr))
def perfect_square(x): if (x == 0 or x == 1): return x i = 1 result = 1 while (result <= x): i += 1 result = i * i return i - 1 x = int(input('Enter no.')) print(perfect_square(x))
def perfect_square(x): if x == 0 or x == 1: return x i = 1 result = 1 while result <= x: i += 1 result = i * i return i - 1 x = int(input('Enter no.')) print(perfect_square(x))
# Default delimiters INPUT1 = ''' pid 2 uptime 675 version 1.2.5 END pid 1 uptime 2 version 3 END ''' OUTPUT1 = '''{"pid": "2", "uptime": "675", "version": "1.2.5"} {"pid": "1", "uptime": "2", "version": "3"} ''' # --field-delim '=', --record-delim '%\n' INPUT2 = ''' a=1 b=2 c=3 % d=4 e=5 f=6 % ''' OUTPUT2 = '''{"a": "1", "b": "2", "c": "3"} {"d": "4", "e": "5", "f": "6"} ''' # --field-delim '=', --entry-delim '|' --record-delim '%\n' INPUT3 = ''' a=1|b=2|c=3% d=4|e=5|f=6% ''' OUTPUT3 = '''{"a": "1", "b": "2", "c": "3"} {"d": "4", "e": "5", "f": "6"} ''' # --field-delim '=', --entry-delim '|' --record-delim '%' INPUT4 = ''' a=1|b=2|c=3%d=4|e=5|f=6% ''' OUTPUT4 = '''{"a": "1", "b": "2", "c": "3"} {"d": "4", "e": "5", "f": "6"} '''
input1 = '\npid 2\nuptime 675\nversion 1.2.5 END\npid 1\nuptime 2\nversion 3\nEND\n' output1 = '{"pid": "2", "uptime": "675", "version": "1.2.5"}\n{"pid": "1", "uptime": "2", "version": "3"}\n' input2 = '\na=1\nb=2\nc=3\n%\nd=4\ne=5\nf=6\n%\n' output2 = '{"a": "1", "b": "2", "c": "3"}\n{"d": "4", "e": "5", "f": "6"}\n' input3 = '\na=1|b=2|c=3%\nd=4|e=5|f=6%\n' output3 = '{"a": "1", "b": "2", "c": "3"}\n{"d": "4", "e": "5", "f": "6"}\n' input4 = '\na=1|b=2|c=3%d=4|e=5|f=6%\n' output4 = '{"a": "1", "b": "2", "c": "3"}\n{"d": "4", "e": "5", "f": "6"}\n'
def capitalize(string): sttings_upper = string.title() for word in string.split(): words = word[:-1] + word[0-1].upper() + " " return sttings_upper[:-1] print(capitalize("GoLand is a new commercial IDE by JetBrains aimed at providing an ergonomic environment " "for Go development. The new IDE extends the IntelliJ platform with coding assistance " "and tool integrations specific for the Go language."))
def capitalize(string): sttings_upper = string.title() for word in string.split(): words = word[:-1] + word[0 - 1].upper() + ' ' return sttings_upper[:-1] print(capitalize('GoLand is a new commercial IDE by JetBrains aimed at providing an ergonomic environment for Go development. The new IDE extends the IntelliJ platform with coding assistance and tool integrations specific for the Go language.'))
class Solution: def compareVersion(self, version1: str, version2: str) -> int: l1 = [int(s) for s in version1.split(".")] l2 = [int(s) for s in version2.split(".")] len1, len2 = len(l1), len(l2) if len1 > len2: l2 += [0] * (len1 - len2) elif len1 < len2: l1 += [0] * (len2 - len1) return (l1 > l2) - (l1 < l2)
class Solution: def compare_version(self, version1: str, version2: str) -> int: l1 = [int(s) for s in version1.split('.')] l2 = [int(s) for s in version2.split('.')] (len1, len2) = (len(l1), len(l2)) if len1 > len2: l2 += [0] * (len1 - len2) elif len1 < len2: l1 += [0] * (len2 - len1) return (l1 > l2) - (l1 < l2)
############# constants TITLE = "Cheese Maze" DEVELOPER = "Jack Gartner" HISTORY = "A mouse wants eat his cheese, Make it to the Hashtag to win, watch out for plus signs, $ is a teleport, P is a power up, Obtain the Key (K) in order to unlock the door (D)" INSTRUCTIONS = "left arrow key\t\t\tto move left\nright arrow key\t\t\tto move right\nup arrow key\t\t\tto move up\ndown arrow key\t\t\tto move down\npress q\t\t\t\t\tto quit" ############# functions def displayTitle(): print(TITLE) print("By " + DEVELOPER) print() print(HISTORY) print() print(INSTRUCTIONS) print() def displayBoard(): print("-----------------") print("| +\033[36mK\033[37m + \033[33mP\033[37m|") print("|\033[32m#\033[37m \033[31mD\033[37m + |") print("|++++ ++++++ |") print("| + |") print("| ++++++ +++++|") print("| \033[34m$\033[37m|") print("-----------------")
title = 'Cheese Maze' developer = 'Jack Gartner' history = 'A mouse wants eat his cheese, Make it to the Hashtag to win, watch out for plus signs, $ is a teleport, P is a power up, Obtain the Key (K) in order to unlock the door (D)' instructions = 'left arrow key\t\t\tto move left\nright arrow key\t\t\tto move right\nup arrow key\t\t\tto move up\ndown arrow key\t\t\tto move down\npress q\t\t\t\t\tto quit' def display_title(): print(TITLE) print('By ' + DEVELOPER) print() print(HISTORY) print() print(INSTRUCTIONS) print() def display_board(): print('-----------------') print('| +\x1b[36mK\x1b[37m + \x1b[33mP\x1b[37m|') print('|\x1b[32m#\x1b[37m \x1b[31mD\x1b[37m + |') print('|++++ ++++++ |') print('| + |') print('| ++++++ +++++|') print('| \x1b[34m$\x1b[37m|') print('-----------------')
score = float(input("Enter Score: ")) if score < 1 and score > 0: if score >= 0.9: print('A') elif score >= 0.8: print('B') elif score >= 0.7: print('C') elif score >= 0.6: print('D') else: print('F') else: print('Value of score is out of range.') largest = None smallest = None while True: num = input("Enter a number: ") if num == "done" : break try: num = int(num) except: print('Invalid input') continue if largest is None: largest = num elif num > largest: largest = num elif smallest is None: smallest = num elif num < smallest: smallest = num #print(num) print("Maximum is", largest) print('Minimum is', smallest) def computepay(h,r): if h <= 40: pay = h * r else: h1 = h - 40 pay = 40 * r + h1 *(r * 1.5) return pay hrs = input("Enter Hours:") rate = input('Enter Rate:') h = float(hrs) r = float(rate) p = computepay(h,r) print("Pay",p)
score = float(input('Enter Score: ')) if score < 1 and score > 0: if score >= 0.9: print('A') elif score >= 0.8: print('B') elif score >= 0.7: print('C') elif score >= 0.6: print('D') else: print('F') else: print('Value of score is out of range.') largest = None smallest = None while True: num = input('Enter a number: ') if num == 'done': break try: num = int(num) except: print('Invalid input') continue if largest is None: largest = num elif num > largest: largest = num elif smallest is None: smallest = num elif num < smallest: smallest = num print('Maximum is', largest) print('Minimum is', smallest) def computepay(h, r): if h <= 40: pay = h * r else: h1 = h - 40 pay = 40 * r + h1 * (r * 1.5) return pay hrs = input('Enter Hours:') rate = input('Enter Rate:') h = float(hrs) r = float(rate) p = computepay(h, r) print('Pay', p)
''' Created on May 19, 2019 @author: ballance ''' # TODO: implement simulation-access methods # - yield # - get sim time # - ... # # The launcher will ultimately implement these methods #
""" Created on May 19, 2019 @author: ballance """
def find_even_index(arr): for index, int in enumerate(arr): left = sum_range(arr, 0, index) right = sum_range(arr, index, len(arr)) if left == right: return index return -1 def sum_range(arr, a, b): return sum(arr[a:b + 1])
def find_even_index(arr): for (index, int) in enumerate(arr): left = sum_range(arr, 0, index) right = sum_range(arr, index, len(arr)) if left == right: return index return -1 def sum_range(arr, a, b): return sum(arr[a:b + 1])
INSTALLED_APPS = ( "testapp", ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } SECRET_KEY = "django_tests_secret_key"
installed_apps = ('testapp',) databases = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:'}} secret_key = 'django_tests_secret_key'
# Databricks notebook source # MAGIC %md # Run transform # MAGIC this will load the schema, the raw txt tables, then transform the dataframes to structured dataframes. # COMMAND ---------- # MAGIC %run ./transform # COMMAND ---------- # MAGIC %md # Store # MAGIC write the transformed dataframes to our base-path # COMMAND ---------- for table in df_openalex_c: target=f'{base_path}parquet/{table}' if table in partition_sizes: partitions=partition_sizes[table] else: partitions=partition_sizes['default'] if file_exists(target): print(f'{target} already exists, skip') else: print(f'writing {target}') df_openalex_c[table].repartition(partitions).write.format('parquet').save(target)
for table in df_openalex_c: target = f'{base_path}parquet/{table}' if table in partition_sizes: partitions = partition_sizes[table] else: partitions = partition_sizes['default'] if file_exists(target): print(f'{target} already exists, skip') else: print(f'writing {target}') df_openalex_c[table].repartition(partitions).write.format('parquet').save(target)
# Ex4. # # Create a program that is going to take a whole number as an input, and will calculate the factorial of the number. # # Factorial example: 5! = 5 * 4 * 3 * 2 * 1 = 120 factorial = 1 number = int(input('Enter a number: ')) for i in range(1, number+1): factorial *= i print(f'Factorial of {number} is {factorial}')
factorial = 1 number = int(input('Enter a number: ')) for i in range(1, number + 1): factorial *= i print(f'Factorial of {number} is {factorial}')
def read_lines_of_file(filename): with open(filename) as f: content = f.readlines() return content,len(content) alltext,alltextlen = read_lines_of_file('read.txt') for line in alltext: print(line.rstrip()) print("Number of lines read from file --> %d" %(alltextlen))
def read_lines_of_file(filename): with open(filename) as f: content = f.readlines() return (content, len(content)) (alltext, alltextlen) = read_lines_of_file('read.txt') for line in alltext: print(line.rstrip()) print('Number of lines read from file --> %d' % alltextlen)
class Authenticator(): def validate(self, username, password): raise NotImplementedError() # pragma: no cover def verify(self, username): raise NotImplementedError() # pragma: no cover def get_password(self, username): raise NotImplementedError() # pragma: no cover
class Authenticator: def validate(self, username, password): raise not_implemented_error() def verify(self, username): raise not_implemented_error() def get_password(self, username): raise not_implemented_error()
#!/usr/local/bin/python3 class Generator(): def __init__(self, init, factor, modulo, multiple): self.value = init self.factor = factor self.modulo = modulo self.multiple = multiple def getNext(self): self.value = (self.value * self.factor) % self.modulo while (self.value % self.multiple) != 0: self.value = (self.value * self.factor) % self.modulo return self.value class Judge(): def __init__(self, genA, genB): self.generatorA = genA self.generatorB = genB self.count = 0 def evalNext(self): if self.generatorA.getNext()&0xffff == self.generatorB.getNext()&0xffff: self.count += 1 FACTOR_GEN_A = 16807 FACTOR_GEN_B = 48271 MODULO = 2147483647 START_VALUE_GEN_A = 512 START_VALUE_GEN_B = 191 generatorA = Generator(START_VALUE_GEN_A, FACTOR_GEN_A, MODULO, 1) generatorB = Generator(START_VALUE_GEN_B, FACTOR_GEN_B, MODULO, 1) judge = Judge(generatorA, generatorB) for i in xrange(40000000): judge.evalNext() print("Star 1: %i" % judge.count) generatorA = Generator(START_VALUE_GEN_A, FACTOR_GEN_A, MODULO, 4) generatorB = Generator(START_VALUE_GEN_B, FACTOR_GEN_B, MODULO, 8) judge = Judge(generatorA, generatorB) for i in xrange(5000000): judge.evalNext() print("Star 2: %i" % judge.count)
class Generator: def __init__(self, init, factor, modulo, multiple): self.value = init self.factor = factor self.modulo = modulo self.multiple = multiple def get_next(self): self.value = self.value * self.factor % self.modulo while self.value % self.multiple != 0: self.value = self.value * self.factor % self.modulo return self.value class Judge: def __init__(self, genA, genB): self.generatorA = genA self.generatorB = genB self.count = 0 def eval_next(self): if self.generatorA.getNext() & 65535 == self.generatorB.getNext() & 65535: self.count += 1 factor_gen_a = 16807 factor_gen_b = 48271 modulo = 2147483647 start_value_gen_a = 512 start_value_gen_b = 191 generator_a = generator(START_VALUE_GEN_A, FACTOR_GEN_A, MODULO, 1) generator_b = generator(START_VALUE_GEN_B, FACTOR_GEN_B, MODULO, 1) judge = judge(generatorA, generatorB) for i in xrange(40000000): judge.evalNext() print('Star 1: %i' % judge.count) generator_a = generator(START_VALUE_GEN_A, FACTOR_GEN_A, MODULO, 4) generator_b = generator(START_VALUE_GEN_B, FACTOR_GEN_B, MODULO, 8) judge = judge(generatorA, generatorB) for i in xrange(5000000): judge.evalNext() print('Star 2: %i' % judge.count)
price = 1000000 good_credit = True high_income = True if good_credit and high_income: down_payment = 1.0 * price print(f"eligible for loan") else: down_payment = 2.0 * price print(f"ineligible for loan") print(f"down payment is {down_payment}")
price = 1000000 good_credit = True high_income = True if good_credit and high_income: down_payment = 1.0 * price print(f'eligible for loan') else: down_payment = 2.0 * price print(f'ineligible for loan') print(f'down payment is {down_payment}')
# Constants shared between C++ code and python # TODO: Share properly via a configuration file # ControllerWithSimpleHistory::EvaluationPeriod EVALUATION_PERIOD_SEQUENCES = 64 # kWorkWindowSize in SysConsts.hpp STATE_TRANSFER_WINDOW = 300
evaluation_period_sequences = 64 state_transfer_window = 300
# Python program to print # ASCII Value of Character # In c we can assign different # characters of which we want ASCII value c = 'g' # print the ASCII value of assigned character in c print("The ASCII value of '" + c + "' is", ord(c))
c = 'g' print("The ASCII value of '" + c + "' is", ord(c))
def find(tree, key, value): items = tree.get("children", []) if isinstance(tree, dict) else tree for item in items: if item[key] == value: yield item else: yield from find(item, key, value) def find_path(tree, key, value, path=()): items = tree.get("children", []) if isinstance(tree, dict) else tree for item in items: if item[key] == value: yield (*path, item) else: yield from find_path(item, key, value, (*path, item))
def find(tree, key, value): items = tree.get('children', []) if isinstance(tree, dict) else tree for item in items: if item[key] == value: yield item else: yield from find(item, key, value) def find_path(tree, key, value, path=()): items = tree.get('children', []) if isinstance(tree, dict) else tree for item in items: if item[key] == value: yield (*path, item) else: yield from find_path(item, key, value, (*path, item))
''' Problem: 13 Reasons Why Given 3 integers A, B, C. Do the following steps- Swap A and B. Multiply A by C. Add C to B. Output new values of A and B. ''' # When ran, you will see a blank line, as that is needed for the submission. # If you are debugging and want it to be easier, change it too # input = input("Numbers: ") # Collects the input input = input() # Puts the input in the list, it's cutting them due to the space between the numbers. inputList = input.split(" ") # Since A and B are being swapped, A is given inputList[1], which was B's input. Vice Versa for B. # C is just given the third input, which was C. A = int(inputList[1]) B = int(inputList[0]) C = int(inputList[2]) # Multiplies A * C. A = A * C # Adds C + B. B = C + B # Converts them to strings since the submission needs to be one line. A = str(A) B = str(B) # Prints the answer. print(A + " " + B)
""" Problem: 13 Reasons Why Given 3 integers A, B, C. Do the following steps- Swap A and B. Multiply A by C. Add C to B. Output new values of A and B. """ input = input() input_list = input.split(' ') a = int(inputList[1]) b = int(inputList[0]) c = int(inputList[2]) a = A * C b = C + B a = str(A) b = str(B) print(A + ' ' + B)
class Solution: def maxIncreaseKeepingSkyline(self, grid): skyline = [] for v_line in grid: skyline.append([max(v_line)] * len(grid)) for x, h_line in enumerate(list(zip(*grid))): max_h = max(h_line) for y in range(len(skyline)): skyline[y][x] = min(skyline[y][x], max_h) ans = sum([sum(l) for l in skyline]) - sum([sum(l) for l in grid]) return ans
class Solution: def max_increase_keeping_skyline(self, grid): skyline = [] for v_line in grid: skyline.append([max(v_line)] * len(grid)) for (x, h_line) in enumerate(list(zip(*grid))): max_h = max(h_line) for y in range(len(skyline)): skyline[y][x] = min(skyline[y][x], max_h) ans = sum([sum(l) for l in skyline]) - sum([sum(l) for l in grid]) return ans
class Solution: def subsetsWithDup(self, nums: List[int]) -> List[List[int]]: output = [[]] result = [] for num in sorted(nums): res = [lst + [num] for lst in output] output += res for subset in output: if subset not in result: result.append(subset) return result
class Solution: def subsets_with_dup(self, nums: List[int]) -> List[List[int]]: output = [[]] result = [] for num in sorted(nums): res = [lst + [num] for lst in output] output += res for subset in output: if subset not in result: result.append(subset) return result
with open('/home/ai/hdd/tupm/projects/textGenOCR/trdg/dicts/general_form_ocr.txt') as f: text = f.readlines() f2 = open('/home/ai/hdd/tupm/projects/textGenOCR/trdg/dicts/dlo_address.txt', 'w+') # data = list(set(text)) # data.sort() # # count2 = 0 # count = {e: 0 for e in data} # count2 = 0 for e in text: e = e.strip() length = len(e) if length > 25: f2.write(f'{e[:length//2]}\n') f2.write(f'{e[length//2:]}\n') else: f2.write(f'{e}\n') # # data.sort() # print(count) # print(len(count)) # print(min(count.values()))
with open('/home/ai/hdd/tupm/projects/textGenOCR/trdg/dicts/general_form_ocr.txt') as f: text = f.readlines() f2 = open('/home/ai/hdd/tupm/projects/textGenOCR/trdg/dicts/dlo_address.txt', 'w+') for e in text: e = e.strip() length = len(e) if length > 25: f2.write(f'{e[:length // 2]}\n') f2.write(f'{e[length // 2:]}\n') else: f2.write(f'{e}\n')
def foo(): ''' >>> class bad(): ... pass ''' pass
def foo(): """ >>> class bad(): ... pass """ pass
class InstanceObjectManager: def __init__(self, parent): self.parent = parent # All Instance Id's of instanced objects on this server. self.localInstanceIds = set() # Dict of {Temp Id: Instance Object} self.tempId2iObject = {} # Dict of {Instance Id: Instance Object} self.instanceId2iObject = {} # Keeps track of all instanced objects under their Parent->Zone key-pair. self.locationDict = {} def storeTempObject(self, tempId, iObject): if tempId in self.tempId2iObject: print("Warning: TempId (%s) already exists in TempId dict. Overriding." % tempId) self.tempId2iObject[tempId] = iObject def deleteTempObject(self, tempId): if tempId not in self.tempId2iObject: print("Error: Attempted to delete non-existent object with TempId (%s)" % tempId) return del self.tempId2iObject[tempId] def activateTempObject(self, tempId, instanceId): if tempId not in self.tempId2iObject: print("Error: Attempted to activate non-existent TempId (%s)" % tempId) return iObject = self.tempId2iObject[tempId] iObject.instanceId = instanceId self.storeInstanceObject(iObject) self.deleteTempObject(tempId) def storeInstanceObject(self, iObject): instanceId = iObject.instanceId if instanceId in self.localInstanceIds: print("Warning: Instance Object (%s) already exists in localInstanceIds. Duplicate generate or poor cleanup?" % instanceId) if instanceId in self.instanceId2iObject: print("Warning: Instance Object (%s) already exists in memory. Overriding." % instanceId) # Store object in memory. self.instanceId2iObject[instanceId] = iObject # Store object in location. parentId = iObject.parentId zoneId = iObject.zoneId parentDict = self.locationDict.setdefault(parentId, {}) zoneDict = parentDict.setdefault(zoneId, set()) zoneDict.add(iObject) # Store the instance id as a known id. self.localInstanceIds.add(instanceId) def deleteInstanceObject(self, instanceId): if (instanceId not in self.localInstanceIds) or (instanceId not in self.instanceId2iObject): print("Error: Attempted to delete invalid Instance Object (%s)" % instanceId) return iObject = self.instanceId2iObject[instanceId] # Get object location. parentId = iObject.parentId zoneId = iObject.zoneId # Remove the object from memory. del self.instanceId2iObject[instanceId] del self.localInstanceIds[instanceId] parentDict = self.locationDict.get(parentId) if parentDict is None: print("Error: Attempted to delete Instance Object (%s) with invalid parent (%s)." % (instanceId, parentId)) return zoneDict = parentDict.get(zoneId) if zoneDict is None: print("Error: Attempted to delete Instance Object (%s) with invalid parent-zone pair (%s:%s)." % (instanceId, parentId, zoneId)) return if instanceId not in zoneDict: print("Error: Attempted to delete Instance Object (%s) that does not exist at location (%s:%s)." % (instanceId, parentId, zoneId)) return # We can finally delete the object out of the locationDict. del zoneDict[instanceId] # Cleanup. if len(zoneDict) == 0: del parentDict[zoneId] if len(parentDict) == 0: del self.locationDict[parentId] def getInstanceObjects(self, parentId, zoneId=None): parent = self.locationDict.get(parentId) if parent is None: return [] # If no zoneId is specified, return all child objects of the parent. if zoneId is None: children = [] for zone in parent.values(): for iObject in zone: children.append(iObject) # If we have a specific zoneId, return all objects under that zone. else: children = parent.get(zoneId, []) return children
class Instanceobjectmanager: def __init__(self, parent): self.parent = parent self.localInstanceIds = set() self.tempId2iObject = {} self.instanceId2iObject = {} self.locationDict = {} def store_temp_object(self, tempId, iObject): if tempId in self.tempId2iObject: print('Warning: TempId (%s) already exists in TempId dict. Overriding.' % tempId) self.tempId2iObject[tempId] = iObject def delete_temp_object(self, tempId): if tempId not in self.tempId2iObject: print('Error: Attempted to delete non-existent object with TempId (%s)' % tempId) return del self.tempId2iObject[tempId] def activate_temp_object(self, tempId, instanceId): if tempId not in self.tempId2iObject: print('Error: Attempted to activate non-existent TempId (%s)' % tempId) return i_object = self.tempId2iObject[tempId] iObject.instanceId = instanceId self.storeInstanceObject(iObject) self.deleteTempObject(tempId) def store_instance_object(self, iObject): instance_id = iObject.instanceId if instanceId in self.localInstanceIds: print('Warning: Instance Object (%s) already exists in localInstanceIds. Duplicate generate or poor cleanup?' % instanceId) if instanceId in self.instanceId2iObject: print('Warning: Instance Object (%s) already exists in memory. Overriding.' % instanceId) self.instanceId2iObject[instanceId] = iObject parent_id = iObject.parentId zone_id = iObject.zoneId parent_dict = self.locationDict.setdefault(parentId, {}) zone_dict = parentDict.setdefault(zoneId, set()) zoneDict.add(iObject) self.localInstanceIds.add(instanceId) def delete_instance_object(self, instanceId): if instanceId not in self.localInstanceIds or instanceId not in self.instanceId2iObject: print('Error: Attempted to delete invalid Instance Object (%s)' % instanceId) return i_object = self.instanceId2iObject[instanceId] parent_id = iObject.parentId zone_id = iObject.zoneId del self.instanceId2iObject[instanceId] del self.localInstanceIds[instanceId] parent_dict = self.locationDict.get(parentId) if parentDict is None: print('Error: Attempted to delete Instance Object (%s) with invalid parent (%s).' % (instanceId, parentId)) return zone_dict = parentDict.get(zoneId) if zoneDict is None: print('Error: Attempted to delete Instance Object (%s) with invalid parent-zone pair (%s:%s).' % (instanceId, parentId, zoneId)) return if instanceId not in zoneDict: print('Error: Attempted to delete Instance Object (%s) that does not exist at location (%s:%s).' % (instanceId, parentId, zoneId)) return del zoneDict[instanceId] if len(zoneDict) == 0: del parentDict[zoneId] if len(parentDict) == 0: del self.locationDict[parentId] def get_instance_objects(self, parentId, zoneId=None): parent = self.locationDict.get(parentId) if parent is None: return [] if zoneId is None: children = [] for zone in parent.values(): for i_object in zone: children.append(iObject) else: children = parent.get(zoneId, []) return children
def append(list1, list2): pass def concat(lists): pass def filter(function, list): pass def length(list): pass def map(function, list): pass def foldl(function, list, initial): pass def foldr(function, list, initial): pass def reverse(list): pass
def append(list1, list2): pass def concat(lists): pass def filter(function, list): pass def length(list): pass def map(function, list): pass def foldl(function, list, initial): pass def foldr(function, list, initial): pass def reverse(list): pass
class Solution: def rob(self, nums: List[int]) -> int: def dp(i: int) -> int: if i == 0: return nums[0] if i == 1: return max(nums[0], nums[1]) if i not in memo: memo[i] = max(dp(i-1), nums[i]+dp(i-2)) return memo[i] memo = {} return dp(len(nums)-1)
class Solution: def rob(self, nums: List[int]) -> int: def dp(i: int) -> int: if i == 0: return nums[0] if i == 1: return max(nums[0], nums[1]) if i not in memo: memo[i] = max(dp(i - 1), nums[i] + dp(i - 2)) return memo[i] memo = {} return dp(len(nums) - 1)
#!/usr/bin/env python3 ############################################################################### # Copyright 2018 The Apollo Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### def segment_overlap(a, b, x, y): if b < x or a > y: return False return True def vector_projection_overlap(p0, p1, p2, p3): v = p1.subtract(p0) n_square = v.norm_square() v0 = p2.subtract(p0) v1 = p3.subtract(p0) t0 = v0.dot(v) t1 = v1.dot(v) if t0 > t1: t = t0 t0 = t1 t1 = t return segment_overlap(t0, t1, 0.0, n_square)
def segment_overlap(a, b, x, y): if b < x or a > y: return False return True def vector_projection_overlap(p0, p1, p2, p3): v = p1.subtract(p0) n_square = v.norm_square() v0 = p2.subtract(p0) v1 = p3.subtract(p0) t0 = v0.dot(v) t1 = v1.dot(v) if t0 > t1: t = t0 t0 = t1 t1 = t return segment_overlap(t0, t1, 0.0, n_square)
class Matrix: def transpose(self, matrix): return list(zip(*matrix)) def column(self, matrix, i): return [row[i] for row in matrix]
class Matrix: def transpose(self, matrix): return list(zip(*matrix)) def column(self, matrix, i): return [row[i] for row in matrix]
def create_histo_table(dataname, dimPerfMap, lines, histoLambda, meanLambda, subsectitle, header): colPairs = len(dimPerfMap) colspecs = '|c|c|' * colPairs lines.append("\\begin{table}[H]") lines.append("\centering") lines.append("\caption{%s: %s}" % (subsectitle, header)) lines.append("\\begin{adjustbox}{width=1\\textwidth}") lines.append("\\begin{tabular}{ %s }" % colspecs) lines.append("\hline") lines.append("\multicolumn{%s}{|c|}{%s} \\\\" % (str(colPairs * 2), header)) lines.append("\hline") tmpl0 = "\multicolumn{2}{|c||}{%s}" tmpl = "\multicolumn{2}{c||}{%s}" tmplN = "\multicolumn{2}{c|}{%s}" dimcols = [] idx = 0 for M,N in sorted(dimPerfMap): if idx == 0: tmplVal = tmpl0 % ("%s-%s" % (dataname, M)) elif idx == len(dimPerfMap) - 1: tmplVal = tmplN % ("%s-%s" % (dataname, M)) else: tmplVal = tmpl % ("%s-%s" % (dataname, M)) dimcols.append(tmplVal) idx += 1 lines.append(" & ".join(dimcols) + "\\\\") lines.append("\hline") dimcols = [] idx = 0 for M,N in sorted(dimPerfMap): if idx == 0: tmplVal = tmpl0 % ("m = %d, gc = %d" % (M,N)) elif idx == len(dimPerfMap) - 1: tmplVal = tmplN % ("m = %d, gc = %d" % (M,N)) else: tmplVal = tmpl % ("m = %d, gc = %d" % (M,N)) dimcols.append(tmplVal) idx += 1 lines.append(" & ".join(dimcols) + "\\\\") lines.append("\hline") lineArr = ["f($\\bar{x}$) & N" for i in range(colPairs)] lines.append(" & ".join(lineArr) + "\\\\") lines.append("\hline") lines.append("\hline") ROWLIMIT = 8 tableData = [[" " for j in range(colPairs*2)] for idx in range(ROWLIMIT)] idx = 0 for M,N in sorted(dimPerfMap): dimPerf = dimPerfMap[(M,N)] j = 0 maxN = -float('inf') maxNIdx = -1 maxN_f = -1 for (f,N) in histoLambda(dimPerf): if N > maxN: maxN = N maxNIdx = j maxN_f = f if j < ROWLIMIT: tableData[j][idx] = str(f) tableData[j][idx+1] = str(N) j+= 1 # Overwrite first row with max tableData[0][idx] = str(maxN_f) tableData[0][idx+1] = str(maxN) idx += 2 maxStatRow = tableData[0] lines.append(" & ".join(maxStatRow) + "\\\\") lines.append("\hline") for tableRow in tableData: lines.append(" & ".join(tableRow) + "\\\\") lines.append("\hline") dimcols = [] idx = 0 summary = [] for M,N in sorted(dimPerfMap): dimPerf = dimPerfMap[(M,N)] if idx == 0: tmplVal = tmpl0 % ("\\^{f} = %s" % str(meanLambda(dimPerf))) elif idx == len(dimPerfMap) - 1: tmplVal = tmplN % ("\\^{f} = %s" % str(meanLambda(dimPerf))) else: tmplVal = tmpl % ("\\^{f} = %s" % str(meanLambda(dimPerf))) dimcols.append(tmplVal) score = str(meanLambda(dimPerf)) summary.append([str(M), str(N), score]) idx += 1 lines.append(" & ".join(dimcols) + "\\\\") lines.append("\hline") lines.append("\end{tabular}") lines.append("\end{adjustbox}") lines.append("\\end{table}") return summary def create_tables(dataname, dimPerfMap, lines, subsectitle): retSummary = [] # lines.append("\subsubsection{DATA:%s | FITNESS}" % (dataname.upper())) histoLambda = lambda dimPerf: dimPerf.scoreFitnessHisto meanLambda = lambda dimPerf: dimPerf.scoreFitnessMean summary = create_histo_table(dataname, dimPerfMap, lines, histoLambda, meanLambda, subsectitle, header = "%s - fitness" % dataname) retSummary = retSummary + [['fitness', summ[0], summ[1], summ[2]] for summ in summary] # M,N,score # lines.append("\subsubsection{DATA:%s | SELF}" % (dataname.upper())) histoLambda = lambda dimPerf: dimPerf.scoreSelfHisto meanLambda = lambda dimPerf: dimPerf.scoreSelfMean summary = create_histo_table(dataname, dimPerfMap, lines, histoLambda, meanLambda, subsectitle, header = "%s - self" % dataname) retSummary = retSummary + [['pscore', summ[0], summ[1], summ[2]] for summ in summary] # M,N,score # lines.append("\subsubsection{DATA:%s | COMPETE}" % (dataname.upper())) histoLambda = lambda dimPerf: dimPerf.scoreCompeteHisto meanLambda = lambda dimPerf: dimPerf.scoreCompeteMean summary = create_histo_table(dataname, dimPerfMap, lines, histoLambda, meanLambda, subsectitle, header = "%s - compete" % dataname) retSummary = retSummary + [['cscore', summ[0], summ[1], summ[2]] for summ in summary] # M,N,score return retSummary def latexify(perfMap): ''' ('rouletteWheel', 'crossover_1p') / (10, 10, 'auth'): (stat.scoreCompeteHisto: [(1.0, 9), (0.9, 1)], stat.scoreCompeteMean: 0.99, stat.scoreSelfHisto: [(0.0, 10)], stat.scoreSelfMean: 0.0, stat.scoreFitnessHisto: [(4.3463447172747323, 1), (7.948375686832958, 1), (3.9489350437230737, 1), (0.34958729407625033, 1), (0.81301756889153154, 1), (3.2477890015590951, 1), (3.581170550257939, 2), (-0.062549850063921664, 2)], stat.scoreFitnessMean: 2.76912907127) Table template: \begin{tabular}{ |c|c||c|c| } \hline \multicolumn{2}{|c||}{col1} & \multicolumn{2}{c|}{col2}\\ \hline \multicolumn{2}{|c||}{m = 10, gc = 10} & \multicolumn{2}{c|}{m = 10, gc = 20}\\ \hline f($\bar{x}$) & N & f($\bar{x}$) & N \\ \hline \hline 100 & 10 & 200 & 20 \\ \hline 100 & 10 & 200 & 20 \\ 100 & 10 & 200 & 20 \\ 100 & 10 & 200 & 20 \\ 100 & 10 & 200 & 20 \\ \hline \multicolumn{2}{|c||}{\^{f} = 150} & \multicolumn{2}{c|}{\^{f} = 15}\\ \hline \end{tabular} ''' lines = [] retSummary = [] for (select, xover), perf1 in perfMap.items(): subsectitle = "SELECTION: %s; CROSSOVER: %s" % (select.upper().replace('_', '-'), xover.upper().replace('CROSSOVER', '').replace('_', '')) lines.append("\subsection{%s}" % subsectitle) dataPerfs = dict() for (M,N,dataname), perf2 in perf1.items(): k = (M,N) if dataname not in dataPerfs: dataPerfs[dataname] = dict() dataPerfs[dataname][k] = perf2 for dataname, dimPerfMap in dataPerfs.items(): dataname = dataname.upper().replace('_', '-') summary = create_tables(dataname, dimPerfMap, lines, subsectitle) select = select.upper().replace('_', '-') xover = xover.upper().replace('CROSSOVER', '').replace('_', '') retSummary = retSummary + [[select, xover, dataname, summ[0], summ[1], summ[2], summ[3]] for summ in summary] # metric, M,N,score print("\n".join(lines)) return retSummary def select_best(summary): ''' select best by dataname, metric ''' summMap = dict() for summ in summary: (select,xover,dataname,metric,M,N,score) = (summ[0], summ[1], summ[2], summ[3], summ[4], summ[5], summ[6]) if (dataname, metric) not in summMap: summMap[(dataname, metric)] = [] summMap[(dataname, metric)].append((summ, score)) ret = [] for (dataname, metric), summArr in summMap.items(): summArrSorted = sorted(summArr, reverse=True, key=lambda kv: kv[1]) ret.append(summArrSorted[0][0]) ret = sorted(ret, key = lambda arr: (arr[2], arr[3])) #sort by dataname, metric return ret def summaryTable(summary): summary = select_best(summary) header = ['select', 'xover', 'dataname', 'metric', 'M', 'N', 'score'] colspecs = "|c|c|c|c|c|c|c|" lines = [] lines.append("\\begin{table}[H]") lines.append("\centering") lines.append("\caption{SUMMARY}") lines.append("\\begin{adjustbox}{width=1\\textwidth}") lines.append("\\begin{tabular}{ %s }" % colspecs) lines.append("\hline") lines.append(" & ".join(header) + "\\\\") lines.append("\hline") for summ in summary: lines.append("\hline") lines.append(" & ".join(summ) + "\\\\") lines.append("\hline") lines.append("\end{tabular}") lines.append("\end{adjustbox}") lines.append("\\end{table}") print("\n".join(lines))
def create_histo_table(dataname, dimPerfMap, lines, histoLambda, meanLambda, subsectitle, header): col_pairs = len(dimPerfMap) colspecs = '|c|c|' * colPairs lines.append('\\begin{table}[H]') lines.append('\\centering') lines.append('\\caption{%s: %s}' % (subsectitle, header)) lines.append('\\begin{adjustbox}{width=1\\textwidth}') lines.append('\\begin{tabular}{ %s }' % colspecs) lines.append('\\hline') lines.append('\\multicolumn{%s}{|c|}{%s} \\\\' % (str(colPairs * 2), header)) lines.append('\\hline') tmpl0 = '\\multicolumn{2}{|c||}{%s}' tmpl = '\\multicolumn{2}{c||}{%s}' tmpl_n = '\\multicolumn{2}{c|}{%s}' dimcols = [] idx = 0 for (m, n) in sorted(dimPerfMap): if idx == 0: tmpl_val = tmpl0 % ('%s-%s' % (dataname, M)) elif idx == len(dimPerfMap) - 1: tmpl_val = tmplN % ('%s-%s' % (dataname, M)) else: tmpl_val = tmpl % ('%s-%s' % (dataname, M)) dimcols.append(tmplVal) idx += 1 lines.append(' & '.join(dimcols) + '\\\\') lines.append('\\hline') dimcols = [] idx = 0 for (m, n) in sorted(dimPerfMap): if idx == 0: tmpl_val = tmpl0 % ('m = %d, gc = %d' % (M, N)) elif idx == len(dimPerfMap) - 1: tmpl_val = tmplN % ('m = %d, gc = %d' % (M, N)) else: tmpl_val = tmpl % ('m = %d, gc = %d' % (M, N)) dimcols.append(tmplVal) idx += 1 lines.append(' & '.join(dimcols) + '\\\\') lines.append('\\hline') line_arr = ['f($\\bar{x}$) & N' for i in range(colPairs)] lines.append(' & '.join(lineArr) + '\\\\') lines.append('\\hline') lines.append('\\hline') rowlimit = 8 table_data = [[' ' for j in range(colPairs * 2)] for idx in range(ROWLIMIT)] idx = 0 for (m, n) in sorted(dimPerfMap): dim_perf = dimPerfMap[M, N] j = 0 max_n = -float('inf') max_n_idx = -1 max_n_f = -1 for (f, n) in histo_lambda(dimPerf): if N > maxN: max_n = N max_n_idx = j max_n_f = f if j < ROWLIMIT: tableData[j][idx] = str(f) tableData[j][idx + 1] = str(N) j += 1 tableData[0][idx] = str(maxN_f) tableData[0][idx + 1] = str(maxN) idx += 2 max_stat_row = tableData[0] lines.append(' & '.join(maxStatRow) + '\\\\') lines.append('\\hline') for table_row in tableData: lines.append(' & '.join(tableRow) + '\\\\') lines.append('\\hline') dimcols = [] idx = 0 summary = [] for (m, n) in sorted(dimPerfMap): dim_perf = dimPerfMap[M, N] if idx == 0: tmpl_val = tmpl0 % ('\\^{f} = %s' % str(mean_lambda(dimPerf))) elif idx == len(dimPerfMap) - 1: tmpl_val = tmplN % ('\\^{f} = %s' % str(mean_lambda(dimPerf))) else: tmpl_val = tmpl % ('\\^{f} = %s' % str(mean_lambda(dimPerf))) dimcols.append(tmplVal) score = str(mean_lambda(dimPerf)) summary.append([str(M), str(N), score]) idx += 1 lines.append(' & '.join(dimcols) + '\\\\') lines.append('\\hline') lines.append('\\end{tabular}') lines.append('\\end{adjustbox}') lines.append('\\end{table}') return summary def create_tables(dataname, dimPerfMap, lines, subsectitle): ret_summary = [] histo_lambda = lambda dimPerf: dimPerf.scoreFitnessHisto mean_lambda = lambda dimPerf: dimPerf.scoreFitnessMean summary = create_histo_table(dataname, dimPerfMap, lines, histoLambda, meanLambda, subsectitle, header='%s - fitness' % dataname) ret_summary = retSummary + [['fitness', summ[0], summ[1], summ[2]] for summ in summary] histo_lambda = lambda dimPerf: dimPerf.scoreSelfHisto mean_lambda = lambda dimPerf: dimPerf.scoreSelfMean summary = create_histo_table(dataname, dimPerfMap, lines, histoLambda, meanLambda, subsectitle, header='%s - self' % dataname) ret_summary = retSummary + [['pscore', summ[0], summ[1], summ[2]] for summ in summary] histo_lambda = lambda dimPerf: dimPerf.scoreCompeteHisto mean_lambda = lambda dimPerf: dimPerf.scoreCompeteMean summary = create_histo_table(dataname, dimPerfMap, lines, histoLambda, meanLambda, subsectitle, header='%s - compete' % dataname) ret_summary = retSummary + [['cscore', summ[0], summ[1], summ[2]] for summ in summary] return retSummary def latexify(perfMap): """ ('rouletteWheel', 'crossover_1p') / (10, 10, 'auth'): (stat.scoreCompeteHisto: [(1.0, 9), (0.9, 1)], stat.scoreCompeteMean: 0.99, stat.scoreSelfHisto: [(0.0, 10)], stat.scoreSelfMean: 0.0, stat.scoreFitnessHisto: [(4.3463447172747323, 1), (7.948375686832958, 1), (3.9489350437230737, 1), (0.34958729407625033, 1), (0.81301756889153154, 1), (3.2477890015590951, 1), (3.581170550257939, 2), (-0.062549850063921664, 2)], stat.scoreFitnessMean: 2.76912907127) Table template: \x08egin{tabular}{ |c|c||c|c| } \\hline \\multicolumn{2}{|c||}{col1} & \\multicolumn{2}{c|}{col2}\\ \\hline \\multicolumn{2}{|c||}{m = 10, gc = 10} & \\multicolumn{2}{c|}{m = 10, gc = 20}\\ \\hline f($\x08ar{x}$) & N & f($\x08ar{x}$) & N \\ \\hline \\hline 100 & 10 & 200 & 20 \\ \\hline 100 & 10 & 200 & 20 \\ 100 & 10 & 200 & 20 \\ 100 & 10 & 200 & 20 \\ 100 & 10 & 200 & 20 \\ \\hline \\multicolumn{2}{|c||}{\\^{f} = 150} & \\multicolumn{2}{c|}{\\^{f} = 15}\\ \\hline \\end{tabular} """ lines = [] ret_summary = [] for ((select, xover), perf1) in perfMap.items(): subsectitle = 'SELECTION: %s; CROSSOVER: %s' % (select.upper().replace('_', '-'), xover.upper().replace('CROSSOVER', '').replace('_', '')) lines.append('\\subsection{%s}' % subsectitle) data_perfs = dict() for ((m, n, dataname), perf2) in perf1.items(): k = (M, N) if dataname not in dataPerfs: dataPerfs[dataname] = dict() dataPerfs[dataname][k] = perf2 for (dataname, dim_perf_map) in dataPerfs.items(): dataname = dataname.upper().replace('_', '-') summary = create_tables(dataname, dimPerfMap, lines, subsectitle) select = select.upper().replace('_', '-') xover = xover.upper().replace('CROSSOVER', '').replace('_', '') ret_summary = retSummary + [[select, xover, dataname, summ[0], summ[1], summ[2], summ[3]] for summ in summary] print('\n'.join(lines)) return retSummary def select_best(summary): """ select best by dataname, metric """ summ_map = dict() for summ in summary: (select, xover, dataname, metric, m, n, score) = (summ[0], summ[1], summ[2], summ[3], summ[4], summ[5], summ[6]) if (dataname, metric) not in summMap: summMap[dataname, metric] = [] summMap[dataname, metric].append((summ, score)) ret = [] for ((dataname, metric), summ_arr) in summMap.items(): summ_arr_sorted = sorted(summArr, reverse=True, key=lambda kv: kv[1]) ret.append(summArrSorted[0][0]) ret = sorted(ret, key=lambda arr: (arr[2], arr[3])) return ret def summary_table(summary): summary = select_best(summary) header = ['select', 'xover', 'dataname', 'metric', 'M', 'N', 'score'] colspecs = '|c|c|c|c|c|c|c|' lines = [] lines.append('\\begin{table}[H]') lines.append('\\centering') lines.append('\\caption{SUMMARY}') lines.append('\\begin{adjustbox}{width=1\\textwidth}') lines.append('\\begin{tabular}{ %s }' % colspecs) lines.append('\\hline') lines.append(' & '.join(header) + '\\\\') lines.append('\\hline') for summ in summary: lines.append('\\hline') lines.append(' & '.join(summ) + '\\\\') lines.append('\\hline') lines.append('\\end{tabular}') lines.append('\\end{adjustbox}') lines.append('\\end{table}') print('\n'.join(lines))
example_schema_array = {"type": "array", "items": {"type": "string"}} example_array = ["string"] example_schema_integer = {"type": "integer", "minimum": 3, "maximum": 5} example_integer = 3 example_schema_number = {"type": "number", "minimum": 3, "maximum": 5} example_number = 3.2 example_schema_object = {"type": "object", "properties": {"value": {"type": "integer"}}, "required": ["value"]} example_object = {"value": 1} example_schema_string = {"type": "string", "minLength": 3, "maxLength": 5} example_string = "str" example_response_types = [example_array, example_integer, example_number, example_object, example_string] example_schema_types = [ example_schema_array, example_schema_integer, example_schema_number, example_schema_object, example_schema_string, ]
example_schema_array = {'type': 'array', 'items': {'type': 'string'}} example_array = ['string'] example_schema_integer = {'type': 'integer', 'minimum': 3, 'maximum': 5} example_integer = 3 example_schema_number = {'type': 'number', 'minimum': 3, 'maximum': 5} example_number = 3.2 example_schema_object = {'type': 'object', 'properties': {'value': {'type': 'integer'}}, 'required': ['value']} example_object = {'value': 1} example_schema_string = {'type': 'string', 'minLength': 3, 'maxLength': 5} example_string = 'str' example_response_types = [example_array, example_integer, example_number, example_object, example_string] example_schema_types = [example_schema_array, example_schema_integer, example_schema_number, example_schema_object, example_schema_string]
# region headers # escript-template v20190611 / [email protected] # * author: MITU Bogdan Nicolae (EEAS-EXT) <[email protected]> # * [email protected] # * version: 2019/09/18 # task_name: CalmSetProjectOwner # description: Given a Calm project UUID, updates the owner reference section # in the metadata. # endregion #region capture Calm variables username = "@@{pc.username}@@" username_secret = "@@{pc.secret}@@" api_server = "@@{pc_ip}@@" nutanix_calm_user_uuid = "@@{nutanix_calm_user_uuid}@@" nutanix_calm_user_upn = "@@{calm_username}@@" project_uuid = "@@{project_uuid}@@" #endregion #region prepare api call (get project) api_server_port = "9440" api_server_endpoint = "/api/nutanix/v3/projects_internal/{}".format(project_uuid) url = "https://{}:{}{}".format( api_server, api_server_port, api_server_endpoint ) method = "GET" headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } #endregion #region make the api call (get project) print("Making a {} API call to {}".format(method, url)) resp = urlreq( url, verb=method, auth='BASIC', user=username, passwd=username_secret, headers=headers, verify=False ) # endregion #region process the results (get project) if resp.ok: print("Successfully retrieved project details for project with uuid {}".format(project_uuid)) project_json = json.loads(resp.content) else: #api call failed print("Request failed") print("Headers: {}".format(headers)) print('Status code: {}'.format(resp.status_code)) print('Response: {}'.format(json.dumps(json.loads(resp.content), indent=4))) exit(1) # endregion #region prepare api call (update project with acp) api_server_port = "9440" api_server_endpoint = "/api/nutanix/v3/projects_internal/{}".format(project_uuid) url = "https://{}:{}{}".format( api_server, api_server_port, api_server_endpoint ) method = "PUT" headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } # Compose the json payload #removing stuff we don't need for the update project_json.pop('status', None) project_json['metadata'].pop('create_time', None) #updating values project_json['metadata']['owner_reference']['uuid'] = nutanix_calm_user_uuid project_json['metadata']['owner_reference']['name'] = nutanix_calm_user_upn for acp in project_json['spec']['access_control_policy_list']: acp["operation"] = "ADD" payload = project_json #endregion #region make the api call (update project with acp) print("Making a {} API call to {}".format(method, url)) resp = urlreq( url, verb=method, auth='BASIC', user=username, passwd=username_secret, params=json.dumps(payload), headers=headers, verify=False ) #endregion #region process the results (update project with acp) if resp.ok: print("Successfully updated the project owner reference to {}".format(nutanix_calm_user_upn)) exit(0) else: #api call failed print("Request failed") print("Headers: {}".format(headers)) print("Payload: {}".format(json.dumps(payload))) print('Status code: {}'.format(resp.status_code)) print('Response: {}'.format(json.dumps(json.loads(resp.content), indent=4))) exit(1) #endregion
username = '@@{pc.username}@@' username_secret = '@@{pc.secret}@@' api_server = '@@{pc_ip}@@' nutanix_calm_user_uuid = '@@{nutanix_calm_user_uuid}@@' nutanix_calm_user_upn = '@@{calm_username}@@' project_uuid = '@@{project_uuid}@@' api_server_port = '9440' api_server_endpoint = '/api/nutanix/v3/projects_internal/{}'.format(project_uuid) url = 'https://{}:{}{}'.format(api_server, api_server_port, api_server_endpoint) method = 'GET' headers = {'Content-Type': 'application/json', 'Accept': 'application/json'} print('Making a {} API call to {}'.format(method, url)) resp = urlreq(url, verb=method, auth='BASIC', user=username, passwd=username_secret, headers=headers, verify=False) if resp.ok: print('Successfully retrieved project details for project with uuid {}'.format(project_uuid)) project_json = json.loads(resp.content) else: print('Request failed') print('Headers: {}'.format(headers)) print('Status code: {}'.format(resp.status_code)) print('Response: {}'.format(json.dumps(json.loads(resp.content), indent=4))) exit(1) api_server_port = '9440' api_server_endpoint = '/api/nutanix/v3/projects_internal/{}'.format(project_uuid) url = 'https://{}:{}{}'.format(api_server, api_server_port, api_server_endpoint) method = 'PUT' headers = {'Content-Type': 'application/json', 'Accept': 'application/json'} project_json.pop('status', None) project_json['metadata'].pop('create_time', None) project_json['metadata']['owner_reference']['uuid'] = nutanix_calm_user_uuid project_json['metadata']['owner_reference']['name'] = nutanix_calm_user_upn for acp in project_json['spec']['access_control_policy_list']: acp['operation'] = 'ADD' payload = project_json print('Making a {} API call to {}'.format(method, url)) resp = urlreq(url, verb=method, auth='BASIC', user=username, passwd=username_secret, params=json.dumps(payload), headers=headers, verify=False) if resp.ok: print('Successfully updated the project owner reference to {}'.format(nutanix_calm_user_upn)) exit(0) else: print('Request failed') print('Headers: {}'.format(headers)) print('Payload: {}'.format(json.dumps(payload))) print('Status code: {}'.format(resp.status_code)) print('Response: {}'.format(json.dumps(json.loads(resp.content), indent=4))) exit(1)
class TCPControlFlags(): def __init__(self): '''Control Bits govern the entire process of connection establishment, data transmissions and connection termination. The control bits are listed as follows, they are''' '''It indicates if we need to use Urgent pointer field or not. If it is set to 1 then only we use Urgent pointer.''' self.URG = 0x0 '''It is set when an acknowledgement is being sent to the sender.''' self.ACK = 0x0 '''When the bit is set, it tells the receiving TCP module to pass the data to the application immediately.''' self.PSH = 0x0 '''When the bit is set, it aborts the connection. It is also used as a negative acknowledgement against a connection request.''' self.RST = 0x0 '''It is used during the initial establishment of a connection. It is set when synchronizing process is initiated.''' self.SYN = 0x0 '''The bit indicates that the host that sent the FIN bit has no more data to send.''' self.FIN = 0x0
class Tcpcontrolflags: def __init__(self): """Control Bits govern the entire process of connection establishment, data transmissions and connection termination. The control bits are listed as follows, they are""" 'It indicates if we need to use Urgent pointer field or not. If it is set to 1 then only we use Urgent pointer.' self.URG = 0 'It is set when an acknowledgement is being sent to the sender.' self.ACK = 0 'When the bit is set, it tells the receiving TCP module to pass the data to the application immediately.' self.PSH = 0 'When the bit is set, it aborts the connection. It is also used as a negative acknowledgement against a connection request.' self.RST = 0 'It is used during the initial establishment of a connection. It is set when synchronizing process is initiated.' self.SYN = 0 'The bit indicates that the host that sent the FIN bit has no more data to send.' self.FIN = 0