content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
n=int(input()) for i in range(0,n): for j in range(0,n-i): print(' ',end='') for k in range(0,n-i): print('*',end='') print() for i in range(1,n): for j in range(-1,i): print(' ',end='') for k in range(-1,i): print('*',end='') print()
n = int(input()) for i in range(0, n): for j in range(0, n - i): print(' ', end='') for k in range(0, n - i): print('*', end='') print() for i in range(1, n): for j in range(-1, i): print(' ', end='') for k in range(-1, i): print('*', end='') print()
## Simple cache class OwnCache: __cache = {} __save_interval = 10 ## In seconds def __init__(self,save_to_disk=0): self.save = save_to_disk def set(self,key,data): self.__cache[key] = data def get (self,key): data = None if key in self.__cache: data = self.__cache[key] return data cache = OwnCache() cache.set("hello",{"g":"g"}) print(cache.get("hello"))
class Owncache: __cache = {} __save_interval = 10 def __init__(self, save_to_disk=0): self.save = save_to_disk def set(self, key, data): self.__cache[key] = data def get(self, key): data = None if key in self.__cache: data = self.__cache[key] return data cache = own_cache() cache.set('hello', {'g': 'g'}) print(cache.get('hello'))
def main(): my_workers = workers_data() print(my_workers.add("A", 4)) print(my_workers.add("A", 5)) print(my_workers.add("B", 3)) print(my_workers.add("C", 3)) print(my_workers.get("A")) print(my_workers) class workers_data(): jobList = {} def __init__(self): pass def add(self, charJob, workerNumber): if workerNumber in self.jobList.values(): return False else: self.jobList[charJob] = workerNumber return True def get(self, item): return self.jobList[item] def __str__(self): return "{}".format(self.jobList) main()
def main(): my_workers = workers_data() print(my_workers.add('A', 4)) print(my_workers.add('A', 5)) print(my_workers.add('B', 3)) print(my_workers.add('C', 3)) print(my_workers.get('A')) print(my_workers) class Workers_Data: job_list = {} def __init__(self): pass def add(self, charJob, workerNumber): if workerNumber in self.jobList.values(): return False else: self.jobList[charJob] = workerNumber return True def get(self, item): return self.jobList[item] def __str__(self): return '{}'.format(self.jobList) main()
n = int(input()) numbers = [] for i in range(n): numbers.append(int(input())) max_number = max(numbers) numbers.remove(max_number) if sum(numbers) == max_number: print(f"Yes\nSum = {max_number}") else: print(f"No\nDiff = {abs(max_number - sum(numbers))}")
n = int(input()) numbers = [] for i in range(n): numbers.append(int(input())) max_number = max(numbers) numbers.remove(max_number) if sum(numbers) == max_number: print(f'Yes\nSum = {max_number}') else: print(f'No\nDiff = {abs(max_number - sum(numbers))}')
with open('a.csv', 'r', encoding = 'UTF8') as a: l = [] for linha in a: l.append(linha.replace('\n', '').split(',')) print(l)
with open('a.csv', 'r', encoding='UTF8') as a: l = [] for linha in a: l.append(linha.replace('\n', '').split(',')) print(l)
#!/usr/bin/env python # Bisection search algorithm for finding square root using high and low # values x = float(input('Enter a number: ')) epsilon = 0.01 num_guesses, low = 0,0 high = max(1, x) ans = (high + low)/2 while abs(ans**2 - x) >= epsilon: print('low =', low, 'high =', high, 'ans =', ans) num_guesses += 1 if ans**2 < x: low = ans else: high = ans ans = (high + low)/2 print('number of guesses =', num_guesses) print(ans, 'is close to square root of', x)
x = float(input('Enter a number: ')) epsilon = 0.01 (num_guesses, low) = (0, 0) high = max(1, x) ans = (high + low) / 2 while abs(ans ** 2 - x) >= epsilon: print('low =', low, 'high =', high, 'ans =', ans) num_guesses += 1 if ans ** 2 < x: low = ans else: high = ans ans = (high + low) / 2 print('number of guesses =', num_guesses) print(ans, 'is close to square root of', x)
''' In a string check how many deletions are needed so that there are only alternating As and Bs ''' def alternatingChars(s): deletions = 0 for i in range(len(s) - 1): j = i + 1 if s[i] == s[j]: deletions += 1 return deletions print(alternatingChars('AAABBB'))
""" In a string check how many deletions are needed so that there are only alternating As and Bs """ def alternating_chars(s): deletions = 0 for i in range(len(s) - 1): j = i + 1 if s[i] == s[j]: deletions += 1 return deletions print(alternating_chars('AAABBB'))
# kubectl explain deployment --recursive dict_data = {} space_count = 3 def addString(key): dict_data[key] = " " def addObject(key): dict_data[key] = " " with open("temp.txt", "r") as f: lines = f.readlines() for i in lines: if i[space_count + 1] == " ": addObject(i.split()[0]) else: addString(i.split()[0]) print(dict_data)
dict_data = {} space_count = 3 def add_string(key): dict_data[key] = ' ' def add_object(key): dict_data[key] = ' ' with open('temp.txt', 'r') as f: lines = f.readlines() for i in lines: if i[space_count + 1] == ' ': add_object(i.split()[0]) else: add_string(i.split()[0]) print(dict_data)
q = int(input("")) s1 = int(input("")) s2 = int(input("")) s3 = int(input("")) s1 = s1 - ((s1 // 35) * 35) s2 = s2 - ((s2 // 100) * 100) s3 = s3 - ((s3 // 10) * 10) a = 0 while q > 0: s1 += 1 if s1 == 35: s1 = 0 q += 30 q -= 1 if q == 0: a += 1 break s2 += 1 if s2 == 100: s2 = 0 q += 60 q -= 1 if q == 0: a += 2 break s3 += 1 if s3 == 10: s3 = 0 q += 9 q -= 1 a += 3 print("Martha plays " + str(a) + " times before going broke.")
q = int(input('')) s1 = int(input('')) s2 = int(input('')) s3 = int(input('')) s1 = s1 - s1 // 35 * 35 s2 = s2 - s2 // 100 * 100 s3 = s3 - s3 // 10 * 10 a = 0 while q > 0: s1 += 1 if s1 == 35: s1 = 0 q += 30 q -= 1 if q == 0: a += 1 break s2 += 1 if s2 == 100: s2 = 0 q += 60 q -= 1 if q == 0: a += 2 break s3 += 1 if s3 == 10: s3 = 0 q += 9 q -= 1 a += 3 print('Martha plays ' + str(a) + ' times before going broke.')
class ResponseType: CH_STATUS = "CH_STATUS" CH_FAILED = "CH_FAILED" LIVETV_READY = "LIVETV_READY" MISSING_TELEPORT_NAME = "MISSING_TELEPORT_NAME" INVALID_KEY = "INVALID_KEY" class ChannelStatusReason: LOCAL = "LOCAL" REMOTE = "REMOTE" RECORDING = "RECORDING" class ChannelSetFailureReason: NO_LIVE = "NO_LIVE" MISSING_CHANNEL = "MISSING_CHANNEL" MALFORMED_CHANNEL = "MALFORMED_CHANNEL" INVALID_CHANNEL = "INVALID_CHANNEL" class IRCodeCommand: UP = "UP" DOWN = "DOWN" LEFT = "LEFT" RIGHT = "RIGHT" SELECT = "SELECT" TIVO = "TIVO" LIVETV = "LIVETV" GUIDE = "GUIDE" INFO = "INFO" EXIT = "EXIT" THUMBSUP = "THUMBSUP" THUMBSDOWN = "THUMBSDOWN" CHANNELUP = "CHANNELUP" CHANNELDOWN = "CHANNELDOWN" MUTE = "MUTE" VOLUMEUP = "VOLUMEUP" VOLUMEDOWN = "VOLUMEDOWN" TVINPUT = "TVINPUT" VIDEO_MODE_FIXED_480i = "VIDEO_MODE_FIXED_480i" VIDEO_MODE_FIXED_480p = "VIDEO_MODE_FIXED_480p" VIDEO_MODE_FIXED_720p = "VIDEO_MODE_FIXED_720p" VIDEO_MODE_FIXED_1080i = "VIDEO_MODE_FIXED_1080i" VIDEO_MODE_HYBRID = "VIDEO_MODE_HYBRID" VIDEO_MODE_HYBRID_720p = "VIDEO_MODE_HYBRID_720p" VIDEO_MODE_HYBRID_1080i = "VIDEO_MODE_HYBRID_1080i" VIDEO_MODE_NATIVE = "VIDEO_MODE_NATIVE" CC_ON = "CC_ON" CC_OFF = "CC_OFF" OPTIONS = "OPTIONS" ASPECT_CORRECTION_FULL = "ASPECT_CORRECTION_FULL" ASPECT_CORRECTION_PANEL = "ASPECT_CORRECTION_PANEL" ASPECT_CORRECTION_ZOOM = "ASPECT_CORRECTION_ZOOM" ASPECT_CORRECTION_WIDE_ZOOM = "ASPECT_CORRECTION_WIDE_ZOOM" PLAY = "PLAY" FORWARD = "FORWARD" REVERSE = "REVERSE" PAUSE = "PAUSE" SLOW = "SLOW" REPLAY = "REPLAY" ADVANCE = "ADVANCE" RECORD = "RECORD" NUM0 = "NUM0" NUM1 = "NUM1" NUM2 = "NUM2" NUM3 = "NUM3" NUM4 = "NUM4" NUM5 = "NUM5" NUM6 = "NUM6" NUM7 = "NUM7" NUM8 = "NUM8" NUM9 = "NUM9" ENTER = "ENTER" CLEAR = "CLEAR" ACTION_A = "ACTION_A" ACTION_B = "ACTION_B" ACTION_C = "ACTION_C" ACTION_D = "ACTION_D" BACK = "BACK" WINDOW = "WINDOW" class KeyboardCommand: A = "A" B = "B" C = "C" D = "D" E = "E" F = "F" G = "G" H = "H" I = "I" J = "J" K = "K" L = "L" M = "M" N = "N" O = "O" P = "P" Q = "Q" R = "R" S = "S" T = "T" U = "U" V = "V" W = "W" X = "X" Y = "Y" Z = "Z" MINUS = "MINUS" EQUALS = "EQUALS" LBRACKET = "LBRACKET" RBRACKET = "RBRACKET" BACKSLASH = "BACKSLASH" SEMICOLON = "SEMICOLON" QUOTE = "QUOTE" COMMA = "COMMA" PERIOD = "PERIOD" SLASH = "SLASH" BACKQUOTE = "BACKQUOTE" SPACE = "SPACE" KBDUP = "KBDUP" KBDDOWN = "KBDDOWN" KBDLEFT = "KBDLEFT" KBDRIGHT = "KBDRIGHT" PAGEUP = "PAGEUP" PAGEDOWN = "PAGEDOWN" HOME = "HOME" END = "END" CAPS = "CAPS" LSHIFT = "LSHIFT" RSHIFT = "RSHIFT" INSERT = "INSERT" BACKSPACE = "BACKSPACE" DELETE = "DELETE" KBDENTER = "KBDENTER" STOP = "STOP" VIDEO_ON_DEMAND = "VIDEO_ON_DEMAND" class TeleportType: TIVO = "TIVO" LIVETV = "LIVETV" GUIDE = "GUIDE" NOWPLAYING = "NOWPLAYING" class SpecialCommand: def WAIT(time): return f"WAIT {time}"
class Responsetype: ch_status = 'CH_STATUS' ch_failed = 'CH_FAILED' livetv_ready = 'LIVETV_READY' missing_teleport_name = 'MISSING_TELEPORT_NAME' invalid_key = 'INVALID_KEY' class Channelstatusreason: local = 'LOCAL' remote = 'REMOTE' recording = 'RECORDING' class Channelsetfailurereason: no_live = 'NO_LIVE' missing_channel = 'MISSING_CHANNEL' malformed_channel = 'MALFORMED_CHANNEL' invalid_channel = 'INVALID_CHANNEL' class Ircodecommand: up = 'UP' down = 'DOWN' left = 'LEFT' right = 'RIGHT' select = 'SELECT' tivo = 'TIVO' livetv = 'LIVETV' guide = 'GUIDE' info = 'INFO' exit = 'EXIT' thumbsup = 'THUMBSUP' thumbsdown = 'THUMBSDOWN' channelup = 'CHANNELUP' channeldown = 'CHANNELDOWN' mute = 'MUTE' volumeup = 'VOLUMEUP' volumedown = 'VOLUMEDOWN' tvinput = 'TVINPUT' video_mode_fixed_480i = 'VIDEO_MODE_FIXED_480i' video_mode_fixed_480p = 'VIDEO_MODE_FIXED_480p' video_mode_fixed_720p = 'VIDEO_MODE_FIXED_720p' video_mode_fixed_1080i = 'VIDEO_MODE_FIXED_1080i' video_mode_hybrid = 'VIDEO_MODE_HYBRID' video_mode_hybrid_720p = 'VIDEO_MODE_HYBRID_720p' video_mode_hybrid_1080i = 'VIDEO_MODE_HYBRID_1080i' video_mode_native = 'VIDEO_MODE_NATIVE' cc_on = 'CC_ON' cc_off = 'CC_OFF' options = 'OPTIONS' aspect_correction_full = 'ASPECT_CORRECTION_FULL' aspect_correction_panel = 'ASPECT_CORRECTION_PANEL' aspect_correction_zoom = 'ASPECT_CORRECTION_ZOOM' aspect_correction_wide_zoom = 'ASPECT_CORRECTION_WIDE_ZOOM' play = 'PLAY' forward = 'FORWARD' reverse = 'REVERSE' pause = 'PAUSE' slow = 'SLOW' replay = 'REPLAY' advance = 'ADVANCE' record = 'RECORD' num0 = 'NUM0' num1 = 'NUM1' num2 = 'NUM2' num3 = 'NUM3' num4 = 'NUM4' num5 = 'NUM5' num6 = 'NUM6' num7 = 'NUM7' num8 = 'NUM8' num9 = 'NUM9' enter = 'ENTER' clear = 'CLEAR' action_a = 'ACTION_A' action_b = 'ACTION_B' action_c = 'ACTION_C' action_d = 'ACTION_D' back = 'BACK' window = 'WINDOW' class Keyboardcommand: a = 'A' b = 'B' c = 'C' d = 'D' e = 'E' f = 'F' g = 'G' h = 'H' i = 'I' j = 'J' k = 'K' l = 'L' m = 'M' n = 'N' o = 'O' p = 'P' q = 'Q' r = 'R' s = 'S' t = 'T' u = 'U' v = 'V' w = 'W' x = 'X' y = 'Y' z = 'Z' minus = 'MINUS' equals = 'EQUALS' lbracket = 'LBRACKET' rbracket = 'RBRACKET' backslash = 'BACKSLASH' semicolon = 'SEMICOLON' quote = 'QUOTE' comma = 'COMMA' period = 'PERIOD' slash = 'SLASH' backquote = 'BACKQUOTE' space = 'SPACE' kbdup = 'KBDUP' kbddown = 'KBDDOWN' kbdleft = 'KBDLEFT' kbdright = 'KBDRIGHT' pageup = 'PAGEUP' pagedown = 'PAGEDOWN' home = 'HOME' end = 'END' caps = 'CAPS' lshift = 'LSHIFT' rshift = 'RSHIFT' insert = 'INSERT' backspace = 'BACKSPACE' delete = 'DELETE' kbdenter = 'KBDENTER' stop = 'STOP' video_on_demand = 'VIDEO_ON_DEMAND' class Teleporttype: tivo = 'TIVO' livetv = 'LIVETV' guide = 'GUIDE' nowplaying = 'NOWPLAYING' class Specialcommand: def wait(time): return f'WAIT {time}'
#!/usr/bin/env python class wire(): def __init__(self, s): l = s.split() self.name = l[-1] self.known = False self.value = 0 if any([op in l for op in ["AND", "OR", "LSHIFT", "RSHIFT"]]): self.op = l[1] self.source = [l[0], l[2]] elif "NOT" in l: self.op = "NOT" self.source = l[1] else: self.op = "ID" self.source = l[0] def __str__(self): return "Name: {}, op: {}, src: {}".format(self.name, self.op, self.source) def sval(self, src): if src.isdigit(): return int(src) else: return wiredict[src].getvalue() def getname(self): return self.name def getvalue(self): if not self.known: self.known = True if self.op == "ID": self.value = self.sval(self.source) elif self.op == "RSHIFT": self.value = self.sval(self.source[0]) >> self.sval(self.source[1]) elif self.op == "LSHIFT": self.value = self.sval(self.source[0]) << self.sval(self.source[1]) elif self.op == "NOT": self.value = ~self.sval(self.source) elif self.op == "OR": self.value = self.sval(self.source[0]) | self.sval(self.source[1]) elif self.op == "AND": self.value = self.sval(self.source[0]) & self.sval(self.source[1]) return self.value wiredict = {} with open("../input/input_07.txt", 'r') as f: for line in f: w = wire(line) wiredict[w.getname()] = w vala = wiredict['a'].getvalue() print(vala) for wire in wiredict.values(): wire.known = False wiredict['b'].source = str(vala) print(wiredict['a'].getvalue())
class Wire: def __init__(self, s): l = s.split() self.name = l[-1] self.known = False self.value = 0 if any([op in l for op in ['AND', 'OR', 'LSHIFT', 'RSHIFT']]): self.op = l[1] self.source = [l[0], l[2]] elif 'NOT' in l: self.op = 'NOT' self.source = l[1] else: self.op = 'ID' self.source = l[0] def __str__(self): return 'Name: {}, op: {}, src: {}'.format(self.name, self.op, self.source) def sval(self, src): if src.isdigit(): return int(src) else: return wiredict[src].getvalue() def getname(self): return self.name def getvalue(self): if not self.known: self.known = True if self.op == 'ID': self.value = self.sval(self.source) elif self.op == 'RSHIFT': self.value = self.sval(self.source[0]) >> self.sval(self.source[1]) elif self.op == 'LSHIFT': self.value = self.sval(self.source[0]) << self.sval(self.source[1]) elif self.op == 'NOT': self.value = ~self.sval(self.source) elif self.op == 'OR': self.value = self.sval(self.source[0]) | self.sval(self.source[1]) elif self.op == 'AND': self.value = self.sval(self.source[0]) & self.sval(self.source[1]) return self.value wiredict = {} with open('../input/input_07.txt', 'r') as f: for line in f: w = wire(line) wiredict[w.getname()] = w vala = wiredict['a'].getvalue() print(vala) for wire in wiredict.values(): wire.known = False wiredict['b'].source = str(vala) print(wiredict['a'].getvalue())
# # PySNMP MIB module APPACCELERATION-TC (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/APPACCELERATION-TC # Produced by pysmi-0.3.4 at Wed May 1 11:23:34 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) # appAccelerationModules, = mibBuilder.importSymbols("APPACCELERATION-SMI", "appAccelerationModules") ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Counter64, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, MibIdentifier, iso, Bits, Counter32, NotificationType, ObjectIdentity, Unsigned32, IpAddress, TimeTicks, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "MibIdentifier", "iso", "Bits", "Counter32", "NotificationType", "ObjectIdentity", "Unsigned32", "IpAddress", "TimeTicks", "Gauge32") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") appAccelerationTextualConventions = ModuleIdentity((1, 3, 6, 1, 4, 1, 3845, 30, 3, 1)) if mibBuilder.loadTexts: appAccelerationTextualConventions.setLastUpdated('200905110000Z') if mibBuilder.loadTexts: appAccelerationTextualConventions.setOrganization('www.citrix.com') if mibBuilder.loadTexts: appAccelerationTextualConventions.setContactInfo(' Citrix Systems, Inc. Postal: 851 West Cypress Creek Road Fort Lauderdale, Florida 33309 United States') if mibBuilder.loadTexts: appAccelerationTextualConventions.setDescription('This module defines the textual conventions used throughout Application Acceleration enterprise mibs.') class AppAccelerationYesNo(TextualConvention, Integer32): description = 'Textual convention for yes/no enum. ' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1)) namedValues = NamedValues(("no", 0), ("yes", 1)) class AppAccelerationDescription(DisplayString): description = 'Represents a string description used for any MIB object. Currently used for alarms sent out as trap notifications. ' status = 'current' subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 255) class AppAccelerationAlarmSeverity(TextualConvention, Integer32): reference = 'ITU-X.733' description = 'Represents the perceived alarm condition associated with a service affecting condition and/or event. cleared(1) - Indicates a previous alarm condition has been cleared. It is not required (unless specifically stated elsewhere on a case by case basis) that an alarm condition that has been cleared will produce a notification or other event containing an alarm severity with this value. indeterminate(2) - Indicates that the severity level cannot be determined. critical(3) - Indicates that a service or safety affecting condition has occurred and an immediate corrective action is required. major(4) - Indicates that a service affecting condition has occurred and an urgent corrective action is required. minor(5) - Indicates the existence of a non-service affecting condition and that corrective action should be taken in order to prevent a more serious (for example, service or safety affecting) condition. warning(6) - Indicates the detection of a potential or impending service or safety affecting condition, before any significant effects have been felt. info(7) - Indicates an alarm condition that does not meet any other severity definition. This can include important, but non-urgent, notices or informational events. ' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7)) namedValues = NamedValues(("cleared", 1), ("indeterminate", 2), ("critical", 3), ("major", 4), ("minor", 5), ("warning", 6), ("info", 7)) class AppAccelerationSeqNum(TextualConvention, Integer32): description = 'Represents the unique sequence number associated with each generated trap. ' status = 'current' subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 2147483647) mibBuilder.exportSymbols("APPACCELERATION-TC", PYSNMP_MODULE_ID=appAccelerationTextualConventions, AppAccelerationYesNo=AppAccelerationYesNo, AppAccelerationAlarmSeverity=AppAccelerationAlarmSeverity, appAccelerationTextualConventions=appAccelerationTextualConventions, AppAccelerationSeqNum=AppAccelerationSeqNum, AppAccelerationDescription=AppAccelerationDescription)
(app_acceleration_modules,) = mibBuilder.importSymbols('APPACCELERATION-SMI', 'appAccelerationModules') (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_intersection, constraints_union, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (counter64, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, mib_identifier, iso, bits, counter32, notification_type, object_identity, unsigned32, ip_address, time_ticks, gauge32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'MibIdentifier', 'iso', 'Bits', 'Counter32', 'NotificationType', 'ObjectIdentity', 'Unsigned32', 'IpAddress', 'TimeTicks', 'Gauge32') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') app_acceleration_textual_conventions = module_identity((1, 3, 6, 1, 4, 1, 3845, 30, 3, 1)) if mibBuilder.loadTexts: appAccelerationTextualConventions.setLastUpdated('200905110000Z') if mibBuilder.loadTexts: appAccelerationTextualConventions.setOrganization('www.citrix.com') if mibBuilder.loadTexts: appAccelerationTextualConventions.setContactInfo(' Citrix Systems, Inc. Postal: 851 West Cypress Creek Road Fort Lauderdale, Florida 33309 United States') if mibBuilder.loadTexts: appAccelerationTextualConventions.setDescription('This module defines the textual conventions used throughout Application Acceleration enterprise mibs.') class Appaccelerationyesno(TextualConvention, Integer32): description = 'Textual convention for yes/no enum. ' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1)) named_values = named_values(('no', 0), ('yes', 1)) class Appaccelerationdescription(DisplayString): description = 'Represents a string description used for any MIB object. Currently used for alarms sent out as trap notifications. ' status = 'current' subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 255) class Appaccelerationalarmseverity(TextualConvention, Integer32): reference = 'ITU-X.733' description = 'Represents the perceived alarm condition associated with a service affecting condition and/or event. cleared(1) - Indicates a previous alarm condition has been cleared. It is not required (unless specifically stated elsewhere on a case by case basis) that an alarm condition that has been cleared will produce a notification or other event containing an alarm severity with this value. indeterminate(2) - Indicates that the severity level cannot be determined. critical(3) - Indicates that a service or safety affecting condition has occurred and an immediate corrective action is required. major(4) - Indicates that a service affecting condition has occurred and an urgent corrective action is required. minor(5) - Indicates the existence of a non-service affecting condition and that corrective action should be taken in order to prevent a more serious (for example, service or safety affecting) condition. warning(6) - Indicates the detection of a potential or impending service or safety affecting condition, before any significant effects have been felt. info(7) - Indicates an alarm condition that does not meet any other severity definition. This can include important, but non-urgent, notices or informational events. ' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7)) named_values = named_values(('cleared', 1), ('indeterminate', 2), ('critical', 3), ('major', 4), ('minor', 5), ('warning', 6), ('info', 7)) class Appaccelerationseqnum(TextualConvention, Integer32): description = 'Represents the unique sequence number associated with each generated trap. ' status = 'current' subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 2147483647) mibBuilder.exportSymbols('APPACCELERATION-TC', PYSNMP_MODULE_ID=appAccelerationTextualConventions, AppAccelerationYesNo=AppAccelerationYesNo, AppAccelerationAlarmSeverity=AppAccelerationAlarmSeverity, appAccelerationTextualConventions=appAccelerationTextualConventions, AppAccelerationSeqNum=AppAccelerationSeqNum, AppAccelerationDescription=AppAccelerationDescription)
name = "Alamin" age = 25 print(f"Hello, {name}. You are {age}") print(f"{5*5}") def to_lowercase(input): return input.lower() name = "Alamin Mahamud" print(f"{to_lowercase(name)} is awesome!") print(f"{name.lower()} is F*ckin awesome!") class Rockstar: def __init__(self, first_name, last_name, age): self.first_name = first_name self.last_name = last_name self.age = age def __str__(self): return f"{self.first_name} {self.last_name} is {self.age}." def __repr__(self): return f"{self.first_name} {self.last_name} is {self.age}. Surprise!" new_rockstar = Rockstar("Alamin", "Mahamud", 25) print(f"{new_rockstar}") print(f"{new_rockstar!r}") # Multiline f-strings name = "Alamin" profession = "Engineer" affiliation = "BriteCore" message = ( f"Hi {name}. " f"You are a/an {profession}. " f"You work in {affiliation}." ) print(message)
name = 'Alamin' age = 25 print(f'Hello, {name}. You are {age}') print(f'{5 * 5}') def to_lowercase(input): return input.lower() name = 'Alamin Mahamud' print(f'{to_lowercase(name)} is awesome!') print(f'{name.lower()} is F*ckin awesome!') class Rockstar: def __init__(self, first_name, last_name, age): self.first_name = first_name self.last_name = last_name self.age = age def __str__(self): return f'{self.first_name} {self.last_name} is {self.age}.' def __repr__(self): return f'{self.first_name} {self.last_name} is {self.age}. Surprise!' new_rockstar = rockstar('Alamin', 'Mahamud', 25) print(f'{new_rockstar}') print(f'{new_rockstar!r}') name = 'Alamin' profession = 'Engineer' affiliation = 'BriteCore' message = f'Hi {name}. You are a/an {profession}. You work in {affiliation}.' print(message)
class TreeNode(): def __init__(self, val = None, children=None): self.val = val if(not children): self.children = [] else: self.children def main(): print("Tree") if __name__ == "__main__": main() # Trees are a class of data structure that a similar to graphs except they can not have loops in them. Like most graphs they have references to # children (neighbors for graphs) Nodes. # Trees are often used to implement more specific data structures such as Binary Trees, Binary Search Trees, Tries, etc. # Common Tree operations: Insert, Delete, and Search.
class Treenode: def __init__(self, val=None, children=None): self.val = val if not children: self.children = [] else: self.children def main(): print('Tree') if __name__ == '__main__': main()
# Getting Started with Python (Example Word count exercise) # Author: Mohit Khedkar. thislist=input("Enter the String: ") a=thislist.split() list=[] for i in a: if i not in list: list.append(i) for i in range(0,len(list)): print(list[i],a.count(list[i]))
thislist = input('Enter the String: ') a = thislist.split() list = [] for i in a: if i not in list: list.append(i) for i in range(0, len(list)): print(list[i], a.count(list[i]))
def f0() -> int: return 42 def f1(x : int) -> int: return x ^ 42 def f2(x : int, y : str) -> bool: q = int(y) return x == q r0 = f0() r1 = f1(42>>1) + 1 r2 = f2(56, "56")
def f0() -> int: return 42 def f1(x: int) -> int: return x ^ 42 def f2(x: int, y: str) -> bool: q = int(y) return x == q r0 = f0() r1 = f1(42 >> 1) + 1 r2 = f2(56, '56')
h,m=map(int,input().split(':')) while 1: m+=1 if m==60:h+=1;m=0 if h==24:h=0 a=str(h);a='0'*(2-len(a))+a b=str(m);a+=':'+'0'*(2-len(b))+b if(a==a[::-1]):print(a);exit()
(h, m) = map(int, input().split(':')) while 1: m += 1 if m == 60: h += 1 m = 0 if h == 24: h = 0 a = str(h) a = '0' * (2 - len(a)) + a b = str(m) a += ':' + '0' * (2 - len(b)) + b if a == a[::-1]: print(a) exit()
#!/bin/python3 # Iterative solution # Time complexity: O(n) # Space complexity: O(1) # Note - a recursive solution won't work here (stack overflow) # The logic: # - every value that you use, the adjacent one you can't # - therefore you have to skip everything that is not required # - when you skip a value you get the maximum sum so far (this restarts the process of considering values) # - negative values are not considered # - for positive values you have to check what's larger, max_sum(i - 2) + value or max_sum(i - 1) # - if max_sum(i - 2) + value is larger you consider the value (here you have to swap the sums because you added a value) # - if max_sum(i - 1) is larger you don't consider value def maxSubsetSum(arr): appendable = notAppendable = 0 for x in arr: if x <= 0: appendable = notAppendable = max(appendable, notAppendable) continue appendable += x if notAppendable >= appendable: appendable = notAppendable continue appendable, notAppendable = notAppendable, appendable return max(appendable, notAppendable) if __name__ == '__main__': input() arr = list(map(int, input().rstrip().split())) print(maxSubsetSum(arr))
def max_subset_sum(arr): appendable = not_appendable = 0 for x in arr: if x <= 0: appendable = not_appendable = max(appendable, notAppendable) continue appendable += x if notAppendable >= appendable: appendable = notAppendable continue (appendable, not_appendable) = (notAppendable, appendable) return max(appendable, notAppendable) if __name__ == '__main__': input() arr = list(map(int, input().rstrip().split())) print(max_subset_sum(arr))
#!/usr/bin/env python3 def pkcs7_padding(data: bytes, cipher_block_size: int): padding_length = cipher_block_size - (len(data) % cipher_block_size) if padding_length != cipher_block_size: return data + bytes([padding_length]*padding_length) else: return data if __name__ == '__main__': b = b'YELLOW SUBMARINE' result = pkcs7_padding(b, 20) print(result)
def pkcs7_padding(data: bytes, cipher_block_size: int): padding_length = cipher_block_size - len(data) % cipher_block_size if padding_length != cipher_block_size: return data + bytes([padding_length] * padding_length) else: return data if __name__ == '__main__': b = b'YELLOW SUBMARINE' result = pkcs7_padding(b, 20) print(result)
# # PySNMP MIB module SONUS-COMMON-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SONUS-COMMON-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:01:35 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, Unsigned32, Counter64, Gauge32, MibIdentifier, IpAddress, Bits, TimeTicks, ObjectIdentity, ModuleIdentity, Integer32, iso, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "Unsigned32", "Counter64", "Gauge32", "MibIdentifier", "IpAddress", "Bits", "TimeTicks", "ObjectIdentity", "ModuleIdentity", "Integer32", "iso", "Counter32") TextualConvention, DateAndTime, DisplayString, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DateAndTime", "DisplayString", "RowStatus") sonusSystemMIBs, = mibBuilder.importSymbols("SONUS-SMI", "sonusSystemMIBs") SonusNameReference, SonusTrapType, SonusAccessLevel, SonusEventClass, SonusName, SonusAdminState, SonusEventLevel, SonusEventString = mibBuilder.importSymbols("SONUS-TC", "SonusNameReference", "SonusTrapType", "SonusAccessLevel", "SonusEventClass", "SonusName", "SonusAdminState", "SonusEventLevel", "SonusEventString") sonusCommonMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5)) if mibBuilder.loadTexts: sonusCommonMIB.setLastUpdated('200102030000Z') if mibBuilder.loadTexts: sonusCommonMIB.setOrganization('Sonus Networks, Inc.') sonusCommonMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1)) sonusNetMgmt = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1)) sonusNetMgmtClient = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1)) sonusNetMgmtClientNextIndex = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusNetMgmtClientNextIndex.setStatus('current') sonusNetMgmtClientTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2), ) if mibBuilder.loadTexts: sonusNetMgmtClientTable.setStatus('current') sonusNetMgmtClientEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1), ).setIndexNames((0, "SONUS-COMMON-MIB", "sonusNetMgmtClientIndex")) if mibBuilder.loadTexts: sonusNetMgmtClientEntry.setStatus('current') sonusNetMgmtClientIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 8)).clone(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusNetMgmtClientIndex.setStatus('current') sonusNetMgmtClientName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 2), SonusName()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientName.setStatus('current') sonusNetMgmtClientState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 3), SonusAdminState().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientState.setStatus('current') sonusNetMgmtClientIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 4), IpAddress().clone(hexValue="01010101")).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientIpAddr.setStatus('current') sonusNetMgmtClientAccess = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 5), SonusAccessLevel().clone('readOnly')).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientAccess.setStatus('current') sonusNetMgmtClientSnmpCommunityGet = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 23)).clone('public')).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientSnmpCommunityGet.setStatus('current') sonusNetMgmtClientSnmpCommunitySet = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 23)).clone('private')).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientSnmpCommunitySet.setStatus('current') sonusNetMgmtClientSnmpCommunityTrap = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 23)).clone('public')).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientSnmpCommunityTrap.setStatus('current') sonusNetMgmtClientTrapState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 9), SonusAdminState().clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientTrapState.setStatus('current') sonusNetMgmtClientRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 10), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientRowStatus.setStatus('current') sonusNetMgmtClientTrapPort = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)).clone(162)).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientTrapPort.setStatus('current') sonusNetMgmtClientAllTraps = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 12), SonusTrapType().clone('trapv2')).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientAllTraps.setStatus('current') sonusNetMgmtClientInformReqTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 120)).clone(5)).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientInformReqTimeout.setStatus('current') sonusNetMgmtClientInformReqRetries = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10)).clone(3)).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientInformReqRetries.setStatus('current') sonusNetMgmtClientInformReqMaxQueue = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100)).clone(50)).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtClientInformReqMaxQueue.setStatus('current') sonusNetMgmtClientStatusTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 3), ) if mibBuilder.loadTexts: sonusNetMgmtClientStatusTable.setStatus('current') sonusNetMgmtClientStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 3, 1), ).setIndexNames((0, "SONUS-COMMON-MIB", "sonusNetMgmtClientStatusIndex")) if mibBuilder.loadTexts: sonusNetMgmtClientStatusEntry.setStatus('current') sonusNetMgmtClientStatusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 8))) if mibBuilder.loadTexts: sonusNetMgmtClientStatusIndex.setStatus('current') sonusNetMgmtClientStatusLastConfigChange = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 3, 1, 2), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusNetMgmtClientStatusLastConfigChange.setStatus('current') sonusNetMgmtTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2)) sonusNetMgmtTrapNextIndex = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 1)) sonusNetMgmtTrapTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2), ) if mibBuilder.loadTexts: sonusNetMgmtTrapTable.setStatus('current') sonusNetMgmtTrapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1), ).setIndexNames((0, "SONUS-COMMON-MIB", "sonusNetMgmtTrapIndex")) if mibBuilder.loadTexts: sonusNetMgmtTrapEntry.setStatus('current') sonusNetMgmtTrapIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)).clone(1)) if mibBuilder.loadTexts: sonusNetMgmtTrapIndex.setStatus('current') sonusNetMgmtTrapName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 2), SonusName()).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusNetMgmtTrapName.setStatus('current') sonusNetMgmtTrapMIBName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusNetMgmtTrapMIBName.setStatus('obsolete') sonusNetMgmtTrapOID = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 4), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusNetMgmtTrapOID.setStatus('current') sonusNetMgmtTrapClass = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 5), SonusEventClass().clone('sysmgmt')).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusNetMgmtTrapClass.setStatus('current') sonusNetMgmtTrapLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 6), SonusEventLevel().clone('info')).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusNetMgmtTrapLevel.setStatus('current') sonusNetMgmtTrapState = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 7), SonusAdminState().clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtTrapState.setStatus('current') sonusNetMgmtNotify = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3)) sonusNetMgmtNotifyNextIndex = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusNetMgmtNotifyNextIndex.setStatus('current') sonusNetMgmtNotifyTable = MibTable((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2), ) if mibBuilder.loadTexts: sonusNetMgmtNotifyTable.setStatus('current') sonusNetMgmtNotifyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1), ).setIndexNames((0, "SONUS-COMMON-MIB", "sonusNetMgmtNotifyIndex")) if mibBuilder.loadTexts: sonusNetMgmtNotifyEntry.setStatus('current') sonusNetMgmtNotifyIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)).clone(1)) if mibBuilder.loadTexts: sonusNetMgmtNotifyIndex.setStatus('current') sonusNetMgmtNotifyName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1, 2), SonusName()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtNotifyName.setStatus('current') sonusNetMgmtNotifyMgmtName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1, 3), SonusNameReference()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtNotifyMgmtName.setStatus('current') sonusNetMgmtNotifyTrapName = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1, 4), SonusNameReference()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtNotifyTrapName.setStatus('current') sonusNetMgmtNotifyTrapType = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1, 5), SonusTrapType().clone('trapv2')).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtNotifyTrapType.setStatus('current') sonusNetMgmtNotifyRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1, 6), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sonusNetMgmtNotifyRowStatus.setStatus('current') sonusCommonMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2)) sonusCommonMIBNotificationsPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 0)) sonusCommonMIBNotificationsObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1)) sonusShelfIndex = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6))).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusShelfIndex.setStatus('current') sonusSlotIndex = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusSlotIndex.setStatus('current') sonusPortIndex = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusPortIndex.setStatus('current') sonusDs3Index = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusDs3Index.setStatus('current') sonusDs1Index = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusDs1Index.setStatus('current') sonusEventDescription = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 6), SonusEventString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusEventDescription.setStatus('current') sonusEventClass = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 7), SonusEventClass()).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusEventClass.setStatus('current') sonusEventLevel = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 8), SonusEventLevel()).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusEventLevel.setStatus('current') sonusSequenceId = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 9), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusSequenceId.setStatus('current') sonusEventTime = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 10), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusEventTime.setStatus('current') sonusNetMgmtInformReqDiscards = MibScalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: sonusNetMgmtInformReqDiscards.setStatus('current') sonusNetMgmtClientInformReqQueueFlushedNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 0, 1)).setObjects(("SONUS-COMMON-MIB", "sonusNetMgmtClientName"), ("SONUS-COMMON-MIB", "sonusNetMgmtInformReqDiscards"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel")) if mibBuilder.loadTexts: sonusNetMgmtClientInformReqQueueFlushedNotification.setStatus('current') sonusNetMgmtClientInformReqQueueFullNotification = NotificationType((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 0, 2)).setObjects(("SONUS-COMMON-MIB", "sonusNetMgmtClientName"), ("SONUS-COMMON-MIB", "sonusNetMgmtInformReqDiscards"), ("SONUS-COMMON-MIB", "sonusEventDescription"), ("SONUS-COMMON-MIB", "sonusEventClass"), ("SONUS-COMMON-MIB", "sonusEventLevel")) if mibBuilder.loadTexts: sonusNetMgmtClientInformReqQueueFullNotification.setStatus('current') mibBuilder.exportSymbols("SONUS-COMMON-MIB", sonusCommonMIB=sonusCommonMIB, sonusCommonMIBNotifications=sonusCommonMIBNotifications, sonusNetMgmtClientNextIndex=sonusNetMgmtClientNextIndex, sonusNetMgmtClientName=sonusNetMgmtClientName, sonusNetMgmtClientIndex=sonusNetMgmtClientIndex, sonusNetMgmtNotifyTrapName=sonusNetMgmtNotifyTrapName, sonusNetMgmtClientStatusEntry=sonusNetMgmtClientStatusEntry, sonusNetMgmtClientInformReqQueueFullNotification=sonusNetMgmtClientInformReqQueueFullNotification, sonusNetMgmtTrapClass=sonusNetMgmtTrapClass, sonusCommonMIBNotificationsObjects=sonusCommonMIBNotificationsObjects, sonusNetMgmtTrapLevel=sonusNetMgmtTrapLevel, sonusNetMgmtClientState=sonusNetMgmtClientState, sonusNetMgmtTrap=sonusNetMgmtTrap, sonusNetMgmtClientStatusLastConfigChange=sonusNetMgmtClientStatusLastConfigChange, sonusNetMgmtNotifyTable=sonusNetMgmtNotifyTable, sonusNetMgmtNotifyTrapType=sonusNetMgmtNotifyTrapType, sonusDs1Index=sonusDs1Index, sonusNetMgmtInformReqDiscards=sonusNetMgmtInformReqDiscards, sonusNetMgmtClientIpAddr=sonusNetMgmtClientIpAddr, sonusNetMgmtClientAllTraps=sonusNetMgmtClientAllTraps, sonusEventTime=sonusEventTime, sonusNetMgmtTrapState=sonusNetMgmtTrapState, sonusPortIndex=sonusPortIndex, sonusNetMgmtClientTrapPort=sonusNetMgmtClientTrapPort, sonusNetMgmtClientSnmpCommunitySet=sonusNetMgmtClientSnmpCommunitySet, sonusCommonMIBObjects=sonusCommonMIBObjects, sonusNetMgmtClientRowStatus=sonusNetMgmtClientRowStatus, sonusNetMgmtClientStatusIndex=sonusNetMgmtClientStatusIndex, sonusNetMgmtClientStatusTable=sonusNetMgmtClientStatusTable, sonusNetMgmtTrapOID=sonusNetMgmtTrapOID, sonusNetMgmt=sonusNetMgmt, sonusDs3Index=sonusDs3Index, PYSNMP_MODULE_ID=sonusCommonMIB, sonusNetMgmtTrapMIBName=sonusNetMgmtTrapMIBName, sonusNetMgmtClientInformReqTimeout=sonusNetMgmtClientInformReqTimeout, sonusNetMgmtClientInformReqRetries=sonusNetMgmtClientInformReqRetries, sonusNetMgmtClient=sonusNetMgmtClient, sonusNetMgmtNotifyNextIndex=sonusNetMgmtNotifyNextIndex, sonusNetMgmtNotifyEntry=sonusNetMgmtNotifyEntry, sonusNetMgmtClientInformReqMaxQueue=sonusNetMgmtClientInformReqMaxQueue, sonusNetMgmtTrapIndex=sonusNetMgmtTrapIndex, sonusCommonMIBNotificationsPrefix=sonusCommonMIBNotificationsPrefix, sonusNetMgmtClientSnmpCommunityGet=sonusNetMgmtClientSnmpCommunityGet, sonusNetMgmtTrapNextIndex=sonusNetMgmtTrapNextIndex, sonusEventClass=sonusEventClass, sonusNetMgmtNotifyIndex=sonusNetMgmtNotifyIndex, sonusNetMgmtNotifyName=sonusNetMgmtNotifyName, sonusEventLevel=sonusEventLevel, sonusSequenceId=sonusSequenceId, sonusNetMgmtNotify=sonusNetMgmtNotify, sonusNetMgmtTrapTable=sonusNetMgmtTrapTable, sonusNetMgmtClientAccess=sonusNetMgmtClientAccess, sonusNetMgmtClientEntry=sonusNetMgmtClientEntry, sonusShelfIndex=sonusShelfIndex, sonusSlotIndex=sonusSlotIndex, sonusNetMgmtTrapEntry=sonusNetMgmtTrapEntry, sonusNetMgmtClientTable=sonusNetMgmtClientTable, sonusNetMgmtClientSnmpCommunityTrap=sonusNetMgmtClientSnmpCommunityTrap, sonusNetMgmtNotifyMgmtName=sonusNetMgmtNotifyMgmtName, sonusNetMgmtClientInformReqQueueFlushedNotification=sonusNetMgmtClientInformReqQueueFlushedNotification, sonusNetMgmtTrapName=sonusNetMgmtTrapName, sonusEventDescription=sonusEventDescription, sonusNetMgmtNotifyRowStatus=sonusNetMgmtNotifyRowStatus, sonusNetMgmtClientTrapState=sonusNetMgmtClientTrapState)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, value_size_constraint, constraints_intersection, constraints_union, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'SingleValueConstraint') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type, unsigned32, counter64, gauge32, mib_identifier, ip_address, bits, time_ticks, object_identity, module_identity, integer32, iso, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType', 'Unsigned32', 'Counter64', 'Gauge32', 'MibIdentifier', 'IpAddress', 'Bits', 'TimeTicks', 'ObjectIdentity', 'ModuleIdentity', 'Integer32', 'iso', 'Counter32') (textual_convention, date_and_time, display_string, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DateAndTime', 'DisplayString', 'RowStatus') (sonus_system_mi_bs,) = mibBuilder.importSymbols('SONUS-SMI', 'sonusSystemMIBs') (sonus_name_reference, sonus_trap_type, sonus_access_level, sonus_event_class, sonus_name, sonus_admin_state, sonus_event_level, sonus_event_string) = mibBuilder.importSymbols('SONUS-TC', 'SonusNameReference', 'SonusTrapType', 'SonusAccessLevel', 'SonusEventClass', 'SonusName', 'SonusAdminState', 'SonusEventLevel', 'SonusEventString') sonus_common_mib = module_identity((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5)) if mibBuilder.loadTexts: sonusCommonMIB.setLastUpdated('200102030000Z') if mibBuilder.loadTexts: sonusCommonMIB.setOrganization('Sonus Networks, Inc.') sonus_common_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1)) sonus_net_mgmt = mib_identifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1)) sonus_net_mgmt_client = mib_identifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1)) sonus_net_mgmt_client_next_index = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusNetMgmtClientNextIndex.setStatus('current') sonus_net_mgmt_client_table = mib_table((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2)) if mibBuilder.loadTexts: sonusNetMgmtClientTable.setStatus('current') sonus_net_mgmt_client_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1)).setIndexNames((0, 'SONUS-COMMON-MIB', 'sonusNetMgmtClientIndex')) if mibBuilder.loadTexts: sonusNetMgmtClientEntry.setStatus('current') sonus_net_mgmt_client_index = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 8)).clone(1)).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusNetMgmtClientIndex.setStatus('current') sonus_net_mgmt_client_name = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 2), sonus_name()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientName.setStatus('current') sonus_net_mgmt_client_state = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 3), sonus_admin_state().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientState.setStatus('current') sonus_net_mgmt_client_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 4), ip_address().clone(hexValue='01010101')).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientIpAddr.setStatus('current') sonus_net_mgmt_client_access = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 5), sonus_access_level().clone('readOnly')).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientAccess.setStatus('current') sonus_net_mgmt_client_snmp_community_get = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 23)).clone('public')).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientSnmpCommunityGet.setStatus('current') sonus_net_mgmt_client_snmp_community_set = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 23)).clone('private')).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientSnmpCommunitySet.setStatus('current') sonus_net_mgmt_client_snmp_community_trap = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 23)).clone('public')).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientSnmpCommunityTrap.setStatus('current') sonus_net_mgmt_client_trap_state = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 9), sonus_admin_state().clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientTrapState.setStatus('current') sonus_net_mgmt_client_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 10), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientRowStatus.setStatus('current') sonus_net_mgmt_client_trap_port = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)).clone(162)).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientTrapPort.setStatus('current') sonus_net_mgmt_client_all_traps = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 12), sonus_trap_type().clone('trapv2')).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientAllTraps.setStatus('current') sonus_net_mgmt_client_inform_req_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(1, 120)).clone(5)).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientInformReqTimeout.setStatus('current') sonus_net_mgmt_client_inform_req_retries = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 10)).clone(3)).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientInformReqRetries.setStatus('current') sonus_net_mgmt_client_inform_req_max_queue = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 2, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(1, 100)).clone(50)).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtClientInformReqMaxQueue.setStatus('current') sonus_net_mgmt_client_status_table = mib_table((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 3)) if mibBuilder.loadTexts: sonusNetMgmtClientStatusTable.setStatus('current') sonus_net_mgmt_client_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 3, 1)).setIndexNames((0, 'SONUS-COMMON-MIB', 'sonusNetMgmtClientStatusIndex')) if mibBuilder.loadTexts: sonusNetMgmtClientStatusEntry.setStatus('current') sonus_net_mgmt_client_status_index = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 8))) if mibBuilder.loadTexts: sonusNetMgmtClientStatusIndex.setStatus('current') sonus_net_mgmt_client_status_last_config_change = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 1, 3, 1, 2), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusNetMgmtClientStatusLastConfigChange.setStatus('current') sonus_net_mgmt_trap = mib_identifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2)) sonus_net_mgmt_trap_next_index = mib_identifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 1)) sonus_net_mgmt_trap_table = mib_table((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2)) if mibBuilder.loadTexts: sonusNetMgmtTrapTable.setStatus('current') sonus_net_mgmt_trap_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1)).setIndexNames((0, 'SONUS-COMMON-MIB', 'sonusNetMgmtTrapIndex')) if mibBuilder.loadTexts: sonusNetMgmtTrapEntry.setStatus('current') sonus_net_mgmt_trap_index = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535)).clone(1)) if mibBuilder.loadTexts: sonusNetMgmtTrapIndex.setStatus('current') sonus_net_mgmt_trap_name = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 2), sonus_name()).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusNetMgmtTrapName.setStatus('current') sonus_net_mgmt_trap_mib_name = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusNetMgmtTrapMIBName.setStatus('obsolete') sonus_net_mgmt_trap_oid = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 4), object_identifier()).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusNetMgmtTrapOID.setStatus('current') sonus_net_mgmt_trap_class = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 5), sonus_event_class().clone('sysmgmt')).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusNetMgmtTrapClass.setStatus('current') sonus_net_mgmt_trap_level = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 6), sonus_event_level().clone('info')).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusNetMgmtTrapLevel.setStatus('current') sonus_net_mgmt_trap_state = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 2, 2, 1, 7), sonus_admin_state().clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtTrapState.setStatus('current') sonus_net_mgmt_notify = mib_identifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3)) sonus_net_mgmt_notify_next_index = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusNetMgmtNotifyNextIndex.setStatus('current') sonus_net_mgmt_notify_table = mib_table((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2)) if mibBuilder.loadTexts: sonusNetMgmtNotifyTable.setStatus('current') sonus_net_mgmt_notify_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1)).setIndexNames((0, 'SONUS-COMMON-MIB', 'sonusNetMgmtNotifyIndex')) if mibBuilder.loadTexts: sonusNetMgmtNotifyEntry.setStatus('current') sonus_net_mgmt_notify_index = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535)).clone(1)) if mibBuilder.loadTexts: sonusNetMgmtNotifyIndex.setStatus('current') sonus_net_mgmt_notify_name = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1, 2), sonus_name()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtNotifyName.setStatus('current') sonus_net_mgmt_notify_mgmt_name = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1, 3), sonus_name_reference()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtNotifyMgmtName.setStatus('current') sonus_net_mgmt_notify_trap_name = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1, 4), sonus_name_reference()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtNotifyTrapName.setStatus('current') sonus_net_mgmt_notify_trap_type = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1, 5), sonus_trap_type().clone('trapv2')).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtNotifyTrapType.setStatus('current') sonus_net_mgmt_notify_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 1, 1, 3, 2, 1, 6), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sonusNetMgmtNotifyRowStatus.setStatus('current') sonus_common_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2)) sonus_common_mib_notifications_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 0)) sonus_common_mib_notifications_objects = mib_identifier((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1)) sonus_shelf_index = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 6))).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusShelfIndex.setStatus('current') sonus_slot_index = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusSlotIndex.setStatus('current') sonus_port_index = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusPortIndex.setStatus('current') sonus_ds3_index = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusDs3Index.setStatus('current') sonus_ds1_index = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusDs1Index.setStatus('current') sonus_event_description = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 6), sonus_event_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusEventDescription.setStatus('current') sonus_event_class = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 7), sonus_event_class()).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusEventClass.setStatus('current') sonus_event_level = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 8), sonus_event_level()).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusEventLevel.setStatus('current') sonus_sequence_id = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 9), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusSequenceId.setStatus('current') sonus_event_time = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 10), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusEventTime.setStatus('current') sonus_net_mgmt_inform_req_discards = mib_scalar((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly') if mibBuilder.loadTexts: sonusNetMgmtInformReqDiscards.setStatus('current') sonus_net_mgmt_client_inform_req_queue_flushed_notification = notification_type((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 0, 1)).setObjects(('SONUS-COMMON-MIB', 'sonusNetMgmtClientName'), ('SONUS-COMMON-MIB', 'sonusNetMgmtInformReqDiscards'), ('SONUS-COMMON-MIB', 'sonusEventDescription'), ('SONUS-COMMON-MIB', 'sonusEventClass'), ('SONUS-COMMON-MIB', 'sonusEventLevel')) if mibBuilder.loadTexts: sonusNetMgmtClientInformReqQueueFlushedNotification.setStatus('current') sonus_net_mgmt_client_inform_req_queue_full_notification = notification_type((1, 3, 6, 1, 4, 1, 2879, 2, 1, 5, 2, 0, 2)).setObjects(('SONUS-COMMON-MIB', 'sonusNetMgmtClientName'), ('SONUS-COMMON-MIB', 'sonusNetMgmtInformReqDiscards'), ('SONUS-COMMON-MIB', 'sonusEventDescription'), ('SONUS-COMMON-MIB', 'sonusEventClass'), ('SONUS-COMMON-MIB', 'sonusEventLevel')) if mibBuilder.loadTexts: sonusNetMgmtClientInformReqQueueFullNotification.setStatus('current') mibBuilder.exportSymbols('SONUS-COMMON-MIB', sonusCommonMIB=sonusCommonMIB, sonusCommonMIBNotifications=sonusCommonMIBNotifications, sonusNetMgmtClientNextIndex=sonusNetMgmtClientNextIndex, sonusNetMgmtClientName=sonusNetMgmtClientName, sonusNetMgmtClientIndex=sonusNetMgmtClientIndex, sonusNetMgmtNotifyTrapName=sonusNetMgmtNotifyTrapName, sonusNetMgmtClientStatusEntry=sonusNetMgmtClientStatusEntry, sonusNetMgmtClientInformReqQueueFullNotification=sonusNetMgmtClientInformReqQueueFullNotification, sonusNetMgmtTrapClass=sonusNetMgmtTrapClass, sonusCommonMIBNotificationsObjects=sonusCommonMIBNotificationsObjects, sonusNetMgmtTrapLevel=sonusNetMgmtTrapLevel, sonusNetMgmtClientState=sonusNetMgmtClientState, sonusNetMgmtTrap=sonusNetMgmtTrap, sonusNetMgmtClientStatusLastConfigChange=sonusNetMgmtClientStatusLastConfigChange, sonusNetMgmtNotifyTable=sonusNetMgmtNotifyTable, sonusNetMgmtNotifyTrapType=sonusNetMgmtNotifyTrapType, sonusDs1Index=sonusDs1Index, sonusNetMgmtInformReqDiscards=sonusNetMgmtInformReqDiscards, sonusNetMgmtClientIpAddr=sonusNetMgmtClientIpAddr, sonusNetMgmtClientAllTraps=sonusNetMgmtClientAllTraps, sonusEventTime=sonusEventTime, sonusNetMgmtTrapState=sonusNetMgmtTrapState, sonusPortIndex=sonusPortIndex, sonusNetMgmtClientTrapPort=sonusNetMgmtClientTrapPort, sonusNetMgmtClientSnmpCommunitySet=sonusNetMgmtClientSnmpCommunitySet, sonusCommonMIBObjects=sonusCommonMIBObjects, sonusNetMgmtClientRowStatus=sonusNetMgmtClientRowStatus, sonusNetMgmtClientStatusIndex=sonusNetMgmtClientStatusIndex, sonusNetMgmtClientStatusTable=sonusNetMgmtClientStatusTable, sonusNetMgmtTrapOID=sonusNetMgmtTrapOID, sonusNetMgmt=sonusNetMgmt, sonusDs3Index=sonusDs3Index, PYSNMP_MODULE_ID=sonusCommonMIB, sonusNetMgmtTrapMIBName=sonusNetMgmtTrapMIBName, sonusNetMgmtClientInformReqTimeout=sonusNetMgmtClientInformReqTimeout, sonusNetMgmtClientInformReqRetries=sonusNetMgmtClientInformReqRetries, sonusNetMgmtClient=sonusNetMgmtClient, sonusNetMgmtNotifyNextIndex=sonusNetMgmtNotifyNextIndex, sonusNetMgmtNotifyEntry=sonusNetMgmtNotifyEntry, sonusNetMgmtClientInformReqMaxQueue=sonusNetMgmtClientInformReqMaxQueue, sonusNetMgmtTrapIndex=sonusNetMgmtTrapIndex, sonusCommonMIBNotificationsPrefix=sonusCommonMIBNotificationsPrefix, sonusNetMgmtClientSnmpCommunityGet=sonusNetMgmtClientSnmpCommunityGet, sonusNetMgmtTrapNextIndex=sonusNetMgmtTrapNextIndex, sonusEventClass=sonusEventClass, sonusNetMgmtNotifyIndex=sonusNetMgmtNotifyIndex, sonusNetMgmtNotifyName=sonusNetMgmtNotifyName, sonusEventLevel=sonusEventLevel, sonusSequenceId=sonusSequenceId, sonusNetMgmtNotify=sonusNetMgmtNotify, sonusNetMgmtTrapTable=sonusNetMgmtTrapTable, sonusNetMgmtClientAccess=sonusNetMgmtClientAccess, sonusNetMgmtClientEntry=sonusNetMgmtClientEntry, sonusShelfIndex=sonusShelfIndex, sonusSlotIndex=sonusSlotIndex, sonusNetMgmtTrapEntry=sonusNetMgmtTrapEntry, sonusNetMgmtClientTable=sonusNetMgmtClientTable, sonusNetMgmtClientSnmpCommunityTrap=sonusNetMgmtClientSnmpCommunityTrap, sonusNetMgmtNotifyMgmtName=sonusNetMgmtNotifyMgmtName, sonusNetMgmtClientInformReqQueueFlushedNotification=sonusNetMgmtClientInformReqQueueFlushedNotification, sonusNetMgmtTrapName=sonusNetMgmtTrapName, sonusEventDescription=sonusEventDescription, sonusNetMgmtNotifyRowStatus=sonusNetMgmtNotifyRowStatus, sonusNetMgmtClientTrapState=sonusNetMgmtClientTrapState)
# 0070. Climbing Stairs # # Note: # 1. We remove case "n == 0" because it is included in the other two base cases. # 2. "Solution#1 Recusion" got the error of "Time Limit Exceeded". # The reason is in this recursion, the inductive case is the combination of two sub-components which share too many redundent sub-components. # One way to solve this "heavy redundent issue" is to use an extra memory to store the computed sub-components in "popping". # There after our recursion reaches the base cases, we come back with results by using mem instead of a calculation. (Not quite right, see later errors) # 3. "Solution#1 Recusion with memory" got the error "list index out of range" in "return self.helper(n, mem[n])". # 4. "Solution#1 Recusion with global memory" still got "Time Limit Exceeded". # The reason is we did not understand the solving for "heavy redundent issue". # The "real" reducing does not happen in the first branch recursion, which is still a standard recursion style "push-pop". # The reducing happens in the second or later recursion when the result was already computed and stored in mem # by the earlier branch recursion, and so does not need to recursion this time. # See "Solution#1 Recusion with global memory - Correct". #================================= # Solution#1 Recusion - Incorrect #================================= class Solution: def climbStairs(self, n: int) -> int: # base cases if n == 0: return 1 if n == 1: return 1 if n == 2: return 2 # inductive cases return 1 * self.climbStairs(n - 1) + 1 * self.climbStairs(n - 2) #==================================== # Solution#1 Recusion with memory - Incorrect #==================================== class Solution: def climbStairs(self, n: int) -> int: mem = [] return self.helper(n, mem[n]) def helper(self, n, mem): # base cases if n == 1: mem[1] = 1 return mem[1] if n == 2: mem[2] = 1 return mem[2] # inductive cases mem[n] = self.helper(n-1, mem) + self.helper(n-2, mem) return mem[n] #====================================================== # Solution#1 Recusion with global memory - Correct #====================================================== class Solution: def __init__(self): self.mem = {} def climbStairs(self, n: int) -> int: if n in self.mem: return self.mem[n] if n == 1: return 1 if n == 2: return 2 else: result = self.climbStairs(n-1) + self.climbStairs(n-2) self.mem[n] = result return result
class Solution: def climb_stairs(self, n: int) -> int: if n == 0: return 1 if n == 1: return 1 if n == 2: return 2 return 1 * self.climbStairs(n - 1) + 1 * self.climbStairs(n - 2) class Solution: def climb_stairs(self, n: int) -> int: mem = [] return self.helper(n, mem[n]) def helper(self, n, mem): if n == 1: mem[1] = 1 return mem[1] if n == 2: mem[2] = 1 return mem[2] mem[n] = self.helper(n - 1, mem) + self.helper(n - 2, mem) return mem[n] class Solution: def __init__(self): self.mem = {} def climb_stairs(self, n: int) -> int: if n in self.mem: return self.mem[n] if n == 1: return 1 if n == 2: return 2 else: result = self.climbStairs(n - 1) + self.climbStairs(n - 2) self.mem[n] = result return result
#!/usr/bin/env python3 def primes(y): x = y // 2 while x > 1: if y % x == 0: print(y, 'has factor', x) break x -= 1 else: print(y, 'is prime.') primes(13) primes(13.0) primes(15) primes(15.0)
def primes(y): x = y // 2 while x > 1: if y % x == 0: print(y, 'has factor', x) break x -= 1 else: print(y, 'is prime.') primes(13) primes(13.0) primes(15) primes(15.0)
num_key = int(input()) max_resistance = list(map(int, input().split())) num_pressed = int(input()) key_pressed = list(map(int, input().split())) hash = {} for i in range(num_key): hash[i+1] = max_resistance[i] output = ["NO"] * num_key for key in key_pressed: hash[key] -= 1 if hash[key] < 0: output[key-1] = "YES" print(" ".join(output))
num_key = int(input()) max_resistance = list(map(int, input().split())) num_pressed = int(input()) key_pressed = list(map(int, input().split())) hash = {} for i in range(num_key): hash[i + 1] = max_resistance[i] output = ['NO'] * num_key for key in key_pressed: hash[key] -= 1 if hash[key] < 0: output[key - 1] = 'YES' print(' '.join(output))
# -*- coding: utf-8 -*- def dict_equal(src_data,dst_data): assert type(src_data) == type(dst_data),"type: '{}' != '{}'".format(type(src_data), type(dst_data)) if isinstance(src_data,dict): for key in src_data: assert dst_data.has_key(key) dict_equal(src_data[key],dst_data[key]) elif isinstance(src_data,list): for src_list, dst_list in zip(sorted(src_data), sorted(dst_data)): dict_equal(src_list, dst_list) else: assert src_data == dst_data,"value '{}' != '{}'".format(src_data, dst_data) def list_equal(src_data, dst_data): assert len(src_data) == len(dst_data) if len(src_data) == len(dst_data): for i in range(len(src_data)): dict_equal(src_data[i], dst_data[i]) def equal(check_value, expect_value): assert check_value == expect_value def less_than(check_value, expect_value): assert check_value < expect_value def less_than_or_equals(check_value, expect_value): assert check_value <= expect_value def greater_than(check_value, expect_value): assert check_value > expect_value def greater_than_or_equals(check_value, expect_value): assert check_value >= expect_value def not_equals(check_value, expect_value): assert check_value != expect_value def string_equals(check_value, expect_value): assert builtin_str(check_value) == builtin_str(expect_value) def length_equals(check_value, expect_value): assert isinstance(expect_value, integer_types) assert len(check_value) == expect_value def length_greater_than(check_value, expect_value): assert isinstance(expect_value, integer_types) assert len(check_value) > expect_value def length_greater_than_or_equals(check_value, expect_value): assert isinstance(expect_value, integer_types) assert len(check_value) >= expect_value def length_less_than(check_value, expect_value): assert isinstance(expect_value, integer_types) assert len(check_value) < expect_value def length_less_than_or_equals(check_value, expect_value): assert isinstance(expect_value, integer_types) assert len(check_value) <= expect_value def contains(check_value, expect_value): assert isinstance(check_value, (list, tuple, dict, basestring)) assert expect_value in check_value def contained_by(check_value, expect_value): assert isinstance(expect_value, (list, tuple, dict, basestring)) assert check_value in expect_value def type_match(check_value, expect_value): def get_type(name): if isinstance(name, type): return name elif isinstance(name, basestring): try: return __builtins__[name] except KeyError: raise ValueError(name) else: raise ValueError(name) assert isinstance(check_value, get_type(expect_value)) def regex_match(check_value, expect_value): assert isinstance(expect_value, basestring) assert isinstance(check_value, basestring) assert re.match(expect_value, check_value) def startswith(check_value, expect_value): assert builtin_str(check_value).startswith(builtin_str(expect_value)) def endswith(check_value, expect_value): assert builtin_str(check_value).endswith(builtin_str(expect_value))
def dict_equal(src_data, dst_data): assert type(src_data) == type(dst_data), "type: '{}' != '{}'".format(type(src_data), type(dst_data)) if isinstance(src_data, dict): for key in src_data: assert dst_data.has_key(key) dict_equal(src_data[key], dst_data[key]) elif isinstance(src_data, list): for (src_list, dst_list) in zip(sorted(src_data), sorted(dst_data)): dict_equal(src_list, dst_list) else: assert src_data == dst_data, "value '{}' != '{}'".format(src_data, dst_data) def list_equal(src_data, dst_data): assert len(src_data) == len(dst_data) if len(src_data) == len(dst_data): for i in range(len(src_data)): dict_equal(src_data[i], dst_data[i]) def equal(check_value, expect_value): assert check_value == expect_value def less_than(check_value, expect_value): assert check_value < expect_value def less_than_or_equals(check_value, expect_value): assert check_value <= expect_value def greater_than(check_value, expect_value): assert check_value > expect_value def greater_than_or_equals(check_value, expect_value): assert check_value >= expect_value def not_equals(check_value, expect_value): assert check_value != expect_value def string_equals(check_value, expect_value): assert builtin_str(check_value) == builtin_str(expect_value) def length_equals(check_value, expect_value): assert isinstance(expect_value, integer_types) assert len(check_value) == expect_value def length_greater_than(check_value, expect_value): assert isinstance(expect_value, integer_types) assert len(check_value) > expect_value def length_greater_than_or_equals(check_value, expect_value): assert isinstance(expect_value, integer_types) assert len(check_value) >= expect_value def length_less_than(check_value, expect_value): assert isinstance(expect_value, integer_types) assert len(check_value) < expect_value def length_less_than_or_equals(check_value, expect_value): assert isinstance(expect_value, integer_types) assert len(check_value) <= expect_value def contains(check_value, expect_value): assert isinstance(check_value, (list, tuple, dict, basestring)) assert expect_value in check_value def contained_by(check_value, expect_value): assert isinstance(expect_value, (list, tuple, dict, basestring)) assert check_value in expect_value def type_match(check_value, expect_value): def get_type(name): if isinstance(name, type): return name elif isinstance(name, basestring): try: return __builtins__[name] except KeyError: raise value_error(name) else: raise value_error(name) assert isinstance(check_value, get_type(expect_value)) def regex_match(check_value, expect_value): assert isinstance(expect_value, basestring) assert isinstance(check_value, basestring) assert re.match(expect_value, check_value) def startswith(check_value, expect_value): assert builtin_str(check_value).startswith(builtin_str(expect_value)) def endswith(check_value, expect_value): assert builtin_str(check_value).endswith(builtin_str(expect_value))
regs = [ #(0x3000000, "", "User Memory and User Stack (sp_usr=3007F00h)"), (0x3007f00, "", "Default Interrupt Stack (6 words/time) (sp_irq=3007FA0h)"), (0x3007fa0, "", "Default Supervisor Stack (4 words/time) (sp_svc=3007FE0h)"), (0x3007fe0, "", "Debug Exception Stack (4 words/time) (sp_xxx=3007FF0h)"), (0x3007ff0, "", "Pointer to Sound Buffer (for SWI Sound functions)"), #(0x3007ff4, "", "Reserved (unused)"), #(0x3007ff7, "", "Reserved (intro/nintendo logo related)"), (0x3007ff8, "", "IRQ IF Check Flags (for SWI IntrWait/VBlankIntrWait functions)"), (0x3007ffa, "", "Soft Reset Re-entry Flag (for SWI SoftReset function)"), (0x3007ffb, "", "Reserved (intro/multiboot slave related)"), (0x3007ffc, "", "Pointer to user IRQ handler (to 32bit ARM code)"), ] for (ea, name, comment) in regs: if name: idc.set_name(ea, name, SN_CHECK) if comment: idc.set_cmt(ea, comment, 1)
regs = [(50364160, '', 'Default Interrupt Stack (6 words/time) (sp_irq=3007FA0h)'), (50364320, '', 'Default Supervisor Stack (4 words/time) (sp_svc=3007FE0h)'), (50364384, '', 'Debug Exception Stack (4 words/time) (sp_xxx=3007FF0h)'), (50364400, '', 'Pointer to Sound Buffer (for SWI Sound functions)'), (50364408, '', 'IRQ IF Check Flags (for SWI IntrWait/VBlankIntrWait functions)'), (50364410, '', 'Soft Reset Re-entry Flag (for SWI SoftReset function)'), (50364411, '', 'Reserved (intro/multiboot slave related)'), (50364412, '', 'Pointer to user IRQ handler (to 32bit ARM code)')] for (ea, name, comment) in regs: if name: idc.set_name(ea, name, SN_CHECK) if comment: idc.set_cmt(ea, comment, 1)
search_query = 'site:linkedin.com/in/ AND "python developer" AND "New York"' # file were scraped profile information will be stored file_name = 'results_file.csv' # login credentials linkedin_username = 'username' linkedin_password = 'PASSWORD'
search_query = 'site:linkedin.com/in/ AND "python developer" AND "New York"' file_name = 'results_file.csv' linkedin_username = 'username' linkedin_password = 'PASSWORD'
# graph theory terminology & lemmas ''' degree - number of edges touching the vertex handshaking lemma - finite undirected graphs - an even number of vertices will have odd degree - consequence of the `degree sum formula` sum(deg(v el of vertices)) = 2|# edges| complete graph - vertex is connected to all other vertices in a graph cycles let (v,e) be graph where between 2 vertices v1, v2 there only exists one path, then... * graph has no cycles * adding a new edge (but not vertex) creates a cycle cyclic, acyclic graphs bipartite graphs two sets of vertices s1 and s2 if any edge is drawn, it should connect any vertex in set s1 to vertex in set s2 complete bipartite graph a bipartite graph is said to be complete if `every` vertex in s1 is connected to `every` vertex in s2 complement of a graph if edges exist in graph 1 are absent in graph 2, if both combined together to form a complete graph, then graph 1 & 2 are called complements of each other much more... connectivity, coverings, matchings, coloring, isomorphism, traversability (hamilton's path) '''
""" degree - number of edges touching the vertex handshaking lemma - finite undirected graphs - an even number of vertices will have odd degree - consequence of the `degree sum formula` sum(deg(v el of vertices)) = 2|# edges| complete graph - vertex is connected to all other vertices in a graph cycles let (v,e) be graph where between 2 vertices v1, v2 there only exists one path, then... * graph has no cycles * adding a new edge (but not vertex) creates a cycle cyclic, acyclic graphs bipartite graphs two sets of vertices s1 and s2 if any edge is drawn, it should connect any vertex in set s1 to vertex in set s2 complete bipartite graph a bipartite graph is said to be complete if `every` vertex in s1 is connected to `every` vertex in s2 complement of a graph if edges exist in graph 1 are absent in graph 2, if both combined together to form a complete graph, then graph 1 & 2 are called complements of each other much more... connectivity, coverings, matchings, coloring, isomorphism, traversability (hamilton's path) """
MOCK_JOB_STATUS = {'value': 'test'} MOCK_JOBS_LIST = ['job1', 'job2'] class SQLMock: expected_agreement_id = None expected_job_id = None expected_owner = None stopped_jobs = [] removed_jobs = [] @staticmethod def assert_all_jobs_stopped_and_reset(): for job in MOCK_JOBS_LIST: assert job in SQLMock.stopped_jobs SQLMock.stopped_jobs = [] @staticmethod def assert_all_jobs_removed_and_reset(): for job in MOCK_JOBS_LIST: assert job in SQLMock.removed_jobs SQLMock.removed_jobs = [] @staticmethod def assert_expected_params(agreement_id, job_id, owner): assert agreement_id == SQLMock.expected_agreement_id assert job_id == SQLMock.expected_job_id assert owner == SQLMock.expected_owner @staticmethod def mock_create_sql_job(agreement_id, job_id, owner): SQLMock.assert_expected_params(agreement_id, job_id, owner) @staticmethod def mock_get_sql_jobs(agreement_id, job_id, owner): SQLMock.assert_expected_params(agreement_id, job_id, owner) return MOCK_JOBS_LIST @staticmethod def mock_stop_sql_job(job): SQLMock.stopped_jobs.append(job) @staticmethod def mock_remove_sql_job(job): SQLMock.removed_jobs.append(job) @staticmethod def mock_get_sql_status(agreement_id, job_id, owner): SQLMock.assert_expected_params(agreement_id, job_id, owner) return MOCK_JOB_STATUS
mock_job_status = {'value': 'test'} mock_jobs_list = ['job1', 'job2'] class Sqlmock: expected_agreement_id = None expected_job_id = None expected_owner = None stopped_jobs = [] removed_jobs = [] @staticmethod def assert_all_jobs_stopped_and_reset(): for job in MOCK_JOBS_LIST: assert job in SQLMock.stopped_jobs SQLMock.stopped_jobs = [] @staticmethod def assert_all_jobs_removed_and_reset(): for job in MOCK_JOBS_LIST: assert job in SQLMock.removed_jobs SQLMock.removed_jobs = [] @staticmethod def assert_expected_params(agreement_id, job_id, owner): assert agreement_id == SQLMock.expected_agreement_id assert job_id == SQLMock.expected_job_id assert owner == SQLMock.expected_owner @staticmethod def mock_create_sql_job(agreement_id, job_id, owner): SQLMock.assert_expected_params(agreement_id, job_id, owner) @staticmethod def mock_get_sql_jobs(agreement_id, job_id, owner): SQLMock.assert_expected_params(agreement_id, job_id, owner) return MOCK_JOBS_LIST @staticmethod def mock_stop_sql_job(job): SQLMock.stopped_jobs.append(job) @staticmethod def mock_remove_sql_job(job): SQLMock.removed_jobs.append(job) @staticmethod def mock_get_sql_status(agreement_id, job_id, owner): SQLMock.assert_expected_params(agreement_id, job_id, owner) return MOCK_JOB_STATUS
class Agenda: def __init__(self, c): self.c = c self.events = {} self.current_time = 0 self.queue = [] def schedule(self, time, event, arguments): if time in self.events: self.events[time].append([event, arguments]) else: self.events[time] = [[event, arguments]] def next_event(self): self.current_time = min(self.events) for event, args in self.events.pop(self.current_time): args = [self] + args event(*args) def has_events(self): return len(self.events) > 0 def has_servers(self): return self.c > 0 def get_server(self): self.c -= 1 def free_server(self): self.c += 1 def add_customer(self, customer): self.queue.append(customer)
class Agenda: def __init__(self, c): self.c = c self.events = {} self.current_time = 0 self.queue = [] def schedule(self, time, event, arguments): if time in self.events: self.events[time].append([event, arguments]) else: self.events[time] = [[event, arguments]] def next_event(self): self.current_time = min(self.events) for (event, args) in self.events.pop(self.current_time): args = [self] + args event(*args) def has_events(self): return len(self.events) > 0 def has_servers(self): return self.c > 0 def get_server(self): self.c -= 1 def free_server(self): self.c += 1 def add_customer(self, customer): self.queue.append(customer)
#!/usr/bin/env python # coding: utf-8 # This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/interactive-coding-challenges). # # Solution Notebook # ## Problem: Find the longest increasing subsequence. # # * [Constraints](#Constraints) # * [Test Cases](#Test-Cases) # * [Algorithm](#Algorithm) # * [Code](#Code) # * [Unit Test](#Unit-Test) # ## Constraints # # * Are duplicates possible? # * Yes # * Can we assume the inputs are integers? # * Yes # * Can we assume the inputs are valid? # * No # * Do we expect the result to be an array of the longest increasing subsequence? # * Yes # * Can we assume this fits memory? # * Yes # ## Test Cases # # * None -> Exception # * [] -> [] # * [3, 4, -1, 0, 6, 2, 3] -> [-1, 0, 2, 3] # ## Algorithm # # We'll use bottom up dynamic programming to build a table. # # <pre> # Init a temp array of size len(input) to 1. # We'll use l and r to iterate through the input. # Array prev will hold the index of the prior smaller value, used to reconstruct the final sequence. # # if input[l] < input[r]: # if temp[r] < temp[l] + 1: # temp[r] = temp[l] + 1 # prev[r] = l # # l r # index: 0 1 2 3 4 5 6 # --------------------------- # input: 3 4 -1 0 6 2 3 # temp: 1 2 1 1 1 1 1 # prev: x x x x x x x # # End result: # # index: 0 1 2 3 4 5 6 # --------------------------- # input: 3 4 -1 0 6 2 3 # temp: 1 2 1 2 3 3 4 # prev: x 0 x 2 1 3 5 # </pre> # # Complexity: # * Time: O(n^2) # * Space: O(n) # ## Code # In[1]: class Subsequence(object): def longest_inc_subseq(self, seq): if seq is None: raise TypeError('seq cannot be None') if not seq: return [] temp = [1] * len(seq) prev = [None] * len(seq) for r in range(1, len(seq)): for l in range(r): if seq[l] < seq[r]: if temp[r] < temp[l] + 1: temp[r] = temp[l] + 1 prev[r] = l max_val = 0 max_index = -1 results = [] for index, value in enumerate(temp): if value > max_val: max_val = value max_index = index curr_index = max_index while curr_index is not None: results.append(seq[curr_index]) curr_index = prev[curr_index] return results[::-1] # ## Unit Test # In[2]: get_ipython().run_cell_magic('writefile', 'test_longest_increasing_subseq.py', "import unittest\n\n\nclass TestLongestIncreasingSubseq(unittest.TestCase):\n\n def test_longest_increasing_subseq(self):\n subseq = Subsequence()\n self.assertRaises(TypeError, subseq.longest_inc_subseq, None)\n self.assertEqual(subseq.longest_inc_subseq([]), [])\n seq = [3, 4, -1, 0, 6, 2, 3]\n expected = [-1, 0, 2, 3]\n self.assertEqual(subseq.longest_inc_subseq(seq), expected)\n print('Success: test_longest_increasing_subseq')\n\n\ndef main():\n test = TestLongestIncreasingSubseq()\n test.test_longest_increasing_subseq()\n\n\nif __name__ == '__main__':\n main()") # In[3]: get_ipython().run_line_magic('run', '-i test_longest_increasing_subseq.py')
class Subsequence(object): def longest_inc_subseq(self, seq): if seq is None: raise type_error('seq cannot be None') if not seq: return [] temp = [1] * len(seq) prev = [None] * len(seq) for r in range(1, len(seq)): for l in range(r): if seq[l] < seq[r]: if temp[r] < temp[l] + 1: temp[r] = temp[l] + 1 prev[r] = l max_val = 0 max_index = -1 results = [] for (index, value) in enumerate(temp): if value > max_val: max_val = value max_index = index curr_index = max_index while curr_index is not None: results.append(seq[curr_index]) curr_index = prev[curr_index] return results[::-1] get_ipython().run_cell_magic('writefile', 'test_longest_increasing_subseq.py', "import unittest\n\n\nclass TestLongestIncreasingSubseq(unittest.TestCase):\n\n def test_longest_increasing_subseq(self):\n subseq = Subsequence()\n self.assertRaises(TypeError, subseq.longest_inc_subseq, None)\n self.assertEqual(subseq.longest_inc_subseq([]), [])\n seq = [3, 4, -1, 0, 6, 2, 3]\n expected = [-1, 0, 2, 3]\n self.assertEqual(subseq.longest_inc_subseq(seq), expected)\n print('Success: test_longest_increasing_subseq')\n\n\ndef main():\n test = TestLongestIncreasingSubseq()\n test.test_longest_increasing_subseq()\n\n\nif __name__ == '__main__':\n main()") get_ipython().run_line_magic('run', '-i test_longest_increasing_subseq.py')
count = 0 with open("tester.txt", "r") as fp: lines = fp.readlines() count = len(lines) with open("new.txt", "w") as fp: for line in lines: if(count == 3): count -= 1 continue else: fp.write(line) count-=1
count = 0 with open('tester.txt', 'r') as fp: lines = fp.readlines() count = len(lines) with open('new.txt', 'w') as fp: for line in lines: if count == 3: count -= 1 continue else: fp.write(line) count -= 1
##### While loop ##### #while loop for printing 1 to 100 i = 0 while i<=100: print (i) i +=1 #Print all number while are multiples of 6 within 1 to 100 i = 0 while i<=100: if i%6==0: print(i) i +=1 #How is the maturity for house i = 1 p = 2500000 while i<=30: p = p+p*.04 i +=1 print (p) #How to calculate the term for the loan years = 1 p = 100000 while p<=160000: p = p+p*.05 years +=1 print ("The total number of years :",years) #How to calculate the EMI for the loan years = 1 p = 320000 while years<=6: p = p+p*.07 years +=1 print ("EMI :",p/72) #Add 1 to 100 by one by one(0+1+2+...100) i=0 sum=0 while i<=100: sum = sum + i i +=1 print("The sum is :",sum) #Calculate the projected income from an investment balance = 100000 target = 2*balance rate=15 year=0 while balance < target : interest = balance * 15/100 balance += interest year +=1 print("After",year,"years,","Your balance will be twice") #What is a sentinel (Something to terminate the program) # Here if the user enters negative value then it will come out from the loop and give average of the salary sum = 0 salary = 0 count =0 while salary>= 0: salary = float(input("Enter the salary : ")) if salary>0: count += 1 sum += salary if count!=0: avg = sum/count print ("The average salary is :",avg) else: print("Enter a valid number !") #Boolean value can be used to control the loop done = False ##### For loop ##### #For is an interator for i in "tony": print (i) string = "tony" #Here "string" is called a container for i in string: print(i) for i in range(10): print (i) for i in range(1,30,1): print (i) for i in range(30,1,-1): print(i) sum = 0 for i in range(1,101): sum = sum+i print (sum) print ("Tony is a nice guy",end="") print (",and he works hard !") for i in "tony": print(2*i," ",end="") #Difference between while and for loop and also the easiness of "for" loop name = 'Virginia' print (len(name)) i =0 while i<len(name): print (name[i]) i +=1 for i in name: print (i) sum =0 for i in range(2,101): if(i % 2 == 0): sum += i print ("The sum of all even numbers between 2 and 100 is :",sum) sum =0 for i in range(1,101): sum = sum + i*i print ("The sum of all squares between 1 and 100 is :",sum) a = int(input("Enter the first number:")) b = int(input("Enter the first number:")) sum =0 for i in range(a,b+1): if(i % 2 != 0): sum += i print ("The sum of all odd numbers between 2 and 100 is :",sum) sum =0 n = input("Enter the number:") for i in n : i = int(i) if i%2 != 0: sum +=i print (sum)
i = 0 while i <= 100: print(i) i += 1 i = 0 while i <= 100: if i % 6 == 0: print(i) i += 1 i = 1 p = 2500000 while i <= 30: p = p + p * 0.04 i += 1 print(p) years = 1 p = 100000 while p <= 160000: p = p + p * 0.05 years += 1 print('The total number of years :', years) years = 1 p = 320000 while years <= 6: p = p + p * 0.07 years += 1 print('EMI :', p / 72) i = 0 sum = 0 while i <= 100: sum = sum + i i += 1 print('The sum is :', sum) balance = 100000 target = 2 * balance rate = 15 year = 0 while balance < target: interest = balance * 15 / 100 balance += interest year += 1 print('After', year, 'years,', 'Your balance will be twice') sum = 0 salary = 0 count = 0 while salary >= 0: salary = float(input('Enter the salary : ')) if salary > 0: count += 1 sum += salary if count != 0: avg = sum / count print('The average salary is :', avg) else: print('Enter a valid number !') done = False for i in 'tony': print(i) string = 'tony' for i in string: print(i) for i in range(10): print(i) for i in range(1, 30, 1): print(i) for i in range(30, 1, -1): print(i) sum = 0 for i in range(1, 101): sum = sum + i print(sum) print('Tony is a nice guy', end='') print(',and he works hard !') for i in 'tony': print(2 * i, '\t', end='') name = 'Virginia' print(len(name)) i = 0 while i < len(name): print(name[i]) i += 1 for i in name: print(i) sum = 0 for i in range(2, 101): if i % 2 == 0: sum += i print('The sum of all even numbers between 2 and 100 is :', sum) sum = 0 for i in range(1, 101): sum = sum + i * i print('The sum of all squares between 1 and 100 is :', sum) a = int(input('Enter the first number:')) b = int(input('Enter the first number:')) sum = 0 for i in range(a, b + 1): if i % 2 != 0: sum += i print('The sum of all odd numbers between 2 and 100 is :', sum) sum = 0 n = input('Enter the number:') for i in n: i = int(i) if i % 2 != 0: sum += i print(sum)
#!/usr/bin/env python # coding: utf-8 version = "2.0.1"
version = '2.0.1'
def solve(matrix): rows = len(matrix) cols = len(matrix[0]) if rows == 0 or matrix[0][0] == 1: return 0 result = [[0 for _ in range(cols)] for __ in range(rows)] result[0][0] = 1 for i in range(rows): for j in range(cols): if matrix[i][j] == 1: continue if i - 1 >= 0: result[i][j] += result[i - 1][j] if j - 1 >= 0: result[i][j] += result[i][j - 1] return result[-1][-1] A = [ [0, 0, 0], [0, 1, 0], [0, 0, 0] ] print(solve(A))
def solve(matrix): rows = len(matrix) cols = len(matrix[0]) if rows == 0 or matrix[0][0] == 1: return 0 result = [[0 for _ in range(cols)] for __ in range(rows)] result[0][0] = 1 for i in range(rows): for j in range(cols): if matrix[i][j] == 1: continue if i - 1 >= 0: result[i][j] += result[i - 1][j] if j - 1 >= 0: result[i][j] += result[i][j - 1] return result[-1][-1] a = [[0, 0, 0], [0, 1, 0], [0, 0, 0]] print(solve(A))
class BitFlagGenerator: def __init__(self, initial=1): self._check_is_flag(initial) self.initial = initial self.current = initial self.flags = [] def _check_is_flag(self, value): if not sum(1 for bit in bin(value) if bit == '1') == 1: raise ValueError('flag must only have active bit') def _gen_next(self): self.flags.append(self.current) current = self.current self.current <<= 1 return current def list(self, count=1): return list(self(count)) def tuple(self, count=1): return tuple(self(count)) def generator(self, count=1): return self(count) def reset(self, initial=1): self.current = initial self.flags.clear() return self def copy(self): new_bit_flag_gen = self.__class__(self.initial) new_bit_flag_gen.flags = self.flags.copy() return new_bit_flag_gen def __getitem__(self, item): return self.flags[item] def __call__(self, count=1): yield self._gen_next() if count > 1: yield from (self._gen_next() for _ in range(count - 1)) def __next__(self): return next(self(1)) def create_flags(count): for i in range(count): yield 1 << i
class Bitflaggenerator: def __init__(self, initial=1): self._check_is_flag(initial) self.initial = initial self.current = initial self.flags = [] def _check_is_flag(self, value): if not sum((1 for bit in bin(value) if bit == '1')) == 1: raise value_error('flag must only have active bit') def _gen_next(self): self.flags.append(self.current) current = self.current self.current <<= 1 return current def list(self, count=1): return list(self(count)) def tuple(self, count=1): return tuple(self(count)) def generator(self, count=1): return self(count) def reset(self, initial=1): self.current = initial self.flags.clear() return self def copy(self): new_bit_flag_gen = self.__class__(self.initial) new_bit_flag_gen.flags = self.flags.copy() return new_bit_flag_gen def __getitem__(self, item): return self.flags[item] def __call__(self, count=1): yield self._gen_next() if count > 1: yield from (self._gen_next() for _ in range(count - 1)) def __next__(self): return next(self(1)) def create_flags(count): for i in range(count): yield (1 << i)
file = open("module_scripts.py","r") lines = file.readlines() file.close() file = open("module_scripts.py","w") level = 0 for line in lines: line = line.strip() acceptableindex = line.find("#") if (acceptableindex == -1): acceptableindex = len(line) level -= line.count("try_end", 0, acceptableindex) level -= line.count("end_try", 0, acceptableindex) level -= line.count("else_try", 0, acceptableindex) newlevel = level level_positive_change = 0 newlevel += line.count("else_try", 0, acceptableindex) newlevel += line.count("(", 0, acceptableindex) newlevel += line.count("[", 0, acceptableindex) newlevel += line.count("try_begin", 0, acceptableindex) newlevel += line.count("try_for", 0, acceptableindex) level_positive_change = newlevel - level newlevel -= line.count(")", 0, acceptableindex) newlevel -= line.count("]", 0, acceptableindex) if (level_positive_change == 0): level = newlevel for i in xrange(level): file.write(" ") level = newlevel file.write("%s\n"%line) file.close()
file = open('module_scripts.py', 'r') lines = file.readlines() file.close() file = open('module_scripts.py', 'w') level = 0 for line in lines: line = line.strip() acceptableindex = line.find('#') if acceptableindex == -1: acceptableindex = len(line) level -= line.count('try_end', 0, acceptableindex) level -= line.count('end_try', 0, acceptableindex) level -= line.count('else_try', 0, acceptableindex) newlevel = level level_positive_change = 0 newlevel += line.count('else_try', 0, acceptableindex) newlevel += line.count('(', 0, acceptableindex) newlevel += line.count('[', 0, acceptableindex) newlevel += line.count('try_begin', 0, acceptableindex) newlevel += line.count('try_for', 0, acceptableindex) level_positive_change = newlevel - level newlevel -= line.count(')', 0, acceptableindex) newlevel -= line.count(']', 0, acceptableindex) if level_positive_change == 0: level = newlevel for i in xrange(level): file.write(' ') level = newlevel file.write('%s\n' % line) file.close()
def init(bs): global batch_size batch_size = bs def get_batch_size(): return batch_size
def init(bs): global batch_size batch_size = bs def get_batch_size(): return batch_size
#!/usr/bin/env python # coding: utf-8 #program to know if a positive number is a prime or not #picking a variable named num num = 20 #using for loop from 2 since 1 is not a prime number from knowledge of mathematics #I set the range from 2 to the number set for i in range(2,num): #An if statement to validate if the i % num is equal to zero if (num % i) == 0: #printing not a prime number if the above condition is true. print(num,"is not a prime number") break #an else statement to print otherwise if the above statement is not true else: print(num,"is a prime number") # # I will be putting an input statement just to ensure the script display result # before closing input("Enter q to close: ")
num = 20 for i in range(2, num): if num % i == 0: print(num, 'is not a prime number') break else: print(num, 'is a prime number') input('Enter q to close: ')
if e1234123412341234.winerror not in (_winapi.ERROR_SEM_TIMEOUT, _winapi.ERROR_PIPE_BUSY) or _check_timeout(t): pass class X: def get_help_text(self): return ngettext( "Your password must contain at least %(min_length)d character.", "Your password must contain at least %(min_length)d characters.", self.min_length, ) % {'min_length': self.min_length} class A: def b(self): if self.connection.mysql_is_mariadb and ( 10, 4, 3, ) < self.connection.mysql_version < (10, 5, 2): pass # output if ( e1234123412341234.winerror not in ( _winapi.ERROR_SEM_TIMEOUT, _winapi.ERROR_PIPE_BUSY, ) or _check_timeout(t) ): pass class X: def get_help_text(self): return ( ngettext( "Your password must contain at least %(min_length)d character.", "Your password must contain at least %(min_length)d characters.", self.min_length, ) % {"min_length": self.min_length} ) class A: def b(self): if ( self.connection.mysql_is_mariadb and ( 10, 4, 3, ) < self.connection.mysql_version < (10, 5, 2) ): pass
if e1234123412341234.winerror not in (_winapi.ERROR_SEM_TIMEOUT, _winapi.ERROR_PIPE_BUSY) or _check_timeout(t): pass class X: def get_help_text(self): return ngettext('Your password must contain at least %(min_length)d character.', 'Your password must contain at least %(min_length)d characters.', self.min_length) % {'min_length': self.min_length} class A: def b(self): if self.connection.mysql_is_mariadb and (10, 4, 3) < self.connection.mysql_version < (10, 5, 2): pass if e1234123412341234.winerror not in (_winapi.ERROR_SEM_TIMEOUT, _winapi.ERROR_PIPE_BUSY) or _check_timeout(t): pass class X: def get_help_text(self): return ngettext('Your password must contain at least %(min_length)d character.', 'Your password must contain at least %(min_length)d characters.', self.min_length) % {'min_length': self.min_length} class A: def b(self): if self.connection.mysql_is_mariadb and (10, 4, 3) < self.connection.mysql_version < (10, 5, 2): pass
root = "/home/brian/manga_ordering" image_shape = (1654, 1170) image_shape_exception = (2960, 2164) size_title_exception = "PrayerHaNemurenai" degeneracies = [ ("Arisa", 1), ("Belmondo", 25) ] yonkoma = ["OL_Lunch"] validation = ["YoumaKourin", "MAD_STONE", "EienNoWith", "Nekodama", "SonokiDeABC"] testing = ["BakuretsuKungFuGirl", "PLANET7", "That'sIzumiko", "YamatoNoHane", "HinagikuKenzan"]
root = '/home/brian/manga_ordering' image_shape = (1654, 1170) image_shape_exception = (2960, 2164) size_title_exception = 'PrayerHaNemurenai' degeneracies = [('Arisa', 1), ('Belmondo', 25)] yonkoma = ['OL_Lunch'] validation = ['YoumaKourin', 'MAD_STONE', 'EienNoWith', 'Nekodama', 'SonokiDeABC'] testing = ['BakuretsuKungFuGirl', 'PLANET7', "That'sIzumiko", 'YamatoNoHane', 'HinagikuKenzan']
sum = 0 for i in range(int(input("von: ")), int(input("bis: "))): sum += i print(sum)
sum = 0 for i in range(int(input('von: ')), int(input('bis: '))): sum += i print(sum)
def convert(string): n = len(string) string = list(string) for i in range(n): if (string[i] == ' '): string[i] = '_' else: string[i] = string[i].lower() string = "".join(string) return string
def convert(string): n = len(string) string = list(string) for i in range(n): if string[i] == ' ': string[i] = '_' else: string[i] = string[i].lower() string = ''.join(string) return string
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def getKthFromEnd(self, head: ListNode, k: int) -> ListNode: r = [] while head: r.append(head) head = head.next return r[-k]
class Solution: def get_kth_from_end(self, head: ListNode, k: int) -> ListNode: r = [] while head: r.append(head) head = head.next return r[-k]
class MessageValidationError(Exception): def __init__(self, msg: str) -> None: super(MessageValidationError, self).__init__(msg) self.msg: str = msg
class Messagevalidationerror(Exception): def __init__(self, msg: str) -> None: super(MessageValidationError, self).__init__(msg) self.msg: str = msg
infile = open('../files/mbox.txt') outfile = open('emails.txt', mode='w') for line in infile: clean_line = line.strip() if clean_line.startswith('From '): tokens = clean_line.split() email = tokens[1] year = tokens[-1] domain = email.split('@')[1] outfile.write('domain: {}\tyear: {}\n'.format(domain, year)) infile.close() outfile.close()
infile = open('../files/mbox.txt') outfile = open('emails.txt', mode='w') for line in infile: clean_line = line.strip() if clean_line.startswith('From '): tokens = clean_line.split() email = tokens[1] year = tokens[-1] domain = email.split('@')[1] outfile.write('domain: {}\tyear: {}\n'.format(domain, year)) infile.close() outfile.close()
params = { 'axes.labelsize': 12, 'font.size': 12, 'savefig.dpi': 1000, 'axes.spines.right': False, 'axes.spines.top': False, 'legend.fontsize': 12, 'xtick.labelsize': 12, 'ytick.labelsize': 12, 'text.usetex': False, 'legend.labelspacing': 1, 'legend.borderpad': 0.5, 'legend.borderaxespad': 0.5, 'axes.labelpad': 0, 'axes.linewidth': 0.4, 'patch.linewidth': 0.7, 'lines.linewidth': 1, 'lines.markersize': 8, 'font.family': 'serif', 'xtick.major.pad': 1.5, 'xtick.major.size': 2.5, 'xtick.major.width': 0.4, 'xtick.minor.pad': 1.2, 'xtick.minor.size': 1.5, 'xtick.minor.width': 0.3, 'ytick.major.pad': 1.5, 'ytick.major.size': 2.5, 'ytick.major.width': 0.4, 'ytick.minor.pad': 1.2, 'ytick.minor.size': 1.5, 'ytick.minor.width': 0.3, 'font.serif': ["Times New Roman"] }
params = {'axes.labelsize': 12, 'font.size': 12, 'savefig.dpi': 1000, 'axes.spines.right': False, 'axes.spines.top': False, 'legend.fontsize': 12, 'xtick.labelsize': 12, 'ytick.labelsize': 12, 'text.usetex': False, 'legend.labelspacing': 1, 'legend.borderpad': 0.5, 'legend.borderaxespad': 0.5, 'axes.labelpad': 0, 'axes.linewidth': 0.4, 'patch.linewidth': 0.7, 'lines.linewidth': 1, 'lines.markersize': 8, 'font.family': 'serif', 'xtick.major.pad': 1.5, 'xtick.major.size': 2.5, 'xtick.major.width': 0.4, 'xtick.minor.pad': 1.2, 'xtick.minor.size': 1.5, 'xtick.minor.width': 0.3, 'ytick.major.pad': 1.5, 'ytick.major.size': 2.5, 'ytick.major.width': 0.4, 'ytick.minor.pad': 1.2, 'ytick.minor.size': 1.5, 'ytick.minor.width': 0.3, 'font.serif': ['Times New Roman']}
inputfile = open('input.txt','r').readlines() for i in range(len(inputfile)): inputfile[i] = inputfile[i].strip('\n') part = 2 # 1 or 2 answer = 0 if part == 1: acc = 0 pointer = 0 run = True runned = [] while run: try: instruction = inputfile[pointer].split(" ") except: run = False if pointer not in runned: if instruction[0]=="acc": acc += int(instruction[1]) elif instruction[0]=="nop": pass elif instruction[0]=="jmp": toJump = int(instruction[1])-1 pointer += toJump else: run = False runned.append(pointer) pointer += 1 answer = acc elif part == 2: acc = 0 pointer = 0 run = True runned = [] def loopOrNot(instructions): acc = 0 pointer = 0 run = True runned = [] loop = False while run: try: instruction = inputfile[pointer].split(" ") except: run = False if instruction[0]=="acc": acc += int(instruction[1]) elif instruction[0]=="nop": pass elif instruction[0]=="jmp": toJump = int(instruction[1])-1 pointer += toJump runned.append(pointer) if len(runned)>=10000: loop = True run = False pointer += 1 return loop # True or False for i in range(len(inputfile)): if inputfile[i][:3]=="nop": if not loopOrNot(inputfile): break inputfile[i] = "jmp" + str(inputfile[i][3:]) if not loopOrNot(inputfile): break inputfile[i] = "nop" + str(inputfile[i][3:]) elif inputfile[i][:3]=="jmp": if not loopOrNot(inputfile): break inputfile[i] = "nop" + str(inputfile[i][3:]) if not loopOrNot(inputfile): break inputfile[i] = "jmp" + str(inputfile[i][3:]) while run: try: instruction = inputfile[pointer].split(" ") except: run = False if pointer not in runned: if instruction[0]=="acc": acc += int(instruction[1]) elif instruction[0]=="nop": pass elif instruction[0]=="jmp": toJump = int(instruction[1])-1 pointer += toJump else: run = False runned.append(pointer) pointer += 1 answer = acc else: print("nope") print("The final answer is: "+str(answer))
inputfile = open('input.txt', 'r').readlines() for i in range(len(inputfile)): inputfile[i] = inputfile[i].strip('\n') part = 2 answer = 0 if part == 1: acc = 0 pointer = 0 run = True runned = [] while run: try: instruction = inputfile[pointer].split(' ') except: run = False if pointer not in runned: if instruction[0] == 'acc': acc += int(instruction[1]) elif instruction[0] == 'nop': pass elif instruction[0] == 'jmp': to_jump = int(instruction[1]) - 1 pointer += toJump else: run = False runned.append(pointer) pointer += 1 answer = acc elif part == 2: acc = 0 pointer = 0 run = True runned = [] def loop_or_not(instructions): acc = 0 pointer = 0 run = True runned = [] loop = False while run: try: instruction = inputfile[pointer].split(' ') except: run = False if instruction[0] == 'acc': acc += int(instruction[1]) elif instruction[0] == 'nop': pass elif instruction[0] == 'jmp': to_jump = int(instruction[1]) - 1 pointer += toJump runned.append(pointer) if len(runned) >= 10000: loop = True run = False pointer += 1 return loop for i in range(len(inputfile)): if inputfile[i][:3] == 'nop': if not loop_or_not(inputfile): break inputfile[i] = 'jmp' + str(inputfile[i][3:]) if not loop_or_not(inputfile): break inputfile[i] = 'nop' + str(inputfile[i][3:]) elif inputfile[i][:3] == 'jmp': if not loop_or_not(inputfile): break inputfile[i] = 'nop' + str(inputfile[i][3:]) if not loop_or_not(inputfile): break inputfile[i] = 'jmp' + str(inputfile[i][3:]) while run: try: instruction = inputfile[pointer].split(' ') except: run = False if pointer not in runned: if instruction[0] == 'acc': acc += int(instruction[1]) elif instruction[0] == 'nop': pass elif instruction[0] == 'jmp': to_jump = int(instruction[1]) - 1 pointer += toJump else: run = False runned.append(pointer) pointer += 1 answer = acc else: print('nope') print('The final answer is: ' + str(answer))
status_fields = { 'satp' : { 'status_fields': { 'summary': { 'Time': 'Time', 'Year': 'Year', 'Azimuth mode': 'Azimuth_mode', 'Azimuth current position': 'Azimuth_current_position', 'Azimuth current velocity': 'Azimuth_current_velocity', 'Elevation mode': 'Elevation_mode', 'Elevation current position': 'Elevation_current_position', 'Elevation current velocity': 'Elevation_current_velocity', 'Boresight mode': 'Boresight_mode', 'Boresight current position': 'Boresight_current_position', 'Qty of free program track stack positions': 'Free_upload_positions', }, 'position_errors': { 'Azimuth average position error': 'Azimuth_avg_position_error', 'Azimuth peak position error': 'Azimuth_peak_position_error', 'Elevation average position error': 'Elevation_avg_position_error', 'Elevation peak position error': 'Elevation_peak_position_error', }, 'axis_limits': { 'Azimuth CCW limit: 2nd emergency': 'AzCCW_HWlimit_2ndEmergency', 'Azimuth CCW limit: emergency': 'AzCCW_HWlimit_emergency', 'Azimuth CCW limit: operating': 'AzCCW_HWlimit_operating', 'Azimuth CCW limit: pre-limit': 'AzCCW_HWprelimit', 'Azimuth CCW limit: operating (ACU software limit)': 'AzCCW_SWlimit_operating', 'Azimuth CCW limit: pre-limit (ACU software limit)': 'AzCCW_SWprelimit', 'Azimuth CW limit: pre-limit (ACU software limit)': 'AzCW_SWprelimit', 'Azimuth CW limit: operating (ACU software limit)': 'AzCW_SWlimit_operating', 'Azimuth CW limit: pre-limit': 'AzCW_HWprelimit', 'Azimuth CW limit: operating': 'AzCW_HWlimit_operating', 'Azimuth CW limit: emergency': 'AzCW_HWlimit_emergency', 'Azimuth CW limit: 2nd emergency': 'AzCW_HWlimit_2ndEmergency', 'Elevation Down limit: extended emergency (co-moving shield off)': 'ElDown_HWlimit_shieldOFF_emergency', 'Elevation Down limit: extended operating (co-moving shield off)': 'ElDown_HWlimit_shieldOFF_operating', 'Elevation Down limit: emergency': 'ElDown_HWlimit_emergency', 'Elevation Down limit: operating': 'ElDown_HWlimit_operating', 'Elevation Down limit: pre-limit': 'ElDown_HWprelimit', 'Elevation Down limit: operating (ACU software limit)': 'ElDown_SWlimit_operating', 'Elevation Down limit: pre-limit (ACU software limit)': 'ElDown_SWprelimit', 'Elevation Up limit: pre-limit (ACU software limit)': 'ElUp_SWprelimit', 'Elevation Up limit: operating (ACU software limit)': 'ElUp_SWlimit_operating', 'Elevation Up limit: pre-limit': 'ElUp_HWprelimit', 'Elevation Up limit: operating': 'ElUp_HWlimit_operating', 'Elevation Up limit: emergency': 'ElUp_HWlimit_emergency', 'Boresight CCW limit: emergency': 'BsCCW_HWlimit_emergency', 'Boresight CCW limit: operating': 'BsCCW_HWlimit_operating', 'Boresight CCW limit: pre-limit': 'BsCCW_HWprelimit', 'Boresight CCW limit: operating (ACU software limit)': 'BsCCW_SWlimit_operating', 'Boresight CCW limit: pre-limit (ACU software limit)': 'BsCCW_SWprelimit', 'Boresight CW limit: pre-limit (ACU software limit)': 'BsCW_SWprelimit', 'Boresight CW limit: operating (ACU software limit)': 'BsCW_SWlimit_operating', 'Boresight CW limit: pre-limit': 'BsCW_HWprelimit', 'Boresight CW limit: operating': 'BsCW_HWlimit_operating', 'Boresight CW limit: emergency': 'BsCW_HWlimit_emergency', }, 'axis_faults_errors_overages': { 'Azimuth summary fault': 'Azimuth_summary_fault', 'Azimuth motion error': 'Azimuth_motion_error', 'Azimuth motor 1 overtemperature': 'Azimuth_motor1_overtemp', 'Azimuth motor 2 overtemperature': 'Azimuth_motor2_overtemp', 'Azimuth overspeed': 'Azimuth_overspeed', 'Azimuth regeneration resistor 1 overtemperature': 'Azimuth_resistor1_overtemp', 'Azimuth regeneration resistor 2 overtemperature': 'Azimuth_resistor2_overtemp', 'Azimuth overcurrent motor 1': 'Azimuth_motor1_overcurrent', 'Azimuth overcurrent motor 2': 'Azimuth_motor2_overcurrent', 'Elevation summary fault': 'Elevation_summary_fault', 'Elevation motion error': 'Elevation_motion_error', 'Elevation motor 1 overtemp': 'Elevation_motor1_overtemp', 'Elevation overspeed': 'Elevation_overspeed', 'Elevation regeneration resistor 1 overtemperature': 'Elevation_resistor1_overtemp', 'Elevation overcurrent motor 1': 'Elevation_motor1_overcurrent', 'Boresight summary fault': 'Boresight_summary_fault', 'Boresight motion error': 'Boresight_motion_error', 'Boresight motor 1 overtemperature': 'Boresight_motor1_overtemp', 'Boresight motor 2 overtemperature': 'Boresight_motor2_overtemp', 'Boresight overspeed': 'Boresight_overspeed', 'Boresight regeneration resistor 1 overtemperature': 'Boresight_resistor1_overtemp', 'Boresight regeneration resistor 2 overtemperature': 'Boresight_resistor1_overtemp', 'Boresight overcurrent motor 1': 'Boresight_motor1_overcurrent', 'Boresight overcurrent motor 2': 'Boresight_motor2_overcurrent', }, 'axis_warnings': { 'Azimuth oscillation warning': 'Azimuth_oscillation_warning', 'Elevation oscillation warning': 'Elevation_oscillation_warning', 'Boresight oscillation warning': 'Boresight_oscillation_warning', }, 'axis_failures': { 'Azimuth servo failure': 'Azimuth_servo_failure', 'Azimuth brake 1 failure': 'Azimuth_brake1_failure', 'Azimuth brake 2 failure': 'Azimuth_brake2_failure', 'Azimuth breaker failure': 'Azimuth_breaker_failure', 'Azimuth CAN bus amplifier 1 communication failure': 'Az_CANbus_amp1_comms_failure', 'Azimuth CAN bus amplifier 2 communication failure': 'Az_CANbus_amp2_comms_failure', 'Azimuth encoder failure': 'Azimuth_encoder_failure', 'Azimuth tacho failure': 'Azimuth_tacho_failure', 'Elevation servo failure': 'Elevation_servo_failure', 'Elevation brake 1 failure': 'Elevation_brake1_failure', 'Elevation breaker failure': 'Elevation_breaker_failure', 'Elevation CAN bus amplifier 1 communication failure': 'El_CANbus_amp1_comms_failure', 'Elevation encoder failure': 'Elevation_encoder_failure', 'Boresight servo failure': 'Boresight_servo_failure', 'Boresight brake 1 failure': 'Boresight_brake1_failure', 'Boresight brake 2 failure': 'Boresight_brake2_failure', 'Boresight breaker failure': 'Boresight_breaker_failure', 'Boresight CAN bus amplifier 1 communication failure': 'Bs_CANbus_amp1_comms_failure', 'Boresight CAN bus amplifier 2 communication failure': 'Bs_CANbus_amp2_comms_failure', 'Boresight encoder failure': 'Boresight_encoder_failure', 'Boresight tacho failure': 'Boresight_tacho_failure', }, 'axis_state': { 'Azimuth computer disabled': 'Azimuth_computer_disabled', 'Azimuth axis in stop': 'Azimuth_axis_stop', 'Azimuth brakes released': 'Azimuth_brakes_released', 'Azimuth stop at LCP': 'Azimuth_stop_LCP', 'Azimuth power on': 'Azimuth_power_on', 'Azimuth AUX 1 mode selected': 'Azimuth_AUX1_mode_selected', 'Azimuth AUX 2 mode selected': 'Azimuth_AUX2_mode_selected', 'Azimuth immobile': 'Azimuth_immobile', 'Elevation computer disabled': 'Elevation_computer_disabled', 'Elevation axis in stop': 'Elevation_axis_stop', 'Elevation brakes released': 'Elevation_brakes_released', 'Elevation stop at LCP': 'Elevation_stop_LCP', 'Elevation power on': 'Elevation_power_on', 'Elevation immobile': 'Elevation_immobile', 'Boresight computer disabled': 'Boresight_computer_disabled', 'Boresight axis in stop': 'Boresight_axis_stop', 'Boresight brakes released': 'Boresight_brakes_released', 'Boresight stop at LCP': 'Boresight_stop_LCP', 'Boresight power on': 'Boresight_power_on', 'Boresight AUX 1 mode selected': 'Boresight_AUX1_mode_selected', 'Boresight AUX 2 mode selected': 'Boresight_AUX2_mode_selected', 'Boresight immobile': 'Boresight_immobile', }, 'osc_alarms': { 'Azimuth oscillation alarm': 'Azimuth_oscillation_alarm', 'Elevation oscillation alarm': 'Elevation_oscillation_alarm', 'Boresight oscillation alarm': 'Boresight_oscillation_alarm', }, 'commands': { 'Azimuth commanded position': 'Azimuth_commanded_position', 'Elevation commanded position': 'Elevation_commanded_position', 'Boresight commanded position': 'Boresight_commanded_position', }, 'ACU_failures_errors': { 'General summary fault': 'General_summary_fault', 'Power failure (latched)': 'Power_failure_Latched', '24V power failure': 'Power_failure_24V', 'General Breaker failure': 'General_breaker_failure', 'Power failure (not latched)': 'Power_failure_NotLatched', 'Cabinet Overtemperature': 'Cabinet_overtemp', 'Ambient temperature low (operation inhibited)': 'Ambient_temp_TooLow', 'PLC-ACU interface error': 'PLC_interface_error', 'ACU fan failure': 'ACU_fan_failure', 'Cabinet undertemperature': 'Cabinet_undertemp', 'Time synchronisation error': 'Time_sync_error', 'ACU-PLC communication error': 'PLC_comms_error', }, 'platform_status': { 'PCU operation': 'PCU_operation', 'Safe': 'Safe_mode', 'Lightning protection surge arresters': 'Lightning_protection_surge_arresters', 'Co-Moving Shield off': 'CoMoving_shield_off', 'ACU in remote mode': 'Remote_mode', }, 'ACU_emergency': { 'E-Stop servo drive cabinet': 'EStop_servo_drive_cabinet', 'E-Stop service pole': 'EStop_service_pole', 'E-Stop Az movable': 'EStop_Az_movable', 'Key Switch Bypass Emergency Limit': 'Key_switch_bypass_emergency_limit', } } } } def allkeys(platform_type): all_keys = [] pfd = status_fields[platform_type]['status_fields'] for category in pfd.keys(): for key in pfd[category].keys(): all_keys.append(key) return all_keys
status_fields = {'satp': {'status_fields': {'summary': {'Time': 'Time', 'Year': 'Year', 'Azimuth mode': 'Azimuth_mode', 'Azimuth current position': 'Azimuth_current_position', 'Azimuth current velocity': 'Azimuth_current_velocity', 'Elevation mode': 'Elevation_mode', 'Elevation current position': 'Elevation_current_position', 'Elevation current velocity': 'Elevation_current_velocity', 'Boresight mode': 'Boresight_mode', 'Boresight current position': 'Boresight_current_position', 'Qty of free program track stack positions': 'Free_upload_positions'}, 'position_errors': {'Azimuth average position error': 'Azimuth_avg_position_error', 'Azimuth peak position error': 'Azimuth_peak_position_error', 'Elevation average position error': 'Elevation_avg_position_error', 'Elevation peak position error': 'Elevation_peak_position_error'}, 'axis_limits': {'Azimuth CCW limit: 2nd emergency': 'AzCCW_HWlimit_2ndEmergency', 'Azimuth CCW limit: emergency': 'AzCCW_HWlimit_emergency', 'Azimuth CCW limit: operating': 'AzCCW_HWlimit_operating', 'Azimuth CCW limit: pre-limit': 'AzCCW_HWprelimit', 'Azimuth CCW limit: operating (ACU software limit)': 'AzCCW_SWlimit_operating', 'Azimuth CCW limit: pre-limit (ACU software limit)': 'AzCCW_SWprelimit', 'Azimuth CW limit: pre-limit (ACU software limit)': 'AzCW_SWprelimit', 'Azimuth CW limit: operating (ACU software limit)': 'AzCW_SWlimit_operating', 'Azimuth CW limit: pre-limit': 'AzCW_HWprelimit', 'Azimuth CW limit: operating': 'AzCW_HWlimit_operating', 'Azimuth CW limit: emergency': 'AzCW_HWlimit_emergency', 'Azimuth CW limit: 2nd emergency': 'AzCW_HWlimit_2ndEmergency', 'Elevation Down limit: extended emergency (co-moving shield off)': 'ElDown_HWlimit_shieldOFF_emergency', 'Elevation Down limit: extended operating (co-moving shield off)': 'ElDown_HWlimit_shieldOFF_operating', 'Elevation Down limit: emergency': 'ElDown_HWlimit_emergency', 'Elevation Down limit: operating': 'ElDown_HWlimit_operating', 'Elevation Down limit: pre-limit': 'ElDown_HWprelimit', 'Elevation Down limit: operating (ACU software limit)': 'ElDown_SWlimit_operating', 'Elevation Down limit: pre-limit (ACU software limit)': 'ElDown_SWprelimit', 'Elevation Up limit: pre-limit (ACU software limit)': 'ElUp_SWprelimit', 'Elevation Up limit: operating (ACU software limit)': 'ElUp_SWlimit_operating', 'Elevation Up limit: pre-limit': 'ElUp_HWprelimit', 'Elevation Up limit: operating': 'ElUp_HWlimit_operating', 'Elevation Up limit: emergency': 'ElUp_HWlimit_emergency', 'Boresight CCW limit: emergency': 'BsCCW_HWlimit_emergency', 'Boresight CCW limit: operating': 'BsCCW_HWlimit_operating', 'Boresight CCW limit: pre-limit': 'BsCCW_HWprelimit', 'Boresight CCW limit: operating (ACU software limit)': 'BsCCW_SWlimit_operating', 'Boresight CCW limit: pre-limit (ACU software limit)': 'BsCCW_SWprelimit', 'Boresight CW limit: pre-limit (ACU software limit)': 'BsCW_SWprelimit', 'Boresight CW limit: operating (ACU software limit)': 'BsCW_SWlimit_operating', 'Boresight CW limit: pre-limit': 'BsCW_HWprelimit', 'Boresight CW limit: operating': 'BsCW_HWlimit_operating', 'Boresight CW limit: emergency': 'BsCW_HWlimit_emergency'}, 'axis_faults_errors_overages': {'Azimuth summary fault': 'Azimuth_summary_fault', 'Azimuth motion error': 'Azimuth_motion_error', 'Azimuth motor 1 overtemperature': 'Azimuth_motor1_overtemp', 'Azimuth motor 2 overtemperature': 'Azimuth_motor2_overtemp', 'Azimuth overspeed': 'Azimuth_overspeed', 'Azimuth regeneration resistor 1 overtemperature': 'Azimuth_resistor1_overtemp', 'Azimuth regeneration resistor 2 overtemperature': 'Azimuth_resistor2_overtemp', 'Azimuth overcurrent motor 1': 'Azimuth_motor1_overcurrent', 'Azimuth overcurrent motor 2': 'Azimuth_motor2_overcurrent', 'Elevation summary fault': 'Elevation_summary_fault', 'Elevation motion error': 'Elevation_motion_error', 'Elevation motor 1 overtemp': 'Elevation_motor1_overtemp', 'Elevation overspeed': 'Elevation_overspeed', 'Elevation regeneration resistor 1 overtemperature': 'Elevation_resistor1_overtemp', 'Elevation overcurrent motor 1': 'Elevation_motor1_overcurrent', 'Boresight summary fault': 'Boresight_summary_fault', 'Boresight motion error': 'Boresight_motion_error', 'Boresight motor 1 overtemperature': 'Boresight_motor1_overtemp', 'Boresight motor 2 overtemperature': 'Boresight_motor2_overtemp', 'Boresight overspeed': 'Boresight_overspeed', 'Boresight regeneration resistor 1 overtemperature': 'Boresight_resistor1_overtemp', 'Boresight regeneration resistor 2 overtemperature': 'Boresight_resistor1_overtemp', 'Boresight overcurrent motor 1': 'Boresight_motor1_overcurrent', 'Boresight overcurrent motor 2': 'Boresight_motor2_overcurrent'}, 'axis_warnings': {'Azimuth oscillation warning': 'Azimuth_oscillation_warning', 'Elevation oscillation warning': 'Elevation_oscillation_warning', 'Boresight oscillation warning': 'Boresight_oscillation_warning'}, 'axis_failures': {'Azimuth servo failure': 'Azimuth_servo_failure', 'Azimuth brake 1 failure': 'Azimuth_brake1_failure', 'Azimuth brake 2 failure': 'Azimuth_brake2_failure', 'Azimuth breaker failure': 'Azimuth_breaker_failure', 'Azimuth CAN bus amplifier 1 communication failure': 'Az_CANbus_amp1_comms_failure', 'Azimuth CAN bus amplifier 2 communication failure': 'Az_CANbus_amp2_comms_failure', 'Azimuth encoder failure': 'Azimuth_encoder_failure', 'Azimuth tacho failure': 'Azimuth_tacho_failure', 'Elevation servo failure': 'Elevation_servo_failure', 'Elevation brake 1 failure': 'Elevation_brake1_failure', 'Elevation breaker failure': 'Elevation_breaker_failure', 'Elevation CAN bus amplifier 1 communication failure': 'El_CANbus_amp1_comms_failure', 'Elevation encoder failure': 'Elevation_encoder_failure', 'Boresight servo failure': 'Boresight_servo_failure', 'Boresight brake 1 failure': 'Boresight_brake1_failure', 'Boresight brake 2 failure': 'Boresight_brake2_failure', 'Boresight breaker failure': 'Boresight_breaker_failure', 'Boresight CAN bus amplifier 1 communication failure': 'Bs_CANbus_amp1_comms_failure', 'Boresight CAN bus amplifier 2 communication failure': 'Bs_CANbus_amp2_comms_failure', 'Boresight encoder failure': 'Boresight_encoder_failure', 'Boresight tacho failure': 'Boresight_tacho_failure'}, 'axis_state': {'Azimuth computer disabled': 'Azimuth_computer_disabled', 'Azimuth axis in stop': 'Azimuth_axis_stop', 'Azimuth brakes released': 'Azimuth_brakes_released', 'Azimuth stop at LCP': 'Azimuth_stop_LCP', 'Azimuth power on': 'Azimuth_power_on', 'Azimuth AUX 1 mode selected': 'Azimuth_AUX1_mode_selected', 'Azimuth AUX 2 mode selected': 'Azimuth_AUX2_mode_selected', 'Azimuth immobile': 'Azimuth_immobile', 'Elevation computer disabled': 'Elevation_computer_disabled', 'Elevation axis in stop': 'Elevation_axis_stop', 'Elevation brakes released': 'Elevation_brakes_released', 'Elevation stop at LCP': 'Elevation_stop_LCP', 'Elevation power on': 'Elevation_power_on', 'Elevation immobile': 'Elevation_immobile', 'Boresight computer disabled': 'Boresight_computer_disabled', 'Boresight axis in stop': 'Boresight_axis_stop', 'Boresight brakes released': 'Boresight_brakes_released', 'Boresight stop at LCP': 'Boresight_stop_LCP', 'Boresight power on': 'Boresight_power_on', 'Boresight AUX 1 mode selected': 'Boresight_AUX1_mode_selected', 'Boresight AUX 2 mode selected': 'Boresight_AUX2_mode_selected', 'Boresight immobile': 'Boresight_immobile'}, 'osc_alarms': {'Azimuth oscillation alarm': 'Azimuth_oscillation_alarm', 'Elevation oscillation alarm': 'Elevation_oscillation_alarm', 'Boresight oscillation alarm': 'Boresight_oscillation_alarm'}, 'commands': {'Azimuth commanded position': 'Azimuth_commanded_position', 'Elevation commanded position': 'Elevation_commanded_position', 'Boresight commanded position': 'Boresight_commanded_position'}, 'ACU_failures_errors': {'General summary fault': 'General_summary_fault', 'Power failure (latched)': 'Power_failure_Latched', '24V power failure': 'Power_failure_24V', 'General Breaker failure': 'General_breaker_failure', 'Power failure (not latched)': 'Power_failure_NotLatched', 'Cabinet Overtemperature': 'Cabinet_overtemp', 'Ambient temperature low (operation inhibited)': 'Ambient_temp_TooLow', 'PLC-ACU interface error': 'PLC_interface_error', 'ACU fan failure': 'ACU_fan_failure', 'Cabinet undertemperature': 'Cabinet_undertemp', 'Time synchronisation error': 'Time_sync_error', 'ACU-PLC communication error': 'PLC_comms_error'}, 'platform_status': {'PCU operation': 'PCU_operation', 'Safe': 'Safe_mode', 'Lightning protection surge arresters': 'Lightning_protection_surge_arresters', 'Co-Moving Shield off': 'CoMoving_shield_off', 'ACU in remote mode': 'Remote_mode'}, 'ACU_emergency': {'E-Stop servo drive cabinet': 'EStop_servo_drive_cabinet', 'E-Stop service pole': 'EStop_service_pole', 'E-Stop Az movable': 'EStop_Az_movable', 'Key Switch Bypass Emergency Limit': 'Key_switch_bypass_emergency_limit'}}}} def allkeys(platform_type): all_keys = [] pfd = status_fields[platform_type]['status_fields'] for category in pfd.keys(): for key in pfd[category].keys(): all_keys.append(key) return all_keys
# Cast double into string a = 2 b = str(a) print(b)
a = 2 b = str(a) print(b)
EMAIL_HOST ='smtp.gmail.com' EMAIL_HOST_USER = 'sedhelp@gmail.com' EMAIL_HOST_PASSWORD = '' EMAIL_PORT = 587 EMAIL_USE_TLS = True EMAIL_DEFAULT_USER = 'support@sedteam.org'
email_host = 'smtp.gmail.com' email_host_user = 'sedhelp@gmail.com' email_host_password = '' email_port = 587 email_use_tls = True email_default_user = 'support@sedteam.org'
class BankAccount: accounts = [] def __init__(self, int_rate, balance): # Make user class later self.int_rate = int_rate self.balance = balance BankAccount.accounts.append(self) def deposit(self, amount): self.balance += amount return self def withdraw(self,amount): if self.balance >= amount: self.balance -= amount else: print('Insufficient funds: Charging a $5 fee') self.balance = self.balance - 5 return self def display_account_info(self): print (f'Your balance is: ${self.balance}') return self def yield_interest(self): if self.balance > 0: self.balance = self.balance + (self.int_rate * self.balance) return self @classmethod def print_all_accounts(cls): for account in cls.accounts: account.display_account_info() class User: def __init__(self, name): self.name = name self.account = { 'checking' : BankAccount(0.01, 1000), 'savings' : BankAccount(0.05, 9500) } def makeDeposit(self, amount): self.account.deposit(amount) return self def makeWithdrawal(self, amount): self.account.withdraw(amount) return self def displayBalance(self): self.account.display_account_info() return self # acc1 = BankAccount(.02, 1000) # # acc1.deposit(300).deposit(250).deposit(500).withdraw(80).yield_interest().display_account_info() # acc2 = BankAccount(.02, 2000) # # acc2.deposit(100).deposit(650).withdraw(150).withdraw(800).withdraw(425).withdraw(390).yield_interest().display_account_info() # BankAccount.print_all_accounts() yuri = User("Yuri") yuri.account['checking'].deposit(150).display_account_info()
class Bankaccount: accounts = [] def __init__(self, int_rate, balance): self.int_rate = int_rate self.balance = balance BankAccount.accounts.append(self) def deposit(self, amount): self.balance += amount return self def withdraw(self, amount): if self.balance >= amount: self.balance -= amount else: print('Insufficient funds: Charging a $5 fee') self.balance = self.balance - 5 return self def display_account_info(self): print(f'Your balance is: ${self.balance}') return self def yield_interest(self): if self.balance > 0: self.balance = self.balance + self.int_rate * self.balance return self @classmethod def print_all_accounts(cls): for account in cls.accounts: account.display_account_info() class User: def __init__(self, name): self.name = name self.account = {'checking': bank_account(0.01, 1000), 'savings': bank_account(0.05, 9500)} def make_deposit(self, amount): self.account.deposit(amount) return self def make_withdrawal(self, amount): self.account.withdraw(amount) return self def display_balance(self): self.account.display_account_info() return self yuri = user('Yuri') yuri.account['checking'].deposit(150).display_account_info()
#!/usr/bin/python class FunctionalList: '''A class wrapping a list with some extra functional magic, like head, tail, init, last, drop, and take.''' def __init__(self, values=None): if values is None: self.values = [] else: self.values = values def __len__(self): return len(self.values) def __getitem__(self, key): # if key is of invalid type or value, the list # values will raise the error return self.values[key] def __setitem__(self, key, value): self.values[key] = value def __delitem__(self, key): del self.values[key] # def __iter__(self): # return iter(self.values) def __reversed__(self): return reversed(self.values) def append(self, value): self.values.append(value) def head(self, n=5): # get the first element return self.values[:n] def tail(self, n=5): # get all elements after the first return self.values[-n:] def init(self): # get elements up to the last return self.values[:-1] def last(self): # get last element return self.values[-1] def drop(self, n): # get all elements except first n return self.values[n:] def take(self, n): # get first n elements return self.values[:n] fl = FunctionalList([1, 2, 3, 4, 5, 6, 7, 8]) fl.append(9) fl.append(10) fl.append(11) print(fl.head()) print(fl.tail()) print(len(fl)) for e in fl: print(e, end=' ') print()
class Functionallist: """A class wrapping a list with some extra functional magic, like head, tail, init, last, drop, and take.""" def __init__(self, values=None): if values is None: self.values = [] else: self.values = values def __len__(self): return len(self.values) def __getitem__(self, key): return self.values[key] def __setitem__(self, key, value): self.values[key] = value def __delitem__(self, key): del self.values[key] def __reversed__(self): return reversed(self.values) def append(self, value): self.values.append(value) def head(self, n=5): return self.values[:n] def tail(self, n=5): return self.values[-n:] def init(self): return self.values[:-1] def last(self): return self.values[-1] def drop(self, n): return self.values[n:] def take(self, n): return self.values[:n] fl = functional_list([1, 2, 3, 4, 5, 6, 7, 8]) fl.append(9) fl.append(10) fl.append(11) print(fl.head()) print(fl.tail()) print(len(fl)) for e in fl: print(e, end=' ') print()
with open('data.txt') as fp: datas = fp.read() #each testcase is seprated by '\n\n' data = datas.split('\n\n') suma = 0 for elem in data: quests = set() # different lines contain no information... answ = elem.replace('\n','').replace(' ','') for char in answ: #if this question has not answered, it is added to the set quests.add(char) suma = len(quests) + suma print(suma)
with open('data.txt') as fp: datas = fp.read() data = datas.split('\n\n') suma = 0 for elem in data: quests = set() answ = elem.replace('\n', '').replace(' ', '') for char in answ: quests.add(char) suma = len(quests) + suma print(suma)
class Solution: def isMatch(self, s, p): dp = [[False for _ in range(len(p)+1)] for i in range(len(s)+1)] dp[0][0] = True for j in range(1, len(p)+1): if p[j-1] != '*': break dp[0][j] = True for i in range(1, len(s)+1): for j in range(1, len(p)+1): if p[j-1] in {s[i-1], '?'}: dp[i][j] = dp[i-1][j-1] elif p[j-1] == '*': dp[i][j] = dp[i-1][j-1] or dp[i-1][j] or dp[i][j-1] return dp[-1][-1]
class Solution: def is_match(self, s, p): dp = [[False for _ in range(len(p) + 1)] for i in range(len(s) + 1)] dp[0][0] = True for j in range(1, len(p) + 1): if p[j - 1] != '*': break dp[0][j] = True for i in range(1, len(s) + 1): for j in range(1, len(p) + 1): if p[j - 1] in {s[i - 1], '?'}: dp[i][j] = dp[i - 1][j - 1] elif p[j - 1] == '*': dp[i][j] = dp[i - 1][j - 1] or dp[i - 1][j] or dp[i][j - 1] return dp[-1][-1]
{ 'total_returned': 1, 'host_list': [ { 'name': 'i-deadbeef', 'up': True, 'is_muted': False, 'apps': [ 'agent' ], 'tags_by_source': { 'Datadog': [ 'host:i-deadbeef' ], 'Amazon Web Services': [ 'account:staging' ] }, 'aws_name': 'mycoolhost-1', 'metrics': { 'load': 0.5, 'iowait': 3.2, 'cpu': 99.0 }, 'sources': [ 'aws', 'agent' ], 'meta': { 'nixV': [ 'Ubuntu', '14.04', 'trusty' ] }, 'host_name': 'i-deadbeef', 'id': 123456, 'aliases': [ 'mycoolhost-1' ] } ], 'total_matching': 1 }
{'total_returned': 1, 'host_list': [{'name': 'i-deadbeef', 'up': True, 'is_muted': False, 'apps': ['agent'], 'tags_by_source': {'Datadog': ['host:i-deadbeef'], 'Amazon Web Services': ['account:staging']}, 'aws_name': 'mycoolhost-1', 'metrics': {'load': 0.5, 'iowait': 3.2, 'cpu': 99.0}, 'sources': ['aws', 'agent'], 'meta': {'nixV': ['Ubuntu', '14.04', 'trusty']}, 'host_name': 'i-deadbeef', 'id': 123456, 'aliases': ['mycoolhost-1']}], 'total_matching': 1}
# 2. Todo List # You will receive a todo-notes until you get the command "End". # The notes will be in the format: "{importance}-{value}". Return the list of todo-notes sorted by importance. # The maximum importance will be 10 note = input() todo_list = [0] * 10 while not note == 'End': importance, task = note.split('-') # remove one in order for the importance to match the index of the list importance = int(importance) - 1 todo_list[importance] = task note = input() print([task for task in todo_list if not task == 0])
note = input() todo_list = [0] * 10 while not note == 'End': (importance, task) = note.split('-') importance = int(importance) - 1 todo_list[importance] = task note = input() print([task for task in todo_list if not task == 0])
n1 = float(input('fale a primeira nota: ')) n2 = float(input('fale a segunda nota: ')) media = (n1 + n2) / 2 if media < 6: print('voce foi reprovado seu burro!!') elif media < 9: print('voce foi aprovado !!') elif media <= 10: print('parabens otimo aluno !!') print('voce foi aprovado !!')
n1 = float(input('fale a primeira nota: ')) n2 = float(input('fale a segunda nota: ')) media = (n1 + n2) / 2 if media < 6: print('voce foi reprovado seu burro!!') elif media < 9: print('voce foi aprovado !!') elif media <= 10: print('parabens otimo aluno !!') print('voce foi aprovado !!')
# TODO: Fill in meta tags. meta = { "title" : "", "author" : "", "description" : "", "url" : "", "icon_path" : "", "keywords" : "" } # TODO: Make additional links in nav-bar here. nav = [ { "name" : "projects", "link" : "index.html#projects" }, { "name" : "blog", "link" : "blog", }, { "name" : "resume", "link" : "resume" } ] # TODO: Fill in one or multple description dicts. about = [ { "description" : "" } ] # TODO: Fill in one or multiple project dicts. The code field executes any html/js you specify. # icon_class is a font-awesome icon and any other classes you might want to specify (see css). # For layout purposes, the code field is optional. projects = [ { "link" : "", "icon_class" : "", "name" : "", "description" : "", "code" : "" } ]
meta = {'title': '', 'author': '', 'description': '', 'url': '', 'icon_path': '', 'keywords': ''} nav = [{'name': 'projects', 'link': 'index.html#projects'}, {'name': 'blog', 'link': 'blog'}, {'name': 'resume', 'link': 'resume'}] about = [{'description': ''}] projects = [{'link': '', 'icon_class': '', 'name': '', 'description': '', 'code': ''}]
#!/usr/bin/python # # check_mk is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation in version 2. check_mk is distributed # in the hope that it will be useful, but WITHOUT ANY WARRANTY; with- # out even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. See the GNU General Public License for more de- # tails. You should have received a copy of the GNU General Public # License along with GNU Make; see the file COPYING. If not, write # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. _health_map = {"1": 0, "2": 1, "3": 1, "4": 2, "5": 3, "6": 3} _health_str = {0: "OK", 1: "WARNING", 2: "CRITICAL", 3: "ABSENCE", 4: "UNKOWN"} def inventory_hw_memory_health(info): return [('MEMORY status', None)] def check_hw_memory_health(item, params, info): _health_status = 3 _msg = '' try: for state in info[0][0]: _health_status = _health_map.get(state) for state, index in info[1]: _each_status = _health_map.get(state) if _each_status is not None: if _each_status == 3: continue _health_msg = _health_str.get(_each_status) _msg = _msg + " %s health status is %s;" % (str(index), _health_msg) return _health_status, "healthy status is %s, %s" % (_health_str.get(_health_status), _msg) except IndexError: return "healthy status is not queried." check_info["huawei_ibmc_memory_check"] = { "inventory_function": inventory_hw_memory_health, "check_function": check_hw_memory_health, "service_description": "%s", "includes": ["huawei_ibmc_util_.include"], "snmp_info": [ (".1.3.6.1.4.1.2011.2.235.1.1.16", ["1.0", ]), (".1.3.6.1.4.1.2011.2.235.1.1.16", ["50.1.6", "50.1.10"]) ], "snmp_scan_function": scan, }
_health_map = {'1': 0, '2': 1, '3': 1, '4': 2, '5': 3, '6': 3} _health_str = {0: 'OK', 1: 'WARNING', 2: 'CRITICAL', 3: 'ABSENCE', 4: 'UNKOWN'} def inventory_hw_memory_health(info): return [('MEMORY status', None)] def check_hw_memory_health(item, params, info): _health_status = 3 _msg = '' try: for state in info[0][0]: _health_status = _health_map.get(state) for (state, index) in info[1]: _each_status = _health_map.get(state) if _each_status is not None: if _each_status == 3: continue _health_msg = _health_str.get(_each_status) _msg = _msg + ' %s health status is %s;' % (str(index), _health_msg) return (_health_status, 'healthy status is %s, %s' % (_health_str.get(_health_status), _msg)) except IndexError: return 'healthy status is not queried.' check_info['huawei_ibmc_memory_check'] = {'inventory_function': inventory_hw_memory_health, 'check_function': check_hw_memory_health, 'service_description': '%s', 'includes': ['huawei_ibmc_util_.include'], 'snmp_info': [('.1.3.6.1.4.1.2011.2.235.1.1.16', ['1.0']), ('.1.3.6.1.4.1.2011.2.235.1.1.16', ['50.1.6', '50.1.10'])], 'snmp_scan_function': scan}
def pallindrom(n): a=str(n) b=a[::-1] if(a==b): return True p=0 lp=0 for i in range(100,1000): for j in range(100,1000): p=i*j if(pallindrom(p)): if(p>lp): lp=p print(lp)
def pallindrom(n): a = str(n) b = a[::-1] if a == b: return True p = 0 lp = 0 for i in range(100, 1000): for j in range(100, 1000): p = i * j if pallindrom(p): if p > lp: lp = p print(lp)
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': 9.4469e-07, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 5.06007e-06, '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.631853, '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': 1.09414, '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.627521, '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': 2.35352, '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.62456, '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': 6.12332, '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': 9.55956e-07, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0229052, '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.165634, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.169398, '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.165635, 'Execution Unit/Register Files/Runtime Dynamic': 0.192303, '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.400239, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 1.04956, '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': 4.20345, '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.0062532, '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.0062532, '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.0054389, '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.00210131, '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.00243341, '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.0203787, '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.0602278, '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.162846, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.43323, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.648647, '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.5531, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.96874, 'Instruction Fetch Unit/Runtime Dynamic': 1.4452, '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.0435797, 'L2/Runtime Dynamic': 0.00818343, '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': 6.19231, 'Load Store Unit/Data Cache/Runtime Dynamic': 2.38379, '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.160312, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.160312, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 6.95242, 'Load Store Unit/Runtime Dynamic': 3.33471, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.395303, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.790605, '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.140294, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.140675, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00813591, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.399995, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.107146, '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.801035, 'Memory Management Unit/Runtime Dynamic': 0.247821, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 27.4508, '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': 3.05404e-06, '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.0323095, '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.329529, '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.361842, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 9.6012, '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': 1.88938e-06, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.20269, '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': 1.26502e-05, '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.169558, '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.27349, '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.138049, '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.581097, '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.193924, '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.20236, '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': 2.38989e-06, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00711201, '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.0514297, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0525977, '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.0514321, 'Execution Unit/Register Files/Runtime Dynamic': 0.0597097, '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.108348, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.285179, '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.53405, '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.00220355, '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.00220355, '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.0019779, '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.000797737, '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.00075557, '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.00714058, '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.0190333, '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.0505635, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.21627, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.199183, '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.171736, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.59088, 'Instruction Fetch Unit/Runtime Dynamic': 0.447657, '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.0392283, 'L2/Runtime Dynamic': 0.00781246, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.90697, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.80578, '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.0540236, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0540235, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 3.16208, 'Load Store Unit/Runtime Dynamic': 1.12623, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.133213, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.266425, '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.0472777, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0476133, '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.199976, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0334039, '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.4373, 'Memory Management Unit/Runtime Dynamic': 0.0810172, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 17.0213, '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': 6.79532e-06, '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.00765006, '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.0865085, '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.0941654, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.29093, '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': 1.88938e-06, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.20269, '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': 1.26502e-05, '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.14782, '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.238429, '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.120351, '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.5066, '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.169061, '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.15367, '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': 2.38989e-06, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00620025, '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.044836, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0458546, '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.0448384, 'Execution Unit/Register Files/Runtime Dynamic': 0.0520549, '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.0944574, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.248641, '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.41536, '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.00193243, '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.00193243, '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.00173501, '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.000700015, '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.000658705, '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.00625858, '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.0166751, '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.0440812, '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.80394, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.173524, '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.14972, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.15854, 'Instruction Fetch Unit/Runtime Dynamic': 0.390258, '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.0358134, 'L2/Runtime Dynamic': 0.00704565, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.70866, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.710347, '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.0476079, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0476078, '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.93348, 'Load Store Unit/Runtime Dynamic': 0.992741, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.117393, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.234786, '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.0416631, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0419689, '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.174339, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0291342, '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.402018, 'Memory Management Unit/Runtime Dynamic': 0.071103, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.273, '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': 6.53416e-06, '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.00666932, '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.0753966, '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.0820725, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.95858, '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': 1.88938e-06, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.20269, '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': 1.01201e-05, '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.149396, '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.24097, '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.121634, '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.512, '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.170865, '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.1572, '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': 1.91191e-06, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00626634, '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.0453144, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0463434, '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.0453163, 'Execution Unit/Register Files/Runtime Dynamic': 0.0526098, '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.0954651, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.251155, '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.42383, '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.0019555, '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.0019555, '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.00175657, '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.000709169, '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.000665727, '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.00633329, '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.0168435, '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.0445511, '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.83383, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.174625, '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.151316, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.18988, 'Instruction Fetch Unit/Runtime Dynamic': 0.393669, '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.0368771, 'L2/Runtime Dynamic': 0.00718455, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.72432, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.717875, '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.0481146, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0481147, '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.95153, 'Load Store Unit/Runtime Dynamic': 1.00328, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.118642, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.237285, '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.0421066, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0424236, '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.176197, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.029329, '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.404638, 'Memory Management Unit/Runtime Dynamic': 0.0717526, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.3296, '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': 5.23898e-06, '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.0067404, '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.0762029, '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.0829485, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.98266, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 0.7808241157476576, 'Runtime Dynamic': 0.7808241157476576, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.0767166, 'Runtime Dynamic': 0.0319482, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 77.1514, 'Peak Power': 110.264, 'Runtime Dynamic': 18.8653, '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': 77.0747, 'Total Cores/Runtime Dynamic': 18.8334, '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.0767166, 'Total L3s/Runtime Dynamic': 0.0319482, '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': 9.4469e-07, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 5.06007e-06, '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.631853, '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': 1.09414, '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.627521, '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': 2.35352, '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.62456, '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': 6.12332, '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': 9.55956e-07, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0229052, '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.165634, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.169398, '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.165635, 'Execution Unit/Register Files/Runtime Dynamic': 0.192303, '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.400239, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 1.04956, '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': 4.20345, '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.0062532, '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.0062532, '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.0054389, '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.00210131, '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.00243341, '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.0203787, '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.0602278, '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.162846, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.43323, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.648647, '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.5531, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.96874, 'Instruction Fetch Unit/Runtime Dynamic': 1.4452, '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.0435797, 'L2/Runtime Dynamic': 0.00818343, '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': 6.19231, 'Load Store Unit/Data Cache/Runtime Dynamic': 2.38379, '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.160312, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.160312, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 6.95242, 'Load Store Unit/Runtime Dynamic': 3.33471, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.395303, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.790605, '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.140294, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.140675, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00813591, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.399995, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.107146, '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.801035, 'Memory Management Unit/Runtime Dynamic': 0.247821, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 27.4508, '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': 3.05404e-06, '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.0323095, '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.329529, '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.361842, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 9.6012, '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': 1.88938e-06, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.20269, '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': 1.26502e-05, '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.169558, '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.27349, '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.138049, '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.581097, '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.193924, '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.20236, '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': 2.38989e-06, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00711201, '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.0514297, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0525977, '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.0514321, 'Execution Unit/Register Files/Runtime Dynamic': 0.0597097, '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.108348, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.285179, '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.53405, '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.00220355, '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.00220355, '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.0019779, '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.000797737, '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.00075557, '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.00714058, '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.0190333, '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.0505635, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.21627, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.199183, '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.171736, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.59088, 'Instruction Fetch Unit/Runtime Dynamic': 0.447657, '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.0392283, 'L2/Runtime Dynamic': 0.00781246, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.90697, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.80578, '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.0540236, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0540235, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 3.16208, 'Load Store Unit/Runtime Dynamic': 1.12623, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.133213, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.266425, '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.0472777, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0476133, '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.199976, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0334039, '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.4373, 'Memory Management Unit/Runtime Dynamic': 0.0810172, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 17.0213, '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': 6.79532e-06, '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.00765006, '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.0865085, '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.0941654, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.29093, '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': 1.88938e-06, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.20269, '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': 1.26502e-05, '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.14782, '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.238429, '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.120351, '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.5066, '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.169061, '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.15367, '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': 2.38989e-06, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00620025, '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.044836, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0458546, '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.0448384, 'Execution Unit/Register Files/Runtime Dynamic': 0.0520549, '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.0944574, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.248641, '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.41536, '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.00193243, '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.00193243, '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.00173501, '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.000700015, '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.000658705, '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.00625858, '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.0166751, '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.0440812, '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.80394, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.173524, '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.14972, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.15854, 'Instruction Fetch Unit/Runtime Dynamic': 0.390258, '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.0358134, 'L2/Runtime Dynamic': 0.00704565, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.70866, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.710347, '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.0476079, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0476078, '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.93348, 'Load Store Unit/Runtime Dynamic': 0.992741, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.117393, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.234786, '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.0416631, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0419689, '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.174339, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0291342, '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.402018, 'Memory Management Unit/Runtime Dynamic': 0.071103, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.273, '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': 6.53416e-06, '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.00666932, '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.0753966, '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.0820725, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.95858, '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': 1.88938e-06, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.20269, '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': 1.01201e-05, '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.149396, '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.24097, '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.121634, '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.512, '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.170865, '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.1572, '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': 1.91191e-06, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00626634, '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.0453144, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0463434, '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.0453163, 'Execution Unit/Register Files/Runtime Dynamic': 0.0526098, '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.0954651, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.251155, '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.42383, '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.0019555, '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.0019555, '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.00175657, '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.000709169, '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.000665727, '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.00633329, '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.0168435, '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.0445511, '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.83383, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.174625, '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.151316, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.18988, 'Instruction Fetch Unit/Runtime Dynamic': 0.393669, '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.0368771, 'L2/Runtime Dynamic': 0.00718455, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.72432, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.717875, '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.0481146, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0481147, '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.95153, 'Load Store Unit/Runtime Dynamic': 1.00328, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.118642, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.237285, '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.0421066, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0424236, '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.176197, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.029329, '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.404638, 'Memory Management Unit/Runtime Dynamic': 0.0717526, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.3296, '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': 5.23898e-06, '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.0067404, '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.0762029, '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.0829485, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.98266, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 0.7808241157476576, 'Runtime Dynamic': 0.7808241157476576, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.0767166, 'Runtime Dynamic': 0.0319482, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 77.1514, 'Peak Power': 110.264, 'Runtime Dynamic': 18.8653, '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': 77.0747, 'Total Cores/Runtime Dynamic': 18.8334, '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.0767166, 'Total L3s/Runtime Dynamic': 0.0319482, '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}}
if __name__ == '__main__': students = [] scores = set() for _ in range(int(input())): name = input() score = float(input()) scores.add(score) students.append([name,score]) students.sort() scores = list(scores) scores.sort() second = scores[1] for student in students: if student[1] == second: print(student[0])
if __name__ == '__main__': students = [] scores = set() for _ in range(int(input())): name = input() score = float(input()) scores.add(score) students.append([name, score]) students.sort() scores = list(scores) scores.sort() second = scores[1] for student in students: if student[1] == second: print(student[0])
#!/usr/bin/python #Configuration file for run_experiments.py istc_uname = 'rhardin' # ISTC Machines ranked by clock skew istc_machines=[ #GOOD "istc1", "istc3", #"istc4", "istc6", "istc8", #OK "istc7", "istc9", "istc10", "istc13", #BAD "istc11", "istc12", "istc2", "istc5", ] vcloud_uname = 'centos' #identity = "/usr0/home/dvanaken/.ssh/id_rsa_vcloud" # vcloud_machines = [ # "146", # "147" # ] vcloud_machines = [ "204", "205", "206", "207", "208", "209", "210", "211", "212", "213", "214", "215", "216", "217", "218", "219", "220", "221", "222", "223", "224", "225", "226", "227", "228", "229", "230", "202", "203", "231", "232", "233", "234", "235", "236", "237", "238", "239", "240", "241", "242", "243", "244", "245", "246", "247", "248", "249", "250", "251", "252", "253", "111", "113", "114", "115", "116", "117", "143", "144", "145", "146", "147", "148" ] local_uname = 'centos' local_machines = [ "146", "147" ]
istc_uname = 'rhardin' istc_machines = ['istc1', 'istc3', 'istc6', 'istc8', 'istc7', 'istc9', 'istc10', 'istc13', 'istc11', 'istc12', 'istc2', 'istc5'] vcloud_uname = 'centos' vcloud_machines = ['204', '205', '206', '207', '208', '209', '210', '211', '212', '213', '214', '215', '216', '217', '218', '219', '220', '221', '222', '223', '224', '225', '226', '227', '228', '229', '230', '202', '203', '231', '232', '233', '234', '235', '236', '237', '238', '239', '240', '241', '242', '243', '244', '245', '246', '247', '248', '249', '250', '251', '252', '253', '111', '113', '114', '115', '116', '117', '143', '144', '145', '146', '147', '148'] local_uname = 'centos' local_machines = ['146', '147']
class Solution: def maxScore(self, cardPoints: List[int], k: int) -> int: max_sum = sum(cardPoints[:k]) cur_sum = max_sum for i in range(k): cur_sum = cur_sum - cardPoints[k-1-i] + cardPoints[-1*i-1] max_sum = max(max_sum, cur_sum) return max_sum
class Solution: def max_score(self, cardPoints: List[int], k: int) -> int: max_sum = sum(cardPoints[:k]) cur_sum = max_sum for i in range(k): cur_sum = cur_sum - cardPoints[k - 1 - i] + cardPoints[-1 * i - 1] max_sum = max(max_sum, cur_sum) return max_sum
NON_MODIFIER_SCOPES = { 'variable': 'variable.other.lsp', 'parameter': 'variable.parameter.lsp', 'function': 'variable.function.lsp', 'method': 'variable.function.lsp', 'property': 'variable.other.member.lsp', 'class': 'support.type.lsp', 'enum': 'variable.enum.lsp', 'enumMember': 'constant.other.enum.lsp', 'type': 'storage.type.lsp', 'macro': 'variable.other.constant.lsp', 'namespace': 'variable.other.namespace.lsp', 'typeParameter': 'variable.parameter.generic.lsp', 'comment': 'comment.block.documentation.lsp', 'dependent': '', 'concept': '', 'module': '', 'magicFunction': '', 'selfParameter': '', } DECLARATION_SCOPES = { 'namespace': 'entity.name.namespace.lsp', 'type': 'entity.name.type.lsp', 'class': 'entity.name.class.lsp', 'enum': 'entity.name.enum.lsp', 'interface': 'entity.name.interface.lsp', 'struct': 'entity.name.struct.lsp', 'function': 'entity.name.function.lsp', 'method': 'entity.name.function.lsp', 'macro': 'entity.name.macro.lsp' } STATIC_SCOPES = NON_MODIFIER_SCOPES.copy() DEPRECATED_SCOPES = NON_MODIFIER_SCOPES.copy() ABSTRACT_SCOPES = NON_MODIFIER_SCOPES.copy() ASYNC_SCOPES = NON_MODIFIER_SCOPES.copy() MODIFICATION_SCOPES = NON_MODIFIER_SCOPES.copy() DEFAULT_LIB_SCOPES = NON_MODIFIER_SCOPES.copy() [NON_MODIFIER_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.lsp'}) for k, v in NON_MODIFIER_SCOPES.items()] [DECLARATION_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.declaration.lsp'}) for k, v in DECLARATION_SCOPES.items()] [STATIC_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.static.lsp'}) for k, v in STATIC_SCOPES.items()] [DEPRECATED_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.deprecated.lsp'}) for k, v in DEPRECATED_SCOPES.items()] [ABSTRACT_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.abstract.lsp'}) for k, v in ABSTRACT_SCOPES.items()] [ASYNC_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.async.lsp'}) for k, v in ASYNC_SCOPES.items()] [MODIFICATION_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.modification.lsp'}) for k, v in MODIFICATION_SCOPES.items()] [DEFAULT_LIB_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.defaultLibrary.lsp'}) for k, v in DEFAULT_LIB_SCOPES.items()] SEMANTIC_SCOPES = { '': NON_MODIFIER_SCOPES, # if no modifiers are provided "declaration": DECLARATION_SCOPES, "definition": DECLARATION_SCOPES, "readonly": {'variable': 'constant.other.lsp, meta.semantic-token.variable.readonly.lsp'}, "static": STATIC_SCOPES, # these are temporary, should be filled with real scopes "deprecated": DEPRECATED_SCOPES, "abstract": ABSTRACT_SCOPES, "async": ASYNC_SCOPES, "modification": MODIFICATION_SCOPES, "documentation": {'comment': 'comment.block.documentation'}, "defaultLibrary": DEFAULT_LIB_SCOPES } def get_semantic_scope_from_modifier(encoded_token: list, semantic_tokens_legends: dict) -> str: token_int = encoded_token[3] modifier_int = encoded_token[4] token_type = semantic_tokens_legends['tokenTypes'][token_int] if not modifier_int: try: return(SEMANTIC_SCOPES[''][token_type]) except KeyError: pass # print('scope not defined for tokenType: ', token_type) modifier_binary = [int(x) for x in reversed(bin(modifier_int)[2:])] modifiers = [semantic_tokens_legends['tokenModifiers'][i] for i in range(len(modifier_binary)) if i] # print('tokenType: ' + token_type + '-- modifiers: ',modifiers) scopes = [] for modifier in modifiers: scope = None try: scope = SEMANTIC_SCOPES[modifier][token_type] except KeyError: pass # print('scope not defined for modifier/tokenType: ', modifier+'/'+token_type) if scope and scope not in scopes: scopes.append(scope) if not scopes: try: return(SEMANTIC_SCOPES[''][token_type]) except KeyError: pass # print('scope not defined for tokenType: ', token_type) else: return ', '.join(scopes) return ''
non_modifier_scopes = {'variable': 'variable.other.lsp', 'parameter': 'variable.parameter.lsp', 'function': 'variable.function.lsp', 'method': 'variable.function.lsp', 'property': 'variable.other.member.lsp', 'class': 'support.type.lsp', 'enum': 'variable.enum.lsp', 'enumMember': 'constant.other.enum.lsp', 'type': 'storage.type.lsp', 'macro': 'variable.other.constant.lsp', 'namespace': 'variable.other.namespace.lsp', 'typeParameter': 'variable.parameter.generic.lsp', 'comment': 'comment.block.documentation.lsp', 'dependent': '', 'concept': '', 'module': '', 'magicFunction': '', 'selfParameter': ''} declaration_scopes = {'namespace': 'entity.name.namespace.lsp', 'type': 'entity.name.type.lsp', 'class': 'entity.name.class.lsp', 'enum': 'entity.name.enum.lsp', 'interface': 'entity.name.interface.lsp', 'struct': 'entity.name.struct.lsp', 'function': 'entity.name.function.lsp', 'method': 'entity.name.function.lsp', 'macro': 'entity.name.macro.lsp'} static_scopes = NON_MODIFIER_SCOPES.copy() deprecated_scopes = NON_MODIFIER_SCOPES.copy() abstract_scopes = NON_MODIFIER_SCOPES.copy() async_scopes = NON_MODIFIER_SCOPES.copy() modification_scopes = NON_MODIFIER_SCOPES.copy() default_lib_scopes = NON_MODIFIER_SCOPES.copy() [NON_MODIFIER_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.lsp'}) for (k, v) in NON_MODIFIER_SCOPES.items()] [DECLARATION_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.declaration.lsp'}) for (k, v) in DECLARATION_SCOPES.items()] [STATIC_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.static.lsp'}) for (k, v) in STATIC_SCOPES.items()] [DEPRECATED_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.deprecated.lsp'}) for (k, v) in DEPRECATED_SCOPES.items()] [ABSTRACT_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.abstract.lsp'}) for (k, v) in ABSTRACT_SCOPES.items()] [ASYNC_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.async.lsp'}) for (k, v) in ASYNC_SCOPES.items()] [MODIFICATION_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.modification.lsp'}) for (k, v) in MODIFICATION_SCOPES.items()] [DEFAULT_LIB_SCOPES.update({k: v + ' meta.semantic-token.' + k + '.defaultLibrary.lsp'}) for (k, v) in DEFAULT_LIB_SCOPES.items()] semantic_scopes = {'': NON_MODIFIER_SCOPES, 'declaration': DECLARATION_SCOPES, 'definition': DECLARATION_SCOPES, 'readonly': {'variable': 'constant.other.lsp, meta.semantic-token.variable.readonly.lsp'}, 'static': STATIC_SCOPES, 'deprecated': DEPRECATED_SCOPES, 'abstract': ABSTRACT_SCOPES, 'async': ASYNC_SCOPES, 'modification': MODIFICATION_SCOPES, 'documentation': {'comment': 'comment.block.documentation'}, 'defaultLibrary': DEFAULT_LIB_SCOPES} def get_semantic_scope_from_modifier(encoded_token: list, semantic_tokens_legends: dict) -> str: token_int = encoded_token[3] modifier_int = encoded_token[4] token_type = semantic_tokens_legends['tokenTypes'][token_int] if not modifier_int: try: return SEMANTIC_SCOPES[''][token_type] except KeyError: pass modifier_binary = [int(x) for x in reversed(bin(modifier_int)[2:])] modifiers = [semantic_tokens_legends['tokenModifiers'][i] for i in range(len(modifier_binary)) if i] scopes = [] for modifier in modifiers: scope = None try: scope = SEMANTIC_SCOPES[modifier][token_type] except KeyError: pass if scope and scope not in scopes: scopes.append(scope) if not scopes: try: return SEMANTIC_SCOPES[''][token_type] except KeyError: pass else: return ', '.join(scopes) return ''
class Crypt: def __init__(self, primesAlgorithm): self.primes = primesAlgorithm def isPrime(self, n): return self.primes.isPrime(n); def previousPrime(self, n): while (n > 1): n -= 1 if self.primes.isPrime(n): return n def nextPrime(self, n): while (True): n += 1 if self.primes.isPrime(n): return n def nthPrimeAfterNumber(self, skip, start): number = start for i in range(skip): number = self.nextPrime(number) return number
class Crypt: def __init__(self, primesAlgorithm): self.primes = primesAlgorithm def is_prime(self, n): return self.primes.isPrime(n) def previous_prime(self, n): while n > 1: n -= 1 if self.primes.isPrime(n): return n def next_prime(self, n): while True: n += 1 if self.primes.isPrime(n): return n def nth_prime_after_number(self, skip, start): number = start for i in range(skip): number = self.nextPrime(number) return number
# Python - 3.6.0 Test.it('Basic tests') Test.assert_equals(odd_ball(['even', 4, 'even', 7, 'even', 55, 'even', 6, 'even', 10, 'odd', 3, 'even']), True) Test.assert_equals(odd_ball(['even', 4, 'even', 7, 'even', 55, 'even', 6, 'even', 9, 'odd', 3, 'even']), False) Test.assert_equals(odd_ball(['even', 10, 'odd', 2, 'even']), True)
Test.it('Basic tests') Test.assert_equals(odd_ball(['even', 4, 'even', 7, 'even', 55, 'even', 6, 'even', 10, 'odd', 3, 'even']), True) Test.assert_equals(odd_ball(['even', 4, 'even', 7, 'even', 55, 'even', 6, 'even', 9, 'odd', 3, 'even']), False) Test.assert_equals(odd_ball(['even', 10, 'odd', 2, 'even']), True)
#crate lists with motorcycle brands to learn how to create, change and append #create a list motorcycles = ['honda','kawasaki','ducati','yamaha','suzuki','norton'] motorcycles_orig = motorcycles print(motorcycles) #change an item motorcycles[5] = 'harley davidson' print(motorcycles) #add an item motorcycles.append('norton') print(motorcycles) #build a list from scratch motorcycles = [] motorcycles.append('bmw') motorcycles.append('husqwarna') motorcycles.append('vespa') print(motorcycles) #insert an item in a list motorcycles.insert(0,'puch') print(motorcycles) #delete item in list based on position del motorcycles[2] print(motorcycles) #delete an item and keep the value for re-use print(motorcycles.pop(1)) print(motorcycles) #delete an item based on value is done with the remove() mothod motorcycles = motorcycles_orig print(motorcycles) motorcycles.remove('ducati') print(motorcycles)
motorcycles = ['honda', 'kawasaki', 'ducati', 'yamaha', 'suzuki', 'norton'] motorcycles_orig = motorcycles print(motorcycles) motorcycles[5] = 'harley davidson' print(motorcycles) motorcycles.append('norton') print(motorcycles) motorcycles = [] motorcycles.append('bmw') motorcycles.append('husqwarna') motorcycles.append('vespa') print(motorcycles) motorcycles.insert(0, 'puch') print(motorcycles) del motorcycles[2] print(motorcycles) print(motorcycles.pop(1)) print(motorcycles) motorcycles = motorcycles_orig print(motorcycles) motorcycles.remove('ducati') print(motorcycles)
def merge_adjacent_text_locations(text_locations): if len(text_locations) == 0: return [] current_low = text_locations[0][0] current_high = text_locations[0][1] output = [] for low, high in text_locations[1:]: if low <= current_high + 1: current_high = high else: output.append((current_low, current_high)) current_low = low current_high = high output.append((current_low, current_high)) return output
def merge_adjacent_text_locations(text_locations): if len(text_locations) == 0: return [] current_low = text_locations[0][0] current_high = text_locations[0][1] output = [] for (low, high) in text_locations[1:]: if low <= current_high + 1: current_high = high else: output.append((current_low, current_high)) current_low = low current_high = high output.append((current_low, current_high)) return output
# Copyright 2012 ThoughtWorks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. class ExecutingServiceConfigurator: def validate(self, service_name, service_definition, abs_path_to_conf, error_list): if not 'execute' in service_definition: error_list.append("Must specify an execute parameter for the command to run") return False return True def config(self, node, service_definition, service_to_dns): node.run_command(service_definition.execute)
class Executingserviceconfigurator: def validate(self, service_name, service_definition, abs_path_to_conf, error_list): if not 'execute' in service_definition: error_list.append('Must specify an execute parameter for the command to run') return False return True def config(self, node, service_definition, service_to_dns): node.run_command(service_definition.execute)
# https://open.kattis.com/problems/boundingrobots def walk_think(x, y, c, v): if c == 'u': return x, y + v if c == 'r': return x + v, y if c == 'd': return x, y - v return x - v, y def walk_actual(w, l, x, y, c, v): x, y = walk_think(x, y, c, v) return min(max(0, x), w - 1), min(max(0, y), l - 1) w, l = map(int, input().split()) while w != 0 and l != 0: n = int(input()) tx, ty, ax, ay = 0, 0, 0, 0 for _ in range(n): c, v = input().split() tx, ty = walk_think(tx, ty, c, int(v)) ax, ay = walk_actual(w, l, ax, ay, c, int(v)) print('Robot thinks %s %s' % (tx, ty)) print('Actually at %s %s' % (ax, ay)) print() w, l = map(int, input().split())
def walk_think(x, y, c, v): if c == 'u': return (x, y + v) if c == 'r': return (x + v, y) if c == 'd': return (x, y - v) return (x - v, y) def walk_actual(w, l, x, y, c, v): (x, y) = walk_think(x, y, c, v) return (min(max(0, x), w - 1), min(max(0, y), l - 1)) (w, l) = map(int, input().split()) while w != 0 and l != 0: n = int(input()) (tx, ty, ax, ay) = (0, 0, 0, 0) for _ in range(n): (c, v) = input().split() (tx, ty) = walk_think(tx, ty, c, int(v)) (ax, ay) = walk_actual(w, l, ax, ay, c, int(v)) print('Robot thinks %s %s' % (tx, ty)) print('Actually at %s %s' % (ax, ay)) print() (w, l) = map(int, input().split())
# test yield class Solution: def fibo(self, N): if N == 1 or N == 2: return 1 first = self.fibo(N-1) second = self.fibo(N-2) yield first + second test = Solution().fibo(3) next(test)
class Solution: def fibo(self, N): if N == 1 or N == 2: return 1 first = self.fibo(N - 1) second = self.fibo(N - 2) yield (first + second) test = solution().fibo(3) next(test)
def solution(A): # write your code in Python 3.6 length = len(A) next_high, next_low = [0] * length, [0] * length stack = [] first = [(number, i) for i, number in enumerate(A)] first.sort(key=lambda x: x[0]) print(first) for (number, i) in first: while stack and stack[-1] < i and A[stack[-1]] < number: next_high[stack.pop()] = i stack.append(i) stack = [] second = [(-number, i) for i, number in enumerate(A)] # second = first[::-1] second.sort(key=lambda x: x[0]) print(second) for number, i in second: while stack and stack[-1] < i and A[stack[-1]] > -number: next_low[stack.pop()] = i stack.append(i) high, low = [0] * length, [0] * length high[-1] = 1 low[-1] = 1 for i in range(length - 1)[::-1]: high[i] = low[next_high[i]] low[i] = high[next_low[i]] print(high, low) return sum() print(solution([10, 13, 12, 14, 15])) print(solution([10, 11, 14, 11, 10]))
def solution(A): length = len(A) (next_high, next_low) = ([0] * length, [0] * length) stack = [] first = [(number, i) for (i, number) in enumerate(A)] first.sort(key=lambda x: x[0]) print(first) for (number, i) in first: while stack and stack[-1] < i and (A[stack[-1]] < number): next_high[stack.pop()] = i stack.append(i) stack = [] second = [(-number, i) for (i, number) in enumerate(A)] second.sort(key=lambda x: x[0]) print(second) for (number, i) in second: while stack and stack[-1] < i and (A[stack[-1]] > -number): next_low[stack.pop()] = i stack.append(i) (high, low) = ([0] * length, [0] * length) high[-1] = 1 low[-1] = 1 for i in range(length - 1)[::-1]: high[i] = low[next_high[i]] low[i] = high[next_low[i]] print(high, low) return sum() print(solution([10, 13, 12, 14, 15])) print(solution([10, 11, 14, 11, 10]))
# Your old mobile phone gets broken and so you want to purchase a new smartphone and decide to go through all the online websites to find out which dealer has the best offer for a particular model. You document the prices of N dealers. Dealer ids start from 0 and go up to N. Find out which dealer has the best price for you. N = int(input('')) array = list(map(int, input().split(' ')[:N])) min = array[0] result = 0 for index in range(1, N): if(min > array[index]): min = array[index] result = index print('Dealer'+str(result))
n = int(input('')) array = list(map(int, input().split(' ')[:N])) min = array[0] result = 0 for index in range(1, N): if min > array[index]: min = array[index] result = index print('Dealer' + str(result))
class Make(object): KEY = 'make' @staticmethod def addParserItems(subparsers): parser = subparsers.add_parser(Make.KEY, help='Process a makefile to carry out accel builds.') parser.add_argument('-j', '--cores', type=int, default=1, help='Number of cores allowed.') @staticmethod def fromArgs(args): return Make(args.cores) def __init__(self, cores): raise NotImplementedError
class Make(object): key = 'make' @staticmethod def add_parser_items(subparsers): parser = subparsers.add_parser(Make.KEY, help='Process a makefile to carry out accel builds.') parser.add_argument('-j', '--cores', type=int, default=1, help='Number of cores allowed.') @staticmethod def from_args(args): return make(args.cores) def __init__(self, cores): raise NotImplementedError
class MockFP16DeepSpeedZeroOptimizer: def __init__(self, optimizer): self.optimizer = optimizer def step(self, closure=None): self.optimizer.step() def _get_param_groups(self): return self.optimizer.param_groups def _set_param_groups(self, value): self.optimizer.param_groups = value param_groups = property(_get_param_groups, _set_param_groups)
class Mockfp16Deepspeedzerooptimizer: def __init__(self, optimizer): self.optimizer = optimizer def step(self, closure=None): self.optimizer.step() def _get_param_groups(self): return self.optimizer.param_groups def _set_param_groups(self, value): self.optimizer.param_groups = value param_groups = property(_get_param_groups, _set_param_groups)
#!/usr/bin/env python3 N = [int(_) for _ in input().split()] x = N[0] y = N[1] if x % y == 0: print(-1) else: for i in range(2, 1000000000): # for i in range(2, 1000): a = x * i # print(a, x, i) if a % y == 0: continue print(a) break
n = [int(_) for _ in input().split()] x = N[0] y = N[1] if x % y == 0: print(-1) else: for i in range(2, 1000000000): a = x * i if a % y == 0: continue print(a) break
DEPS = [ 'recipe_engine/json', 'recipe_engine/python', 'recipe_engine/raw_io', 'recipe_engine/step', 'depot_tools/tryserver', ]
deps = ['recipe_engine/json', 'recipe_engine/python', 'recipe_engine/raw_io', 'recipe_engine/step', 'depot_tools/tryserver']
#!/usr/local/bin/python # -*- coding: utf-8 -*- #################################################################### # Animus AI Developed by Kuldeep Paul Dated 13th March 2018 # #################################################################### #EchoSkill.py def echo(Message): return Message ###################################################################### #System wide voice implementation through the echo skill in Animus AI# #Copyright Kuldeep Paul # ######################################################################
def echo(Message): return Message
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @author : microfat # @time : 01/26/21 20:40:02 # @File : production_design.py def blueprint(cache, material): return "",{}
def blueprint(cache, material): return ('', {})
''' This component inverses pixel colours in a channel''' class Component(): def __init__(self): self._components = [] self.name = "inverse" def components(self): # Components are tuples with the data (id, title, init, min, max, type, is_headsup) self._components.append( (1, "R Inverse", False, 0, 0, 7, True) ) self._components.append( (2, "G Inverse", False, 0, 0, 7, True) ) self._components.append( (3, "B Inverse", False, 0, 0, 7, True) ) #TODO: Add some cool multichannel inversing. def run(self, image_data, component_values, width, height): is_r_inv = component_values[0] is_g_inv = component_values[1] is_b_inv = component_values[2] for index in range(0, len(image_data)): r_val = (255 - image_data[index][0]) if is_r_inv else image_data[index][0] g_val = (255 - image_data[index][1]) if is_g_inv else image_data[index][1] b_val = (255 - image_data[index][2]) if is_b_inv else image_data[index][2] image_data[index] = [r_val, g_val, b_val, 255] return image_data # This must return image_data.
""" This component inverses pixel colours in a channel""" class Component: def __init__(self): self._components = [] self.name = 'inverse' def components(self): self._components.append((1, 'R Inverse', False, 0, 0, 7, True)) self._components.append((2, 'G Inverse', False, 0, 0, 7, True)) self._components.append((3, 'B Inverse', False, 0, 0, 7, True)) def run(self, image_data, component_values, width, height): is_r_inv = component_values[0] is_g_inv = component_values[1] is_b_inv = component_values[2] for index in range(0, len(image_data)): r_val = 255 - image_data[index][0] if is_r_inv else image_data[index][0] g_val = 255 - image_data[index][1] if is_g_inv else image_data[index][1] b_val = 255 - image_data[index][2] if is_b_inv else image_data[index][2] image_data[index] = [r_val, g_val, b_val, 255] return image_data
class aluno: def __init__(self,matricula,nome,notas): self.matricula = matricula self.nome = nome self.notas = notas def imprimir(self): print(f"\nmatricula: {self.matricula}") print(f"nome: {self.nome}") print(f"notas: {self.notas}\n") class turma: def __init__(self): self.turma = {} def insere_aluno(self,matricula,nome,notas): if(self.busca(matricula)): return False else: p = aluno(matricula, nome, notas) self.turma[matricula] = p return True def imprimir_alunos(self): for v in self.turma.values(): v.imprimir() def media(self,notas): #recebe as medias de um aluno inserido no dicionario media = (notas[0]*2 + notas[1]*3 + notas[2] * 5)/(2+3+5) return media def final(self,aluno): #recebe um aluno inserido no dicionario F = 0 M = self.media(aluno.notas) if(M < 7): F = 14-M return F def encerramento_turma(self): self.L_alunos = [] if( self.tem_aluno()): for v in self.turma.values(): aux = [] m = self.media(v.notas) aux.append(v.nome) aux.append(m) self.L_alunos.append(aux) return True return False def listagem_alunos(self): if (self.tem_aluno()): for i in self.L_alunos: print(f"\nnome do aluno: {i[0]}") print(f"media: {i[1]}\n") return True return False def busca(self,mat): if mat in self.turma.keys(): return True else: return False def tem_aluno(self): if len(self.turma) > 0: return True return False
class Aluno: def __init__(self, matricula, nome, notas): self.matricula = matricula self.nome = nome self.notas = notas def imprimir(self): print(f'\nmatricula: {self.matricula}') print(f'nome: {self.nome}') print(f'notas: {self.notas}\n') class Turma: def __init__(self): self.turma = {} def insere_aluno(self, matricula, nome, notas): if self.busca(matricula): return False else: p = aluno(matricula, nome, notas) self.turma[matricula] = p return True def imprimir_alunos(self): for v in self.turma.values(): v.imprimir() def media(self, notas): media = (notas[0] * 2 + notas[1] * 3 + notas[2] * 5) / (2 + 3 + 5) return media def final(self, aluno): f = 0 m = self.media(aluno.notas) if M < 7: f = 14 - M return F def encerramento_turma(self): self.L_alunos = [] if self.tem_aluno(): for v in self.turma.values(): aux = [] m = self.media(v.notas) aux.append(v.nome) aux.append(m) self.L_alunos.append(aux) return True return False def listagem_alunos(self): if self.tem_aluno(): for i in self.L_alunos: print(f'\nnome do aluno: {i[0]}') print(f'media: {i[1]}\n') return True return False def busca(self, mat): if mat in self.turma.keys(): return True else: return False def tem_aluno(self): if len(self.turma) > 0: return True return False
def qs(arr): if len(arr) <= 1: return arr smaller = [] larger = [] pivot = 0 pivot_element = arr[pivot] for i in range(1, len(arr)): if arr[i] > pivot_element: larger.append(arr[i]) else: smaller.append(arr[i]) sorted_smaller = qs(smaller) sorted_larger = qs(larger) return sorted_smaller + [pivot_element] + sorted_larger
def qs(arr): if len(arr) <= 1: return arr smaller = [] larger = [] pivot = 0 pivot_element = arr[pivot] for i in range(1, len(arr)): if arr[i] > pivot_element: larger.append(arr[i]) else: smaller.append(arr[i]) sorted_smaller = qs(smaller) sorted_larger = qs(larger) return sorted_smaller + [pivot_element] + sorted_larger
def rename(names, input_div, output_div): return [name.replace(inputdiv,output_div) for name in names] def c_rename(names): newnames = [] for name in names: name = name.split("_") newname = [name[0]] newname.extend(name[1].split("-")) newnames.append("_".join(newname)) return newnames
def rename(names, input_div, output_div): return [name.replace(inputdiv, output_div) for name in names] def c_rename(names): newnames = [] for name in names: name = name.split('_') newname = [name[0]] newname.extend(name[1].split('-')) newnames.append('_'.join(newname)) return newnames
with open('input.txt') as f: chunks = list(map(lambda line: line.strip(), f.readlines())) mapper = { '(': ')', '[': ']', '{': '}', '<': '>' } error_score = { ')': 3, ']': 57, '}': 1197, '>': 25137 } def validate(line): stack = [] for ch in line: if ch in ['(', '[', '{', '<']: stack.append(ch) elif ch in [')', ']', '}', '>']: expect = mapper[stack.pop()] if ch != expect: return ch return stack res = 0 for line in chunks: result = validate(line) if isinstance(result, list): continue else: res += error_score[result] print(res)
with open('input.txt') as f: chunks = list(map(lambda line: line.strip(), f.readlines())) mapper = {'(': ')', '[': ']', '{': '}', '<': '>'} error_score = {')': 3, ']': 57, '}': 1197, '>': 25137} def validate(line): stack = [] for ch in line: if ch in ['(', '[', '{', '<']: stack.append(ch) elif ch in [')', ']', '}', '>']: expect = mapper[stack.pop()] if ch != expect: return ch return stack res = 0 for line in chunks: result = validate(line) if isinstance(result, list): continue else: res += error_score[result] print(res)
def Dict(a): b={} for x in a: b[x]=len(x) return b a=[] for x in range(int(input("Enter Limit:"))): a.append(input("Enter String:")) print (Dict(a))
def dict(a): b = {} for x in a: b[x] = len(x) return b a = [] for x in range(int(input('Enter Limit:'))): a.append(input('Enter String:')) print(dict(a))
PLUS, MINUS, NUM, EOF = "plus", "minus", "num", "eof" class Token: def __init__(self, token_type, value): self.token_type = token_type self.value = value def __str__(self): return "(type:{},value:{})".format(self.token_type, self.value) class Interpreter: def __init__(self, text): self.text = text self.pos = -1 self.curr_token = None self.curr_char = None def error(self, s): raise RuntimeError(s) def next_char(self): self.pos += 1 if self.pos >= len(self.text): self.curr_char = None return self.curr_char = self.text[self.pos] def back_char(self): self.pos -= 1 self.curr_char = self.text[self.pos] def next_token(self): if self.pos >= len(self.text): self.curr_token = Token(EOF, None) return self.next_char() if self.curr_char == "+": self.curr_token = Token(PLUS, None) return if self.curr_char == "-": self.curr_token = Token(MINUS, None) return val = "" while True: if not self.curr_char: break if self.curr_char.isdigit(): val += self.curr_char self.next_char() else: self.back_char() break if val: num = int(val) self.curr_token = Token(NUM, num) return self.error("No Token Left") def eat(self, token_type): if self.curr_token.token_type == token_type: self.next_token() else: self.error("syntax error") def expr(self): self.next_token() left = self.curr_token self.eat(NUM) sign = self.curr_token calc = None if sign.token_type == PLUS: self.eat(PLUS) calc = lambda x, y : x + y elif sign.token_type == MINUS: self.eat(MINUS) calc = lambda x, y : x - y else: self.error("sysntax error") right = self.curr_token self.eat(NUM) return calc(left.value, right.value) def main(): while True: try: text = input("expr> ") except Exception: print("EOF Error") if (text == "q"): print("bye bye") break i = Interpreter(text) print(i.expr()) if __name__ == "__main__": main()
(plus, minus, num, eof) = ('plus', 'minus', 'num', 'eof') class Token: def __init__(self, token_type, value): self.token_type = token_type self.value = value def __str__(self): return '(type:{},value:{})'.format(self.token_type, self.value) class Interpreter: def __init__(self, text): self.text = text self.pos = -1 self.curr_token = None self.curr_char = None def error(self, s): raise runtime_error(s) def next_char(self): self.pos += 1 if self.pos >= len(self.text): self.curr_char = None return self.curr_char = self.text[self.pos] def back_char(self): self.pos -= 1 self.curr_char = self.text[self.pos] def next_token(self): if self.pos >= len(self.text): self.curr_token = token(EOF, None) return self.next_char() if self.curr_char == '+': self.curr_token = token(PLUS, None) return if self.curr_char == '-': self.curr_token = token(MINUS, None) return val = '' while True: if not self.curr_char: break if self.curr_char.isdigit(): val += self.curr_char self.next_char() else: self.back_char() break if val: num = int(val) self.curr_token = token(NUM, num) return self.error('No Token Left') def eat(self, token_type): if self.curr_token.token_type == token_type: self.next_token() else: self.error('syntax error') def expr(self): self.next_token() left = self.curr_token self.eat(NUM) sign = self.curr_token calc = None if sign.token_type == PLUS: self.eat(PLUS) calc = lambda x, y: x + y elif sign.token_type == MINUS: self.eat(MINUS) calc = lambda x, y: x - y else: self.error('sysntax error') right = self.curr_token self.eat(NUM) return calc(left.value, right.value) def main(): while True: try: text = input('expr> ') except Exception: print('EOF Error') if text == 'q': print('bye bye') break i = interpreter(text) print(i.expr()) if __name__ == '__main__': main()
class SPARQL: def __init__(self, raw_query, parser): self.raw_query = raw_query self.query, self.supported, self.uris = parser(raw_query) self.where_clause, self.where_clause_template = self.__extrat_where() def __extrat_where(self): WHERE = "WHERE" sparql_query = self.query.strip(" {};\t") idx = sparql_query.find(WHERE) where_clause_raw = sparql_query[idx + len(WHERE):].strip(" {}") where_clause_raw = [item.replace(".", "").strip(" .") for item in where_clause_raw.split(" ")] where_clause_raw = [item for item in where_clause_raw if item != ""] buffer = [] where_clause = [] for item in where_clause_raw: buffer.append(item) if len(buffer) == 3: where_clause.append(buffer) buffer = [] if len(buffer) > 0: where_clause.append(buffer) where_clause_template = " ".join([" ".join(item) for item in where_clause]) for uri in set(self.uris): where_clause_template = where_clause_template.replace(uri.uri, uri.uri_type) return where_clause, where_clause_template def query_features(self): features = {"boolean": ["ask "], "count": ["count("], "filter": ["filter("], "comparison": ["<= ", ">= ", " < ", " > "], "sort": ["order by"], "aggregate": ["max(", "min("] } output = set() if self.where_clause_template.count(" ") > 3: output.add("compound") else: output.add("single") generic_uris = set() for uri in self.uris: if uri.is_generic(): generic_uris.add(uri) if len(generic_uris) > 1: output.add("multivar") break if len(generic_uris) <= 1: output.add("singlevar") raw_query = self.raw_query.lower() for feature in features: for constraint in features[feature]: if constraint in raw_query: output.add(feature) return output def __eq__(self, other): if isinstance(other, SPARQL): mapping = {} for line in self.where_clause: found = False for other_line in other.where_clause: match = 0 mapping_buffer = mapping.copy() for i in range(len(line)): if line[i] == other_line[i]: match += 1 elif line[i].startswith("?") and other_line[i].startswith("?"): if line[i] not in mapping_buffer: mapping_buffer[line[i]] = other_line[i] match += 1 else: match += mapping_buffer[line[i]] == other_line[i] if match == len(line): found = True mapping = mapping_buffer break if not found: return False return True def __ne__(self, other): return not self == other def __str__(self): return self.query.encode("ascii", "ignore") # return self.query
class Sparql: def __init__(self, raw_query, parser): self.raw_query = raw_query (self.query, self.supported, self.uris) = parser(raw_query) (self.where_clause, self.where_clause_template) = self.__extrat_where() def __extrat_where(self): where = 'WHERE' sparql_query = self.query.strip(' {};\t') idx = sparql_query.find(WHERE) where_clause_raw = sparql_query[idx + len(WHERE):].strip(' {}') where_clause_raw = [item.replace('.', '').strip(' .') for item in where_clause_raw.split(' ')] where_clause_raw = [item for item in where_clause_raw if item != ''] buffer = [] where_clause = [] for item in where_clause_raw: buffer.append(item) if len(buffer) == 3: where_clause.append(buffer) buffer = [] if len(buffer) > 0: where_clause.append(buffer) where_clause_template = ' '.join([' '.join(item) for item in where_clause]) for uri in set(self.uris): where_clause_template = where_clause_template.replace(uri.uri, uri.uri_type) return (where_clause, where_clause_template) def query_features(self): features = {'boolean': ['ask '], 'count': ['count('], 'filter': ['filter('], 'comparison': ['<= ', '>= ', ' < ', ' > '], 'sort': ['order by'], 'aggregate': ['max(', 'min(']} output = set() if self.where_clause_template.count(' ') > 3: output.add('compound') else: output.add('single') generic_uris = set() for uri in self.uris: if uri.is_generic(): generic_uris.add(uri) if len(generic_uris) > 1: output.add('multivar') break if len(generic_uris) <= 1: output.add('singlevar') raw_query = self.raw_query.lower() for feature in features: for constraint in features[feature]: if constraint in raw_query: output.add(feature) return output def __eq__(self, other): if isinstance(other, SPARQL): mapping = {} for line in self.where_clause: found = False for other_line in other.where_clause: match = 0 mapping_buffer = mapping.copy() for i in range(len(line)): if line[i] == other_line[i]: match += 1 elif line[i].startswith('?') and other_line[i].startswith('?'): if line[i] not in mapping_buffer: mapping_buffer[line[i]] = other_line[i] match += 1 else: match += mapping_buffer[line[i]] == other_line[i] if match == len(line): found = True mapping = mapping_buffer break if not found: return False return True def __ne__(self, other): return not self == other def __str__(self): return self.query.encode('ascii', 'ignore')
grades_list = [87, 80, 90] #list grades_tuple = (89, 93, 95) #immutable grades_set = {70, 71, 74} #unique & unordered ## Set Operation my_numbers = {1,2,3,4,5} winning_numbers = {1,3,5,7,9,11} #print( my_numbers.intersection(winning_numbers)) #print(my_numbers.union(winning_numbers)) print(my_numbers.difference(winning_numbers))
grades_list = [87, 80, 90] grades_tuple = (89, 93, 95) grades_set = {70, 71, 74} my_numbers = {1, 2, 3, 4, 5} winning_numbers = {1, 3, 5, 7, 9, 11} print(my_numbers.difference(winning_numbers))
fin = open("input_10_test.txt") numbers = [int(line) for line in fin] numbers.append(0) numbers.append(max(numbers)+3) fin.close() numbers.sort() count1 = 0 count3 = 0 for i,number in enumerate(numbers[:-1]): diff = numbers[i+1]-number if diff == 3: count3 += 1 elif diff == 1: count1 += 1 print(count1, count3, count1*count3)
fin = open('input_10_test.txt') numbers = [int(line) for line in fin] numbers.append(0) numbers.append(max(numbers) + 3) fin.close() numbers.sort() count1 = 0 count3 = 0 for (i, number) in enumerate(numbers[:-1]): diff = numbers[i + 1] - number if diff == 3: count3 += 1 elif diff == 1: count1 += 1 print(count1, count3, count1 * count3)
A = list(map(int, input().split())) B = list(map(int, input().split())) C = list(map(int, input().split())) t = (A[3]*3600+A[4]*60+A[5])-(A[0]*3600+A[1]*60+A[2]) h, t = divmod(t, 3600) m, s = divmod(t, 60) print(h, m, s) t = (B[3]*3600+B[4]*60+B[5])-(B[0]*3600+B[1]*60+B[2]) h, t = divmod(t, 3600) m, s = divmod(t, 60) print(h, m, s) t = (C[3]*3600+C[4]*60+C[5])-(C[0]*3600+C[1]*60+C[2]) h, t = divmod(t, 3600) m, s = divmod(t, 60) print(h, m, s)
a = list(map(int, input().split())) b = list(map(int, input().split())) c = list(map(int, input().split())) t = A[3] * 3600 + A[4] * 60 + A[5] - (A[0] * 3600 + A[1] * 60 + A[2]) (h, t) = divmod(t, 3600) (m, s) = divmod(t, 60) print(h, m, s) t = B[3] * 3600 + B[4] * 60 + B[5] - (B[0] * 3600 + B[1] * 60 + B[2]) (h, t) = divmod(t, 3600) (m, s) = divmod(t, 60) print(h, m, s) t = C[3] * 3600 + C[4] * 60 + C[5] - (C[0] * 3600 + C[1] * 60 + C[2]) (h, t) = divmod(t, 3600) (m, s) = divmod(t, 60) print(h, m, s)
WIDTH = 800 HEIGHT = 600 TITLE = "O.K. Team" SPEED = 50 ANIMATION_SPEED = 5 BACKGROUND = (253, 246, 227) WALK_IMAGES = ("walk0", "walk1", "walk1") HAPPY_IMAGES = ("happy0", "happy1") FLOWER_IMAGES = ("flower0", "flower1", "flower2")
width = 800 height = 600 title = 'O.K. Team' speed = 50 animation_speed = 5 background = (253, 246, 227) walk_images = ('walk0', 'walk1', 'walk1') happy_images = ('happy0', 'happy1') flower_images = ('flower0', 'flower1', 'flower2')
''' Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum. ''' n = 100 sqos = pow(sum([x for x in range(1, n+1)]), 2) sosq = sum([x*x for x in range(1, n+1)]) print(sqos-sosq)
""" Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum. """ n = 100 sqos = pow(sum([x for x in range(1, n + 1)]), 2) sosq = sum([x * x for x in range(1, n + 1)]) print(sqos - sosq)
GENOMES_DIR = '/home/cmb-panasas2/skchoudh/genomes' OUT_DIR = '/staging/as/skchoudh/rna/September_2017_Shalgi_et_al_Cell_2013' SRC_DIR = '/home/cmb-panasas2/skchoudh/github_projects/clip_seq_pipeline/scripts' RAWDATA_DIR = '/home/cmb-06/as/skchoudh/dna/September_2017_Shalgi_et_al_Cell_2013/sra_single_end_mouse' GENOME_BUILD = 'mm10' GENOME_FASTA = GENOMES_DIR + '/' + GENOME_BUILD + '/fasta/'+ GENOME_BUILD+ '.fa' STAR_INDEX = GENOMES_DIR + '/' + GENOME_BUILD + '/star_annotated' GTF = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'gencode.vM11.annotation.without_rRNA_tRNA.gtf' GENE_NAMES = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + GENOME_BUILD+'_gene_names_stripped.tsv' GTF_UTR = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'gencode.vM11.gffutils.modifiedUTRs.gtf' GENE_LENGTHS = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'gencode.vM11.coding_lengths.tsv' #+ GENOME_BUILD+'_gene_lengths.tsv' HTSEQ_STRANDED = 'yes' FEATURECOUNTS_S = '-s 1' GENE_BED = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'mm10.vM11.genes.fromUCSC.bed' #+ GENOME_BUILD+'_gene_lengths.tsv' START_CODON_BED = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'gencode.vM11.gffutils.start_codon.bed' #+ GENOME_BUILD+'_gene_lengths.tsv' STOP_CODON_BED = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'gencode.vM11.gffutils.stop_codon.bed' #+ GENOME_BUILD+'_gene_lengths.tsv' FEATURECOUNTS_T='CDS' HTSEQ_MODE='intersection-strict'
genomes_dir = '/home/cmb-panasas2/skchoudh/genomes' out_dir = '/staging/as/skchoudh/rna/September_2017_Shalgi_et_al_Cell_2013' src_dir = '/home/cmb-panasas2/skchoudh/github_projects/clip_seq_pipeline/scripts' rawdata_dir = '/home/cmb-06/as/skchoudh/dna/September_2017_Shalgi_et_al_Cell_2013/sra_single_end_mouse' genome_build = 'mm10' genome_fasta = GENOMES_DIR + '/' + GENOME_BUILD + '/fasta/' + GENOME_BUILD + '.fa' star_index = GENOMES_DIR + '/' + GENOME_BUILD + '/star_annotated' gtf = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'gencode.vM11.annotation.without_rRNA_tRNA.gtf' gene_names = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + GENOME_BUILD + '_gene_names_stripped.tsv' gtf_utr = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'gencode.vM11.gffutils.modifiedUTRs.gtf' gene_lengths = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'gencode.vM11.coding_lengths.tsv' htseq_stranded = 'yes' featurecounts_s = '-s 1' gene_bed = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'mm10.vM11.genes.fromUCSC.bed' start_codon_bed = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'gencode.vM11.gffutils.start_codon.bed' stop_codon_bed = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'gencode.vM11.gffutils.stop_codon.bed' featurecounts_t = 'CDS' htseq_mode = 'intersection-strict'
class JobInterruptedException(Exception): def __init__(self, *args,**kwargs): Exception.__init__(self,*args,**kwargs) class RequestFailedException(Exception): def __init__(self, error_msg, *args,**kwargs): Exception.__init__(self,*args,**kwargs) self.error_msg = error_msg
class Jobinterruptedexception(Exception): def __init__(self, *args, **kwargs): Exception.__init__(self, *args, **kwargs) class Requestfailedexception(Exception): def __init__(self, error_msg, *args, **kwargs): Exception.__init__(self, *args, **kwargs) self.error_msg = error_msg
def count_symbol_occurrences(text): occurrences = {} for symbol in text: if symbol not in occurrences: occurrences[symbol] = 0 occurrences[symbol] += 1 return occurrences def print_result(occurrences): for symbol, count in sorted(occurrences.items()): print(f"{symbol}: {count} time/s") symbol_occurrences = count_symbol_occurrences(input()) print_result(symbol_occurrences)
def count_symbol_occurrences(text): occurrences = {} for symbol in text: if symbol not in occurrences: occurrences[symbol] = 0 occurrences[symbol] += 1 return occurrences def print_result(occurrences): for (symbol, count) in sorted(occurrences.items()): print(f'{symbol}: {count} time/s') symbol_occurrences = count_symbol_occurrences(input()) print_result(symbol_occurrences)
sum=0 num=int(input("enter ")) while 1: sum+=num num-=1 print(sum) if(num==0): break print(sum)
sum = 0 num = int(input('enter ')) while 1: sum += num num -= 1 print(sum) if num == 0: break print(sum)
# -*- coding: utf-8 -*- # invoice2py: an invoice web interface app for web2py # # Project page: http://code.google.com/p/ivoice2py # # Copyright (C) 2013 Alan Etkin <spametki@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see http://www.gnu.org/licenses/ # # Developed with web2py, by Massimo Di Pierro ######################################################################### ## Customize your APP title, subtitle and menus here ######################################################################### response.logo = A(B('web',SPAN(2),'py'),XML('&trade;&nbsp;'), _class="brand",_href="http://www.web2py.com/") response.title = request.application.replace('_',' ').title() response.subtitle = T('A simple online invoice interface') ## read more at http://dev.w3.org/html5/markup/meta.name.html response.meta.author = 'Alan Etkin <spametki@gmail.com>' response.meta.description = 'a cool new app' response.meta.keywords = 'web2py, python, framework, invoice' response.meta.generator = 'Web2py Web Framework' ## your http://google.com/analytics id response.google_analytics_id = None ######################################################################### ## this is the main application menu add/remove items as required ######################################################################### response.menu = [ (T('My invoices'), False, URL('default', 'index'), []) ] DEVELOPMENT_MENU = False INVOICE_ID = session.invoice_id if request.args(0) == "invoice": INVOICE_ID = request.args(1) # Invoice menu. It gives acces to: # - header CRUD (shows the current invoice id) # - details (items CRUD) # - close (set as complete)/cancel/clear invoice actions response.menu += [(T("Invoice No. %(number)s") % \ dict(number=INVOICE_ID or "(%s)" % T("Create")), True, URL(c="default", f="invoice")), (T("Invoice details"), True, URL(c="default", f="details"))] if INVOICE_ID: response.menu += [(T("Clear"), True, URL(c="default", f="status", args=["invoice", "none", "status", "clear"])),] if "auth" in locals(): auth.wikimenu()
response.logo = a(b('web', span(2), 'py'), xml('&trade;&nbsp;'), _class='brand', _href='http://www.web2py.com/') response.title = request.application.replace('_', ' ').title() response.subtitle = t('A simple online invoice interface') response.meta.author = 'Alan Etkin <spametki@gmail.com>' response.meta.description = 'a cool new app' response.meta.keywords = 'web2py, python, framework, invoice' response.meta.generator = 'Web2py Web Framework' response.google_analytics_id = None response.menu = [(t('My invoices'), False, url('default', 'index'), [])] development_menu = False invoice_id = session.invoice_id if request.args(0) == 'invoice': invoice_id = request.args(1) response.menu += [(t('Invoice No. %(number)s') % dict(number=INVOICE_ID or '(%s)' % t('Create')), True, url(c='default', f='invoice')), (t('Invoice details'), True, url(c='default', f='details'))] if INVOICE_ID: response.menu += [(t('Clear'), True, url(c='default', f='status', args=['invoice', 'none', 'status', 'clear']))] if 'auth' in locals(): auth.wikimenu()
def get_res(regular_alu,regular_nalurp,regular_nrp,hyper,output): falu=open(regular_alu) fnalurp=open(regular_nalurp) fnrp=open(regular_nrp) fhyper=open(hyper) fo_AI=open(output+'_A_to_I_regular.res','w') fo_hAI=open(output+'_A_to_I_hyper.res','w') fo_CU=open(output+'_C_to_U.res','w') for line in falu: seq=line.rstrip().split('\t') if seq[3]=='AG' or seq[3]=='TC': fo_AI.write(line) for line in fnalurp: seq=line.rstrip().split('\t') if seq[3]=='AG' or seq[3]=='TC': fo_AI.write(line) if seq[3]=='CT' or seq[3]=='GA': fo_CU.write(line) for line in fnrp: seq=line.rstrip().split('\t') if seq[3]=='AG' or seq[3]=='TC': fo_AI.write(line) if seq[3]=='CT' or seq[3]=='GA': fo_CU.write(line) for line in fhyper: seq=line.rstrip().split('\t') if seq[3]=='AG' or seq[3]=='TC': fo_hAI.write(line)
def get_res(regular_alu, regular_nalurp, regular_nrp, hyper, output): falu = open(regular_alu) fnalurp = open(regular_nalurp) fnrp = open(regular_nrp) fhyper = open(hyper) fo_ai = open(output + '_A_to_I_regular.res', 'w') fo_h_ai = open(output + '_A_to_I_hyper.res', 'w') fo_cu = open(output + '_C_to_U.res', 'w') for line in falu: seq = line.rstrip().split('\t') if seq[3] == 'AG' or seq[3] == 'TC': fo_AI.write(line) for line in fnalurp: seq = line.rstrip().split('\t') if seq[3] == 'AG' or seq[3] == 'TC': fo_AI.write(line) if seq[3] == 'CT' or seq[3] == 'GA': fo_CU.write(line) for line in fnrp: seq = line.rstrip().split('\t') if seq[3] == 'AG' or seq[3] == 'TC': fo_AI.write(line) if seq[3] == 'CT' or seq[3] == 'GA': fo_CU.write(line) for line in fhyper: seq = line.rstrip().split('\t') if seq[3] == 'AG' or seq[3] == 'TC': fo_hAI.write(line)
n=6 x=1 for i in range(1,n+1): for j in range(1,i+1): ch=chr(ord('A')+j-1) print(ch,end="") x=x+1 print()
n = 6 x = 1 for i in range(1, n + 1): for j in range(1, i + 1): ch = chr(ord('A') + j - 1) print(ch, end='') x = x + 1 print()