content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
t = int(input())
for i in range(t):
count = 0
n = int(input())
l = list(map(int, input().split()))
for j in range(1,len(l)-1):
if l[j-1]<l[j] and l[j+1]<l[j]:
count += 1
print(f'Case #{i+1}: {count}') | t = int(input())
for i in range(t):
count = 0
n = int(input())
l = list(map(int, input().split()))
for j in range(1, len(l) - 1):
if l[j - 1] < l[j] and l[j + 1] < l[j]:
count += 1
print(f'Case #{i + 1}: {count}') |
def linear_search(arr, x):
for i in range(len(arr)):
if arr[i] == x:
return i
return -1
def binary_search(arr, low, high, x):
if high >= 1:
mid = (high + low) // 2
if arr[mid] == x:
return mid
elif arr[mid] > x:
return binary_search(arr, low, mid - 1, x)
else:
return binary_search(arr, mid + 1, high, x)
else:
return -1
def insertion_sort(arr):
for i in range(1, len(arr)):
key = arr[i]
j = i - 1
while j >= 0 and key < arr[j]:
arr[j + 1] = arr[j]
j -= 1
arr[j + 1] = key
print(arr)
def bubble_sort(arr):
n = len(arr)
for i in range(n - 1):
for j in range(0, n - i - 1):
if arr[j] > arr[j + 1]:
arr[j], arr[j + 1] = arr[j + 1], arr[j]
print(arr)
arr = [11, 13, 12, 5, 6]
print(arr)
print('''
--------------------
| SEARCH OPTIONS |
--------------------
| 1. Linear Search |
| 2. Binary Search |
--------------------
''')
ans = 'y'
while ans == 'y' or ans == 'Y':
ch = int(input("Enter your choice(1/2): "))
if ch == 1:
x = int(input("Enter your search element: "))
pos = linear_search(arr, x)
if pos == -1:
print("The search element not found!")
else:
print("The element was found at the position: ", pos + 1)
elif ch == 2:
x = int(input("Enter your search element: "))
print("Sort the elements:-")
print("1. Insertion sort")
print("2. Bubble sort")
ans = 'y'
while ans == 'y' or ans == 'Y':
ch = int(input("Enter your choice(1/2): "))
if ch == 1:
insertion_sort(arr)
elif ch == 2:
bubble_sort(arr)
else:
print("Wrong choice!!!")
break
pos = binary_search(arr, 0, len(arr) - 1, x)
if pos != -1:
print("Element is present at position:", pos + 1, "of sorted array")
else:
print("Element is not present in array !")
else:
print("Wrong choice!!!")
ans = str(input("Do you want to continue?(y/n): "))
################################################################################
| def linear_search(arr, x):
for i in range(len(arr)):
if arr[i] == x:
return i
return -1
def binary_search(arr, low, high, x):
if high >= 1:
mid = (high + low) // 2
if arr[mid] == x:
return mid
elif arr[mid] > x:
return binary_search(arr, low, mid - 1, x)
else:
return binary_search(arr, mid + 1, high, x)
else:
return -1
def insertion_sort(arr):
for i in range(1, len(arr)):
key = arr[i]
j = i - 1
while j >= 0 and key < arr[j]:
arr[j + 1] = arr[j]
j -= 1
arr[j + 1] = key
print(arr)
def bubble_sort(arr):
n = len(arr)
for i in range(n - 1):
for j in range(0, n - i - 1):
if arr[j] > arr[j + 1]:
(arr[j], arr[j + 1]) = (arr[j + 1], arr[j])
print(arr)
arr = [11, 13, 12, 5, 6]
print(arr)
print('\n --------------------\n | SEARCH OPTIONS |\n --------------------\n | 1. Linear Search |\n | 2. Binary Search |\n --------------------\n ')
ans = 'y'
while ans == 'y' or ans == 'Y':
ch = int(input('Enter your choice(1/2): '))
if ch == 1:
x = int(input('Enter your search element: '))
pos = linear_search(arr, x)
if pos == -1:
print('The search element not found!')
else:
print('The element was found at the position: ', pos + 1)
elif ch == 2:
x = int(input('Enter your search element: '))
print('Sort the elements:-')
print('1. Insertion sort')
print('2. Bubble sort')
ans = 'y'
while ans == 'y' or ans == 'Y':
ch = int(input('Enter your choice(1/2): '))
if ch == 1:
insertion_sort(arr)
elif ch == 2:
bubble_sort(arr)
else:
print('Wrong choice!!!')
break
pos = binary_search(arr, 0, len(arr) - 1, x)
if pos != -1:
print('Element is present at position:', pos + 1, 'of sorted array')
else:
print('Element is not present in array !')
else:
print('Wrong choice!!!')
ans = str(input('Do you want to continue?(y/n): ')) |
# Used for import directories into other modules. Good for setting
# project wide parameters, such as the location of the database.
class settings():
db = "C:\\Users\\Andrew\\lab_project\\database\\frontiers_corpus.db"
d2v = "C:\\Users\\Andrew\\lab_project\\models\\doc2vecmodels\\"
d2v500 = "C:\\Users\\Andrew\\lab_project\\models\\doc2vecmodels\\500model"
d2v300 = "C:\\Users\\Andrew\\lab_project\\models\\doc2vecmodels\\300model"
d2v100 = "C:\\Users\\Andrew\\lab_project\\models\\doc2vecmodels\\100model"
bowmodel = "C:\\Users\\Andrew\\lab_project\\models\\bagofwordsmodels"
xml = "C:\\Users\\Andrew\\Desktop\\frontiers_data\\article_xml" | class Settings:
db = 'C:\\Users\\Andrew\\lab_project\\database\\frontiers_corpus.db'
d2v = 'C:\\Users\\Andrew\\lab_project\\models\\doc2vecmodels\\'
d2v500 = 'C:\\Users\\Andrew\\lab_project\\models\\doc2vecmodels\\500model'
d2v300 = 'C:\\Users\\Andrew\\lab_project\\models\\doc2vecmodels\\300model'
d2v100 = 'C:\\Users\\Andrew\\lab_project\\models\\doc2vecmodels\\100model'
bowmodel = 'C:\\Users\\Andrew\\lab_project\\models\\bagofwordsmodels'
xml = 'C:\\Users\\Andrew\\Desktop\\frontiers_data\\article_xml' |
class OverrideRootError(Exception):
def __init__(self):
super().__init__(self, "Cannot override Tree root node")
class TreeHeightError(Exception):
def __init__(self):
super().__init__(self, "Cannot add node lower than tree height")
| class Overriderooterror(Exception):
def __init__(self):
super().__init__(self, 'Cannot override Tree root node')
class Treeheighterror(Exception):
def __init__(self):
super().__init__(self, 'Cannot add node lower than tree height') |
CROCKFORD_MODIFIED = (
b"ahm6a81a59rqaub3dcn2m832e9qqevh0ctqqg83aenpq0wt0dxv6awh0ehm6a818dhgqmy994"
b"1j6ytt1"
)
CROCKFORD = (
b"AHM6A81A59RQATB3DCN2M832E9QQEVH0CSQQG83AENPQ0WS0DXV6AWH0EHM6A818DHGQMY994"
b"1J6YSS1"
)
ZBASE32 = (
b"ktwgkebkfjazk4mdpcinwednqjzzq5tyc3zzoedkqiszyh3yp75gkhtyqtwgkebeptozw6jjr"
b"b1g633b"
)
RFC_3548 = (
b"KRUGKIBKFJYXK2LDNMVCUIDCOJXXO3RAMZXXQIDKOVWXA4ZAN53GK4RAORUGKIBINRQXU6JJE"
b"BSG6ZZB"
)
RFC_2938 = (
b"AHK6A81A59ONAQB3DCL2K832E9NNERH0CPNNG83AELMN0SP0DTR6ASH0EHK6A818DHGNKV994"
b"1I6VPP1"
)
RFC_4648 = (
b"KRUGKIBKFJYXK2LDNMVCUIDCOJXXO3RAMZXXQIDKOVWXA4ZAN53GK4RAORUGKIBINRQXU6JJE"
b"BSG6ZZB"
)
NIGHTMARE = (
b"6vNI6LD61lZm62b08BnONL0OUlmmUSvdBzmmVL06UnMmd5zd8sSI65vdUvNI6LDL8vVmN7llo"
b"DWI7zzD"
)
ARBITRARY = (
b"`^(6`81`59=_`[~3@!)2(832#9__#]^0!+__%83`#)-_0{+0@}]6`{^0#^(6`818@^%_(\994"
b"1&6\++1"
)
ICON_ZBASE32 = (
b"tferhtapbepywyyyyygw11nrkeyyyyyoyyyyyryeyayyyyy96x9snyyyyyrzy1n3qcyyynauy"
b"yyysrabynpjagyyyyfr64kdepefy4dxqtzzg4dxqyor1o4drba8r55gpfsgkyyyxdpj4w58kt"
b"j61ft769xxeo1mtnyje15xkekooen1ekfayfrtrainnneojkrndeq3niehnrkfewnbz1fytyb"
b"a7dwytokinmyctefpob9rrgte7y7dtnfci69bxqtsziih69uc59ii4h9qxm8uus3h6b6ybygj"
b"c1bukr4aydfjeexbdarda9ncpaxrf3yenntrqyybynfucooz89jdyryxo9th8oi1foy8zayyn"
b"6gubcrybonpuxydy8r89h86wow3moyabbybab4jnqnmbnybeynyxk8rfjoyebdydyr7uyufgy"
b"fyyoygb15dcmtoywbpybonq99g4cyeb8xauf7onyn51ootkypy1rynyr5ftbnyy4b5ynsc6iw"
b"kewyfocyynturztb3ydcn4ybojfmsc1yysn5obogqnyf5ryyeboydywceowwoybd5ybocoe3d"
b"xyyejgeyntdxri3h6ri4hr88feyyy6r3se6m1jb3esyisnbpqrdiqi3qdawch1ezfckdcaenc"
b"gprymsnxgct1cwbgo86bh6cyyykbrein8oe8h97xd8y7msq3a5e7poqmhs6ixag9htgrazd95"
b"1h9k5oeyyybamwx5e9hmbxscpeyqagobs97etf7angozomwb49xn5gse8wbpeywdw7wi9uqdh"
b"8hxbheso3bqq35816j3gajmnrrs5b3jmz59u8ajxhyi97puhzhx8h6946bxznr1yurzcbehnx"
b"tagn3u4r3jeh36jyubdn5uue6t9hshf999y74ctce1mnzfcnwf8dkrj8dd1rukgxgcifrkrwf"
b"rtjaw17f95rhmx136ad85xukyfope9yn6htfswf4aad63f1qrnaquyqf7ayyd3ms56b4owyoy"
b"hypnb6du5z99zu99k8wy1obydgjgj8nyyym3nnem1w3k3u9taeyyyrjerbfkarng9warcn3oy"
b"gduyomzgbbx6gypwree1cjo1nnbbyw3rydt3gykpcojbntbspsyq1wabx4tyb4pgykfwepr5o"
b"bazcripaba6zyd94crrj7ojez1yo1bnb3yrbgajb5krynawkmytahnyzugn9oeqbjynbfn3rr"
b"draofntrjf3npkegfjewibykirb5ht7qebdub4he47jnq6eyy3ef9rgztdudfrbsjeu5iycsi"
b"b5ukbzdknrpeom4b18ecc4thmkbg6oqk4bwxccg4o6xwfmpy87id36exdubo8edydu8tdcgyz"
b"cpo4nsrhnancucxf5neicb1ihcgiok4sy8qhj6ith9cmzyojentqybr5ye74nrbothokembgf"
b"ousajnwny8brgoe7wnjzbrbaewqnrhtj8knmsoumwrx3aocgrctto7crombd4aje6r3xnb7ao"
b"o6rgh1bfnkdgeu5urynjga4eig1nmjrpwuqket61mfjuc4rogtd1xr7w3dmseduufbcryihtb"
b"xruz1c83buhop6eex1mcfj4a1yqg1xow9nfbjcw41kd81tb3jwhwdgmgb1efk48g115swkniy"
b"tgs8iwoipwg5ffm4to6wbgpdiuehh5yasjff4mmpn1zjtw4yzpd5sum9eq17bdzcid38jxwnz"
b"4mf61t9e19wy87dzbogacfcda6rgqky3uccyqgd8df5ttmhaj1ubuwhmd8diecbzg8i3t3h3b"
b"6cs6ikafk5nw9yi18fyifkk1wujkg3kf7kkukigimxkwn4i6pkhsirxifxfg9pqe3kugw9dir"
b"r7jfimksij4w8mkcpig37j8qwexku8ibziex7rx3c95negm8bw3o4xeq1fdeftm9t53ttybpt"
b"tuc5afoossdpmo34anpqrr4ah5smhqaimzg87ds7asxpkigou1o3uje3ixc416qkgcxa8hqc8"
b"d6rhqt8yu33ew6m9g9wk5akq6kxnfrp4cpnczraskzdmikmjxf1aiprkswpme9i54piq7su35"
b"ji7es7iu6hbb3yhq1t8mouwq3hx3an3534u5fj75jakwhmr4xj46szn7kumwwp4dq4rq69s7j"
b"9qunxmhzwyu3gg9j66xg66x6ohxwz94i87pz7kx7k8btcypcacrodpsdgqdy6ckpmtph6b4m6"
b"85xaino47apyr8jmb1io3xacr1gh7nxfd4ide4toxttwhcz8druts5tupa4t1cbtgrrursuxk"
b"jzzjww1pzgunujt5jo7w3t6p3ug4fuqsur43sxjt4h3qxg98uxm3zz7zcbp8ostcs4wmpqdfj"
b"g3qesigm8zmpxdqoipd1spfmbkiwzpue4s35mjf44745q78ngu51uwuj4i37iu8aqaxdpsjs4"
b"w5qgpohzcyps7qs3s5c9mbc7tbq37zaszc85wuzsjz5qu7tz6u4bapo9co7ka7meqzhh7wqek"
b"dwit454pc788q876hm7rs7rzsqsgxnd87oc9dsajhskqrpgqi8g6ue7utq373qqb98nrmtffa"
b"f13q1h9n7ga5a5qhtxxrjj4xkhk7hf7pf7c7uq33zozpidp495ts73w67b6hu9gdj83ju3cug"
b"h6oaxrr8anthzeu6nh91wagzz7cx38wguhbc646qe3xccz3ni7p46amxjmzim5sd5az855dhh"
b"w9hc9qgxbz5a3phsk93o5hbp6es9fw9o5xu3xamz4dxht96389xm97nyf8oy1on3adtgywdyk"
b"5ym79o6uhrg9ahx345p19pcs37iya3ef3erkwddhnisbqmopprfwct5roiwo9x3ha34ehh4eq"
b"oie874gs4ydsd3ubtxbzhdb8osdakihg8688bnnadmeudf3iq9e7ao5u57nxwtrseuxjs33tj"
b"hh46mkkgwid7ktqpe6pwp74g17d9ttqc3ch3ikauicr15nmdoh1hkiqg3zg3xs99us98b9nuz"
b"tyza55n6cn91n7qbh4dusn61n4qfijfajnaqwsebgeouta1uarnrbkiymeajx1np51mdokx8b"
b"b5ou8rez7npsttdcrgzbkd38xr1bkji7jf5rtzo4z1jgfgq1133p3oou4urfhjogw3zc58kxb"
b"pgusrbsurxj4zwaa8rwt1bawfktbjsj5c39kc9ugc7smit1amcz6aizezp3xd4kox1mmsqeka"
b"bk3fwfmcoig7bkfwkgzfed5r35fk7um9ucj3eh3pkh6fxg65ufu3mp3yphh76x995e1aejqdr"
b"iswsdrsi3pdicqpxpcpeh5rxdtx8poiaaiywiaciogio6mtnisfjs7ku7m7im3xmu6zwu8wum"
b"mofxcd1wnag4on49mbpkoi3cfxzi73i9pmi8iom43564sd6wguwpuhfcjtkzbjsaz1hkz9sbe"
b"5thqkgh8p9fm9gqh114kuk6rzf1c63s1c5w6pztpu3po7fik19ujqduqbzc7ipyp57mmj5xi6"
b"3n7smhz3wwpzqhds3b5ue7981hma3p8388c4q39k11fj7nw9jkdp5s15s4sdi9ap5e6hg55zu"
b"5dj5gi5pp5379785r57s4iyfkw5img4i19s1x5sx5u9mwjimw9tfz5piq44uupq8shqy61yx6"
b"oqeaqs5m5uigidzjd4in1t9mnz448b5dt9xz6uzzzqmepgagimdcha5tnghnrx81qu7aj595t"
b"hdj45j5ea67chrd7g85sdiut4m5kekpxfg1gupj3i645cjp5wu6c85e7p4s6xm6rxsa9b6qde"
b"xn3xffxgigjp8pquysu1pu9fuhcusk349m6f5h7aag5wk58z35d35xswd5x767by78b4jn99n"
b"988q6dzu1h6kh8jhi15x1tgi7ak6pk6q19pzi8j4th94j7gu68zqqmzgiqzfqgzqxqxk65k65"
b"g69wtz8tz35q9jxm36rmx9isiuahu5zp76p7g976f69476fs7x33nx9qq3q77173874s5au7h"
b"m94rb5kb5fb75b6i87p97zga79q864syq6ox8wqhe95opbcd399jd7cxb7bomdh3t9facdcg7"
b"qxdoxt388td6hz7786kqo6xcu81p8oz94tx717qnhmn69za4zi7xustude4df9116j565mhwz"
b"66io8mdgz7ztsnaaxm71magcai77ns9xshn76hqhq69e69b786e9byxhwx6483s84i8wf89qj"
b"turhu9hny8g8u9ttugmq5yyyyyeddjbjr4yyyxe1oyyryocyyb6x9yyyeb4eyyb4uyyyy7joy"
b"yyb4uyyyyf5x1jxhktoyyybe41krefk8tsir4xpwswabynyxd59cq45muuuwsxg7jb1apbnfc"
b"b1bw3ysysnaf7q4e6ajkfe1s16r3bgmdpf1foacocuh3bnrdn54irdt9mnyrcfq11ozfnfqoa"
b"w7hw14xq5xh94bfxkweuhx4yp9s78iyicitr1qo8dymwrsoorcyhe3yq4yfpbcen6syiojoyq"
b"db9y9qrirnzudrtkwjzt5qyui8muz6yn99pymbcz4ktqz443onak1suoh54yw343xrnuebgyy"
b"c5s69y8kye4sjsnimpmpzqdj9ezegbtpjz8tzkmkidxnz4bgophokjfabu1zin7nb8fpdr6dm"
b"sodkouayunpurfsmkinwmpc81pjzqyhm9ee9etkst6s3aznhz5xzyuyeqjiu81a7pxqkxownx"
b"6f34t3q93cmrqyegbotaeazjsmx9qcu3s9s161gzcoeetbeka1bi36m9ogiu67inzozp9y5dr"
b"9djq56cijpsqzcxke19nod9j7uiq66ks8m7na7a9qxcepezntsr4npgnkraph1rozwt347n69"
b"47zckc35zfjb5kn31pxw8efio3ntkxrjjc1ess1qgp5axdtzu3r31qjqqcnghxawcbo3ta8xy"
b"pxwtjd75czh6e4cmwmxqttoxocwe5y5ay4hq5uyo1p6unfrmidngxc5dgh1nfkaueb1o3m95y"
b"o4kph8w5xcmi9z4an7q1r87ujrkdtryyyodzgc9k31qiubc1zjrxfnydi7bqmznf1siwqin55"
b"ngusqn6s5uwuz5jhg47dd3xyssoojo9ande61orjojwosghcf4145ykdui418gckiu9yue1as"
b"qmad4ja435x87wbqp7mcqgee3darxorhyo7eu3rhfz5mpai7ezh58jena4bdf3ci4im9igi97"
b"s4kpht7heb99379ynmfecgra8wnxazujps14s4mbmmujiqhzbaq99deirwbncifedcxsd4ysu"
b"bxotae9qr58umr38edg5okyeaun8wcjf9onjuhhpnen8adybz8af9wxefca1yyyyyyy1kfj3n"
b"khouyoe"
)
SAMPLE_TEXT = b"The **quick** brown fox jumps over the (lazy) dog!"
TOO_SHORT_ALPHABET = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ23456"
TOO_LONG_ALPHABET = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ2345678"
REPEAT_CHARACTER_ALPHABET = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ234566"
ARBITRARY_ALPHABET = b"0123456789`~!@#$%^&*()-_=+[]{}\/"
| crockford_modified = b'ahm6a81a59rqaub3dcn2m832e9qqevh0ctqqg83aenpq0wt0dxv6awh0ehm6a818dhgqmy9941j6ytt1'
crockford = b'AHM6A81A59RQATB3DCN2M832E9QQEVH0CSQQG83AENPQ0WS0DXV6AWH0EHM6A818DHGQMY9941J6YSS1'
zbase32 = b'ktwgkebkfjazk4mdpcinwednqjzzq5tyc3zzoedkqiszyh3yp75gkhtyqtwgkebeptozw6jjrb1g633b'
rfc_3548 = b'KRUGKIBKFJYXK2LDNMVCUIDCOJXXO3RAMZXXQIDKOVWXA4ZAN53GK4RAORUGKIBINRQXU6JJEBSG6ZZB'
rfc_2938 = b'AHK6A81A59ONAQB3DCL2K832E9NNERH0CPNNG83AELMN0SP0DTR6ASH0EHK6A818DHGNKV9941I6VPP1'
rfc_4648 = b'KRUGKIBKFJYXK2LDNMVCUIDCOJXXO3RAMZXXQIDKOVWXA4ZAN53GK4RAORUGKIBINRQXU6JJEBSG6ZZB'
nightmare = b'6vNI6LD61lZm62b08BnONL0OUlmmUSvdBzmmVL06UnMmd5zd8sSI65vdUvNI6LDL8vVmN7lloDWI7zzD'
arbitrary = b'`^(6`81`59=_`[~3@!)2(832#9__#]^0!+__%83`#)-_0{+0@}]6`{^0#^(6`818@^%_(\\9941&6\\++1'
icon_zbase32 = b'tferhtapbepywyyyyygw11nrkeyyyyyoyyyyyryeyayyyyy96x9snyyyyyrzy1n3qcyyynauyyyysrabynpjagyyyyfr64kdepefy4dxqtzzg4dxqyor1o4drba8r55gpfsgkyyyxdpj4w58ktj61ft769xxeo1mtnyje15xkekooen1ekfayfrtrainnneojkrndeq3niehnrkfewnbz1fytyba7dwytokinmyctefpob9rrgte7y7dtnfci69bxqtsziih69uc59ii4h9qxm8uus3h6b6ybygjc1bukr4aydfjeexbdarda9ncpaxrf3yenntrqyybynfucooz89jdyryxo9th8oi1foy8zayyn6gubcrybonpuxydy8r89h86wow3moyabbybab4jnqnmbnybeynyxk8rfjoyebdydyr7uyufgyfyyoygb15dcmtoywbpybonq99g4cyeb8xauf7onyn51ootkypy1rynyr5ftbnyy4b5ynsc6iwkewyfocyynturztb3ydcn4ybojfmsc1yysn5obogqnyf5ryyeboydywceowwoybd5ybocoe3dxyyejgeyntdxri3h6ri4hr88feyyy6r3se6m1jb3esyisnbpqrdiqi3qdawch1ezfckdcaencgprymsnxgct1cwbgo86bh6cyyykbrein8oe8h97xd8y7msq3a5e7poqmhs6ixag9htgrazd951h9k5oeyyybamwx5e9hmbxscpeyqagobs97etf7angozomwb49xn5gse8wbpeywdw7wi9uqdh8hxbheso3bqq35816j3gajmnrrs5b3jmz59u8ajxhyi97puhzhx8h6946bxznr1yurzcbehnxtagn3u4r3jeh36jyubdn5uue6t9hshf999y74ctce1mnzfcnwf8dkrj8dd1rukgxgcifrkrwfrtjaw17f95rhmx136ad85xukyfope9yn6htfswf4aad63f1qrnaquyqf7ayyd3ms56b4owyoyhypnb6du5z99zu99k8wy1obydgjgj8nyyym3nnem1w3k3u9taeyyyrjerbfkarng9warcn3oygduyomzgbbx6gypwree1cjo1nnbbyw3rydt3gykpcojbntbspsyq1wabx4tyb4pgykfwepr5obazcripaba6zyd94crrj7ojez1yo1bnb3yrbgajb5krynawkmytahnyzugn9oeqbjynbfn3rrdraofntrjf3npkegfjewibykirb5ht7qebdub4he47jnq6eyy3ef9rgztdudfrbsjeu5iycsib5ukbzdknrpeom4b18ecc4thmkbg6oqk4bwxccg4o6xwfmpy87id36exdubo8edydu8tdcgyzcpo4nsrhnancucxf5neicb1ihcgiok4sy8qhj6ith9cmzyojentqybr5ye74nrbothokembgfousajnwny8brgoe7wnjzbrbaewqnrhtj8knmsoumwrx3aocgrctto7crombd4aje6r3xnb7aoo6rgh1bfnkdgeu5urynjga4eig1nmjrpwuqket61mfjuc4rogtd1xr7w3dmseduufbcryihtbxruz1c83buhop6eex1mcfj4a1yqg1xow9nfbjcw41kd81tb3jwhwdgmgb1efk48g115swkniytgs8iwoipwg5ffm4to6wbgpdiuehh5yasjff4mmpn1zjtw4yzpd5sum9eq17bdzcid38jxwnz4mf61t9e19wy87dzbogacfcda6rgqky3uccyqgd8df5ttmhaj1ubuwhmd8diecbzg8i3t3h3b6cs6ikafk5nw9yi18fyifkk1wujkg3kf7kkukigimxkwn4i6pkhsirxifxfg9pqe3kugw9dirr7jfimksij4w8mkcpig37j8qwexku8ibziex7rx3c95negm8bw3o4xeq1fdeftm9t53ttybpttuc5afoossdpmo34anpqrr4ah5smhqaimzg87ds7asxpkigou1o3uje3ixc416qkgcxa8hqc8d6rhqt8yu33ew6m9g9wk5akq6kxnfrp4cpnczraskzdmikmjxf1aiprkswpme9i54piq7su35ji7es7iu6hbb3yhq1t8mouwq3hx3an3534u5fj75jakwhmr4xj46szn7kumwwp4dq4rq69s7j9qunxmhzwyu3gg9j66xg66x6ohxwz94i87pz7kx7k8btcypcacrodpsdgqdy6ckpmtph6b4m685xaino47apyr8jmb1io3xacr1gh7nxfd4ide4toxttwhcz8druts5tupa4t1cbtgrrursuxkjzzjww1pzgunujt5jo7w3t6p3ug4fuqsur43sxjt4h3qxg98uxm3zz7zcbp8ostcs4wmpqdfjg3qesigm8zmpxdqoipd1spfmbkiwzpue4s35mjf44745q78ngu51uwuj4i37iu8aqaxdpsjs4w5qgpohzcyps7qs3s5c9mbc7tbq37zaszc85wuzsjz5qu7tz6u4bapo9co7ka7meqzhh7wqekdwit454pc788q876hm7rs7rzsqsgxnd87oc9dsajhskqrpgqi8g6ue7utq373qqb98nrmtffaf13q1h9n7ga5a5qhtxxrjj4xkhk7hf7pf7c7uq33zozpidp495ts73w67b6hu9gdj83ju3cugh6oaxrr8anthzeu6nh91wagzz7cx38wguhbc646qe3xccz3ni7p46amxjmzim5sd5az855dhhw9hc9qgxbz5a3phsk93o5hbp6es9fw9o5xu3xamz4dxht96389xm97nyf8oy1on3adtgywdyk5ym79o6uhrg9ahx345p19pcs37iya3ef3erkwddhnisbqmopprfwct5roiwo9x3ha34ehh4eqoie874gs4ydsd3ubtxbzhdb8osdakihg8688bnnadmeudf3iq9e7ao5u57nxwtrseuxjs33tjhh46mkkgwid7ktqpe6pwp74g17d9ttqc3ch3ikauicr15nmdoh1hkiqg3zg3xs99us98b9nuztyza55n6cn91n7qbh4dusn61n4qfijfajnaqwsebgeouta1uarnrbkiymeajx1np51mdokx8bb5ou8rez7npsttdcrgzbkd38xr1bkji7jf5rtzo4z1jgfgq1133p3oou4urfhjogw3zc58kxbpgusrbsurxj4zwaa8rwt1bawfktbjsj5c39kc9ugc7smit1amcz6aizezp3xd4kox1mmsqekabk3fwfmcoig7bkfwkgzfed5r35fk7um9ucj3eh3pkh6fxg65ufu3mp3yphh76x995e1aejqdriswsdrsi3pdicqpxpcpeh5rxdtx8poiaaiywiaciogio6mtnisfjs7ku7m7im3xmu6zwu8wummofxcd1wnag4on49mbpkoi3cfxzi73i9pmi8iom43564sd6wguwpuhfcjtkzbjsaz1hkz9sbe5thqkgh8p9fm9gqh114kuk6rzf1c63s1c5w6pztpu3po7fik19ujqduqbzc7ipyp57mmj5xi63n7smhz3wwpzqhds3b5ue7981hma3p8388c4q39k11fj7nw9jkdp5s15s4sdi9ap5e6hg55zu5dj5gi5pp5379785r57s4iyfkw5img4i19s1x5sx5u9mwjimw9tfz5piq44uupq8shqy61yx6oqeaqs5m5uigidzjd4in1t9mnz448b5dt9xz6uzzzqmepgagimdcha5tnghnrx81qu7aj595thdj45j5ea67chrd7g85sdiut4m5kekpxfg1gupj3i645cjp5wu6c85e7p4s6xm6rxsa9b6qdexn3xffxgigjp8pquysu1pu9fuhcusk349m6f5h7aag5wk58z35d35xswd5x767by78b4jn99n988q6dzu1h6kh8jhi15x1tgi7ak6pk6q19pzi8j4th94j7gu68zqqmzgiqzfqgzqxqxk65k65g69wtz8tz35q9jxm36rmx9isiuahu5zp76p7g976f69476fs7x33nx9qq3q77173874s5au7hm94rb5kb5fb75b6i87p97zga79q864syq6ox8wqhe95opbcd399jd7cxb7bomdh3t9facdcg7qxdoxt388td6hz7786kqo6xcu81p8oz94tx717qnhmn69za4zi7xustude4df9116j565mhwz66io8mdgz7ztsnaaxm71magcai77ns9xshn76hqhq69e69b786e9byxhwx6483s84i8wf89qjturhu9hny8g8u9ttugmq5yyyyyeddjbjr4yyyxe1oyyryocyyb6x9yyyeb4eyyb4uyyyy7joyyyb4uyyyyf5x1jxhktoyyybe41krefk8tsir4xpwswabynyxd59cq45muuuwsxg7jb1apbnfcb1bw3ysysnaf7q4e6ajkfe1s16r3bgmdpf1foacocuh3bnrdn54irdt9mnyrcfq11ozfnfqoaw7hw14xq5xh94bfxkweuhx4yp9s78iyicitr1qo8dymwrsoorcyhe3yq4yfpbcen6syiojoyqdb9y9qrirnzudrtkwjzt5qyui8muz6yn99pymbcz4ktqz443onak1suoh54yw343xrnuebgyyc5s69y8kye4sjsnimpmpzqdj9ezegbtpjz8tzkmkidxnz4bgophokjfabu1zin7nb8fpdr6dmsodkouayunpurfsmkinwmpc81pjzqyhm9ee9etkst6s3aznhz5xzyuyeqjiu81a7pxqkxownx6f34t3q93cmrqyegbotaeazjsmx9qcu3s9s161gzcoeetbeka1bi36m9ogiu67inzozp9y5dr9djq56cijpsqzcxke19nod9j7uiq66ks8m7na7a9qxcepezntsr4npgnkraph1rozwt347n6947zckc35zfjb5kn31pxw8efio3ntkxrjjc1ess1qgp5axdtzu3r31qjqqcnghxawcbo3ta8xypxwtjd75czh6e4cmwmxqttoxocwe5y5ay4hq5uyo1p6unfrmidngxc5dgh1nfkaueb1o3m95yo4kph8w5xcmi9z4an7q1r87ujrkdtryyyodzgc9k31qiubc1zjrxfnydi7bqmznf1siwqin55ngusqn6s5uwuz5jhg47dd3xyssoojo9ande61orjojwosghcf4145ykdui418gckiu9yue1asqmad4ja435x87wbqp7mcqgee3darxorhyo7eu3rhfz5mpai7ezh58jena4bdf3ci4im9igi97s4kpht7heb99379ynmfecgra8wnxazujps14s4mbmmujiqhzbaq99deirwbncifedcxsd4ysubxotae9qr58umr38edg5okyeaun8wcjf9onjuhhpnen8adybz8af9wxefca1yyyyyyy1kfj3nkhouyoe'
sample_text = b'The **quick** brown fox jumps over the (lazy) dog!'
too_short_alphabet = b'ABCDEFGHIJKLMNOPQRSTUVWXYZ23456'
too_long_alphabet = b'ABCDEFGHIJKLMNOPQRSTUVWXYZ2345678'
repeat_character_alphabet = b'ABCDEFGHIJKLMNOPQRSTUVWXYZ234566'
arbitrary_alphabet = b'0123456789`~!@#$%^&*()-_=+[]{}\\/' |
# Script to help automation of converting a cpu/layoutX/CpuConstraintPoly.sol contract to Rust
# Parses out "mload(0xDEADBEEF)" (Solidity EVM Assembley Command) from the file and replaces it with the proper Rust equivalent
# Note: replace file_name.txt appropriately
# file_name.txt should contain Solidity Assembly from CpuConstraintPoly.sol
# Further Reductions example: You can reduce addmod(x, y, PRIME) to prime_field::fadd(x.clone(), y.clone());
# by using Find and Replace in an IDE. eg. Find: ", PRIME)" Replace with: ")"
f = open("file_name.txt", "r")
text = f.read()
parsedNum = ""
startParsing = False
i = 5
mloadStartIdx = -1
# Searches for "mload(" and reads the hex address until it reaches the closing bracket, ")"
# Once the hex address is parsed the mload(0xDEADBEEF) is replaced with a proper eqivalent
# derived from the memory mapping at the top of CpuConstraintPoly.sol
# The new read is placed in mload(0xDEADBEEF)'s spot in the file
while i < len(text):
if text[i] == ')' and startParsing:
addr = int(parsedNum, 0)
newText = ""
if addr == 0 :
newText += "ctx[map::MM_PERIODIC_COLUMN__PEDERSEN__POINTS__X].clone()"
elif addr == 32 :
newText += "ctx[map::MM_PERIODIC_COLUMN__PEDERSEN__POINTS__Y].clone()"
elif addr == 64 :
newText += "ctx[map::MM_PERIODIC_COLUMN__ECDSA__GENERATOR_POINTS__X].clone()"
elif addr == 96 :
newText += "ctx[map::MM_PERIODIC_COLUMN__ECDSA__GENERATOR_POINTS__Y].clone()"
elif addr == 128 :
newText += "ctx[map::MM_TRACE_LENGTH].clone()"
elif addr == 160 :
newText += "ctx[map::MM_OFFSET_SIZE].clone()"
elif addr == 192 :
newText += "ctx[map::MM_HALF_OFFSET_SIZE].clone()"
elif addr == 224 :
newText += "ctx[map::MM_INITIAL_AP].clone()"
elif addr == 256 :
newText += "ctx[map::MM_INITIAL_PC].clone()"
elif addr == 288 :
newText += "ctx[map::MM_FINAL_AP].clone()"
elif addr == 320 :
newText += "ctx[map::MM_FINAL_PC].clone()"
elif addr == 352 :
newText += "ctx[map::MM_MEMORY__MULTI_COLUMN_PERM__PERM__INTERACTION_ELM].clone()"
elif addr == 384 :
newText += "ctx[map::MM_MEMORY__MULTI_COLUMN_PERM__HASH_INTERACTION_ELM0].clone()"
elif addr == 416 :
newText += "ctx[map::MM_MEMORY__MULTI_COLUMN_PERM__PERM__PUBLIC_MEMORY_PROD].clone()"
elif addr == 448 :
newText += "ctx[map::MM_RC16__PERM__INTERACTION_ELM].clone()"
elif addr == 480 :
newText += "ctx[map::MM_RC16__PERM__PUBLIC_MEMORY_PROD].clone()"
elif addr == 512 :
newText += "ctx[map::MM_RC_MIN].clone()"
elif addr == 544 :
newText += "ctx[map::MM_RC_MAX].clone()"
elif addr == 576 :
newText += "ctx[map::MM_PEDERSEN__SHIFT_POINT_X].clone()"
elif addr == 608 :
newText += "ctx[map::MM_PEDERSEN__SHIFT_POINT_Y].clone()"
elif addr == 640 :
newText += "ctx[map::MM_INITIAL_PEDERSEN_ADDR].clone()"
elif addr == 672 :
newText += "ctx[map::MM_INITIAL_RC_ADDR].clone()"
elif addr == 704 :
newText += "ctx[map::MM_ECDSA__SIG_CONFIG_ALPHA].clone()"
elif addr == 736 :
newText += "ctx[map::MM_ECDSA__SIG_CONFIG_SHIFT_POINT_X].clone()"
elif addr == 768 :
newText += "ctx[map::MM_ECDSA__SIG_CONFIG_SHIFT_POINT_Y].clone()"
elif addr == 800 :
newText += "ctx[map::MM_ECDSA__SIG_CONFIG_BETA].clone()"
elif addr == 832 :
newText += "ctx[map::MM_INITIAL_ECDSA_ADDR].clone()"
elif addr == 864 :
newText += "ctx[map::MM_TRACE_GENERATOR].clone()"
elif addr == 896 :
newText += "ctx[map::MM_OODS_POINT].clone()"
elif addr == 928 :
newText += "ctx[map::MM_INTERACTION_ELEMENTS+0].clone()"
elif addr == 960 :
newText += "ctx[map::MM_INTERACTION_ELEMENTS+1].clone()"
elif addr == 992 :
newText += "ctx[map::MM_INTERACTION_ELEMENTS+2].clone()"
elif addr < 12480 and addr >= 1024 :
newText += "ctx[map::MM_COEFFICIENTS+" + str( int((addr-1024)/32) ) + "].clone()"
elif addr < 18880 and addr >= 12480 :
newText += "ctx[map::MM_OODS_VALUES+" + str( int((addr-12480)/32) ) + "].clone()"
elif addr < 20256 and addr >= 18880 :
newText += "intermediate_vals[" + str( int((addr-18880)/32) ) + "].clone()"
elif addr < 20928 and addr >= 20256 :
newText += "exp_mods[" + str( int((addr-20256)/32) ) + "].clone()"
elif addr < 21632 and addr >= 20928 :
newText += "denominator_inv[" + str( int((addr-20928)/32) ) + "].clone()"
elif addr < 22336 and addr >= 21632 :
newText += "denominators[" + str( int((addr-21632)/32) ) + "].clone()"
elif addr < 22656 and addr >= 22336 :
newText += "numerators[" + str( int((addr-22336)/32) ) + "].clone()"
else :
# Reset
parsedNum = ""
startParsing = False
mloadStartIdx = -1
i += 1
continue
text = text[:mloadStartIdx] + newText + text[i+1:]
# Reset
parsedNum = ""
startParsing = False
mloadStartIdx = -1
i += 1
continue
if startParsing :
parsedNum += str(text[i])
i += 1
continue
if text[i] == '(' and text[i-1] == 'd' and text[i-2] == 'a' and text[i-3] == 'o' and text[i-4] == 'l' and text[i-5] == 'm':
startParsing = True
mloadStartIdx =i-5
i += 1
f.close()
f = open("file_name.txt", "w")
f.write(text)
f.close()
print(text)
| f = open('file_name.txt', 'r')
text = f.read()
parsed_num = ''
start_parsing = False
i = 5
mload_start_idx = -1
while i < len(text):
if text[i] == ')' and startParsing:
addr = int(parsedNum, 0)
new_text = ''
if addr == 0:
new_text += 'ctx[map::MM_PERIODIC_COLUMN__PEDERSEN__POINTS__X].clone()'
elif addr == 32:
new_text += 'ctx[map::MM_PERIODIC_COLUMN__PEDERSEN__POINTS__Y].clone()'
elif addr == 64:
new_text += 'ctx[map::MM_PERIODIC_COLUMN__ECDSA__GENERATOR_POINTS__X].clone()'
elif addr == 96:
new_text += 'ctx[map::MM_PERIODIC_COLUMN__ECDSA__GENERATOR_POINTS__Y].clone()'
elif addr == 128:
new_text += 'ctx[map::MM_TRACE_LENGTH].clone()'
elif addr == 160:
new_text += 'ctx[map::MM_OFFSET_SIZE].clone()'
elif addr == 192:
new_text += 'ctx[map::MM_HALF_OFFSET_SIZE].clone()'
elif addr == 224:
new_text += 'ctx[map::MM_INITIAL_AP].clone()'
elif addr == 256:
new_text += 'ctx[map::MM_INITIAL_PC].clone()'
elif addr == 288:
new_text += 'ctx[map::MM_FINAL_AP].clone()'
elif addr == 320:
new_text += 'ctx[map::MM_FINAL_PC].clone()'
elif addr == 352:
new_text += 'ctx[map::MM_MEMORY__MULTI_COLUMN_PERM__PERM__INTERACTION_ELM].clone()'
elif addr == 384:
new_text += 'ctx[map::MM_MEMORY__MULTI_COLUMN_PERM__HASH_INTERACTION_ELM0].clone()'
elif addr == 416:
new_text += 'ctx[map::MM_MEMORY__MULTI_COLUMN_PERM__PERM__PUBLIC_MEMORY_PROD].clone()'
elif addr == 448:
new_text += 'ctx[map::MM_RC16__PERM__INTERACTION_ELM].clone()'
elif addr == 480:
new_text += 'ctx[map::MM_RC16__PERM__PUBLIC_MEMORY_PROD].clone()'
elif addr == 512:
new_text += 'ctx[map::MM_RC_MIN].clone()'
elif addr == 544:
new_text += 'ctx[map::MM_RC_MAX].clone()'
elif addr == 576:
new_text += 'ctx[map::MM_PEDERSEN__SHIFT_POINT_X].clone()'
elif addr == 608:
new_text += 'ctx[map::MM_PEDERSEN__SHIFT_POINT_Y].clone()'
elif addr == 640:
new_text += 'ctx[map::MM_INITIAL_PEDERSEN_ADDR].clone()'
elif addr == 672:
new_text += 'ctx[map::MM_INITIAL_RC_ADDR].clone()'
elif addr == 704:
new_text += 'ctx[map::MM_ECDSA__SIG_CONFIG_ALPHA].clone()'
elif addr == 736:
new_text += 'ctx[map::MM_ECDSA__SIG_CONFIG_SHIFT_POINT_X].clone()'
elif addr == 768:
new_text += 'ctx[map::MM_ECDSA__SIG_CONFIG_SHIFT_POINT_Y].clone()'
elif addr == 800:
new_text += 'ctx[map::MM_ECDSA__SIG_CONFIG_BETA].clone()'
elif addr == 832:
new_text += 'ctx[map::MM_INITIAL_ECDSA_ADDR].clone()'
elif addr == 864:
new_text += 'ctx[map::MM_TRACE_GENERATOR].clone()'
elif addr == 896:
new_text += 'ctx[map::MM_OODS_POINT].clone()'
elif addr == 928:
new_text += 'ctx[map::MM_INTERACTION_ELEMENTS+0].clone()'
elif addr == 960:
new_text += 'ctx[map::MM_INTERACTION_ELEMENTS+1].clone()'
elif addr == 992:
new_text += 'ctx[map::MM_INTERACTION_ELEMENTS+2].clone()'
elif addr < 12480 and addr >= 1024:
new_text += 'ctx[map::MM_COEFFICIENTS+' + str(int((addr - 1024) / 32)) + '].clone()'
elif addr < 18880 and addr >= 12480:
new_text += 'ctx[map::MM_OODS_VALUES+' + str(int((addr - 12480) / 32)) + '].clone()'
elif addr < 20256 and addr >= 18880:
new_text += 'intermediate_vals[' + str(int((addr - 18880) / 32)) + '].clone()'
elif addr < 20928 and addr >= 20256:
new_text += 'exp_mods[' + str(int((addr - 20256) / 32)) + '].clone()'
elif addr < 21632 and addr >= 20928:
new_text += 'denominator_inv[' + str(int((addr - 20928) / 32)) + '].clone()'
elif addr < 22336 and addr >= 21632:
new_text += 'denominators[' + str(int((addr - 21632) / 32)) + '].clone()'
elif addr < 22656 and addr >= 22336:
new_text += 'numerators[' + str(int((addr - 22336) / 32)) + '].clone()'
else:
parsed_num = ''
start_parsing = False
mload_start_idx = -1
i += 1
continue
text = text[:mloadStartIdx] + newText + text[i + 1:]
parsed_num = ''
start_parsing = False
mload_start_idx = -1
i += 1
continue
if startParsing:
parsed_num += str(text[i])
i += 1
continue
if text[i] == '(' and text[i - 1] == 'd' and (text[i - 2] == 'a') and (text[i - 3] == 'o') and (text[i - 4] == 'l') and (text[i - 5] == 'm'):
start_parsing = True
mload_start_idx = i - 5
i += 1
f.close()
f = open('file_name.txt', 'w')
f.write(text)
f.close()
print(text) |
del_items(0x80137B7C)
SetType(0x80137B7C, "void EA_cd_seek(int secnum)")
del_items(0x80137BA4)
SetType(0x80137BA4, "void MY_CdGetSector(unsigned long *src, unsigned long *dst, int size)")
del_items(0x80137BD8)
SetType(0x80137BD8, "void init_cdstream(int chunksize, unsigned char *buf, int bufsize)")
del_items(0x80137BE8)
SetType(0x80137BE8, "void flush_cdstream()")
del_items(0x80137C0C)
SetType(0x80137C0C, "int check_complete_frame(struct strheader *h)")
del_items(0x80137C8C)
SetType(0x80137C8C, "void reset_cdstream()")
del_items(0x80137CB4)
SetType(0x80137CB4, "void kill_stream_handlers()")
del_items(0x80137D24)
SetType(0x80137D24, "void stream_cdready_handler(unsigned long *addr, int idx, int i, int sec)")
del_items(0x80137F18)
SetType(0x80137F18, "void CD_stream_handler(struct TASK *T)")
del_items(0x80138004)
SetType(0x80138004, "void install_stream_handlers()")
del_items(0x80138074)
SetType(0x80138074, "void cdstream_service()")
del_items(0x8013810C)
SetType(0x8013810C, "int cdstream_get_chunk(unsigned char **data, struct strheader **h)")
del_items(0x80138230)
SetType(0x80138230, "int cdstream_is_last_chunk()")
del_items(0x80138248)
SetType(0x80138248, "void cdstream_discard_chunk()")
del_items(0x80138348)
SetType(0x80138348, "void close_cdstream()")
del_items(0x801383C0)
SetType(0x801383C0, "int open_cdstream(char *fname, int secoffs, int seclen)")
del_items(0x80138530)
SetType(0x80138530, "int set_mdec_img_buffer(unsigned char *p)")
del_items(0x80138564)
SetType(0x80138564, "void start_mdec_decode(unsigned char *data, int x, int y, int w, int h)")
del_items(0x801386E8)
SetType(0x801386E8, "void DCT_out_handler()")
del_items(0x80138784)
SetType(0x80138784, "void init_mdec(unsigned char *vlc_buffer, unsigned char *vlc_table)")
del_items(0x801387F4)
SetType(0x801387F4, "void init_mdec_buffer(char *buf, int size)")
del_items(0x80138810)
SetType(0x80138810, "int split_poly_area(struct POLY_FT4 *p, struct POLY_FT4 *bp, int offs, struct RECT *r, int sx, int sy, int correct)")
del_items(0x80138C00)
SetType(0x80138C00, "void rebuild_mdec_polys(int x, int y)")
del_items(0x80138DD4)
SetType(0x80138DD4, "void clear_mdec_frame()")
del_items(0x80138DE0)
SetType(0x80138DE0, "void draw_mdec_polys()")
del_items(0x8013912C)
SetType(0x8013912C, "void invalidate_mdec_frame()")
del_items(0x80139140)
SetType(0x80139140, "int is_frame_decoded()")
del_items(0x8013914C)
SetType(0x8013914C, "void init_mdec_polys(int x, int y, int w, int h, int bx1, int by1, int bx2, int by2, int correct)")
del_items(0x801394DC)
SetType(0x801394DC, "void set_mdec_poly_bright(int br)")
del_items(0x80139544)
SetType(0x80139544, "int init_mdec_stream(unsigned char *buftop, int sectors_per_frame, int mdec_frames_per_buffer)")
del_items(0x80139594)
SetType(0x80139594, "void init_mdec_audio(int rate)")
del_items(0x8013964C)
SetType(0x8013964C, "void kill_mdec_audio()")
del_items(0x8013967C)
SetType(0x8013967C, "void stop_mdec_audio()")
del_items(0x801396A0)
SetType(0x801396A0, "void play_mdec_audio(unsigned char *data, struct asec *h)")
del_items(0x8013993C)
SetType(0x8013993C, "void set_mdec_audio_volume(short vol, struct SpuVoiceAttr voice_attr)")
del_items(0x80139A08)
SetType(0x80139A08, "void resync_audio()")
del_items(0x80139A38)
SetType(0x80139A38, "void stop_mdec_stream()")
del_items(0x80139A84)
SetType(0x80139A84, "void dequeue_stream()")
del_items(0x80139B70)
SetType(0x80139B70, "void dequeue_animation()")
del_items(0x80139D20)
SetType(0x80139D20, "void decode_mdec_stream(int frames_elapsed)")
del_items(0x80139F0C)
SetType(0x80139F0C, "void play_mdec_stream(char *filename, int speed, int start, int end)")
del_items(0x80139FC0)
SetType(0x80139FC0, "void clear_mdec_queue()")
del_items(0x80139FEC)
SetType(0x80139FEC, "void StrClearVRAM()")
del_items(0x8013A0AC)
SetType(0x8013A0AC, "short PlayFMVOverLay(char *filename, int w, int h)")
del_items(0x8013A4B4)
SetType(0x8013A4B4, "unsigned short GetDown__C4CPad(struct CPad *this)")
| del_items(2148760444)
set_type(2148760444, 'void EA_cd_seek(int secnum)')
del_items(2148760484)
set_type(2148760484, 'void MY_CdGetSector(unsigned long *src, unsigned long *dst, int size)')
del_items(2148760536)
set_type(2148760536, 'void init_cdstream(int chunksize, unsigned char *buf, int bufsize)')
del_items(2148760552)
set_type(2148760552, 'void flush_cdstream()')
del_items(2148760588)
set_type(2148760588, 'int check_complete_frame(struct strheader *h)')
del_items(2148760716)
set_type(2148760716, 'void reset_cdstream()')
del_items(2148760756)
set_type(2148760756, 'void kill_stream_handlers()')
del_items(2148760868)
set_type(2148760868, 'void stream_cdready_handler(unsigned long *addr, int idx, int i, int sec)')
del_items(2148761368)
set_type(2148761368, 'void CD_stream_handler(struct TASK *T)')
del_items(2148761604)
set_type(2148761604, 'void install_stream_handlers()')
del_items(2148761716)
set_type(2148761716, 'void cdstream_service()')
del_items(2148761868)
set_type(2148761868, 'int cdstream_get_chunk(unsigned char **data, struct strheader **h)')
del_items(2148762160)
set_type(2148762160, 'int cdstream_is_last_chunk()')
del_items(2148762184)
set_type(2148762184, 'void cdstream_discard_chunk()')
del_items(2148762440)
set_type(2148762440, 'void close_cdstream()')
del_items(2148762560)
set_type(2148762560, 'int open_cdstream(char *fname, int secoffs, int seclen)')
del_items(2148762928)
set_type(2148762928, 'int set_mdec_img_buffer(unsigned char *p)')
del_items(2148762980)
set_type(2148762980, 'void start_mdec_decode(unsigned char *data, int x, int y, int w, int h)')
del_items(2148763368)
set_type(2148763368, 'void DCT_out_handler()')
del_items(2148763524)
set_type(2148763524, 'void init_mdec(unsigned char *vlc_buffer, unsigned char *vlc_table)')
del_items(2148763636)
set_type(2148763636, 'void init_mdec_buffer(char *buf, int size)')
del_items(2148763664)
set_type(2148763664, 'int split_poly_area(struct POLY_FT4 *p, struct POLY_FT4 *bp, int offs, struct RECT *r, int sx, int sy, int correct)')
del_items(2148764672)
set_type(2148764672, 'void rebuild_mdec_polys(int x, int y)')
del_items(2148765140)
set_type(2148765140, 'void clear_mdec_frame()')
del_items(2148765152)
set_type(2148765152, 'void draw_mdec_polys()')
del_items(2148765996)
set_type(2148765996, 'void invalidate_mdec_frame()')
del_items(2148766016)
set_type(2148766016, 'int is_frame_decoded()')
del_items(2148766028)
set_type(2148766028, 'void init_mdec_polys(int x, int y, int w, int h, int bx1, int by1, int bx2, int by2, int correct)')
del_items(2148766940)
set_type(2148766940, 'void set_mdec_poly_bright(int br)')
del_items(2148767044)
set_type(2148767044, 'int init_mdec_stream(unsigned char *buftop, int sectors_per_frame, int mdec_frames_per_buffer)')
del_items(2148767124)
set_type(2148767124, 'void init_mdec_audio(int rate)')
del_items(2148767308)
set_type(2148767308, 'void kill_mdec_audio()')
del_items(2148767356)
set_type(2148767356, 'void stop_mdec_audio()')
del_items(2148767392)
set_type(2148767392, 'void play_mdec_audio(unsigned char *data, struct asec *h)')
del_items(2148768060)
set_type(2148768060, 'void set_mdec_audio_volume(short vol, struct SpuVoiceAttr voice_attr)')
del_items(2148768264)
set_type(2148768264, 'void resync_audio()')
del_items(2148768312)
set_type(2148768312, 'void stop_mdec_stream()')
del_items(2148768388)
set_type(2148768388, 'void dequeue_stream()')
del_items(2148768624)
set_type(2148768624, 'void dequeue_animation()')
del_items(2148769056)
set_type(2148769056, 'void decode_mdec_stream(int frames_elapsed)')
del_items(2148769548)
set_type(2148769548, 'void play_mdec_stream(char *filename, int speed, int start, int end)')
del_items(2148769728)
set_type(2148769728, 'void clear_mdec_queue()')
del_items(2148769772)
set_type(2148769772, 'void StrClearVRAM()')
del_items(2148769964)
set_type(2148769964, 'short PlayFMVOverLay(char *filename, int w, int h)')
del_items(2148770996)
set_type(2148770996, 'unsigned short GetDown__C4CPad(struct CPad *this)') |
MONOBANK_API_TOKEN = None
MONOBANK_API_BASE_URL = 'https://api.monobank.ua'
MONOBANK_API_CURRENCY_ENDPOINT = MONOBANK_API_BASE_URL + '/bank/currency'
MONOBANK_API_CLIENT_INFO_ENDPOINT = MONOBANK_API_BASE_URL + '/personal/client-info'
MONOBANK_API_WEBHOOK_ENDPOINT = MONOBANK_API_BASE_URL + '/personal/webhook'
MONOBANK_API_STATEMENTS_ENDPOINT = MONOBANK_API_BASE_URL + '/personal/statement/{account}/{from_timestamp}/{to_timestamp}'
| monobank_api_token = None
monobank_api_base_url = 'https://api.monobank.ua'
monobank_api_currency_endpoint = MONOBANK_API_BASE_URL + '/bank/currency'
monobank_api_client_info_endpoint = MONOBANK_API_BASE_URL + '/personal/client-info'
monobank_api_webhook_endpoint = MONOBANK_API_BASE_URL + '/personal/webhook'
monobank_api_statements_endpoint = MONOBANK_API_BASE_URL + '/personal/statement/{account}/{from_timestamp}/{to_timestamp}' |
arquivo = open('numeros.txt', 'w')
for linha in range(1, 101):
arquivo.write('%d\n' % linha)
arquivo.close()
| arquivo = open('numeros.txt', 'w')
for linha in range(1, 101):
arquivo.write('%d\n' % linha)
arquivo.close() |
def getMessage(content):
firstCarrot = content.index('<')
secondCarrot = content.index('>')
return content[firstCarrot+3:secondCarrot]
y = getMessage('GG <@!799778925936246804>, you just advanced to level 5')
print(y) | def get_message(content):
first_carrot = content.index('<')
second_carrot = content.index('>')
return content[firstCarrot + 3:secondCarrot]
y = get_message('GG <@!799778925936246804>, you just advanced to level 5')
print(y) |
# Bubble sort
def sort_bubble(my_list):
for i in range(len(my_list) - 1, 0, -1):
for j in range(i):
if my_list[j] > my_list[j + 1]:
my_list[j], my_list[j + 1] = my_list[j + 1], my_list[j]
return my_list
print(sort_bubble([1,4,2,6,5,3,1])) | def sort_bubble(my_list):
for i in range(len(my_list) - 1, 0, -1):
for j in range(i):
if my_list[j] > my_list[j + 1]:
(my_list[j], my_list[j + 1]) = (my_list[j + 1], my_list[j])
return my_list
print(sort_bubble([1, 4, 2, 6, 5, 3, 1])) |
#program to enter number followed by commas and the storing those numbers in a list
arr=[];r=0;
a=input("ENter numbers followed by commas :")
l=a.split(",")
m=''
for c in a:
if(c!=','):
m=m+c;
else:
arr.append(int(m));
m='';
arr.append(int(m));
print(arr);
| arr = []
r = 0
a = input('ENter numbers followed by commas :')
l = a.split(',')
m = ''
for c in a:
if c != ',':
m = m + c
else:
arr.append(int(m))
m = ''
arr.append(int(m))
print(arr) |
file = open ("employees.txt" , "r")
if(file.readable()):
print("Success")
else:
print("Error")
print()
#read the whole file
print(file.read())
#rewind file pointer
file.seek(0)
print()
#read individual line
print(file.readline())
#rewind file pointer
file.seek(0)
print()
#read the whole file and set as lists
print(file.readlines())
#rewind file pointer
file.seek(0)
print()
#access specific list set
print(file.readlines()[1])
#rewind file pointer
file.seek(0)
print()
#read the lists using a for loop
for employee in file.readlines():
print(employee)
file.close() | file = open('employees.txt', 'r')
if file.readable():
print('Success')
else:
print('Error')
print()
print(file.read())
file.seek(0)
print()
print(file.readline())
file.seek(0)
print()
print(file.readlines())
file.seek(0)
print()
print(file.readlines()[1])
file.seek(0)
print()
for employee in file.readlines():
print(employee)
file.close() |
'''
Script converts data from newline seperated values to comma seperated values
'''
fName = input('Enter File Name:')
with open(fName,'r') as f:
lines = f.read()
f.close()
values = lines.splitlines()
s = 'time\n'
for val in values:
s = s + val.strip() + '\n'
print(s)
with open(fName,'w') as f:
f.write(s)
f.close()
print('Done')
| """
Script converts data from newline seperated values to comma seperated values
"""
f_name = input('Enter File Name:')
with open(fName, 'r') as f:
lines = f.read()
f.close()
values = lines.splitlines()
s = 'time\n'
for val in values:
s = s + val.strip() + '\n'
print(s)
with open(fName, 'w') as f:
f.write(s)
f.close()
print('Done') |
# Spiritual Release (57462)
sakuno = 9130021
sm.setSpeakerID(sakuno)
sm.sendNext("Kanna, please come to Momijigaoka. We have news.")
sm.setPlayerAsSpeaker()
sm.sendSay("I wonder what's going on? I hope Oda's Army isn't on the move.")
sm.startQuest(parentID)
| sakuno = 9130021
sm.setSpeakerID(sakuno)
sm.sendNext('Kanna, please come to Momijigaoka. We have news.')
sm.setPlayerAsSpeaker()
sm.sendSay("I wonder what's going on? I hope Oda's Army isn't on the move.")
sm.startQuest(parentID) |
Theatre_1 = {"Name":'Lviv',
"Seats_Number":120,
"Actors_1":["Andrew Kigan","Jhon Speelberg","Alan Mask","Neil Bambino"],
"Play_1":["25/03/2018","Aida",80,"Andrew Kigan","Jhon Speelberg",60,"OK"],
"Play_2":["26/03/2018","War",220,"Jhon Speelberg","Jhon Speelberg","Alan Mask","Neil Bambino",100,"OK"]
}
Theatre_2 = {"Name":'Sokil',
"Seats_Number":110,
"Actors_2":["Julia Portman","Mary Lewis","Carla Mask","Neil Bambino","Natalie Queen"],
"Play_3":["26/03/2018","Rigoletto",120,"Mary Lewis","Carla Mask","Neil Bambino","Natalie Queen",80,"OK"],
"Play_4":["27/03/2018","Night Warriors",90,"Andrew Kigan","Julia Portman","Mary Lewis","Carla Mask",75,"NO"]
}
print('Plays are: ' + str(Theatre_1["Play_1"][1:2]) + ' ' + str(Theatre_1["Play_2"][1:2]) + ' ' + str(Theatre_2["Play_3"][1:2]) + ' ' + str(Theatre_2["Play_4"][1:2]))
print('Number of actors of Lviv Theatre is : ' + str(len(Theatre_1["Actors_1"])))
Other_play = {"Play_5":["29/03/2018","SomethingNew",90,"Andrew Kigan","Julia Portman","Carla Mask",74,"YES"]}
Theatre_2.update(Other_play)
free_tickets = Theatre_1.get("Play_1")[2] - Theatre_1.get("Play_1")[5]
print('Play ' + str(Theatre_1["Play_1"][1:2]) + ', availiable tickets num = ' + str(free_tickets))
profit = Theatre_2.get("Play_3")[2] * Theatre_2.get("Play_3")[7]
print('Play ' + str(Theatre_2["Play_3"][1:2]) + ', profit = ' + str(profit))
One_more_ticket = {"Play_4":["27/03/2018","Night Warriors",90,"Andrew Kigan","Julia Portman","Mary Lewis","Carla Mask",76,"NO"]}
Theatre_2.update(One_more_ticket)
print(Theatre_2)
| theatre_1 = {'Name': 'Lviv', 'Seats_Number': 120, 'Actors_1': ['Andrew Kigan', 'Jhon Speelberg', 'Alan Mask', 'Neil Bambino'], 'Play_1': ['25/03/2018', 'Aida', 80, 'Andrew Kigan', 'Jhon Speelberg', 60, 'OK'], 'Play_2': ['26/03/2018', 'War', 220, 'Jhon Speelberg', 'Jhon Speelberg', 'Alan Mask', 'Neil Bambino', 100, 'OK']}
theatre_2 = {'Name': 'Sokil', 'Seats_Number': 110, 'Actors_2': ['Julia Portman', 'Mary Lewis', 'Carla Mask', 'Neil Bambino', 'Natalie Queen'], 'Play_3': ['26/03/2018', 'Rigoletto', 120, 'Mary Lewis', 'Carla Mask', 'Neil Bambino', 'Natalie Queen', 80, 'OK'], 'Play_4': ['27/03/2018', 'Night Warriors', 90, 'Andrew Kigan', 'Julia Portman', 'Mary Lewis', 'Carla Mask', 75, 'NO']}
print('Plays are: ' + str(Theatre_1['Play_1'][1:2]) + ' ' + str(Theatre_1['Play_2'][1:2]) + ' ' + str(Theatre_2['Play_3'][1:2]) + ' ' + str(Theatre_2['Play_4'][1:2]))
print('Number of actors of Lviv Theatre is : ' + str(len(Theatre_1['Actors_1'])))
other_play = {'Play_5': ['29/03/2018', 'SomethingNew', 90, 'Andrew Kigan', 'Julia Portman', 'Carla Mask', 74, 'YES']}
Theatre_2.update(Other_play)
free_tickets = Theatre_1.get('Play_1')[2] - Theatre_1.get('Play_1')[5]
print('Play ' + str(Theatre_1['Play_1'][1:2]) + ', availiable tickets num = ' + str(free_tickets))
profit = Theatre_2.get('Play_3')[2] * Theatre_2.get('Play_3')[7]
print('Play ' + str(Theatre_2['Play_3'][1:2]) + ', profit = ' + str(profit))
one_more_ticket = {'Play_4': ['27/03/2018', 'Night Warriors', 90, 'Andrew Kigan', 'Julia Portman', 'Mary Lewis', 'Carla Mask', 76, 'NO']}
Theatre_2.update(One_more_ticket)
print(Theatre_2) |
'''
Subgraphs II
In the previous exercise, we gave you a list of nodes whose neighbors we asked you to extract.
Let's try one more exercise in which you extract nodes that have a particular metadata property and their neighbors. This should hark back to what you've learned about using list comprehensions to find nodes. The exercise will also build your capacity to compose functions that you've already written before.
INSTRUCTIONS
0XP
Using a list comprehension, extract nodes that have the metadata 'occupation' as 'celebrity' alongside their neighbors:
The output expression of the list comprehension is n, and there are two iterator variables: n and d. The iterable is the list of nodes of T (including the metadata, which you can specify using data=True) and the conditional expression is if the 'occupation' key of the metadata dictionary d equals 'celebrity'.
Place them in a new subgraph called T_sub. To do this:
Iterate over the nodes, compute the neighbors of each node, and add them to the set of nodes nodeset by using the .union() method. This last part has been done for you.
Use nodeset along with the T.subgraph() method to calculate T_sub.
Draw T_sub to the screen.
'''
# Extract the nodes of interest: nodes
nodes = [n for n, d in T.nodes(data=True) if d['occupation'] == 'celebrity']
# Create the set of nodes: nodeset
nodeset = set(nodes)
# Iterate over nodes
for n in nodes:
# Compute the neighbors of n: nbrs
nbrs = T.neighbors(n)
# Compute the union of nodeset and nbrs: nodeset
nodeset = nodeset.union(nbrs)
# Compute the subgraph using nodeset: T_sub
T_sub = T.subgraph(nodeset)
# Draw T_sub to the screen
nx.draw(T_sub)
plt.show() | """
Subgraphs II
In the previous exercise, we gave you a list of nodes whose neighbors we asked you to extract.
Let's try one more exercise in which you extract nodes that have a particular metadata property and their neighbors. This should hark back to what you've learned about using list comprehensions to find nodes. The exercise will also build your capacity to compose functions that you've already written before.
INSTRUCTIONS
0XP
Using a list comprehension, extract nodes that have the metadata 'occupation' as 'celebrity' alongside their neighbors:
The output expression of the list comprehension is n, and there are two iterator variables: n and d. The iterable is the list of nodes of T (including the metadata, which you can specify using data=True) and the conditional expression is if the 'occupation' key of the metadata dictionary d equals 'celebrity'.
Place them in a new subgraph called T_sub. To do this:
Iterate over the nodes, compute the neighbors of each node, and add them to the set of nodes nodeset by using the .union() method. This last part has been done for you.
Use nodeset along with the T.subgraph() method to calculate T_sub.
Draw T_sub to the screen.
"""
nodes = [n for (n, d) in T.nodes(data=True) if d['occupation'] == 'celebrity']
nodeset = set(nodes)
for n in nodes:
nbrs = T.neighbors(n)
nodeset = nodeset.union(nbrs)
t_sub = T.subgraph(nodeset)
nx.draw(T_sub)
plt.show() |
# program description
# :: python
# :: allows user to enter initial height of ball before dropped
# :: outputs total distance traveled by ball based on number of bounces
# constants
bounceIndex = float(0.6)
# input variables
height = int(input("Enter Ball Height: "))
numberOfBounces = float(input("Enter Number Of Ball Bounces: "))
# calculation
distance = 0
while numberOfBounces > 0:
distance += height
height *= bounceIndex
distance += height
numberOfBounces -= 1
# output
print("Total Distance Traveled: " + str(distance) + " Units.")
| bounce_index = float(0.6)
height = int(input('Enter Ball Height: '))
number_of_bounces = float(input('Enter Number Of Ball Bounces: '))
distance = 0
while numberOfBounces > 0:
distance += height
height *= bounceIndex
distance += height
number_of_bounces -= 1
print('Total Distance Traveled: ' + str(distance) + ' Units.') |
class Stack:
def __init__(self):
self.items = []
def push(self, e):
self.items = [e] + self.items
def pop(self):
return self.items.pop()
s = Stack()
s.push(5) # [5]
s.push(7) # [7, 5]
s.push(11) # [11, 7, 5]
print(s.pop()) # returns 11, left is [7, 5]
print(s.pop()) # returns 7, left is [5] | class Stack:
def __init__(self):
self.items = []
def push(self, e):
self.items = [e] + self.items
def pop(self):
return self.items.pop()
s = stack()
s.push(5)
s.push(7)
s.push(11)
print(s.pop())
print(s.pop()) |
i=map(int, raw_input())
c=0
for m in i:
c = c+1 if m==4 or m==7 else c
print("YES" if c==4 or c==7 else "NO") | i = map(int, raw_input())
c = 0
for m in i:
c = c + 1 if m == 4 or m == 7 else c
print('YES' if c == 4 or c == 7 else 'NO') |
class Solution:
def tribonacci(self, n: int) -> int:
if n <= 1:
return n
arr = [0 for i in range(n+1)]
arr[1], arr[2] = 1, 1
for i in range(3, len(arr)):
arr[i] = arr[i-1] + arr[i-2] + arr[i-3]
return arr[n]
s = Solution()
print(s.tribonacci(5)) | class Solution:
def tribonacci(self, n: int) -> int:
if n <= 1:
return n
arr = [0 for i in range(n + 1)]
(arr[1], arr[2]) = (1, 1)
for i in range(3, len(arr)):
arr[i] = arr[i - 1] + arr[i - 2] + arr[i - 3]
return arr[n]
s = solution()
print(s.tribonacci(5)) |
class Yo():
def __init__(self, name):
self.name = name
def say_name(self):
print('Yo {}!'.format(self.name))
| class Yo:
def __init__(self, name):
self.name = name
def say_name(self):
print('Yo {}!'.format(self.name)) |
class AlreadyFiredError(RuntimeError):
pass
class InvalidBoardError(RuntimeError):
pass
class InvalidMoveError(RuntimeError):
pass
| class Alreadyfirederror(RuntimeError):
pass
class Invalidboarderror(RuntimeError):
pass
class Invalidmoveerror(RuntimeError):
pass |
class Solution:
def canPermutePalindrome(self, s: str) -> bool:
x={}
k=0
for i in set(s):
x[i]=s.count(i)
for i,j in x.items():
if j%2!=0:
k=k+1
if k>1:
return False
return True
| class Solution:
def can_permute_palindrome(self, s: str) -> bool:
x = {}
k = 0
for i in set(s):
x[i] = s.count(i)
for (i, j) in x.items():
if j % 2 != 0:
k = k + 1
if k > 1:
return False
return True |
def test_user_creation(faunadb_client):
username = "burgerbob"
created_user = faunadb_client.create_user(
username=username, password="password1234"
)
assert created_user["username"] == username
all_users = faunadb_client.all_users()
assert len(all_users) == 1
| def test_user_creation(faunadb_client):
username = 'burgerbob'
created_user = faunadb_client.create_user(username=username, password='password1234')
assert created_user['username'] == username
all_users = faunadb_client.all_users()
assert len(all_users) == 1 |
'''
## Questions
### 154. [Find Minimum in Rotated Sorted Array II](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/)
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.
(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).
Find the minimum element.
The array may contain duplicates.
Example 1:
Input: [1,3,5]
Output: 1
Example 2:
Input: [2,2,2,0,1]
Output: 0
Note:
- This is a follow up problem to Find Minimum in Rotated Sorted Array.
- Would allow duplicates affect the run-time complexity? How and why?
'''
## Solutions
class Solution:
def findMin(self, nums: List[int]) -> int:
if not nums:
return nums
nums.sort()
return nums[0]
# Runtime: 60 ms
# Memory Usage: 14.2 MB
| """
## Questions
### 154. [Find Minimum in Rotated Sorted Array II](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/)
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.
(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).
Find the minimum element.
The array may contain duplicates.
Example 1:
Input: [1,3,5]
Output: 1
Example 2:
Input: [2,2,2,0,1]
Output: 0
Note:
- This is a follow up problem to Find Minimum in Rotated Sorted Array.
- Would allow duplicates affect the run-time complexity? How and why?
"""
class Solution:
def find_min(self, nums: List[int]) -> int:
if not nums:
return nums
nums.sort()
return nums[0] |
#
# PySNMP MIB module CISCO-ATM-SERVICE-REGISTRY-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ATM-SERVICE-REGISTRY-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:33:26 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup")
Gauge32, TimeTicks, Integer32, iso, Counter32, Counter64, IpAddress, Bits, ObjectIdentity, ModuleIdentity, Unsigned32, NotificationType, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "TimeTicks", "Integer32", "iso", "Counter32", "Counter64", "IpAddress", "Bits", "ObjectIdentity", "ModuleIdentity", "Unsigned32", "NotificationType", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
TextualConvention, DisplayString, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "RowStatus")
ciscoAtmServiceRegistryMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 50))
ciscoAtmServiceRegistryMIB.setRevisions(('1996-02-04 00:00',))
if mibBuilder.loadTexts: ciscoAtmServiceRegistryMIB.setLastUpdated('9602210000Z')
if mibBuilder.loadTexts: ciscoAtmServiceRegistryMIB.setOrganization('Cisco Systems, Inc.')
ciscoAtmServiceRegistryMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 50, 1))
class AtmAddr(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(8, 8), ValueSizeConstraint(13, 13), ValueSizeConstraint(20, 20), )
class InterfaceIndexOrZero(TextualConvention, Integer32):
status = 'current'
displayHint = 'd'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 2147483647)
asrSrvcRegTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1), )
if mibBuilder.loadTexts: asrSrvcRegTable.setStatus('current')
asrSrvcRegEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1), ).setIndexNames((0, "CISCO-ATM-SERVICE-REGISTRY-MIB", "asrSrvcRegPort"), (0, "CISCO-ATM-SERVICE-REGISTRY-MIB", "asrSrvcRegServiceID"), (0, "CISCO-ATM-SERVICE-REGISTRY-MIB", "asrSrvcRegAddressIndex"))
if mibBuilder.loadTexts: asrSrvcRegEntry.setStatus('current')
asrSrvcRegPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1, 1), InterfaceIndexOrZero())
if mibBuilder.loadTexts: asrSrvcRegPort.setStatus('current')
asrSrvcRegServiceID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1, 2), ObjectIdentifier())
if mibBuilder.loadTexts: asrSrvcRegServiceID.setStatus('current')
asrSrvcRegATMAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1, 3), AtmAddr()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: asrSrvcRegATMAddress.setStatus('current')
asrSrvcRegAddressIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1, 4), Integer32())
if mibBuilder.loadTexts: asrSrvcRegAddressIndex.setStatus('current')
asrSrvcRegParm1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1, 5), OctetString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: asrSrvcRegParm1.setStatus('current')
asrSrvcRegRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1, 6), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: asrSrvcRegRowStatus.setStatus('current')
asrSrvcRegMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 50, 3))
asrSrvcRegMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 50, 3, 1))
asrSrvcRegMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 50, 3, 2))
asrSrvcRegMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 50, 3, 1, 1)).setObjects(("CISCO-ATM-SERVICE-REGISTRY-MIB", "asrSrvcRegMIBGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
asrSrvcRegMIBCompliance = asrSrvcRegMIBCompliance.setStatus('current')
asrSrvcRegMIBGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 50, 3, 2, 1)).setObjects(("CISCO-ATM-SERVICE-REGISTRY-MIB", "asrSrvcRegATMAddress"), ("CISCO-ATM-SERVICE-REGISTRY-MIB", "asrSrvcRegParm1"), ("CISCO-ATM-SERVICE-REGISTRY-MIB", "asrSrvcRegRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
asrSrvcRegMIBGroup = asrSrvcRegMIBGroup.setStatus('current')
mibBuilder.exportSymbols("CISCO-ATM-SERVICE-REGISTRY-MIB", asrSrvcRegServiceID=asrSrvcRegServiceID, asrSrvcRegRowStatus=asrSrvcRegRowStatus, asrSrvcRegMIBGroups=asrSrvcRegMIBGroups, ciscoAtmServiceRegistryMIB=ciscoAtmServiceRegistryMIB, InterfaceIndexOrZero=InterfaceIndexOrZero, ciscoAtmServiceRegistryMIBObjects=ciscoAtmServiceRegistryMIBObjects, asrSrvcRegTable=asrSrvcRegTable, asrSrvcRegMIBConformance=asrSrvcRegMIBConformance, asrSrvcRegMIBCompliance=asrSrvcRegMIBCompliance, asrSrvcRegEntry=asrSrvcRegEntry, asrSrvcRegMIBCompliances=asrSrvcRegMIBCompliances, PYSNMP_MODULE_ID=ciscoAtmServiceRegistryMIB, asrSrvcRegATMAddress=asrSrvcRegATMAddress, asrSrvcRegParm1=asrSrvcRegParm1, asrSrvcRegMIBGroup=asrSrvcRegMIBGroup, asrSrvcRegPort=asrSrvcRegPort, AtmAddr=AtmAddr, asrSrvcRegAddressIndex=asrSrvcRegAddressIndex)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, value_range_constraint, single_value_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ConstraintsUnion')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup')
(gauge32, time_ticks, integer32, iso, counter32, counter64, ip_address, bits, object_identity, module_identity, unsigned32, notification_type, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'TimeTicks', 'Integer32', 'iso', 'Counter32', 'Counter64', 'IpAddress', 'Bits', 'ObjectIdentity', 'ModuleIdentity', 'Unsigned32', 'NotificationType', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn')
(textual_convention, display_string, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'RowStatus')
cisco_atm_service_registry_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 50))
ciscoAtmServiceRegistryMIB.setRevisions(('1996-02-04 00:00',))
if mibBuilder.loadTexts:
ciscoAtmServiceRegistryMIB.setLastUpdated('9602210000Z')
if mibBuilder.loadTexts:
ciscoAtmServiceRegistryMIB.setOrganization('Cisco Systems, Inc.')
cisco_atm_service_registry_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 50, 1))
class Atmaddr(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + constraints_union(value_size_constraint(0, 0), value_size_constraint(8, 8), value_size_constraint(13, 13), value_size_constraint(20, 20))
class Interfaceindexorzero(TextualConvention, Integer32):
status = 'current'
display_hint = 'd'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 2147483647)
asr_srvc_reg_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1))
if mibBuilder.loadTexts:
asrSrvcRegTable.setStatus('current')
asr_srvc_reg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1)).setIndexNames((0, 'CISCO-ATM-SERVICE-REGISTRY-MIB', 'asrSrvcRegPort'), (0, 'CISCO-ATM-SERVICE-REGISTRY-MIB', 'asrSrvcRegServiceID'), (0, 'CISCO-ATM-SERVICE-REGISTRY-MIB', 'asrSrvcRegAddressIndex'))
if mibBuilder.loadTexts:
asrSrvcRegEntry.setStatus('current')
asr_srvc_reg_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1, 1), interface_index_or_zero())
if mibBuilder.loadTexts:
asrSrvcRegPort.setStatus('current')
asr_srvc_reg_service_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1, 2), object_identifier())
if mibBuilder.loadTexts:
asrSrvcRegServiceID.setStatus('current')
asr_srvc_reg_atm_address = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1, 3), atm_addr()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
asrSrvcRegATMAddress.setStatus('current')
asr_srvc_reg_address_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1, 4), integer32())
if mibBuilder.loadTexts:
asrSrvcRegAddressIndex.setStatus('current')
asr_srvc_reg_parm1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1, 5), octet_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
asrSrvcRegParm1.setStatus('current')
asr_srvc_reg_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 50, 1, 1, 1, 6), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
asrSrvcRegRowStatus.setStatus('current')
asr_srvc_reg_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 50, 3))
asr_srvc_reg_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 50, 3, 1))
asr_srvc_reg_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 50, 3, 2))
asr_srvc_reg_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 50, 3, 1, 1)).setObjects(('CISCO-ATM-SERVICE-REGISTRY-MIB', 'asrSrvcRegMIBGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
asr_srvc_reg_mib_compliance = asrSrvcRegMIBCompliance.setStatus('current')
asr_srvc_reg_mib_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 50, 3, 2, 1)).setObjects(('CISCO-ATM-SERVICE-REGISTRY-MIB', 'asrSrvcRegATMAddress'), ('CISCO-ATM-SERVICE-REGISTRY-MIB', 'asrSrvcRegParm1'), ('CISCO-ATM-SERVICE-REGISTRY-MIB', 'asrSrvcRegRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
asr_srvc_reg_mib_group = asrSrvcRegMIBGroup.setStatus('current')
mibBuilder.exportSymbols('CISCO-ATM-SERVICE-REGISTRY-MIB', asrSrvcRegServiceID=asrSrvcRegServiceID, asrSrvcRegRowStatus=asrSrvcRegRowStatus, asrSrvcRegMIBGroups=asrSrvcRegMIBGroups, ciscoAtmServiceRegistryMIB=ciscoAtmServiceRegistryMIB, InterfaceIndexOrZero=InterfaceIndexOrZero, ciscoAtmServiceRegistryMIBObjects=ciscoAtmServiceRegistryMIBObjects, asrSrvcRegTable=asrSrvcRegTable, asrSrvcRegMIBConformance=asrSrvcRegMIBConformance, asrSrvcRegMIBCompliance=asrSrvcRegMIBCompliance, asrSrvcRegEntry=asrSrvcRegEntry, asrSrvcRegMIBCompliances=asrSrvcRegMIBCompliances, PYSNMP_MODULE_ID=ciscoAtmServiceRegistryMIB, asrSrvcRegATMAddress=asrSrvcRegATMAddress, asrSrvcRegParm1=asrSrvcRegParm1, asrSrvcRegMIBGroup=asrSrvcRegMIBGroup, asrSrvcRegPort=asrSrvcRegPort, AtmAddr=AtmAddr, asrSrvcRegAddressIndex=asrSrvcRegAddressIndex) |
def is_anagram(first, second):
return sorted(list(first)) == sorted(list(second))
def main():
valid = 0
with open('day_4.in', 'r') as f:
for l in f.readlines():
split = l.strip().split(' ')
valid_passphrase = True
for start in range(0, len(split) - 1):
for cur in range(start + 1, len(split)):
if is_anagram(split[start], split[cur]):
valid_passphrase = False
break
if not valid_passphrase:
break
if valid_passphrase:
valid += 1
print(valid)
if __name__ == '__main__':
main() | def is_anagram(first, second):
return sorted(list(first)) == sorted(list(second))
def main():
valid = 0
with open('day_4.in', 'r') as f:
for l in f.readlines():
split = l.strip().split(' ')
valid_passphrase = True
for start in range(0, len(split) - 1):
for cur in range(start + 1, len(split)):
if is_anagram(split[start], split[cur]):
valid_passphrase = False
break
if not valid_passphrase:
break
if valid_passphrase:
valid += 1
print(valid)
if __name__ == '__main__':
main() |
APP_KEY = 'u5lo5mX6IzAyv9TQJZG5tErDP'
APP_SECRET = 'pJ294qcsbwcEty3ePPbGYVbD9sTL2J7dgC7BDdQ4KyoupmAxHS'
OAUTH_TOKEN = '1285969065996095488-WqwqIQPP69TovfaCISoY6DkWWgwajY'
OAUTH_TOKEN_SECRET = 'PIC1rTAs9Q9HD8zpGV7dMC5FMXpWmM5yn5WFhpJHt3li5'
## Your Telegram Channel Name ##
channel_name = 'uchihacommunity'
## Telegram Access Token ##
telegram_token = '1395164117:AAGmUsXuvPng9mwyWti_hTtfFzVtH075Wtc'
## Twitter User Name to get Timeline ##
user_name = 'uchihahimself'
| app_key = 'u5lo5mX6IzAyv9TQJZG5tErDP'
app_secret = 'pJ294qcsbwcEty3ePPbGYVbD9sTL2J7dgC7BDdQ4KyoupmAxHS'
oauth_token = '1285969065996095488-WqwqIQPP69TovfaCISoY6DkWWgwajY'
oauth_token_secret = 'PIC1rTAs9Q9HD8zpGV7dMC5FMXpWmM5yn5WFhpJHt3li5'
channel_name = 'uchihacommunity'
telegram_token = '1395164117:AAGmUsXuvPng9mwyWti_hTtfFzVtH075Wtc'
user_name = 'uchihahimself' |
def euler():
d = True
x = 1
while d == True:
x += 1
x_1 = str(x)
x_2 = f"{2 * x}"
x_3 = f"{3 * x}"
x_4 = f"{4 * x}"
x_5 = f"{5 * x}"
x_6 = f"{6 * x}"
if len(x_1) != len(x_6):
continue
sez1 = []
sez2 = []
sez3 = []
sez4 = []
sez5 = []
sez6 = []
for t in range(len(x_1)):
sez1.append( x_1[t])
sez2.append(x_2[t])
sez3.append(x_3[t])
sez4.append(x_4[t])
sez5.append(x_5[t])
sez6.append(x_6[t])
sez1.sort()
sez2.sort()
sez3.sort()
sez4.sort()
sez5.sort()
sez6.sort()
if sez1 == sez2 == sez3 == sez4 == sez5 == sez6:
return x
return False
euler()
| def euler():
d = True
x = 1
while d == True:
x += 1
x_1 = str(x)
x_2 = f'{2 * x}'
x_3 = f'{3 * x}'
x_4 = f'{4 * x}'
x_5 = f'{5 * x}'
x_6 = f'{6 * x}'
if len(x_1) != len(x_6):
continue
sez1 = []
sez2 = []
sez3 = []
sez4 = []
sez5 = []
sez6 = []
for t in range(len(x_1)):
sez1.append(x_1[t])
sez2.append(x_2[t])
sez3.append(x_3[t])
sez4.append(x_4[t])
sez5.append(x_5[t])
sez6.append(x_6[t])
sez1.sort()
sez2.sort()
sez3.sort()
sez4.sort()
sez5.sort()
sez6.sort()
if sez1 == sez2 == sez3 == sez4 == sez5 == sez6:
return x
return False
euler() |
# Given a string s, return the longest palindromic substring in s.
#
# Example 1:
# Input: s = "babad"
# Output: "bab"
# Note: "aba" is also a valid answer.
# lets first check if s a palindrome
def palindrome(s):
mid = len(s) // 2
if len(s) % 2 != 0:
if s[:mid] == s[:mid:-1]:
return s
else:
if s[:mid] == s[:mid - 1:-1]:
return s
return ""
def longest_palindrome(s):
if palindrome(s) == s:
return s
longest = s[0]
for i in range(0, len(s)):
for j in range(1, len(s)+1):
current = palindrome(s[i:j])
if len(current) > len(longest):
longest = current
return longest
if __name__ == "__main__":
input_string0 = "babad"
input_string1 = "cbbd"
input_string2 = "a"
input_string3 = "ac"
input_string4 = "bb"
print(longest_palindrome(input_string4)) | def palindrome(s):
mid = len(s) // 2
if len(s) % 2 != 0:
if s[:mid] == s[:mid:-1]:
return s
elif s[:mid] == s[:mid - 1:-1]:
return s
return ''
def longest_palindrome(s):
if palindrome(s) == s:
return s
longest = s[0]
for i in range(0, len(s)):
for j in range(1, len(s) + 1):
current = palindrome(s[i:j])
if len(current) > len(longest):
longest = current
return longest
if __name__ == '__main__':
input_string0 = 'babad'
input_string1 = 'cbbd'
input_string2 = 'a'
input_string3 = 'ac'
input_string4 = 'bb'
print(longest_palindrome(input_string4)) |
def algo(load, plants):
row = 0
produced = 0
names = []
p = []
for i in range(len(plants)):
if row < len(plants):
battery = plants.iloc[row, :]
names.append(battery["name"])
if load > produced:
temp = load - produced
if battery["pmax"] >= temp >= battery["pmin"]:
used = temp
elif battery["pmax"] < temp:
used = battery["pmax"]
elif battery["pmin"] > temp:
used = battery["pmin"]
produced += used
p.append(used)
elif load <= produced:
used = 0
p.append(used)
row += 1
response = dict(zip(names, p))
return response
| def algo(load, plants):
row = 0
produced = 0
names = []
p = []
for i in range(len(plants)):
if row < len(plants):
battery = plants.iloc[row, :]
names.append(battery['name'])
if load > produced:
temp = load - produced
if battery['pmax'] >= temp >= battery['pmin']:
used = temp
elif battery['pmax'] < temp:
used = battery['pmax']
elif battery['pmin'] > temp:
used = battery['pmin']
produced += used
p.append(used)
elif load <= produced:
used = 0
p.append(used)
row += 1
response = dict(zip(names, p))
return response |
# note the looping - we set the initial value for x =10 and when the first for loop is
# executed, it is evaluated at that time, so changing the variable x in the loop
# does not effect that loop. Now the next time that for loop is executed at that
# time the new value of x is used!
x = 10
for i in range(0,x):
print(i)
x = 5
for i in range(0,x):
print(i)
# another example
x = 5
# outer loop
for i in range (0, x):
# inner loop
for j in range(0, x):
print(i, j)
x = 3 # next time the inner loop is evaluted it will use this value
| x = 10
for i in range(0, x):
print(i)
x = 5
for i in range(0, x):
print(i)
x = 5
for i in range(0, x):
for j in range(0, x):
print(i, j)
x = 3 |
# This is a variable concept
'''
a = 10
print(a)
print(type(a))
a = 10.33
print(a)
print(type(a))
a = "New Jersey"
print(a)
print(type(a))
'''
#a = input()
#print(a)
name = input("Please enter your name : ")
print("Your name is ",name)
print(type(name))
number = int(input("Enter your number : ")) #Explicit type conversion
print("Your number is ",number)
print(type(number))
| """
a = 10
print(a)
print(type(a))
a = 10.33
print(a)
print(type(a))
a = "New Jersey"
print(a)
print(type(a))
"""
name = input('Please enter your name : ')
print('Your name is ', name)
print(type(name))
number = int(input('Enter your number : '))
print('Your number is ', number)
print(type(number)) |
def vowels(word):
if (word[0] in 'AEIOU' or word[0] in 'aeiou'):
if (word[len(word) - 1] in 'AEIOU' or word[len(word) - 1] in 'aeiou'):
return 'First and last letter of ' + word + ' is vowel'
else:
return 'First letter of ' + word + ' is vowel'
else:
return 'Not a vowel'
print(vowels('ankara'))
| def vowels(word):
if word[0] in 'AEIOU' or word[0] in 'aeiou':
if word[len(word) - 1] in 'AEIOU' or word[len(word) - 1] in 'aeiou':
return 'First and last letter of ' + word + ' is vowel'
else:
return 'First letter of ' + word + ' is vowel'
else:
return 'Not a vowel'
print(vowels('ankara')) |
dist = []
for num in range(1, 1000):
if (num % 3 == 0) or (num % 5 == 0):
dist.append(num)
print(sum(dist))
| dist = []
for num in range(1, 1000):
if num % 3 == 0 or num % 5 == 0:
dist.append(num)
print(sum(dist)) |
add_init_container = [
{
'op': 'add',
'path': '/some/new/path',
'value': 'some-value',
},
]
| add_init_container = [{'op': 'add', 'path': '/some/new/path', 'value': 'some-value'}] |
def get_persistent_id(node_unicode_proxy, *args, **kwargs):
return node_unicode_proxy
def get_type(node, *args, **kwargs):
return type(node)
def is_exact_type(node, typename, *args, **kwargs):
return isinstance(node, typename)
def is_type(node, typename, *args, **kwargs):
return typename in ['Transform', 'Curve', 'Joint', 'Shape', 'UnicodeDelegate', 'DagNode']
def rename(node_dag, name, *args, **kwargs):
return name
def duplicate(node_dag, parent_only=True, *args, **kwargs):
return node_dag + '_duplicate'
def list_relatives(node_dag, *args, **kwargs):
return node_dag
def parent(node, new_parent, *args, **kwargs):
return new_parent
def delete(nodes, *args, **kwargs):
del (nodes)
def get_scene_tree():
return {'standalone': None}
def list_scene(object_type='transform', *args, **kwargs):
return []
def list_scene_nodes(object_type='transform', has_shape=False):
return ['standalone']
def exists(node, *args, **kwargs):
return True
def safe_delete(node_or_nodes):
return True
| def get_persistent_id(node_unicode_proxy, *args, **kwargs):
return node_unicode_proxy
def get_type(node, *args, **kwargs):
return type(node)
def is_exact_type(node, typename, *args, **kwargs):
return isinstance(node, typename)
def is_type(node, typename, *args, **kwargs):
return typename in ['Transform', 'Curve', 'Joint', 'Shape', 'UnicodeDelegate', 'DagNode']
def rename(node_dag, name, *args, **kwargs):
return name
def duplicate(node_dag, parent_only=True, *args, **kwargs):
return node_dag + '_duplicate'
def list_relatives(node_dag, *args, **kwargs):
return node_dag
def parent(node, new_parent, *args, **kwargs):
return new_parent
def delete(nodes, *args, **kwargs):
del nodes
def get_scene_tree():
return {'standalone': None}
def list_scene(object_type='transform', *args, **kwargs):
return []
def list_scene_nodes(object_type='transform', has_shape=False):
return ['standalone']
def exists(node, *args, **kwargs):
return True
def safe_delete(node_or_nodes):
return True |
age = 20
if age >= 20 and age == 30:
print('age == 30')
elif age >= 20 or age == 30:
print(' age >= 20 or age == 30')
else:
print('...') | age = 20
if age >= 20 and age == 30:
print('age == 30')
elif age >= 20 or age == 30:
print(' age >= 20 or age == 30')
else:
print('...') |
def namta(p=1):
for i in range(1, 11):
print(p, "x", i, "=", p*i)
namta(5)
namta()
| def namta(p=1):
for i in range(1, 11):
print(p, 'x', i, '=', p * i)
namta(5)
namta() |
num_waves = 2
num_eqn = 2
# Conserved quantities
pressure = 0
velocity = 1
| num_waves = 2
num_eqn = 2
pressure = 0
velocity = 1 |
# Defining our main object of interation
game = [[0,0,0],
[0,0,0],
[0,0,0]]
#printing a column index, printing a row index, now #we have a coordinate to make a move, like c2
def game_board(player=0, row=1, column=1, just_display=False):
print(' 1 2 3')
if not just_display:
game[row][column] = player
for count, row in enumerate(game, 1):
print(count, row)
game_board(just_display=True)
game_board(player=1, row=2, column=1)
# game[0][1] = 1
# game_board()
| game = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
def game_board(player=0, row=1, column=1, just_display=False):
print(' 1 2 3')
if not just_display:
game[row][column] = player
for (count, row) in enumerate(game, 1):
print(count, row)
game_board(just_display=True)
game_board(player=1, row=2, column=1) |
def function_2(x):
return x[0]**2 + x[1]**2
def numerical_diff(f, x):
h = 1e-4
return (f(x+h) - f(x-h)) / (2*h)
def function_tmp1(x0):
return x0*x0 + 4.0**2
def function_tmp2(x1):
return 3.0**2.0 + x1*x1
print(numerical_diff(function_tmp1, 3.0))
print(numerical_diff(function_tmp2, 4.0)) | def function_2(x):
return x[0] ** 2 + x[1] ** 2
def numerical_diff(f, x):
h = 0.0001
return (f(x + h) - f(x - h)) / (2 * h)
def function_tmp1(x0):
return x0 * x0 + 4.0 ** 2
def function_tmp2(x1):
return 3.0 ** 2.0 + x1 * x1
print(numerical_diff(function_tmp1, 3.0))
print(numerical_diff(function_tmp2, 4.0)) |
JOBS_RAW = {
0: {
"Name": "Farmer"
},
1: {
"Name": "Baker"
},
2: {
"Name": "Lumberjack"
},
3: {
"Name": "Carpenter"
}
} | jobs_raw = {0: {'Name': 'Farmer'}, 1: {'Name': 'Baker'}, 2: {'Name': 'Lumberjack'}, 3: {'Name': 'Carpenter'}} |
def work(x):
x = x.split("cat ") #"cat " is a delimiter for the whole command dividing the line on two parts
f = open(x[1], "r") #the second part is a filename or path (in the future)
print(f.read()) #outputs the content of the specified file
| def work(x):
x = x.split('cat ')
f = open(x[1], 'r')
print(f.read()) |
num = int(input('Enter a number:'))
count = 0
while num != 0:
num //= 10
count += 1
print("Total digits are: ", count)
| num = int(input('Enter a number:'))
count = 0
while num != 0:
num //= 10
count += 1
print('Total digits are: ', count) |
class MetodoDeNewton(object):
def __init__(self, f, f_derivada, x0, precisao=0.001, max_interacoes=15):
self.__X = [x0]
self.__interacoes = 0
while self.interacoes < max_interacoes:
self.__X.append(self.X[-1] - f(self.X[-1]) / f_derivada(self.X[-1]))
self.__interacoes += 1
if abs(self.X[-2] - self.X[-1]) <= precisao:
break
@property
def X(self):
return self.__X
@property
def x(self):
return self.__X[-1]
@property
def interacoes(self):
return self.__interacoes
| class Metododenewton(object):
def __init__(self, f, f_derivada, x0, precisao=0.001, max_interacoes=15):
self.__X = [x0]
self.__interacoes = 0
while self.interacoes < max_interacoes:
self.__X.append(self.X[-1] - f(self.X[-1]) / f_derivada(self.X[-1]))
self.__interacoes += 1
if abs(self.X[-2] - self.X[-1]) <= precisao:
break
@property
def x(self):
return self.__X
@property
def x(self):
return self.__X[-1]
@property
def interacoes(self):
return self.__interacoes |
S = input()
t = ''.join(c if c in 'ACGT' else ' ' for c in S)
print(max(map(len, t.split(' '))))
| s = input()
t = ''.join((c if c in 'ACGT' else ' ' for c in S))
print(max(map(len, t.split(' ')))) |
# coding=utf-8
def point_inside(p, bounds):
return bounds[3] <= p[0] <= bounds[1] and bounds[0] <= p[1] <= bounds[2]
| def point_inside(p, bounds):
return bounds[3] <= p[0] <= bounds[1] and bounds[0] <= p[1] <= bounds[2] |
#Python Operators
x = 9
y = 3
#Arithmetic operators
print(x+y) #Addition
print(x-y) #Subtraction
print(x*y) #Multiplication
print(x/y) #Division
print(x%y) #Modulus
print(x**y) #Exponentiation
x = 9.191823
print(x//y) #Floor division
#Assignment operators
x = 9
x += 3
print(x)
x = 9
x -= 3
print(x)
x *= 3
print(x)
x /= 3
print(x)
x **= 3
print(x)
#Comparison operators
x = 9
y = 3
print(x==y) #True if x equals y, False otherwise
print(x != y) #True if x does not equal y, False otherwise
print(x > y) #True if x is greater than y, False otherwise
print(x < y) #True if x is less than y, False otherwise
print(x >= y) #True if x is greater than or equal to y, False otherwise
print(x <= y) #True if x is less than or equal to y, False otherwise | x = 9
y = 3
print(x + y)
print(x - y)
print(x * y)
print(x / y)
print(x % y)
print(x ** y)
x = 9.191823
print(x // y)
x = 9
x += 3
print(x)
x = 9
x -= 3
print(x)
x *= 3
print(x)
x /= 3
print(x)
x **= 3
print(x)
x = 9
y = 3
print(x == y)
print(x != y)
print(x > y)
print(x < y)
print(x >= y)
print(x <= y) |
# 2020.04.27
# https://leetcode.com/problems/add-two-numbers/submissions/
# works
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
# def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode:
def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode:
# Part 1: turn the linked lists into listspart
# get values into list:
list1 = []
list1.append(l1.val)
mask = l1
while mask.next:
if mask.next:
list1.append(mask.next.val)
if mask.next.next:
mask = mask.next
else:
break
print(list1)
# get values into list:
list2 = []
list2.append(l2.val)
mask = l2
while mask.next:
if mask.next:
list2.append(mask.next.val)
if mask.next.next:
mask = mask.next
else:
break
print(list2)
# part 2: reverse the numbers
l1 = list1
l2 = list2
# convert list 1
l1 = l1[::-1] # reverse the order
strL = ""
l1 = int("".join(map(str, l1))) # convert to a single number
print(l1)
# convert list 2
l2 = l2[::-1] # reverse the order
strL = ""
l2 = int("".join(map(str, l2))) # convert to a single number
print(l2)
# add and make a new backwards list
# add list 1 and list 2
l3 = l1 + l2 # add the numbers
l3 = list(str(l3)) # convert to list of digits (string form)
l3 = list(map(int, l3)) # convert to a list of digits
l3 = l3[::-1] # reverse the order
print(l3)
# turn back into a linked list
# swap names
list3 = l3
# start the linked list
l3 = ListNode(list3[0])
# remove first item
list3.pop(0)
mask = l3
for i in list3: # now one digit shorter
mask.next = ListNode(i) # create node for each item in list
# print(mask.next.val)
mask = mask.next
print(l3.val)
print(l3.next.val)
print(l3.next.next.val)
return l3
xx = Solution()
l1 = ListNode(2)
l1.next = ListNode(4)
l1.next.next = ListNode(3)
l2 = ListNode(5)
l2.next = ListNode(6)
l2.next.next = ListNode(4)
xx.addTwoNumbers(l1, l2)
| class Listnode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def add_two_numbers(self, l1: ListNode, l2: ListNode) -> ListNode:
list1 = []
list1.append(l1.val)
mask = l1
while mask.next:
if mask.next:
list1.append(mask.next.val)
if mask.next.next:
mask = mask.next
else:
break
print(list1)
list2 = []
list2.append(l2.val)
mask = l2
while mask.next:
if mask.next:
list2.append(mask.next.val)
if mask.next.next:
mask = mask.next
else:
break
print(list2)
l1 = list1
l2 = list2
l1 = l1[::-1]
str_l = ''
l1 = int(''.join(map(str, l1)))
print(l1)
l2 = l2[::-1]
str_l = ''
l2 = int(''.join(map(str, l2)))
print(l2)
l3 = l1 + l2
l3 = list(str(l3))
l3 = list(map(int, l3))
l3 = l3[::-1]
print(l3)
list3 = l3
l3 = list_node(list3[0])
list3.pop(0)
mask = l3
for i in list3:
mask.next = list_node(i)
mask = mask.next
print(l3.val)
print(l3.next.val)
print(l3.next.next.val)
return l3
xx = solution()
l1 = list_node(2)
l1.next = list_node(4)
l1.next.next = list_node(3)
l2 = list_node(5)
l2.next = list_node(6)
l2.next.next = list_node(4)
xx.addTwoNumbers(l1, l2) |
KNOWN_PATHS = [
"/etc/systemd/*",
"/etc/systemd/**/*",
"/lib/systemd/*",
"/lib/systemd/**/*",
"/run/systemd/*",
"/run/systemd/**/*",
"/usr/lib/systemd/*",
"/usr/lib/systemd/**/*",
]
KNOWN_DROPIN_PATHS = {
"user.conf": [
"/etc/systemd/%unit%.d/*.conf", "/run/systemd/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
"system.conf": [
"/etc/systemd/%unit%.d/*.conf", "/run/systemd/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
".service": [
"/etc/systemd/system/%unit%.d/*.conf", "/run/systemd/system/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
".target": [
"/etc/systemd/system/%unit%.d/*.conf", "/run/systemd/system/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
".mount": [
"/etc/systemd/system/%unit%.d/*.conf", "/run/systemd/system/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
".automount": [
"/etc/systemd/system/%unit%.d/*.conf", "/run/systemd/system/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
".device": [
"/etc/systemd/system/%unit%.d/*.conf", "/run/systemd/system/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
".swap": [
"/etc/systemd/system/%unit%.d/*.conf", "/run/systemd/system/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
".path": [
"/etc/systemd/system/%unit%.d/*.conf", "/run/systemd/system/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
".timer": [
"/etc/systemd/system/%unit%.d/*.conf", "/run/systemd/system/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
".scope": [
"/etc/systemd/system/%unit%.d/*.conf", "/run/systemd/system/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
".slice": [
"/etc/systemd/system/%unit%.d/*.conf", "/run/systemd/system/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
".network": [
"/etc/systemd/network/%unit%.d/*.conf", "/run/systemd/network/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
".netdev": [
"/etc/systemd/%unit%.d/*.conf", "/run/systemd/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
"timesyncd.conf": [
"/etc/systemd/%unit%.d/*.conf", "/run/systemd/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
"journald.conf": [
"/etc/systemd/%unit%.d/*.conf", "/run/systemd/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
"journal-upload.conf": [
"/etc/systemd/%unit%.d/*.conf", "/run/systemd/%unit%.d/*.conf", "/usr/lib/systemd/%unit%.d/*.conf", "/lib/systemd/%unit%.d/*.conf"
],
}
| known_paths = ['/etc/systemd/*', '/etc/systemd/**/*', '/lib/systemd/*', '/lib/systemd/**/*', '/run/systemd/*', '/run/systemd/**/*', '/usr/lib/systemd/*', '/usr/lib/systemd/**/*']
known_dropin_paths = {'user.conf': ['/etc/systemd/%unit%.d/*.conf', '/run/systemd/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], 'system.conf': ['/etc/systemd/%unit%.d/*.conf', '/run/systemd/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], '.service': ['/etc/systemd/system/%unit%.d/*.conf', '/run/systemd/system/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], '.target': ['/etc/systemd/system/%unit%.d/*.conf', '/run/systemd/system/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], '.mount': ['/etc/systemd/system/%unit%.d/*.conf', '/run/systemd/system/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], '.automount': ['/etc/systemd/system/%unit%.d/*.conf', '/run/systemd/system/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], '.device': ['/etc/systemd/system/%unit%.d/*.conf', '/run/systemd/system/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], '.swap': ['/etc/systemd/system/%unit%.d/*.conf', '/run/systemd/system/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], '.path': ['/etc/systemd/system/%unit%.d/*.conf', '/run/systemd/system/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], '.timer': ['/etc/systemd/system/%unit%.d/*.conf', '/run/systemd/system/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], '.scope': ['/etc/systemd/system/%unit%.d/*.conf', '/run/systemd/system/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], '.slice': ['/etc/systemd/system/%unit%.d/*.conf', '/run/systemd/system/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], '.network': ['/etc/systemd/network/%unit%.d/*.conf', '/run/systemd/network/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], '.netdev': ['/etc/systemd/%unit%.d/*.conf', '/run/systemd/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], 'timesyncd.conf': ['/etc/systemd/%unit%.d/*.conf', '/run/systemd/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], 'journald.conf': ['/etc/systemd/%unit%.d/*.conf', '/run/systemd/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf'], 'journal-upload.conf': ['/etc/systemd/%unit%.d/*.conf', '/run/systemd/%unit%.d/*.conf', '/usr/lib/systemd/%unit%.d/*.conf', '/lib/systemd/%unit%.d/*.conf']} |
# Created by MechAviv
# ID :: [101000010]
# Ellinia : Magic Library
sm.warp(101000000, 4) | sm.warp(101000000, 4) |
class SubrectangleQueries:
def __init__(self, rectangle: List[List[int]]):
self.rectangle = rectangle
def updateSubrectangle(self, row1: int, col1: int, row2: int, col2: int, newValue: int) -> None:
self.row1, self.col1, self.row2, self.col2, self.newValue = row1, col1, row2, col2, newValue
for i in range(self.row1, self.row2 + 1) :
for j in range(self.col1, self.col2 + 1):
self.rectangle[i][j] = self.newValue
def getValue(self, row: int, col: int) -> int:
self.row = row
self.col = col
return self.rectangle[self.row][self.col]
# Your SubrectangleQueries object will be instantiated and called as such:
# obj = SubrectangleQueries(rectangle)
# obj.updateSubrectangle(row1,col1,row2,col2,newValue)
# param_2 = obj.getValue(row,col) | class Subrectanglequeries:
def __init__(self, rectangle: List[List[int]]):
self.rectangle = rectangle
def update_subrectangle(self, row1: int, col1: int, row2: int, col2: int, newValue: int) -> None:
(self.row1, self.col1, self.row2, self.col2, self.newValue) = (row1, col1, row2, col2, newValue)
for i in range(self.row1, self.row2 + 1):
for j in range(self.col1, self.col2 + 1):
self.rectangle[i][j] = self.newValue
def get_value(self, row: int, col: int) -> int:
self.row = row
self.col = col
return self.rectangle[self.row][self.col] |
# 2nd Solution
i = 4
d = 4.0
s = 'HackerRank '
a = int(input())
b = float(input())
c = input()
print(i+a)
print(d+b)
print(s+c) | i = 4
d = 4.0
s = 'HackerRank '
a = int(input())
b = float(input())
c = input()
print(i + a)
print(d + b)
print(s + c) |
{
'includes': [
'common.gyp',
'amo.gypi',
],
'targets': [
{
'target_name': 'amo',
'product_name': 'amo',
'type': 'none',
'sources': [
'<@(source_code_amo)',
],
'dependencies': [
]
},
]
} | {'includes': ['common.gyp', 'amo.gypi'], 'targets': [{'target_name': 'amo', 'product_name': 'amo', 'type': 'none', 'sources': ['<@(source_code_amo)'], 'dependencies': []}]} |
def imprime_quadro(numeros):
print('.' * (len(numeros) + 2))
maior_numero = max(numeros)
numeros_traduzidos = []
for numero in numeros:
numeros_traduzidos.append(['|' if n < numero else ' ' for n in range(maior_numero)][::-1])
for linha in zip(*numeros_traduzidos):
print('.' + ''.join(linha) + '.')
print('.' * (len(numeros) + 2))
def bubble_sort(numeros):
while numeros != sorted(numeros):
for index in range(len(numeros) - 1):
if numeros[index] > numeros[index + 1]:
numeros[index], numeros[index + 1] = numeros[index + 1], numeros[index]
imprime_quadro(numeros)
def selection_sort(numeros):
index = 0
while numeros != sorted(numeros):
menor_numero = min(numeros[index:])
index_menor_numero = numeros[index:].index(menor_numero) + index
if numeros[index] > menor_numero:
numeros[index], numeros[index_menor_numero] = menor_numero, numeros[index]
index += 1
imprime_quadro(numeros)
def insertion_sort(numeros):
index_main = 1
while numeros != sorted(numeros):
index = index_main
while index > 0 and numeros[index] < numeros[index - 1]:
numeros[index], numeros[index - 1] = numeros[index - 1], numeros[index]
index -= 1
index_main += 1
imprime_quadro(numeros)
algoritmos = {'bubble':bubble_sort, 'selection':selection_sort, 'insertion':insertion_sort}
algoritmo_escolhido = input()
numeros = [int(n) for n in input().split()]
imprime_quadro(numeros)
algoritmos[algoritmo_escolhido](numeros) | def imprime_quadro(numeros):
print('.' * (len(numeros) + 2))
maior_numero = max(numeros)
numeros_traduzidos = []
for numero in numeros:
numeros_traduzidos.append(['|' if n < numero else ' ' for n in range(maior_numero)][::-1])
for linha in zip(*numeros_traduzidos):
print('.' + ''.join(linha) + '.')
print('.' * (len(numeros) + 2))
def bubble_sort(numeros):
while numeros != sorted(numeros):
for index in range(len(numeros) - 1):
if numeros[index] > numeros[index + 1]:
(numeros[index], numeros[index + 1]) = (numeros[index + 1], numeros[index])
imprime_quadro(numeros)
def selection_sort(numeros):
index = 0
while numeros != sorted(numeros):
menor_numero = min(numeros[index:])
index_menor_numero = numeros[index:].index(menor_numero) + index
if numeros[index] > menor_numero:
(numeros[index], numeros[index_menor_numero]) = (menor_numero, numeros[index])
index += 1
imprime_quadro(numeros)
def insertion_sort(numeros):
index_main = 1
while numeros != sorted(numeros):
index = index_main
while index > 0 and numeros[index] < numeros[index - 1]:
(numeros[index], numeros[index - 1]) = (numeros[index - 1], numeros[index])
index -= 1
index_main += 1
imprime_quadro(numeros)
algoritmos = {'bubble': bubble_sort, 'selection': selection_sort, 'insertion': insertion_sort}
algoritmo_escolhido = input()
numeros = [int(n) for n in input().split()]
imprime_quadro(numeros)
algoritmos[algoritmo_escolhido](numeros) |
#
a, b = 10, 10
print(a == b)
print(a is b)
print(id(a), id(b))
a1 = [1, 2, 3, 4]
b1 = [1, 2, 3, 4]
print(a1 == b1)
print(a1 is b1)
print(id(a1), id(b1))
| (a, b) = (10, 10)
print(a == b)
print(a is b)
print(id(a), id(b))
a1 = [1, 2, 3, 4]
b1 = [1, 2, 3, 4]
print(a1 == b1)
print(a1 is b1)
print(id(a1), id(b1)) |
total = 0
media = 0.0
for i in range(6):
num = float(input())
if num > 0.0:
total += 1
media += num
print('{} valores positivos'.format(total))
print('{:.1f}'.format(media/total))
| total = 0
media = 0.0
for i in range(6):
num = float(input())
if num > 0.0:
total += 1
media += num
print('{} valores positivos'.format(total))
print('{:.1f}'.format(media / total)) |
# http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/JIS0201.TXT
JIS0201_map = {
'20' : 0x0020, # SPACE
'21' : 0x0021, # EXCLAMATION MARK
'22' : 0x0022, # QUOTATION MARK
'23' : 0x0023, # NUMBER SIGN
'24' : 0x0024, # DOLLAR SIGN
'25' : 0x0025, # PERCENT SIGN
'26' : 0x0026, # AMPERSAND
'27' : 0x0027, # APOSTROPHE
'28' : 0x0028, # LEFT PARENTHESIS
'29' : 0x0029, # RIGHT PARENTHESIS
'2A' : 0x002A, # ASTERISK
'2B' : 0x002B, # PLUS SIGN
'2C' : 0x002C, # COMMA
'2D' : 0x002D, # HYPHEN-MINUS
'2E' : 0x002E, # FULL STOP
'2F' : 0x002F, # SOLIDUS
'30' : 0x0030, # DIGIT ZERO
'31' : 0x0031, # DIGIT ONE
'32' : 0x0032, # DIGIT TWO
'33' : 0x0033, # DIGIT THREE
'34' : 0x0034, # DIGIT FOUR
'35' : 0x0035, # DIGIT FIVE
'36' : 0x0036, # DIGIT SIX
'37' : 0x0037, # DIGIT SEVEN
'38' : 0x0038, # DIGIT EIGHT
'39' : 0x0039, # DIGIT NINE
'3A' : 0x003A, # COLON
'3B' : 0x003B, # SEMICOLON
'3C' : 0x003C, # LESS-THAN SIGN
'3D' : 0x003D, # EQUALS SIGN
'3E' : 0x003E, # GREATER-THAN SIGN
'3F' : 0x003F, # QUESTION MARK
'40' : 0x0040, # COMMERCIAL AT
'41' : 0x0041, # LATIN CAPITAL LETTER A
'42' : 0x0042, # LATIN CAPITAL LETTER B
'43' : 0x0043, # LATIN CAPITAL LETTER C
'44' : 0x0044, # LATIN CAPITAL LETTER D
'45' : 0x0045, # LATIN CAPITAL LETTER E
'46' : 0x0046, # LATIN CAPITAL LETTER F
'47' : 0x0047, # LATIN CAPITAL LETTER G
'48' : 0x0048, # LATIN CAPITAL LETTER H
'49' : 0x0049, # LATIN CAPITAL LETTER I
'4A' : 0x004A, # LATIN CAPITAL LETTER J
'4B' : 0x004B, # LATIN CAPITAL LETTER K
'4C' : 0x004C, # LATIN CAPITAL LETTER L
'4D' : 0x004D, # LATIN CAPITAL LETTER M
'4E' : 0x004E, # LATIN CAPITAL LETTER N
'4F' : 0x004F, # LATIN CAPITAL LETTER O
'50' : 0x0050, # LATIN CAPITAL LETTER P
'51' : 0x0051, # LATIN CAPITAL LETTER Q
'52' : 0x0052, # LATIN CAPITAL LETTER R
'53' : 0x0053, # LATIN CAPITAL LETTER S
'54' : 0x0054, # LATIN CAPITAL LETTER T
'55' : 0x0055, # LATIN CAPITAL LETTER U
'56' : 0x0056, # LATIN CAPITAL LETTER V
'57' : 0x0057, # LATIN CAPITAL LETTER W
'58' : 0x0058, # LATIN CAPITAL LETTER X
'59' : 0x0059, # LATIN CAPITAL LETTER Y
'5A' : 0x005A, # LATIN CAPITAL LETTER Z
'5B' : 0x005B, # LEFT SQUARE BRACKET
'5C' : 0x00A5, # YEN SIGN
'5D' : 0x005D, # RIGHT SQUARE BRACKET
'5E' : 0x005E, # CIRCUMFLEX ACCENT
'5F' : 0x005F, # LOW LINE
'60' : 0x0060, # GRAVE ACCENT
'61' : 0x0061, # LATIN SMALL LETTER A
'62' : 0x0062, # LATIN SMALL LETTER B
'63' : 0x0063, # LATIN SMALL LETTER C
'64' : 0x0064, # LATIN SMALL LETTER D
'65' : 0x0065, # LATIN SMALL LETTER E
'66' : 0x0066, # LATIN SMALL LETTER F
'67' : 0x0067, # LATIN SMALL LETTER G
'68' : 0x0068, # LATIN SMALL LETTER H
'69' : 0x0069, # LATIN SMALL LETTER I
'6A' : 0x006A, # LATIN SMALL LETTER J
'6B' : 0x006B, # LATIN SMALL LETTER K
'6C' : 0x006C, # LATIN SMALL LETTER L
'6D' : 0x006D, # LATIN SMALL LETTER M
'6E' : 0x006E, # LATIN SMALL LETTER N
'6F' : 0x006F, # LATIN SMALL LETTER O
'70' : 0x0070, # LATIN SMALL LETTER P
'71' : 0x0071, # LATIN SMALL LETTER Q
'72' : 0x0072, # LATIN SMALL LETTER R
'73' : 0x0073, # LATIN SMALL LETTER S
'74' : 0x0074, # LATIN SMALL LETTER T
'75' : 0x0075, # LATIN SMALL LETTER U
'76' : 0x0076, # LATIN SMALL LETTER V
'77' : 0x0077, # LATIN SMALL LETTER W
'78' : 0x0078, # LATIN SMALL LETTER X
'79' : 0x0079, # LATIN SMALL LETTER Y
'7A' : 0x007A, # LATIN SMALL LETTER Z
'7B' : 0x007B, # LEFT CURLY BRACKET
'7C' : 0x007C, # VERTICAL LINE
'7D' : 0x007D, # RIGHT CURLY BRACKET
'7E' : 0x203E, # OVERLINE
'A1' : 0xFF61, # HALFWIDTH IDEOGRAPHIC FULL STOP
'A2' : 0xFF62, # HALFWIDTH LEFT CORNER BRACKET
'A3' : 0xFF63, # HALFWIDTH RIGHT CORNER BRACKET
'A4' : 0xFF64, # HALFWIDTH IDEOGRAPHIC COMMA
'A5' : 0xFF65, # HALFWIDTH KATAKANA MIDDLE DOT
'A6' : 0xFF66, # HALFWIDTH KATAKANA LETTER WO
'A7' : 0xFF67, # HALFWIDTH KATAKANA LETTER SMALL A
'A8' : 0xFF68, # HALFWIDTH KATAKANA LETTER SMALL I
'A9' : 0xFF69, # HALFWIDTH KATAKANA LETTER SMALL U
'AA' : 0xFF6A, # HALFWIDTH KATAKANA LETTER SMALL E
'AB' : 0xFF6B, # HALFWIDTH KATAKANA LETTER SMALL O
'AC' : 0xFF6C, # HALFWIDTH KATAKANA LETTER SMALL YA
'AD' : 0xFF6D, # HALFWIDTH KATAKANA LETTER SMALL YU
'AE' : 0xFF6E, # HALFWIDTH KATAKANA LETTER SMALL YO
'AF' : 0xFF6F, # HALFWIDTH KATAKANA LETTER SMALL TU
'B0' : 0xFF70, # HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
'B1' : 0xFF71, # HALFWIDTH KATAKANA LETTER A
'B2' : 0xFF72, # HALFWIDTH KATAKANA LETTER I
'B3' : 0xFF73, # HALFWIDTH KATAKANA LETTER U
'B4' : 0xFF74, # HALFWIDTH KATAKANA LETTER E
'B5' : 0xFF75, # HALFWIDTH KATAKANA LETTER O
'B6' : 0xFF76, # HALFWIDTH KATAKANA LETTER KA
'B7' : 0xFF77, # HALFWIDTH KATAKANA LETTER KI
'B8' : 0xFF78, # HALFWIDTH KATAKANA LETTER KU
'B9' : 0xFF79, # HALFWIDTH KATAKANA LETTER KE
'BA' : 0xFF7A, # HALFWIDTH KATAKANA LETTER KO
'BB' : 0xFF7B, # HALFWIDTH KATAKANA LETTER SA
'BC' : 0xFF7C, # HALFWIDTH KATAKANA LETTER SI
'BD' : 0xFF7D, # HALFWIDTH KATAKANA LETTER SU
'BE' : 0xFF7E, # HALFWIDTH KATAKANA LETTER SE
'BF' : 0xFF7F, # HALFWIDTH KATAKANA LETTER SO
'C0' : 0xFF80, # HALFWIDTH KATAKANA LETTER TA
'C1' : 0xFF81, # HALFWIDTH KATAKANA LETTER TI
'C2' : 0xFF82, # HALFWIDTH KATAKANA LETTER TU
'C3' : 0xFF83, # HALFWIDTH KATAKANA LETTER TE
'C4' : 0xFF84, # HALFWIDTH KATAKANA LETTER TO
'C5' : 0xFF85, # HALFWIDTH KATAKANA LETTER NA
'C6' : 0xFF86, # HALFWIDTH KATAKANA LETTER NI
'C7' : 0xFF87, # HALFWIDTH KATAKANA LETTER NU
'C8' : 0xFF88, # HALFWIDTH KATAKANA LETTER NE
'C9' : 0xFF89, # HALFWIDTH KATAKANA LETTER NO
'CA' : 0xFF8A, # HALFWIDTH KATAKANA LETTER HA
'CB' : 0xFF8B, # HALFWIDTH KATAKANA LETTER HI
'CC' : 0xFF8C, # HALFWIDTH KATAKANA LETTER HU
'CD' : 0xFF8D, # HALFWIDTH KATAKANA LETTER HE
'CE' : 0xFF8E, # HALFWIDTH KATAKANA LETTER HO
'CF' : 0xFF8F, # HALFWIDTH KATAKANA LETTER MA
'D0' : 0xFF90, # HALFWIDTH KATAKANA LETTER MI
'D1' : 0xFF91, # HALFWIDTH KATAKANA LETTER MU
'D2' : 0xFF92, # HALFWIDTH KATAKANA LETTER ME
'D3' : 0xFF93, # HALFWIDTH KATAKANA LETTER MO
'D4' : 0xFF94, # HALFWIDTH KATAKANA LETTER YA
'D5' : 0xFF95, # HALFWIDTH KATAKANA LETTER YU
'D6' : 0xFF96, # HALFWIDTH KATAKANA LETTER YO
'D7' : 0xFF97, # HALFWIDTH KATAKANA LETTER RA
'D8' : 0xFF98, # HALFWIDTH KATAKANA LETTER RI
'D9' : 0xFF99, # HALFWIDTH KATAKANA LETTER RU
'DA' : 0xFF9A, # HALFWIDTH KATAKANA LETTER RE
'DB' : 0xFF9B, # HALFWIDTH KATAKANA LETTER RO
'DC' : 0xFF9C, # HALFWIDTH KATAKANA LETTER WA
'DD' : 0xFF9D, # HALFWIDTH KATAKANA LETTER N
'DE' : 0xFF9E, # HALFWIDTH KATAKANA VOICED SOUND MARK
'DF' : 0xFF9F, # HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
} | jis0201_map = {'20': 32, '21': 33, '22': 34, '23': 35, '24': 36, '25': 37, '26': 38, '27': 39, '28': 40, '29': 41, '2A': 42, '2B': 43, '2C': 44, '2D': 45, '2E': 46, '2F': 47, '30': 48, '31': 49, '32': 50, '33': 51, '34': 52, '35': 53, '36': 54, '37': 55, '38': 56, '39': 57, '3A': 58, '3B': 59, '3C': 60, '3D': 61, '3E': 62, '3F': 63, '40': 64, '41': 65, '42': 66, '43': 67, '44': 68, '45': 69, '46': 70, '47': 71, '48': 72, '49': 73, '4A': 74, '4B': 75, '4C': 76, '4D': 77, '4E': 78, '4F': 79, '50': 80, '51': 81, '52': 82, '53': 83, '54': 84, '55': 85, '56': 86, '57': 87, '58': 88, '59': 89, '5A': 90, '5B': 91, '5C': 165, '5D': 93, '5E': 94, '5F': 95, '60': 96, '61': 97, '62': 98, '63': 99, '64': 100, '65': 101, '66': 102, '67': 103, '68': 104, '69': 105, '6A': 106, '6B': 107, '6C': 108, '6D': 109, '6E': 110, '6F': 111, '70': 112, '71': 113, '72': 114, '73': 115, '74': 116, '75': 117, '76': 118, '77': 119, '78': 120, '79': 121, '7A': 122, '7B': 123, '7C': 124, '7D': 125, '7E': 8254, 'A1': 65377, 'A2': 65378, 'A3': 65379, 'A4': 65380, 'A5': 65381, 'A6': 65382, 'A7': 65383, 'A8': 65384, 'A9': 65385, 'AA': 65386, 'AB': 65387, 'AC': 65388, 'AD': 65389, 'AE': 65390, 'AF': 65391, 'B0': 65392, 'B1': 65393, 'B2': 65394, 'B3': 65395, 'B4': 65396, 'B5': 65397, 'B6': 65398, 'B7': 65399, 'B8': 65400, 'B9': 65401, 'BA': 65402, 'BB': 65403, 'BC': 65404, 'BD': 65405, 'BE': 65406, 'BF': 65407, 'C0': 65408, 'C1': 65409, 'C2': 65410, 'C3': 65411, 'C4': 65412, 'C5': 65413, 'C6': 65414, 'C7': 65415, 'C8': 65416, 'C9': 65417, 'CA': 65418, 'CB': 65419, 'CC': 65420, 'CD': 65421, 'CE': 65422, 'CF': 65423, 'D0': 65424, 'D1': 65425, 'D2': 65426, 'D3': 65427, 'D4': 65428, 'D5': 65429, 'D6': 65430, 'D7': 65431, 'D8': 65432, 'D9': 65433, 'DA': 65434, 'DB': 65435, 'DC': 65436, 'DD': 65437, 'DE': 65438, 'DF': 65439} |
#it is collection of data and methods.
class gohul:
a=100
b=200
def func(self):
print("Inside function")
print(gohul.func(1))
object=gohul()
print(object.a)
print(object.b)
print(object.func())
object1=gohul()
print(object1.a)
| class Gohul:
a = 100
b = 200
def func(self):
print('Inside function')
print(gohul.func(1))
object = gohul()
print(object.a)
print(object.b)
print(object.func())
object1 = gohul()
print(object1.a) |
class LandingPage:
@staticmethod
def get():
return 'Beautiful UI'
| class Landingpage:
@staticmethod
def get():
return 'Beautiful UI' |
class Peptide:
def __init__(self, sequence, proteinID, modification, mass, isNterm):
self.sequence = sequence
self.length = len(self.sequence)
self.proteinID = [proteinID]
self.modification = modification
self.massArray = self.getMassArray(mass)
self.totalResidueMass = self.getTotalResidueMass()
self.pm = self.getPrecursorMass(mass)
self.isNterm = isNterm
def getMassArray(self, mass):
massArray = []
sequence = self.sequence
position = self.modification['position']
deltaMass = self.modification['deltaMass']
for i in range(self.length):
massArray.append(mass[sequence[i].upper()])
for i in range(len(position)):
massArray[position[i]] += deltaMass[i]
return massArray
def getTotalResidueMass(self):
totalResidueMass = sum(self.massArray)
return totalResidueMass
def getPrecursorMass(self, mass):
pm = self.totalResidueMass
pm = pm + mass['Hatom'] * 2 + mass['Oatom']
return pm
def getMassList(self, mass, param):
massList = []
fwdMass = 0
massArray = self.massArray
totalResidueMass = self.totalResidueMass
useAIon = param['useAIon']
for i in range(self.length - 1):
fragment = dict()
fwdMass += massArray[i]
revMass = totalResidueMass - fwdMass
fragment['b'] = fwdMass + mass['BIonRes']
fragment['y'] = revMass + mass['YIonRes']
if useAIon:
fragment['a'] = fwdMass + mass['AIonRes']
massList.append(fragment)
return massList
| class Peptide:
def __init__(self, sequence, proteinID, modification, mass, isNterm):
self.sequence = sequence
self.length = len(self.sequence)
self.proteinID = [proteinID]
self.modification = modification
self.massArray = self.getMassArray(mass)
self.totalResidueMass = self.getTotalResidueMass()
self.pm = self.getPrecursorMass(mass)
self.isNterm = isNterm
def get_mass_array(self, mass):
mass_array = []
sequence = self.sequence
position = self.modification['position']
delta_mass = self.modification['deltaMass']
for i in range(self.length):
massArray.append(mass[sequence[i].upper()])
for i in range(len(position)):
massArray[position[i]] += deltaMass[i]
return massArray
def get_total_residue_mass(self):
total_residue_mass = sum(self.massArray)
return totalResidueMass
def get_precursor_mass(self, mass):
pm = self.totalResidueMass
pm = pm + mass['Hatom'] * 2 + mass['Oatom']
return pm
def get_mass_list(self, mass, param):
mass_list = []
fwd_mass = 0
mass_array = self.massArray
total_residue_mass = self.totalResidueMass
use_a_ion = param['useAIon']
for i in range(self.length - 1):
fragment = dict()
fwd_mass += massArray[i]
rev_mass = totalResidueMass - fwdMass
fragment['b'] = fwdMass + mass['BIonRes']
fragment['y'] = revMass + mass['YIonRes']
if useAIon:
fragment['a'] = fwdMass + mass['AIonRes']
massList.append(fragment)
return massList |
#CMPUT 410 Lab1 by Chongyang Ye
#This program allows add courses and
#corresponding marks for a student
#and count the average score
class Student:
courseMarks={}
name= ""
def __init__(self,name,family):
self.name = name
self.family = family
def addCourseMark(self, course, mark):
self.courseMarks[course] = mark
def average(self):
grade= []
grade= self.courseMarks.values()
averageGrade= sum(grade)/float(len(grade))
print("The course average for %s is %.2f" %(self.name, averageGrade))
if __name__ == "__main__":
student = Student("Jeff", "Hub")
student.addCourseMark("CMPUT410", 90)
student.addCourseMark("CMPUT379", 95)
student.addCourseMark("CMPUT466", 80)
student.average()
| class Student:
course_marks = {}
name = ''
def __init__(self, name, family):
self.name = name
self.family = family
def add_course_mark(self, course, mark):
self.courseMarks[course] = mark
def average(self):
grade = []
grade = self.courseMarks.values()
average_grade = sum(grade) / float(len(grade))
print('The course average for %s is %.2f' % (self.name, averageGrade))
if __name__ == '__main__':
student = student('Jeff', 'Hub')
student.addCourseMark('CMPUT410', 90)
student.addCourseMark('CMPUT379', 95)
student.addCourseMark('CMPUT466', 80)
student.average() |
{
"targets": [{
"target_name": "defaults",
"sources": [ ],
"conditions": [
['OS=="mac"', {
"sources": [
"src/defaults.mm",
"src/json_formatter.h",
"src/json_formatter.cc"
],
}]
],
'include_dirs': [
"<!@(node -p \"require('node-addon-api').include\")"
],
'libraries': [],
'dependencies': [
"<!(node -p \"require('node-addon-api').gyp\")"
],
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
"xcode_settings": {
"OTHER_CPLUSPLUSFLAGS": ["-std=c++17", "-stdlib=libc++", "-Wextra"],
"OTHER_LDFLAGS": ["-framework CoreFoundation -framework Cocoa -framework Carbon"],
"MACOSX_DEPLOYMENT_TARGET": "10.12"
}
}]
} | {'targets': [{'target_name': 'defaults', 'sources': [], 'conditions': [['OS=="mac"', {'sources': ['src/defaults.mm', 'src/json_formatter.h', 'src/json_formatter.cc']}]], 'include_dirs': ['<!@(node -p "require(\'node-addon-api\').include")'], 'libraries': [], 'dependencies': ['<!(node -p "require(\'node-addon-api\').gyp")'], 'defines': ['NAPI_DISABLE_CPP_EXCEPTIONS'], 'xcode_settings': {'OTHER_CPLUSPLUSFLAGS': ['-std=c++17', '-stdlib=libc++', '-Wextra'], 'OTHER_LDFLAGS': ['-framework CoreFoundation -framework Cocoa -framework Carbon'], 'MACOSX_DEPLOYMENT_TARGET': '10.12'}}]} |
#!/usr/bin/env python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
register_rule("agents/" + _("Agent Plugins"),
"agent_config:nvidia_gpu",
DropdownChoice(
title = _("Nvidia GPU (Linux)"),
help = _("This will deploy the agent plugin <tt>nvidia_gpu</tt> to collect GPU utilization values."),
choices = [
( True, _("Deploy plugin for GPU Monitoring") ),
( None, _("Do not deploy plugin for GPU Monitoring") ),
]
)
)
| register_rule('agents/' + _('Agent Plugins'), 'agent_config:nvidia_gpu', dropdown_choice(title=_('Nvidia GPU (Linux)'), help=_('This will deploy the agent plugin <tt>nvidia_gpu</tt> to collect GPU utilization values.'), choices=[(True, _('Deploy plugin for GPU Monitoring')), (None, _('Do not deploy plugin for GPU Monitoring'))])) |
#!/usr/bin/env python
types = [
("bool", "Bool", "strconv.FormatBool(bool(*%s))", "*%s == false"),
("uint8", "Uint8", "strconv.FormatUint(uint64(*%s), 10)", "*%s == 0"),
("uint16", "Uint16", "strconv.FormatUint(uint64(*%s), 10)", "*%s == 0"),
("uint32", "Uint32", "strconv.FormatUint(uint64(*%s), 10)", "*%s == 0"),
("uint64", "Uint64", "strconv.FormatUint(uint64(*%s), 10)", "*%s == 0"),
("int8", "Int8", "strconv.FormatInt(int64(*%s), 10)", "*%s == 0"),
("int16", "Int16", "strconv.FormatInt(int64(*%s), 10)", "*%s == 0"),
("int32", "Int32", "strconv.FormatInt(int64(*%s), 10)", "*%s == 0"),
("int64", "Int64", "strconv.FormatInt(int64(*%s), 10)", "*%s == 0"),
("float32", "Float32", "strconv.FormatFloat(float64(*%s), 'g', -1, 32)", "*%s == 0.0"),
("float64", "Float64", "strconv.FormatFloat(float64(*%s), 'g', -1, 64)", "*%s == 0.0"),
("string", "String", "string(*%s)", "*%s == \"\""),
("int", "Int", "strconv.Itoa(int(*%s))", "*%s == 0"),
("uint", "Uint", "strconv.FormatUint(uint64(*%s), 10)", "*%s == 0"),
("time.Duration", "Duration", "(*time.Duration)(%s).String()", "*%s == 0"),
# TODO: Func
]
imports = [
"time"
]
imports_stringer = [
"strconv"
]
| types = [('bool', 'Bool', 'strconv.FormatBool(bool(*%s))', '*%s == false'), ('uint8', 'Uint8', 'strconv.FormatUint(uint64(*%s), 10)', '*%s == 0'), ('uint16', 'Uint16', 'strconv.FormatUint(uint64(*%s), 10)', '*%s == 0'), ('uint32', 'Uint32', 'strconv.FormatUint(uint64(*%s), 10)', '*%s == 0'), ('uint64', 'Uint64', 'strconv.FormatUint(uint64(*%s), 10)', '*%s == 0'), ('int8', 'Int8', 'strconv.FormatInt(int64(*%s), 10)', '*%s == 0'), ('int16', 'Int16', 'strconv.FormatInt(int64(*%s), 10)', '*%s == 0'), ('int32', 'Int32', 'strconv.FormatInt(int64(*%s), 10)', '*%s == 0'), ('int64', 'Int64', 'strconv.FormatInt(int64(*%s), 10)', '*%s == 0'), ('float32', 'Float32', "strconv.FormatFloat(float64(*%s), 'g', -1, 32)", '*%s == 0.0'), ('float64', 'Float64', "strconv.FormatFloat(float64(*%s), 'g', -1, 64)", '*%s == 0.0'), ('string', 'String', 'string(*%s)', '*%s == ""'), ('int', 'Int', 'strconv.Itoa(int(*%s))', '*%s == 0'), ('uint', 'Uint', 'strconv.FormatUint(uint64(*%s), 10)', '*%s == 0'), ('time.Duration', 'Duration', '(*time.Duration)(%s).String()', '*%s == 0')]
imports = ['time']
imports_stringer = ['strconv'] |
class OriginEPG():
def __init__(self, fhdhr):
self.fhdhr = fhdhr
def update_epg(self, fhdhr_channels):
programguide = {}
for fhdhr_id in list(fhdhr_channels.list.keys()):
chan_obj = fhdhr_channels.list[fhdhr_id]
if str(chan_obj.number) not in list(programguide.keys()):
programguide[str(chan_obj.number)] = chan_obj.epgdict
return programguide
| class Originepg:
def __init__(self, fhdhr):
self.fhdhr = fhdhr
def update_epg(self, fhdhr_channels):
programguide = {}
for fhdhr_id in list(fhdhr_channels.list.keys()):
chan_obj = fhdhr_channels.list[fhdhr_id]
if str(chan_obj.number) not in list(programguide.keys()):
programguide[str(chan_obj.number)] = chan_obj.epgdict
return programguide |
class TrieNode:
def __init__(self):
self.children = {}
self.endOfString = False
class Trie:
def __init__(self):
self.root = TrieNode()
def insert(self, word):
currNode = self.root
for char in word:
if char not in currNode.children:
currNode.children[char] = TrieNode()
currNode = currNode.children[char]
currNode.endOfString = True
def search(self, word):
currNode = self.root
replace = ""
for char in word:
if char not in currNode.children:
return word
replace += char
currNode = currNode.children[char]
if currNode.endOfString == True:
return replace
return word
class Solution:
def replaceWords(self, dictionary: list[str], sentence: str) -> str:
trie = Trie()
wordsList = sentence.split()
for rootWord in dictionary:
trie.insert(rootWord)
processed_wordList = []
for word in wordsList:
processed_wordList.append(trie.search(word))
return " ".join(processed_wordList)
| class Trienode:
def __init__(self):
self.children = {}
self.endOfString = False
class Trie:
def __init__(self):
self.root = trie_node()
def insert(self, word):
curr_node = self.root
for char in word:
if char not in currNode.children:
currNode.children[char] = trie_node()
curr_node = currNode.children[char]
currNode.endOfString = True
def search(self, word):
curr_node = self.root
replace = ''
for char in word:
if char not in currNode.children:
return word
replace += char
curr_node = currNode.children[char]
if currNode.endOfString == True:
return replace
return word
class Solution:
def replace_words(self, dictionary: list[str], sentence: str) -> str:
trie = trie()
words_list = sentence.split()
for root_word in dictionary:
trie.insert(rootWord)
processed_word_list = []
for word in wordsList:
processed_wordList.append(trie.search(word))
return ' '.join(processed_wordList) |
def get_capabilities():
return [
"bogus_capability"
]
def should_ignore_response():
return True
| def get_capabilities():
return ['bogus_capability']
def should_ignore_response():
return True |
class ExportModuleToFile(object):
def __init__(self, **kargs):
self.moduleId = kargs["moduleId"] if "moduleId" in kargs else None
self.exportType = kargs["exportType"] if "exportType" in kargs else None
| class Exportmoduletofile(object):
def __init__(self, **kargs):
self.moduleId = kargs['moduleId'] if 'moduleId' in kargs else None
self.exportType = kargs['exportType'] if 'exportType' in kargs else None |
class Preprocessor:
def __init__(self, title):
self.title = title
def evaluate(self, value):
return value
| class Preprocessor:
def __init__(self, title):
self.title = title
def evaluate(self, value):
return value |
s=input()
li=list(map(int,s.split(' ')))
while(li!=sorted(li)):
n=(len(li)//2)
for i in range(n):
li.pop()
print(li)
| s = input()
li = list(map(int, s.split(' ')))
while li != sorted(li):
n = len(li) // 2
for i in range(n):
li.pop()
print(li) |
#!/usr/bin/env python3
#Take a list, say for example this one: a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] and write a program that prints out all the elements of the list that are less than 5.
#Extras:
#Instead of printing the elements one by one, make a new list that has all the elements less than 5 from this list in it and print out this new list.
#Write this in one line of Python.
#Ask the user for a number and return a list that contains only elements from the original list a that are smaller than that number given by the user.
#list = input("Input few numbers (comma separated): ").split(",")
list = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
num = int(input("Enter a number for comparison: "))
print ("numbers less than %d are: " %num)
print([element for element in list if element < num])
#2. new_list = []
#for element in list:
# if int(element) < 5:
# new_list.append(element)
#print (new_list)
| list = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
num = int(input('Enter a number for comparison: '))
print('numbers less than %d are: ' % num)
print([element for element in list if element < num]) |
#
# Example file for working with loops
#
def main():
x = 0
# define a while loop
while (x<5):
print(x)
x+=1
# define a for loop
for i in range(5):
x -= 1
print(x)
# use a for loop over a collection
days = ["Mon","Tue","Wed",\
"Thurs","Fri","Sat","Sun"]
for day in days:
print(day)
# use the break and continue statements
for day in days:
if day == "Wed":
continue
if day == "Fri":
break
print(day)
#using the enumerate() function to get index
for index,day in enumerate(days):
print("Day #{} = {}".format(index,day))
if __name__ == "__main__":
main()
| def main():
x = 0
while x < 5:
print(x)
x += 1
for i in range(5):
x -= 1
print(x)
days = ['Mon', 'Tue', 'Wed', 'Thurs', 'Fri', 'Sat', 'Sun']
for day in days:
print(day)
for day in days:
if day == 'Wed':
continue
if day == 'Fri':
break
print(day)
for (index, day) in enumerate(days):
print('Day #{} = {}'.format(index, day))
if __name__ == '__main__':
main() |
def solution(S):
hash1 = dict()
count = 0
ans = -0
ans_final = 0
if(len(S)==1):
print("0")
pass
else:
for i in range(len(S)):
#print(S[i])
if(S[i] in hash1):
#print("T")
value = hash1[S[i]]
hash1[S[i]] = i
if(value > i):
ans = value - i
count = 0
else:
ans = i - value
if(ans>ans_final):
ans_final = ans
count = 0
#print(ans_final)
else:
hash1[S[i]] = i
count = count + 1
if(count >= ans_final):
if(count==1):
count= count + 1
#print(count)
return(count)
#print(count)
return(count)
else:
#print(ans_final)
if(ans_final==1):
ans_final= ans_final + 1
#print(ans_final)
return(ans_final)
return(ans_final)
S = "cdd"
#print(len(S))
solution(S) | def solution(S):
hash1 = dict()
count = 0
ans = -0
ans_final = 0
if len(S) == 1:
print('0')
pass
else:
for i in range(len(S)):
if S[i] in hash1:
value = hash1[S[i]]
hash1[S[i]] = i
if value > i:
ans = value - i
count = 0
else:
ans = i - value
if ans > ans_final:
ans_final = ans
count = 0
else:
hash1[S[i]] = i
count = count + 1
if count >= ans_final:
if count == 1:
count = count + 1
return count
return count
else:
if ans_final == 1:
ans_final = ans_final + 1
return ans_final
return ans_final
s = 'cdd'
solution(S) |
Size = (400, 400)
Position = (0, 0)
ScaleFactor = 1.0
ZoomLevel = 50.0
Orientation = 0
Mirror = 0
NominalPixelSize = 0.12237
filename = ''
ImageWindow.Center = None
ImageWindow.ViewportCenter = (1.4121498000000001, 1.2090156)
ImageWindow.crosshair_color = (255, 0, 255)
ImageWindow.boxsize = (0.1, 0.06)
ImageWindow.box_color = (128, 128, 255)
ImageWindow.show_box = False
ImageWindow.Scale = [[-0.5212962, -0.0758694], [-0.073422, -0.0073422]]
ImageWindow.show_scale = True
ImageWindow.scale_color = (128, 128, 255)
ImageWindow.crosshair_size = (0.05, 0.05)
ImageWindow.show_crosshair = True
ImageWindow.show_profile = False
ImageWindow.show_FWHM = False
ImageWindow.show_center = False
ImageWindow.calculate_section = False
ImageWindow.profile_color = (255, 0, 255)
ImageWindow.FWHM_color = (0, 0, 255)
ImageWindow.center_color = (0, 0, 255)
ImageWindow.ROI = [[-0.2, -0.2], [0.2, 0.2]]
ImageWindow.ROI_color = (255, 255, 0)
ImageWindow.show_saturated_pixels = False
ImageWindow.mask_bad_pixels = False
ImageWindow.saturation_threshold = 233
ImageWindow.saturated_color = (255, 0, 0)
ImageWindow.linearity_correction = False
ImageWindow.bad_pixel_threshold = 233
ImageWindow.bad_pixel_color = (30, 30, 30)
ImageWindow.show_grid = False
ImageWindow.grid_type = 'xy'
ImageWindow.grid_color = (0, 0, 255)
ImageWindow.grid_x_spacing = 1.0
ImageWindow.grid_x_offset = 0.0
ImageWindow.grid_y_spacing = 1.0
ImageWindow.grid_y_offset = 0.0
camera.use_multicast = True
camera.IP_addr = 'pico14.niddk.nih.gov'
| size = (400, 400)
position = (0, 0)
scale_factor = 1.0
zoom_level = 50.0
orientation = 0
mirror = 0
nominal_pixel_size = 0.12237
filename = ''
ImageWindow.Center = None
ImageWindow.ViewportCenter = (1.4121498000000001, 1.2090156)
ImageWindow.crosshair_color = (255, 0, 255)
ImageWindow.boxsize = (0.1, 0.06)
ImageWindow.box_color = (128, 128, 255)
ImageWindow.show_box = False
ImageWindow.Scale = [[-0.5212962, -0.0758694], [-0.073422, -0.0073422]]
ImageWindow.show_scale = True
ImageWindow.scale_color = (128, 128, 255)
ImageWindow.crosshair_size = (0.05, 0.05)
ImageWindow.show_crosshair = True
ImageWindow.show_profile = False
ImageWindow.show_FWHM = False
ImageWindow.show_center = False
ImageWindow.calculate_section = False
ImageWindow.profile_color = (255, 0, 255)
ImageWindow.FWHM_color = (0, 0, 255)
ImageWindow.center_color = (0, 0, 255)
ImageWindow.ROI = [[-0.2, -0.2], [0.2, 0.2]]
ImageWindow.ROI_color = (255, 255, 0)
ImageWindow.show_saturated_pixels = False
ImageWindow.mask_bad_pixels = False
ImageWindow.saturation_threshold = 233
ImageWindow.saturated_color = (255, 0, 0)
ImageWindow.linearity_correction = False
ImageWindow.bad_pixel_threshold = 233
ImageWindow.bad_pixel_color = (30, 30, 30)
ImageWindow.show_grid = False
ImageWindow.grid_type = 'xy'
ImageWindow.grid_color = (0, 0, 255)
ImageWindow.grid_x_spacing = 1.0
ImageWindow.grid_x_offset = 0.0
ImageWindow.grid_y_spacing = 1.0
ImageWindow.grid_y_offset = 0.0
camera.use_multicast = True
camera.IP_addr = 'pico14.niddk.nih.gov' |
# Project Euler Problem 7- 10001st prime
# https://projecteuler.net/problem=7
# Answer = 104743
def is_prime(num):
for i in range(2, num):
if (num % i) == 0:
return False
return True
def prime_list():
prime_list = []
num = 2
while True:
if is_prime(num):
prime_list.append(num)
if len(prime_list) == 10001:
return(prime_list[-1])
break
num += 1
print(prime_list())
| def is_prime(num):
for i in range(2, num):
if num % i == 0:
return False
return True
def prime_list():
prime_list = []
num = 2
while True:
if is_prime(num):
prime_list.append(num)
if len(prime_list) == 10001:
return prime_list[-1]
break
num += 1
print(prime_list()) |
# Approach 2 - Greedy with Stack
# Time: O(N)
# Space: O(N)
class Solution:
def removeKdigits(self, num: str, k: int) -> str:
num_stack = []
for digit in num:
while k and num_stack and num_stack[-1] > digit:
num_stack.pop()
k -= 1
num_stack.append(digit)
final_stack = num_stack[:-k] if k else num_stack
return ''.join(final_stack).lstrip("0") or "0"
| class Solution:
def remove_kdigits(self, num: str, k: int) -> str:
num_stack = []
for digit in num:
while k and num_stack and (num_stack[-1] > digit):
num_stack.pop()
k -= 1
num_stack.append(digit)
final_stack = num_stack[:-k] if k else num_stack
return ''.join(final_stack).lstrip('0') or '0' |
def get_keys(filename):
with open(filename) as f:
data = f.read()
doc = data.split("\n")
res = []
li = []
for i in doc:
if i != "":
li.append(i)
else:
res.append(li)
li=[]
return res
if __name__=="__main__":
filename = './input.txt'
input = get_keys(filename)
sum = 0
result = []
for i in input:
check = "".join(i)
result.append(list(set(list(check))))
for i in result:
sum+=len(i)
print(f"Your puzzle answer was {sum}.")
| def get_keys(filename):
with open(filename) as f:
data = f.read()
doc = data.split('\n')
res = []
li = []
for i in doc:
if i != '':
li.append(i)
else:
res.append(li)
li = []
return res
if __name__ == '__main__':
filename = './input.txt'
input = get_keys(filename)
sum = 0
result = []
for i in input:
check = ''.join(i)
result.append(list(set(list(check))))
for i in result:
sum += len(i)
print(f'Your puzzle answer was {sum}.') |
expected_output = {
"mac_table": {
"vlans": {
"100": {
"mac_addresses": {
"ecbd.1dff.5f92": {
"drop": {"drop": True, "entry_type": "dynamic"},
"mac_address": "ecbd.1dff.5f92",
},
"3820.56ff.6f75": {
"interfaces": {
"Port-channel12": {
"interface": "Port-channel12",
"entry_type": "dynamic",
}
},
"mac_address": "3820.56ff.6f75",
},
"58bf.eaff.e508": {
"interfaces": {
"Vlan100": {"interface": "Vlan100", "entry_type": "static"}
},
"mac_address": "58bf.eaff.e508",
},
},
"vlan": 100,
},
"all": {
"mac_addresses": {
"0100.0cff.9999": {
"interfaces": {
"CPU": {"interface": "CPU", "entry_type": "static"}
},
"mac_address": "0100.0cff.9999",
},
"0100.0cff.999a": {
"interfaces": {
"CPU": {"interface": "CPU", "entry_type": "static"}
},
"mac_address": "0100.0cff.999a",
},
},
"vlan": "all",
},
"20": {
"mac_addresses": {
"aaaa.bbff.8888": {
"drop": {"drop": True, "entry_type": "static"},
"mac_address": "aaaa.bbff.8888",
}
},
"vlan": 20,
},
"10": {
"mac_addresses": {
"aaaa.bbff.8888": {
"interfaces": {
"GigabitEthernet1/0/8": {
"entry": "*",
"interface": "GigabitEthernet1/0/8",
"entry_type": "static",
},
"GigabitEthernet1/0/9": {
"entry": "*",
"interface": "GigabitEthernet1/0/9",
"entry_type": "static",
},
"Vlan101": {
"entry": "*",
"interface": "Vlan101",
"entry_type": "static",
},
},
"mac_address": "aaaa.bbff.8888",
}
},
"vlan": 10,
},
"101": {
"mac_addresses": {
"58bf.eaff.e5f7": {
"interfaces": {
"Vlan101": {"interface": "Vlan101", "entry_type": "static"}
},
"mac_address": "58bf.eaff.e5f7",
},
"3820.56ff.6fb3": {
"interfaces": {
"Port-channel12": {
"interface": "Port-channel12",
"entry_type": "dynamic",
}
},
"mac_address": "3820.56ff.6fb3",
},
"3820.56ff.6f75": {
"interfaces": {
"Port-channel12": {
"interface": "Port-channel12",
"entry_type": "dynamic",
}
},
"mac_address": "3820.56ff.6f75",
},
},
"vlan": 101,
},
}
},
"total_mac_addresses": 10,
}
| expected_output = {'mac_table': {'vlans': {'100': {'mac_addresses': {'ecbd.1dff.5f92': {'drop': {'drop': True, 'entry_type': 'dynamic'}, 'mac_address': 'ecbd.1dff.5f92'}, '3820.56ff.6f75': {'interfaces': {'Port-channel12': {'interface': 'Port-channel12', 'entry_type': 'dynamic'}}, 'mac_address': '3820.56ff.6f75'}, '58bf.eaff.e508': {'interfaces': {'Vlan100': {'interface': 'Vlan100', 'entry_type': 'static'}}, 'mac_address': '58bf.eaff.e508'}}, 'vlan': 100}, 'all': {'mac_addresses': {'0100.0cff.9999': {'interfaces': {'CPU': {'interface': 'CPU', 'entry_type': 'static'}}, 'mac_address': '0100.0cff.9999'}, '0100.0cff.999a': {'interfaces': {'CPU': {'interface': 'CPU', 'entry_type': 'static'}}, 'mac_address': '0100.0cff.999a'}}, 'vlan': 'all'}, '20': {'mac_addresses': {'aaaa.bbff.8888': {'drop': {'drop': True, 'entry_type': 'static'}, 'mac_address': 'aaaa.bbff.8888'}}, 'vlan': 20}, '10': {'mac_addresses': {'aaaa.bbff.8888': {'interfaces': {'GigabitEthernet1/0/8': {'entry': '*', 'interface': 'GigabitEthernet1/0/8', 'entry_type': 'static'}, 'GigabitEthernet1/0/9': {'entry': '*', 'interface': 'GigabitEthernet1/0/9', 'entry_type': 'static'}, 'Vlan101': {'entry': '*', 'interface': 'Vlan101', 'entry_type': 'static'}}, 'mac_address': 'aaaa.bbff.8888'}}, 'vlan': 10}, '101': {'mac_addresses': {'58bf.eaff.e5f7': {'interfaces': {'Vlan101': {'interface': 'Vlan101', 'entry_type': 'static'}}, 'mac_address': '58bf.eaff.e5f7'}, '3820.56ff.6fb3': {'interfaces': {'Port-channel12': {'interface': 'Port-channel12', 'entry_type': 'dynamic'}}, 'mac_address': '3820.56ff.6fb3'}, '3820.56ff.6f75': {'interfaces': {'Port-channel12': {'interface': 'Port-channel12', 'entry_type': 'dynamic'}}, 'mac_address': '3820.56ff.6f75'}}, 'vlan': 101}}}, 'total_mac_addresses': 10} |
package = FreeDesktopPackage('%{name}', 'pkg-config', '0.27',
configure_flags=["--with-internal-glib"])
if package.profile.name == 'darwin':
package.m64_only = True
| package = free_desktop_package('%{name}', 'pkg-config', '0.27', configure_flags=['--with-internal-glib'])
if package.profile.name == 'darwin':
package.m64_only = True |
def task_format():
return {
"actions": ["black .", "isort ."],
"verbosity": 2,
}
def task_test():
return {
"actions": ["tox -e py39"],
"verbosity": 2,
}
def task_fulltest():
return {
"actions": ["tox --skip-missing-interpreters"],
"verbosity": 2,
}
def task_build():
return {
"actions": ["flit build"],
"task_dep": ["precommit"],
"verbosity": 2,
}
def task_publish():
return {
"actions": ["flit publish"],
"task_dep": ["build"],
"verbosity": 2,
}
def task_precommit():
return {"actions": None, "task_dep": ["format", "fulltest"]}
| def task_format():
return {'actions': ['black .', 'isort .'], 'verbosity': 2}
def task_test():
return {'actions': ['tox -e py39'], 'verbosity': 2}
def task_fulltest():
return {'actions': ['tox --skip-missing-interpreters'], 'verbosity': 2}
def task_build():
return {'actions': ['flit build'], 'task_dep': ['precommit'], 'verbosity': 2}
def task_publish():
return {'actions': ['flit publish'], 'task_dep': ['build'], 'verbosity': 2}
def task_precommit():
return {'actions': None, 'task_dep': ['format', 'fulltest']} |
# Python Functions
# Three types of functions
# Built in functions
# User-defined functions
# Anonymous functions
# i.e. lambada functions; not declared with def():
# Method vs function
# Method --> function that is part of a class
#can only access said method with an instance or object of said class
# A straight function does not have the above limitation; insert logical proof here about how all methods are functions
# but not all functions are methods
# Straight function
# block of code that is called by name
# can be passed parameters (data)
# can return values (return value)
def straightSwitch(item1,item2):
return item2,item1
class SwitchClass(object):
# Method
def methodSwitch(self,item1,item2):
# First argument of EVERY class method is reference to current instance
# of the class (i.e. itself, thus 'self')
self.contents = item2, item1
return self.contents
# in order to access methodSwitch(), instance or object needs to be defined:
#instance declared of SwitchClass object
instance = SwitchClass()
#method methodSwitch() called upon instance of the above object
print(instance.methodSwitch(1,2))
# functions ---> data is explicitly passed
# methods ---> data is implicitly passed
# classes ---> are blueprints for creating objects
# function arguments
# default, required, keyword, and variable number arguments
# default: take a specified default value if no arguement is passed during the call
# required: need to be passed during call in specific order
# keyword: identify arguments by parameter name to call in specified order
# variable argument: *args (used to accept a variable number of arguements)
#P4E 14.4
#Examining the methods of an object using the dir() function:
#dir() lists the methods and attributes of a python object
stuff = list()
print(dir(stuff)) | def straight_switch(item1, item2):
return (item2, item1)
class Switchclass(object):
def method_switch(self, item1, item2):
self.contents = (item2, item1)
return self.contents
instance = switch_class()
print(instance.methodSwitch(1, 2))
stuff = list()
print(dir(stuff)) |
# Copyright (c) OpenMMLab. All rights reserved.
model = dict(
type='DBNet',
backbone=dict(
type='mmdet.ResNet',
depth=18,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=-1,
norm_cfg=dict(type='BN', requires_grad=True),
init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet18'),
norm_eval=False,
style='caffe'),
neck=dict(type='FPNC', in_channels=[2, 4, 8, 16], lateral_channels=8),
bbox_head=dict(
type='DBHead',
text_repr_type='quad',
in_channels=8,
loss=dict(type='DBLoss', alpha=5.0, beta=10.0, bbce_loss=True)),
train_cfg=None,
test_cfg=None)
dataset_type = 'IcdarDataset'
data_root = 'tests/test_codebase/test_mmocr/data'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
test_pipeline = [
dict(type='LoadImageFromFile', color_type='color_ignore_orientation'),
dict(
type='MultiScaleFlipAug',
img_scale=(128, 64),
flip=False,
transforms=[
dict(type='Resize', img_scale=(256, 128), keep_ratio=True),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size_divisor=32),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect', keys=['img']),
])
]
data = dict(
samples_per_gpu=16,
test_dataloader=dict(samples_per_gpu=1),
test=dict(
type=dataset_type,
ann_file=data_root + '/text_detection.json',
img_prefix=data_root,
pipeline=test_pipeline))
evaluation = dict(interval=100, metric='hmean-iou')
| model = dict(type='DBNet', backbone=dict(type='mmdet.ResNet', depth=18, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=-1, norm_cfg=dict(type='BN', requires_grad=True), init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet18'), norm_eval=False, style='caffe'), neck=dict(type='FPNC', in_channels=[2, 4, 8, 16], lateral_channels=8), bbox_head=dict(type='DBHead', text_repr_type='quad', in_channels=8, loss=dict(type='DBLoss', alpha=5.0, beta=10.0, bbce_loss=True)), train_cfg=None, test_cfg=None)
dataset_type = 'IcdarDataset'
data_root = 'tests/test_codebase/test_mmocr/data'
img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
test_pipeline = [dict(type='LoadImageFromFile', color_type='color_ignore_orientation'), dict(type='MultiScaleFlipAug', img_scale=(128, 64), flip=False, transforms=[dict(type='Resize', img_scale=(256, 128), keep_ratio=True), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='ImageToTensor', keys=['img']), dict(type='Collect', keys=['img'])])]
data = dict(samples_per_gpu=16, test_dataloader=dict(samples_per_gpu=1), test=dict(type=dataset_type, ann_file=data_root + '/text_detection.json', img_prefix=data_root, pipeline=test_pipeline))
evaluation = dict(interval=100, metric='hmean-iou') |
for i in range(1, 6):
for j in range(1, 6):
if(i == 1 or i == 5):
print(j, end="")
elif(j == 6 - i):
print(6 - i, end="")
else:
print(" ", end="")
print()
| for i in range(1, 6):
for j in range(1, 6):
if i == 1 or i == 5:
print(j, end='')
elif j == 6 - i:
print(6 - i, end='')
else:
print(' ', end='')
print() |
# Fit image to screen height, optionally stretched horizontally
def fit_to_screen(image, loaded_image, is_full_width):
# Resize to fill height and width
image_w, image_h = loaded_image.size
target_w = image_w
target_h = image_h
image_ratio = float(image_w / image_h)
if target_h > image.height:
target_h = image.height
target_w = round(image_ratio * target_h)
# If full width requested
if is_full_width == True:
target_w = image.width
target_h = round(target_w / image_ratio)
# Apply resize
return loaded_image.resize((target_w, target_h))
| def fit_to_screen(image, loaded_image, is_full_width):
(image_w, image_h) = loaded_image.size
target_w = image_w
target_h = image_h
image_ratio = float(image_w / image_h)
if target_h > image.height:
target_h = image.height
target_w = round(image_ratio * target_h)
if is_full_width == True:
target_w = image.width
target_h = round(target_w / image_ratio)
return loaded_image.resize((target_w, target_h)) |
def setup_parser(common_parser, subparsers):
parser = subparsers.add_parser("genotype", parents=[common_parser])
parser.add_argument(
"-i",
"--gram_dir",
help="Directory containing outputs from gramtools `build`",
dest="gram_dir",
type=str,
required=True,
)
parser.add_argument(
"-o",
"--genotype_dir",
help="Directory to hold this command's outputs.",
type=str,
dest="geno_dir",
required=True,
)
parser.add_argument(
"--reads",
help="One or more read files.\n"
"Valid formats: fastq, sam/bam/cram, fasta, txt; compressed or uncompressed; fuzzy extensions (eg fq, fsq for fastq).\n"
"Read files can be given after one or several '--reads' argument:"
"Eg '--reads rf_1.fq rf_2.fq.gz --reads rf_3.bam '",
nargs="+",
action="append",
type=str,
required=True,
)
parser.add_argument(
"--sample_id",
help="A name for your dataset.\n" "Appears in the genotyping outputs.",
required=True,
)
parser.add_argument(
"--ploidy",
help="The expected ploidy of the sample.\n" "Default: haploid",
choices=["haploid", "diploid"],
required=False,
default="haploid",
)
parser.add_argument(
"--max_threads",
help="Run with more threads than the default of one.",
type=int,
default=1,
required=False,
)
parser.add_argument(
"--seed",
help="Fixing the seed will produce the same read mappings across different runs."
"By default, seed is randomly generated so this is not the case.",
type=int,
default=0,
required=False,
)
| def setup_parser(common_parser, subparsers):
parser = subparsers.add_parser('genotype', parents=[common_parser])
parser.add_argument('-i', '--gram_dir', help='Directory containing outputs from gramtools `build`', dest='gram_dir', type=str, required=True)
parser.add_argument('-o', '--genotype_dir', help="Directory to hold this command's outputs.", type=str, dest='geno_dir', required=True)
parser.add_argument('--reads', help="One or more read files.\nValid formats: fastq, sam/bam/cram, fasta, txt; compressed or uncompressed; fuzzy extensions (eg fq, fsq for fastq).\nRead files can be given after one or several '--reads' argument:Eg '--reads rf_1.fq rf_2.fq.gz --reads rf_3.bam '", nargs='+', action='append', type=str, required=True)
parser.add_argument('--sample_id', help='A name for your dataset.\nAppears in the genotyping outputs.', required=True)
parser.add_argument('--ploidy', help='The expected ploidy of the sample.\nDefault: haploid', choices=['haploid', 'diploid'], required=False, default='haploid')
parser.add_argument('--max_threads', help='Run with more threads than the default of one.', type=int, default=1, required=False)
parser.add_argument('--seed', help='Fixing the seed will produce the same read mappings across different runs.By default, seed is randomly generated so this is not the case.', type=int, default=0, required=False) |
#coding=utf-8
class Solution:
def longestCommonPrefix(self, strs):
res = ""
strs.sort(key=lambda i: len(i))
# print(strs)
for i in range(len(strs[0])):
tmp = res + strs[0][i]
# print("tmp=",tmp)
for each in strs:
if each.startswith(tmp) == False:
return res
res = tmp
return res
if __name__ == '__main__':
s = Solution()
res = s.longestCommonPrefix( ["flower","flow","flight"])
print(res)
res = s.longestCommonPrefix( ["dog","racecar","car"])
print(res)
| class Solution:
def longest_common_prefix(self, strs):
res = ''
strs.sort(key=lambda i: len(i))
for i in range(len(strs[0])):
tmp = res + strs[0][i]
for each in strs:
if each.startswith(tmp) == False:
return res
res = tmp
return res
if __name__ == '__main__':
s = solution()
res = s.longestCommonPrefix(['flower', 'flow', 'flight'])
print(res)
res = s.longestCommonPrefix(['dog', 'racecar', 'car'])
print(res) |
def da_sort(lst):
count = 0
# replica = [x for x in lst]
result = sorted(array)
for char in lst:
if char != result[0]:
count += 1
else:
result.pop(0)
return count
T = int(input())
for _ in range(T):
k, n = map(int, input().split())
array = []
if n % 10 == 0:
iterange = n//10
else:
iterange = n//10 + 1
for _ in range(iterange):
array.extend([int(x) for x in input().split()])
print(k, da_sort(array)) | def da_sort(lst):
count = 0
result = sorted(array)
for char in lst:
if char != result[0]:
count += 1
else:
result.pop(0)
return count
t = int(input())
for _ in range(T):
(k, n) = map(int, input().split())
array = []
if n % 10 == 0:
iterange = n // 10
else:
iterange = n // 10 + 1
for _ in range(iterange):
array.extend([int(x) for x in input().split()])
print(k, da_sort(array)) |
def netmiko_config(device, configuration=None, **kwargs):
if configuration:
output = device['nc'].send_config_set(configuration)
else:
output = "No configuration to send."
return output | def netmiko_config(device, configuration=None, **kwargs):
if configuration:
output = device['nc'].send_config_set(configuration)
else:
output = 'No configuration to send.'
return output |
# x = 5
#
#
# def print_x():
# print(f'Print {x}')
#
#
# print(x)
# print_x()
#
#
# def f1():
# def nested_f1():
# # nonlocal y
# # y += 1
# y = 88
# ll.append(3)
# # ll = [3]
# z = 7
# print('From nested f1')
# print(x)
# print(y)
# print(z)
# print(abs(-x - y - z))
#
# global name
# name = 'Pesho'
# global x
# x += 5
# y = 6
# ll = []
# print(f'Before: {y}')
# print(ll)
# nested_f1()
# print(ll)
# print(f'After: {y}')
# return 'Pesho'
#
#
# f1()
# print(name)
# # print(y)
def get_my_print():
count = 0
def my_print(x):
nonlocal count
count += 1
print(f'My ({count}): {x}')
return my_print
my_print = get_my_print()
my_print('1')
my_print('Pesho')
my_print('Apples')
| def get_my_print():
count = 0
def my_print(x):
nonlocal count
count += 1
print(f'My ({count}): {x}')
return my_print
my_print = get_my_print()
my_print('1')
my_print('Pesho')
my_print('Apples') |
def get_int_value(text):
text = text.strip()
if len(text) > 1 and text[:1] == '0':
second_char = text[1:2]
if second_char == 'x' or second_char == 'X':
# hexa-decimal value
return int(text[2:], 16)
elif second_char == 'b' or second_char == 'B':
# binary value
return int(text[2:], 2)
else:
# octal value
return int(text[2:], 8)
else:
# decimal value
return int(text)
def get_float_value(text):
text = text.strip()
return float(text)
def get_bool_value(text):
text = text.strip()
if text == '1' or text.lower() == 'true':
return True
else:
return False
def get_string_value(text):
return text.strip()
| def get_int_value(text):
text = text.strip()
if len(text) > 1 and text[:1] == '0':
second_char = text[1:2]
if second_char == 'x' or second_char == 'X':
return int(text[2:], 16)
elif second_char == 'b' or second_char == 'B':
return int(text[2:], 2)
else:
return int(text[2:], 8)
else:
return int(text)
def get_float_value(text):
text = text.strip()
return float(text)
def get_bool_value(text):
text = text.strip()
if text == '1' or text.lower() == 'true':
return True
else:
return False
def get_string_value(text):
return text.strip() |
class AdvancedArithmetic(object):
def divisorSum(n):
raise NotImplementedError
class Calculator(AdvancedArithmetic):
def getDivisors(self, n):
if n == 1:
return [1]
maximum, num = n, 2
result = [1, n]
while num < maximum:
if not n % num:
if num != n/num:
result.extend([num, n//num])
else:
result.append(num)
maximum = n//num
num += 1
return result
def divisorSum(self, n):
return sum(self.getDivisors(n))
n = int(input())
my_calculator = Calculator()
s = my_calculator.divisorSum(n)
print("I implemented: " + type(my_calculator).__bases__[0].__name__)
print(s) | class Advancedarithmetic(object):
def divisor_sum(n):
raise NotImplementedError
class Calculator(AdvancedArithmetic):
def get_divisors(self, n):
if n == 1:
return [1]
(maximum, num) = (n, 2)
result = [1, n]
while num < maximum:
if not n % num:
if num != n / num:
result.extend([num, n // num])
else:
result.append(num)
maximum = n // num
num += 1
return result
def divisor_sum(self, n):
return sum(self.getDivisors(n))
n = int(input())
my_calculator = calculator()
s = my_calculator.divisorSum(n)
print('I implemented: ' + type(my_calculator).__bases__[0].__name__)
print(s) |
class Node:
def __init__(self, item, next=None):
self.value = item
self.next = next
def linked_list_to_array(LList):
item = []
if LList is None:
return []
item = item + [LList.value]
zz = LList
while zz.next is not None:
item = item + [zz.next.value]
zz = zz.next
return item
def reverse_linked_list(LList):
if LList.next is None:
return LList
prev_node = None
current_node = LList
while current_node is not None:
next_node = current_node.next
current_node.next = prev_node
prev_node = current_node
if next_node is None:
return current_node
else:
current_node = next_node
def insert_front(LList, node):
node.next = LList
return node
| class Node:
def __init__(self, item, next=None):
self.value = item
self.next = next
def linked_list_to_array(LList):
item = []
if LList is None:
return []
item = item + [LList.value]
zz = LList
while zz.next is not None:
item = item + [zz.next.value]
zz = zz.next
return item
def reverse_linked_list(LList):
if LList.next is None:
return LList
prev_node = None
current_node = LList
while current_node is not None:
next_node = current_node.next
current_node.next = prev_node
prev_node = current_node
if next_node is None:
return current_node
else:
current_node = next_node
def insert_front(LList, node):
node.next = LList
return node |
# /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 expandtab : */
class d:
def __init__(i, tag, txt, nl="", kl=None):
i.tag, i.nl, i.kl, i.txt = tag, nl, kl, txt
def __repr__(i):
s=""
if isinstance(i.txt,(list,tuple)):
s = ''.join([str(x) for x in i.txt])
else:
s = str(i.txt)
kl = " class=\"%s\"" % i.kl if i.kl else ""
return "%s<%s%s>%s</%s>" % (
i.nl,i.tag,kl,s,i.tag)
def dnl(tag,txt,kl=None): return d(tag, txt,kl=kl,nl="\n")
# n different licences
# sidenav
# top nav
# news
# all the following should be sub-classed
class Page:
def page(i,t,x): return dnl("html", [i.head(t), i.body( i.div(x, "wrapper"))])
def body(i,x, kl=None) : return dnl( "body", x, kl=kl)
def head(i,t, kl=None) : return dnl( "head", i.title(t), kl=kl)
def title(i,x,kl=None) : return dnl( "title",x, kl=kl)
def div(i,x, kl=None) : return dnl( "div", x, kl=kl)
def ul(i,x, kl=None) : return d( "ul", x, kl=kl)
def i(i,x, kl=None) : return d( "em", x, kl=kl)
def b(i,x, kl=None) : return d( "b" , x, kl=kl)
def p(i,x, kl=None) : return dnl( "p" , x, kl=kl)
def li(i,x, kl=None) : return dnl( "li", x, kl=kl)
def ol(i,*l, kl=None) : return dnl( "ol", [i.li(y) for y in l], kl=kl)
def ul(i,*l, kl=None) : return dnl( "ul", [i.li(y) for y in l], kl=kl)
def uls(i,*l, kl=None, odd="li0", even="li1"):
return i.ls(*l,what="ul",kl=None,odd=odd,even=even)
def ols(i,*l, kl=None, odd="li0", even="li1"):
return i.ls(*l,what="ol",kl=None,odd=odd,even=even)
def ls(i,*l, what="ul", kl=None, odd="li0", even="li1"):
oddp=[False]
def show(x):
oddp[0] = not oddp[0]
return dnl("li", x, kl = odd if oddp[0] else even)
return dnl( what, [show(y) for y in l],kl=kl)
p=Page()
print(p.page("love",p.uls("asdas",["sdasas", p.b("bols")], "dadas","apple",
"banana","ws","white",odd="odd", even="even")))
| class D:
def __init__(i, tag, txt, nl='', kl=None):
(i.tag, i.nl, i.kl, i.txt) = (tag, nl, kl, txt)
def __repr__(i):
s = ''
if isinstance(i.txt, (list, tuple)):
s = ''.join([str(x) for x in i.txt])
else:
s = str(i.txt)
kl = ' class="%s"' % i.kl if i.kl else ''
return '%s<%s%s>%s</%s>' % (i.nl, i.tag, kl, s, i.tag)
def dnl(tag, txt, kl=None):
return d(tag, txt, kl=kl, nl='\n')
class Page:
def page(i, t, x):
return dnl('html', [i.head(t), i.body(i.div(x, 'wrapper'))])
def body(i, x, kl=None):
return dnl('body', x, kl=kl)
def head(i, t, kl=None):
return dnl('head', i.title(t), kl=kl)
def title(i, x, kl=None):
return dnl('title', x, kl=kl)
def div(i, x, kl=None):
return dnl('div', x, kl=kl)
def ul(i, x, kl=None):
return d('ul', x, kl=kl)
def i(i, x, kl=None):
return d('em', x, kl=kl)
def b(i, x, kl=None):
return d('b', x, kl=kl)
def p(i, x, kl=None):
return dnl('p', x, kl=kl)
def li(i, x, kl=None):
return dnl('li', x, kl=kl)
def ol(i, *l, kl=None):
return dnl('ol', [i.li(y) for y in l], kl=kl)
def ul(i, *l, kl=None):
return dnl('ul', [i.li(y) for y in l], kl=kl)
def uls(i, *l, kl=None, odd='li0', even='li1'):
return i.ls(*l, what='ul', kl=None, odd=odd, even=even)
def ols(i, *l, kl=None, odd='li0', even='li1'):
return i.ls(*l, what='ol', kl=None, odd=odd, even=even)
def ls(i, *l, what='ul', kl=None, odd='li0', even='li1'):
oddp = [False]
def show(x):
oddp[0] = not oddp[0]
return dnl('li', x, kl=odd if oddp[0] else even)
return dnl(what, [show(y) for y in l], kl=kl)
p = page()
print(p.page('love', p.uls('asdas', ['sdasas', p.b('bols')], 'dadas', 'apple', 'banana', 'ws', 'white', odd='odd', even='even'))) |
students = [
{
"name": "John Doe",
"age": 15,
"sex": "male"
},
{
"name": "Jane Doe",
"age": 12,
"sex": "female"
},
{
"name": "Lockle Rory",
"age": 18,
"sex": "male"
},
{
"name": "Seyi Pedro",
"age": 10,
"sex": "female"
}
]
| students = [{'name': 'John Doe', 'age': 15, 'sex': 'male'}, {'name': 'Jane Doe', 'age': 12, 'sex': 'female'}, {'name': 'Lockle Rory', 'age': 18, 'sex': 'male'}, {'name': 'Seyi Pedro', 'age': 10, 'sex': 'female'}] |
# 832 SLoC
v = FormValidator(
firstname=Unicode(),
surname=Unicode(required="Please enter your surname"),
age=Int(greaterthan(18, "You must be at least 18 to proceed"), required=False),
)
input_data = {
'firstname': u'Fred',
'surname': u'Jones',
'age': u'21',
}
v.process(input_data) == {'age': 21, 'firstname': u'Fred', 'surname': u'Jones'}
input_data = {
'firstname': u'Fred',
'age': u'16',
}
v.process(input_data) # raises ValidationError
# ValidationError([('surname', 'Please enter your surname'), ('age', 'You must be at least 18 to proceed')])
#assert_true # raise if not value
#assert_false # raise if value
#test # raise if callback(value)
#minlen
#maxlen
#greaterthan
#lessthan
#notempty
#matches # regex
#equals
#is_in
looks_like_email # basic, but kudos for not using a regex!
maxwords
minwords
CustomType # for subclassing
PassThrough # return value
Int # int(value) or raise ValidationError
Float # as Int
Decimal # as Int
Unicode # optionally strip, unicode(value), no encoding
Bool # default (undefined) is False by default
Calculated # return callback(*source_fields)
DateTime
Date
| v = form_validator(firstname=unicode(), surname=unicode(required='Please enter your surname'), age=int(greaterthan(18, 'You must be at least 18 to proceed'), required=False))
input_data = {'firstname': u'Fred', 'surname': u'Jones', 'age': u'21'}
v.process(input_data) == {'age': 21, 'firstname': u'Fred', 'surname': u'Jones'}
input_data = {'firstname': u'Fred', 'age': u'16'}
v.process(input_data)
looks_like_email
maxwords
minwords
CustomType
PassThrough
Int
Float
Decimal
Unicode
Bool
Calculated
DateTime
Date |
power = {'BUSES': {'Area': 1.33155,
'Bus/Area': 1.33155,
'Bus/Gate Leakage': 0.00662954,
'Bus/Peak Dynamic': 0.0,
'Bus/Runtime Dynamic': 0.0,
'Bus/Subthreshold Leakage': 0.0691322,
'Bus/Subthreshold Leakage with power gating': 0.0259246,
'Gate Leakage': 0.00662954,
'Peak Dynamic': 0.0,
'Runtime Dynamic': 0.0,
'Subthreshold Leakage': 0.0691322,
'Subthreshold Leakage with power gating': 0.0259246},
'Core': [{'Area': 32.6082,
'Execution Unit/Area': 8.2042,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.31626,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.451093,
'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.81823,
'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.759535,
'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.31524,
'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.754327,
'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.8291,
'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.472009,
'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': 9.01815,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.343502,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0275337,
'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.313021,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.203629,
'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.656523,
'Execution Unit/Register Files/Runtime Dynamic': 0.231163,
'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.84303,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 1.88478,
'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': 5.80152,
'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.0011616,
'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.0011616,
'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.00101462,
'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.000394344,
'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.00292514,
'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.00626296,
'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.0110348,
'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.195754,
'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.402603,
'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.664867,
'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.28052,
'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.0693417,
'L2/Runtime Dynamic': 0.0136607,
'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.69495,
'Load Store Unit/Data Cache/Runtime Dynamic': 2.62506,
'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.176574,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.176574,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 7.53217,
'Load Store Unit/Runtime Dynamic': 3.67243,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.435401,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.870803,
'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.154525,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.155561,
'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.0660188,
'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.825638,
'Memory Management Unit/Runtime Dynamic': 0.221579,
'Memory Management Unit/Subthreshold Leakage': 0.0769113,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462,
'Peak Dynamic': 30.9757,
'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': 1.1984,
'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.0532591,
'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.373546,
'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': 1.62521,
'Renaming Unit/Subthreshold Leakage': 0.070483,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779,
'Runtime Dynamic': 12.6149,
'Subthreshold Leakage': 6.21877,
'Subthreshold Leakage with power gating': 2.58311},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0495849,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.241635,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.261666,
'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.216426,
'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.349086,
'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.176207,
'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.741719,
'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.207411,
'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.69332,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0494344,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00907786,
'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.0844564,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0671363,
'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.133891,
'Execution Unit/Register Files/Runtime Dynamic': 0.0762142,
'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.190325,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.469552,
'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.9345,
'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.00193701,
'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.00193701,
'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.00172701,
'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.000690364,
'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.000964419,
'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.00656545,
'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.0171471,
'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.0645399,
'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': 4.10529,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.220422,
'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.219206,
'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': 6.52304,
'Instruction Fetch Unit/Runtime Dynamic': 0.52788,
'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.0687005,
'L2/Runtime Dynamic': 0.0149604,
'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': 3.61072,
'Load Store Unit/Data Cache/Runtime Dynamic': 1.1518,
'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.0767916,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0767917,
'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.97335,
'Load Store Unit/Runtime Dynamic': 1.6073,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.189355,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.37871,
'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.0672027,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0679998,
'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.255252,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.0368303,
'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.526803,
'Memory Management Unit/Runtime Dynamic': 0.10483,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 19.3747,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.130039,
'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.0113471,
'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.107479,
'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.248866,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 4.43833,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.0,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0619241,
'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.0998813,
'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.0504167,
'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.212222,
'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.0708235,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 3.9613,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00259738,
'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.0187824,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0192092,
'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.0187824,
'Execution Unit/Register Files/Runtime Dynamic': 0.0218066,
'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.0395692,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.111314,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 0.953409,
'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.00062807,
'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.00062807,
'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.000552209,
'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.000216592,
'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.000275942,
'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.00208429,
'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.0058375,
'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.0184663,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.17461,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0835913,
'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.0627198,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 3.45013,
'Instruction Fetch Unit/Runtime Dynamic': 0.172699,
'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.030093,
'L2/Runtime Dynamic': 0.0091679,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 1.55146,
'Load Store Unit/Data Cache/Runtime Dynamic': 0.165561,
'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.0101696,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0101696,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 1.59948,
'Load Store Unit/Runtime Dynamic': 0.225883,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.0250765,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.050153,
'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.00889971,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.00935155,
'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.073033,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.0137039,
'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.24443,
'Memory Management Unit/Runtime Dynamic': 0.0230554,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 12.8749,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.00279385,
'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.0318851,
'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.0346789,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 1.41889,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.0,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.244148,
'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.393802,
'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.198778,
'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.836729,
'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.279235,
'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.36938,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0102407,
'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.0740531,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0757361,
'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.0740531,
'Execution Unit/Register Files/Runtime Dynamic': 0.0859768,
'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.156009,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.467161,
'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.99793,
'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.00201571,
'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.00201571,
'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.00179321,
'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.00071471,
'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.00108796,
'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.00691258,
'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.0179854,
'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.0728071,
'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': 4.63115,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.243379,
'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.247286,
'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': 7.07443,
'Instruction Fetch Unit/Runtime Dynamic': 0.58837,
'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.0567864,
'L2/Runtime Dynamic': 0.0161194,
'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': 3.66987,
'Load Store Unit/Data Cache/Runtime Dynamic': 1.19043,
'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.0787053,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0787054,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 4.04154,
'Load Store Unit/Runtime Dynamic': 1.65728,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.194074,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.388148,
'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.0688775,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0697277,
'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.287948,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.0399064,
'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.562376,
'Memory Management Unit/Runtime Dynamic': 0.109634,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 19.694,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.0110153,
'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.127029,
'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.138044,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 4.50738,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328}],
'DRAM': {'Area': 0,
'Gate Leakage': 0,
'Peak Dynamic': 1.9369935276373202,
'Runtime Dynamic': 1.9369935276373202,
'Subthreshold Leakage': 4.252,
'Subthreshold Leakage with power gating': 4.252},
'L3': [{'Area': 61.9075,
'Gate Leakage': 0.0484137,
'Peak Dynamic': 0.161329,
'Runtime Dynamic': 0.0792786,
'Subthreshold Leakage': 6.80085,
'Subthreshold Leakage with power gating': 3.32364}],
'Processor': {'Area': 191.908,
'Gate Leakage': 1.53485,
'Peak Dynamic': 83.0806,
'Peak Power': 116.193,
'Runtime Dynamic': 23.0588,
'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': 82.9193,
'Total Cores/Runtime Dynamic': 22.9795,
'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.161329,
'Total L3s/Runtime Dynamic': 0.0792786,
'Total L3s/Subthreshold Leakage': 6.80085,
'Total L3s/Subthreshold Leakage with power gating': 3.32364,
'Total Leakage': 33.1122,
'Total NoCs/Area': 1.33155,
'Total NoCs/Gate Leakage': 0.00662954,
'Total NoCs/Peak Dynamic': 0.0,
'Total NoCs/Runtime Dynamic': 0.0,
'Total NoCs/Subthreshold Leakage': 0.0691322,
'Total NoCs/Subthreshold Leakage with power gating': 0.0259246}} | power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate Leakage': 0.00662954, 'Peak Dynamic': 0.0, 'Runtime Dynamic': 0.0, 'Subthreshold Leakage': 0.0691322, 'Subthreshold Leakage with power gating': 0.0259246}, 'Core': [{'Area': 32.6082, 'Execution Unit/Area': 8.2042, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.31626, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.451093, '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.81823, '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.759535, '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.31524, '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.754327, '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.8291, '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.472009, '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': 9.01815, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.343502, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0275337, '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.313021, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.203629, '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.656523, 'Execution Unit/Register Files/Runtime Dynamic': 0.231163, '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.84303, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 1.88478, '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': 5.80152, '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.0011616, '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.0011616, '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.00101462, '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.000394344, '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.00292514, '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.00626296, '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.0110348, '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.195754, '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.402603, '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.664867, '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.28052, '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.0693417, 'L2/Runtime Dynamic': 0.0136607, '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.69495, 'Load Store Unit/Data Cache/Runtime Dynamic': 2.62506, '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.176574, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.176574, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 7.53217, 'Load Store Unit/Runtime Dynamic': 3.67243, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.435401, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.870803, '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.154525, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.155561, '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.0660188, '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.825638, 'Memory Management Unit/Runtime Dynamic': 0.221579, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 30.9757, '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': 1.1984, '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.0532591, '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.373546, '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': 1.62521, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 12.6149, 'Subthreshold Leakage': 6.21877, 'Subthreshold Leakage with power gating': 2.58311}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0495849, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.241635, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.261666, '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.216426, '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.349086, '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.176207, '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.741719, '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.207411, '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.69332, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0494344, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00907786, '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.0844564, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0671363, '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.133891, 'Execution Unit/Register Files/Runtime Dynamic': 0.0762142, '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.190325, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.469552, '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.9345, '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.00193701, '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.00193701, '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.00172701, '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.000690364, '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.000964419, '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.00656545, '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.0171471, '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.0645399, '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': 4.10529, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.220422, '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.219206, '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': 6.52304, 'Instruction Fetch Unit/Runtime Dynamic': 0.52788, '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.0687005, 'L2/Runtime Dynamic': 0.0149604, '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': 3.61072, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.1518, '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.0767916, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0767917, '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.97335, 'Load Store Unit/Runtime Dynamic': 1.6073, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.189355, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.37871, '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.0672027, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0679998, '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.255252, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0368303, '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.526803, 'Memory Management Unit/Runtime Dynamic': 0.10483, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 19.3747, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.130039, '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.0113471, '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.107479, '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.248866, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 4.43833, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0619241, '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.0998813, '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.0504167, '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.212222, '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.0708235, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 3.9613, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00259738, '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.0187824, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0192092, '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.0187824, 'Execution Unit/Register Files/Runtime Dynamic': 0.0218066, '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.0395692, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.111314, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 0.953409, '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.00062807, '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.00062807, '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.000552209, '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.000216592, '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.000275942, '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.00208429, '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.0058375, '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.0184663, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.17461, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0835913, '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.0627198, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 3.45013, 'Instruction Fetch Unit/Runtime Dynamic': 0.172699, '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.030093, 'L2/Runtime Dynamic': 0.0091679, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 1.55146, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.165561, '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.0101696, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0101696, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 1.59948, 'Load Store Unit/Runtime Dynamic': 0.225883, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0250765, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.050153, '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.00889971, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.00935155, '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.073033, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0137039, '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.24443, 'Memory Management Unit/Runtime Dynamic': 0.0230554, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 12.8749, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00279385, '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.0318851, '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.0346789, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.41889, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.244148, '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.393802, '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.198778, '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.836729, '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.279235, '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.36938, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0102407, '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.0740531, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0757361, '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.0740531, 'Execution Unit/Register Files/Runtime Dynamic': 0.0859768, '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.156009, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.467161, '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.99793, '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.00201571, '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.00201571, '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.00179321, '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.00071471, '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.00108796, '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.00691258, '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.0179854, '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.0728071, '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': 4.63115, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.243379, '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.247286, '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': 7.07443, 'Instruction Fetch Unit/Runtime Dynamic': 0.58837, '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.0567864, 'L2/Runtime Dynamic': 0.0161194, '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': 3.66987, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.19043, '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.0787053, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0787054, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 4.04154, 'Load Store Unit/Runtime Dynamic': 1.65728, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.194074, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.388148, '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.0688775, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0697277, '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.287948, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0399064, '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.562376, 'Memory Management Unit/Runtime Dynamic': 0.109634, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 19.694, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.0110153, '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.127029, '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.138044, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 4.50738, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 1.9369935276373202, 'Runtime Dynamic': 1.9369935276373202, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.161329, 'Runtime Dynamic': 0.0792786, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 83.0806, 'Peak Power': 116.193, 'Runtime Dynamic': 23.0588, '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': 82.9193, 'Total Cores/Runtime Dynamic': 22.9795, '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.161329, 'Total L3s/Runtime Dynamic': 0.0792786, '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}} |
def most_frequent_days(year):
days=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
if year==2000: return ['Saturday', 'Sunday']
check=2000
if year>check:
day=6
while check<year:
check+=1
day+=2 if leap(check) else 1
if day%7==0:
return [days[(day)%7], days[(day-1)%7]] if leap(year) else [days[day%7]]
return [days[(day-1)%7], days[(day)%7]] if leap(year) else [days[day%7]]
elif year<check:
day=5
while check>year:
check-=1
day-=2 if leap(check) else 1
if (day+1)%7==0:
return [days[(day+1)%7], days[day%7]] if leap(year) else [days[day%7]]
return [days[day%7], days[(day+1)%7]] if leap(year) else [days[day%7]]
def leap(year):
if year%400==0:
return True
elif year%100==0:
return False
elif year%4==0:
return True
return False | def most_frequent_days(year):
days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
if year == 2000:
return ['Saturday', 'Sunday']
check = 2000
if year > check:
day = 6
while check < year:
check += 1
day += 2 if leap(check) else 1
if day % 7 == 0:
return [days[day % 7], days[(day - 1) % 7]] if leap(year) else [days[day % 7]]
return [days[(day - 1) % 7], days[day % 7]] if leap(year) else [days[day % 7]]
elif year < check:
day = 5
while check > year:
check -= 1
day -= 2 if leap(check) else 1
if (day + 1) % 7 == 0:
return [days[(day + 1) % 7], days[day % 7]] if leap(year) else [days[day % 7]]
return [days[day % 7], days[(day + 1) % 7]] if leap(year) else [days[day % 7]]
def leap(year):
if year % 400 == 0:
return True
elif year % 100 == 0:
return False
elif year % 4 == 0:
return True
return False |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.