content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
class GameContainer: def __init__(self, lowest_level, high_score, stat_diffs, points_available): self.lowest_level = lowest_level self.high_score = high_score self.stat_diffs = stat_diffs self.points_available = points_available
class Gamecontainer: def __init__(self, lowest_level, high_score, stat_diffs, points_available): self.lowest_level = lowest_level self.high_score = high_score self.stat_diffs = stat_diffs self.points_available = points_available
class Foo: class Bar: def baz(self): pass
class Foo: class Bar: def baz(self): pass
def main(): return "foo" def failure(): raise RuntimeError("This is an error")
def main(): return 'foo' def failure(): raise runtime_error('This is an error')
""" Model Synoptic Module """ simple_tree_model_sklearn = ( "<class 'sklearn.ensemble._forest.ExtraTreesClassifier'>", "<class 'sklearn.ensemble._forest.ExtraTreesRegressor'>", "<class 'sklearn.ensemble._forest.RandomForestClassifier'>", "<class 'sklearn.ensemble._forest.RandomForestRegressor'>", "<class 'sklearn.ensemble._gb.GradientBoostingClassifier'>", "<class 'sklearn.ensemble._gb.GradientBoostingRegressor'>" ) xgboost_model = ( "<class 'xgboost.sklearn.XGBClassifier'>", "<class 'xgboost.sklearn.XGBRegressor'>", "<class 'xgboost.core.Booster'>") lightgbm_model = ( "<class 'lightgbm.sklearn.LGBMClassifier'>", "<class 'lightgbm.sklearn.LGBMRegressor'>" ) catboost_model = ( "<class 'catboost.core.CatBoostClassifier'>", "<class 'catboost.core.CatBoostRegressor'>") linear_model = ( "<class 'sklearn.linear_model._logistic.LogisticRegression'>", "<class 'sklearn.linear_model._base.LinearRegression'>") svm_model = ( "<class 'sklearn.svm._classes.SVC'>", "<class 'sklearn.svm._classes.SVR'>") simple_tree_model = simple_tree_model_sklearn + xgboost_model + lightgbm_model dict_model_feature = {"<class 'sklearn.ensemble._forest.ExtraTreesClassifier'>": ['length'], "<class 'sklearn.ensemble._forest.ExtraTreesRegressor'>": ['length'], "<class 'sklearn.ensemble._forest.RandomForestClassifier'>": ['length'], "<class 'sklearn.ensemble._forest.RandomForestRegressor'>": ['length'], "<class 'sklearn.ensemble._gb.GradientBoostingClassifier'>": ['length'], "<class 'sklearn.ensemble._gb.GradientBoostingRegressor'>": ['length'], "<class 'sklearn.linear_model._logistic.LogisticRegression'>": ['length'], "<class 'sklearn.linear_model._base.LinearRegression'>": ['length'], "<class 'sklearn.svm._classes.SVC'>": ['length'], "<class 'sklearn.svm._classes.SVR'>": ['length'], "<class 'lightgbm.sklearn.LGBMClassifier'>": ["booster_","feature_name"], "<class 'lightgbm.sklearn.LGBMRegressor'>": ["booster_","feature_name"], "<class 'xgboost.sklearn.XGBClassifier'>": ["get_booster","feature_names"], "<class 'xgboost.sklearn.XGBRegressor'>": ["get_booster","feature_names"], "<class 'xgboost.core.Booster'>": ["feature_names"], "<class 'catboost.core.CatBoostClassifier'>": ["feature_names_"], "<class 'catboost.core.CatBoostRegressor'>": ["feature_names_"], }
""" Model Synoptic Module """ simple_tree_model_sklearn = ("<class 'sklearn.ensemble._forest.ExtraTreesClassifier'>", "<class 'sklearn.ensemble._forest.ExtraTreesRegressor'>", "<class 'sklearn.ensemble._forest.RandomForestClassifier'>", "<class 'sklearn.ensemble._forest.RandomForestRegressor'>", "<class 'sklearn.ensemble._gb.GradientBoostingClassifier'>", "<class 'sklearn.ensemble._gb.GradientBoostingRegressor'>") xgboost_model = ("<class 'xgboost.sklearn.XGBClassifier'>", "<class 'xgboost.sklearn.XGBRegressor'>", "<class 'xgboost.core.Booster'>") lightgbm_model = ("<class 'lightgbm.sklearn.LGBMClassifier'>", "<class 'lightgbm.sklearn.LGBMRegressor'>") catboost_model = ("<class 'catboost.core.CatBoostClassifier'>", "<class 'catboost.core.CatBoostRegressor'>") linear_model = ("<class 'sklearn.linear_model._logistic.LogisticRegression'>", "<class 'sklearn.linear_model._base.LinearRegression'>") svm_model = ("<class 'sklearn.svm._classes.SVC'>", "<class 'sklearn.svm._classes.SVR'>") simple_tree_model = simple_tree_model_sklearn + xgboost_model + lightgbm_model dict_model_feature = {"<class 'sklearn.ensemble._forest.ExtraTreesClassifier'>": ['length'], "<class 'sklearn.ensemble._forest.ExtraTreesRegressor'>": ['length'], "<class 'sklearn.ensemble._forest.RandomForestClassifier'>": ['length'], "<class 'sklearn.ensemble._forest.RandomForestRegressor'>": ['length'], "<class 'sklearn.ensemble._gb.GradientBoostingClassifier'>": ['length'], "<class 'sklearn.ensemble._gb.GradientBoostingRegressor'>": ['length'], "<class 'sklearn.linear_model._logistic.LogisticRegression'>": ['length'], "<class 'sklearn.linear_model._base.LinearRegression'>": ['length'], "<class 'sklearn.svm._classes.SVC'>": ['length'], "<class 'sklearn.svm._classes.SVR'>": ['length'], "<class 'lightgbm.sklearn.LGBMClassifier'>": ['booster_', 'feature_name'], "<class 'lightgbm.sklearn.LGBMRegressor'>": ['booster_', 'feature_name'], "<class 'xgboost.sklearn.XGBClassifier'>": ['get_booster', 'feature_names'], "<class 'xgboost.sklearn.XGBRegressor'>": ['get_booster', 'feature_names'], "<class 'xgboost.core.Booster'>": ['feature_names'], "<class 'catboost.core.CatBoostClassifier'>": ['feature_names_'], "<class 'catboost.core.CatBoostRegressor'>": ['feature_names_']}
def lily_format(seq): return " ".join(point["lilypond"] for point in seq) def output(seq): return "{ %s }" % lily_format(seq) def write(filename, seq): with open(filename, "w") as f: f.write(output(seq))
def lily_format(seq): return ' '.join((point['lilypond'] for point in seq)) def output(seq): return '{ %s }' % lily_format(seq) def write(filename, seq): with open(filename, 'w') as f: f.write(output(seq))
print("Iterando sobre o arquivo") with open("dados.txt", "r") as arquivo: for linha in arquivo: print(linha) print("Fim do arquivo", arquivo.name)
print('Iterando sobre o arquivo') with open('dados.txt', 'r') as arquivo: for linha in arquivo: print(linha) print('Fim do arquivo', arquivo.name)
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.063025, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.252192, '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.336758, '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.28979, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.501812, '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.287803, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.07941, '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.234815, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 5.93592, '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.0636208, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0105051, '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.0997069, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0776918, '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.163328, 'Execution Unit/Register Files/Runtime Dynamic': 0.0881969, '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.258199, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.653394, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 2.47857, '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.00171471, '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.00171471, '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.00149793, '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.000582287, '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.00111605, '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.00604339, '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.0162826, '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.0746871, '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.75074, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.220284, '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.253671, '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.20335, 'Instruction Fetch Unit/Runtime Dynamic': 0.570969, '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.0912664, 'L2/Runtime Dynamic': 0.0149542, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80969, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 3.91288, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.30685, '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.0865673, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0865674, '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.32334, 'Load Store Unit/Runtime Dynamic': 1.82034, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.21346, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.426921, '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.0757577, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0770213, '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.295384, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0364302, '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.584853, 'Memory Management Unit/Runtime Dynamic': 0.113451, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 22.7004, 'Renaming Unit/Area': 0.369768, 'Renaming Unit/FP Front End RAT/Area': 0.168486, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.221959, '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.0174892, '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.146944, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.386393, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 5.38467, '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.0248217, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.222185, '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.132187, '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.123111, '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.198574, '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.100234, '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.421919, '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.120538, '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.29263, '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.0249729, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00516385, '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.0467096, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0381898, '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.0716825, 'Execution Unit/Register Files/Runtime Dynamic': 0.0433536, '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.104611, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.268124, '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.36096, '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.00096861, '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.00096861, '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.000870559, '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.00035172, '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.000548599, '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.00335638, '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.00832581, '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.0367128, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 2.33525, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.106878, '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.124693, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 4.6671, 'Instruction Fetch Unit/Runtime Dynamic': 0.279967, '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.0412946, 'L2/Runtime Dynamic': 0.00689639, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.56248, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.647909, '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.0428786, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0428785, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.76496, 'Load Store Unit/Runtime Dynamic': 0.902249, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.105731, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.211462, '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.0375244, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0380905, '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.145197, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0176811, '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.365766, 'Memory Management Unit/Runtime Dynamic': 0.0557716, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 15.7212, '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.0656927, '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.00635391, '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.0618182, '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.133865, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.73971, '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.0146909, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.214227, '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.0762629, '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.103046, '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.166209, '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.0838969, '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.353152, '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.106162, '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.16664, '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.0144077, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00432221, '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.0368798, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0319654, '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.0512875, 'Execution Unit/Register Files/Runtime Dynamic': 0.0362876, '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.081369, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.218818, '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.22786, '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.000754142, '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.000754142, '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.000672222, '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.000268632, '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.000459186, '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.00263969, '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.00668167, '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.0307292, '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.95464, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0862819, '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.10437, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 4.26802, 'Instruction Fetch Unit/Runtime Dynamic': 0.230703, '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.0400426, 'L2/Runtime Dynamic': 0.0100873, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.34645, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.549699, '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.0358894, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0358894, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.51592, 'Load Store Unit/Runtime Dynamic': 0.762582, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0884971, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.176994, '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.0314079, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0319777, '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.121532, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0142383, '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.331594, 'Memory Management Unit/Runtime Dynamic': 0.046216, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 14.9117, '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.0378998, '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.00511039, '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.0524499, '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.0954601, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.37291, '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.0118559, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.212, '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.060521, '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.0715576, '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.11542, '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.05826, '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.245237, '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.0725621, '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.07335, '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.0114337, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00300145, '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.0262853, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0221975, '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.037719, 'Execution Unit/Register Files/Runtime Dynamic': 0.025199, '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.0583403, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.160581, '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.0484, '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.000374453, '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.000374453, '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.000332464, '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.000132157, '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.000318869, '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.00140024, '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.00336457, '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.0213391, '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.35735, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0530035, '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.0724771, '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.64174, 'Instruction Fetch Unit/Runtime Dynamic': 0.151584, '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.0384802, 'L2/Runtime Dynamic': 0.00959312, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.0509, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.406273, '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.0263276, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0263275, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.17522, 'Load Store Unit/Runtime Dynamic': 0.562439, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0649195, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.129838, '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.0230401, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0236093, '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.0843949, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.00871477, '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.280083, 'Memory Management Unit/Runtime Dynamic': 0.0323241, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.7983, '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.0300766, '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.00359451, '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.0366169, '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.070288, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.87462, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 6.7133013220344875, 'Runtime Dynamic': 6.7133013220344875, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.334987, 'Runtime Dynamic': 0.0855449, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 67.4667, 'Peak Power': 100.579, 'Runtime Dynamic': 12.4575, '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': 67.1317, 'Total Cores/Runtime Dynamic': 12.3719, '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.334987, 'Total L3s/Runtime Dynamic': 0.0855449, '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.063025, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.252192, '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.336758, '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.28979, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.501812, '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.287803, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.07941, '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.234815, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 5.93592, '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.0636208, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0105051, '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.0997069, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0776918, '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.163328, 'Execution Unit/Register Files/Runtime Dynamic': 0.0881969, '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.258199, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.653394, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 2.47857, '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.00171471, '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.00171471, '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.00149793, '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.000582287, '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.00111605, '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.00604339, '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.0162826, '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.0746871, '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.75074, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.220284, '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.253671, '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.20335, 'Instruction Fetch Unit/Runtime Dynamic': 0.570969, '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.0912664, 'L2/Runtime Dynamic': 0.0149542, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80969, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 3.91288, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.30685, '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.0865673, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0865674, '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.32334, 'Load Store Unit/Runtime Dynamic': 1.82034, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.21346, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.426921, '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.0757577, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0770213, '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.295384, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0364302, '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.584853, 'Memory Management Unit/Runtime Dynamic': 0.113451, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 22.7004, 'Renaming Unit/Area': 0.369768, 'Renaming Unit/FP Front End RAT/Area': 0.168486, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.221959, '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.0174892, '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.146944, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.386393, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 5.38467, '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.0248217, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.222185, '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.132187, '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.123111, '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.198574, '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.100234, '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.421919, '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.120538, '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.29263, '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.0249729, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00516385, '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.0467096, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0381898, '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.0716825, 'Execution Unit/Register Files/Runtime Dynamic': 0.0433536, '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.104611, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.268124, '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.36096, '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.00096861, '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.00096861, '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.000870559, '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.00035172, '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.000548599, '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.00335638, '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.00832581, '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.0367128, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 2.33525, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.106878, '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.124693, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 4.6671, 'Instruction Fetch Unit/Runtime Dynamic': 0.279967, '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.0412946, 'L2/Runtime Dynamic': 0.00689639, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.56248, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.647909, '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.0428786, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0428785, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.76496, 'Load Store Unit/Runtime Dynamic': 0.902249, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.105731, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.211462, '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.0375244, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0380905, '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.145197, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0176811, '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.365766, 'Memory Management Unit/Runtime Dynamic': 0.0557716, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 15.7212, '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.0656927, '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.00635391, '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.0618182, '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.133865, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.73971, '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.0146909, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.214227, '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.0762629, '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.103046, '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.166209, '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.0838969, '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.353152, '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.106162, '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.16664, '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.0144077, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00432221, '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.0368798, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0319654, '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.0512875, 'Execution Unit/Register Files/Runtime Dynamic': 0.0362876, '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.081369, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.218818, '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.22786, '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.000754142, '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.000754142, '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.000672222, '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.000268632, '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.000459186, '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.00263969, '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.00668167, '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.0307292, '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.95464, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0862819, '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.10437, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 4.26802, 'Instruction Fetch Unit/Runtime Dynamic': 0.230703, '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.0400426, 'L2/Runtime Dynamic': 0.0100873, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.34645, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.549699, '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.0358894, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0358894, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.51592, 'Load Store Unit/Runtime Dynamic': 0.762582, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0884971, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.176994, '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.0314079, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0319777, '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.121532, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0142383, '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.331594, 'Memory Management Unit/Runtime Dynamic': 0.046216, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 14.9117, '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.0378998, '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.00511039, '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.0524499, '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.0954601, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.37291, '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.0118559, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.212, '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.060521, '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.0715576, '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.11542, '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.05826, '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.245237, '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.0725621, '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.07335, '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.0114337, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00300145, '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.0262853, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0221975, '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.037719, 'Execution Unit/Register Files/Runtime Dynamic': 0.025199, '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.0583403, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.160581, '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.0484, '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.000374453, '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.000374453, '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.000332464, '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.000132157, '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.000318869, '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.00140024, '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.00336457, '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.0213391, '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.35735, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0530035, '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.0724771, '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.64174, 'Instruction Fetch Unit/Runtime Dynamic': 0.151584, '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.0384802, 'L2/Runtime Dynamic': 0.00959312, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.0509, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.406273, '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.0263276, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0263275, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.17522, 'Load Store Unit/Runtime Dynamic': 0.562439, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0649195, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.129838, '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.0230401, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0236093, '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.0843949, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.00871477, '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.280083, 'Memory Management Unit/Runtime Dynamic': 0.0323241, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 13.7983, '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.0300766, '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.00359451, '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.0366169, '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.070288, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 1.87462, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 6.7133013220344875, 'Runtime Dynamic': 6.7133013220344875, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.334987, 'Runtime Dynamic': 0.0855449, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 67.4667, 'Peak Power': 100.579, 'Runtime Dynamic': 12.4575, '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': 67.1317, 'Total Cores/Runtime Dynamic': 12.3719, '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.334987, 'Total L3s/Runtime Dynamic': 0.0855449, '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}}
# Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: sum = 0 def DFS(self,node: TreeNode, path: str): if node is None: return if node.left is None and node.right is None: self.sum+= int(path+str(node.val)) return path = path+str(node.val) self.DFS(node.left, path) self.DFS(node.right, path) def sumNumbers(self, root: TreeNode) -> int: if root is None: return [] self.DFS(root, "") return self.sum
class Treenode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: sum = 0 def dfs(self, node: TreeNode, path: str): if node is None: return if node.left is None and node.right is None: self.sum += int(path + str(node.val)) return path = path + str(node.val) self.DFS(node.left, path) self.DFS(node.right, path) def sum_numbers(self, root: TreeNode) -> int: if root is None: return [] self.DFS(root, '') return self.sum
N=int(input()) count=0 for i in range(1,N+1): if len(str(i))%2==1:count+=1 print(count)
n = int(input()) count = 0 for i in range(1, N + 1): if len(str(i)) % 2 == 1: count += 1 print(count)
# # PySNMP MIB module CXCFG-IPX-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CXCFG-IPX-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:32:22 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint") cxIpx, Alias = mibBuilder.importSymbols("CXProduct-SMI", "cxIpx", "Alias") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") iso, MibIdentifier, Counter64, ModuleIdentity, Counter32, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Bits, NotificationType, TimeTicks, Gauge32, Integer32, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "MibIdentifier", "Counter64", "ModuleIdentity", "Counter32", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Bits", "NotificationType", "TimeTicks", "Gauge32", "Integer32", "IpAddress") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") cxCfgIpx = MibIdentifier((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1)) class NetNumber(OctetString): subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(4, 4) fixedLength = 4 cxCfgIpxNumClockTicksPerSecond = MibScalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxNumClockTicksPerSecond.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxNumClockTicksPerSecond.setDescription('Identifies the number of clock ticks per second. Range of Values: None Default Value: The value is always 1 ') cxCfgIpxPortTable = MibTable((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2), ) if mibBuilder.loadTexts: cxCfgIpxPortTable.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortTable.setDescription('Provides configuration information for each IPX port. The table contains three default entries (rows); each row corresponds to a particular IPX port. Some of the values in a row can be modified. If more than three IPX ports are required, additional entries can be added.') cxCfgIpxPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1), ).setIndexNames((0, "CXCFG-IPX-MIB", "cxCfgIpxPort")) if mibBuilder.loadTexts: cxCfgIpxPortEntry.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortEntry.setDescription('Provides configuration information for a particular IPX port. Some of the parameters can be modified.') cxCfgIpxPort = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cxCfgIpxPort.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPort.setDescription('Identifies the number of the IPX Port. The number is used as local index for this and the ipxStatsTable. Range of Values: From 1 to 32 Default Value: None Note: The system defines three default entries; their respective values are 1, 2, and 3.') cxCfgIpxPortIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cxCfgIpxPortIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortIfIndex.setDescription('Identifies the table row that contains configuration or monitoring objects for a specific type of physical interface. Range of Values: From 1 to the number of entries in the interface table. Default value: None ') cxCfgIpxPortSubnetworkSAPAlias = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 3), Alias()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortSubnetworkSAPAlias.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortSubnetworkSAPAlias.setDescription('Determines the name which uniquely defines the cxCfgIpxPortSubnetworkSap. Range of Values: 0 to 16 alphanumeric characters. The first character must be a letter, spaces are not allowed. Default Values: None Note: The system defines three default entries; their respective values are LAN-PORT1, CNV-PORT1, and CNV-PORT2. Related Parameter: The object must be the same as cxLanIoPortAlias of the cxLanIoPortTable, and cxFwkDestAlias in cxFwkCircuitTable. Configuration Changed: Administrative') cxCfgIpxPortState = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortState.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortState.setDescription('Determines the initialization state of the IPX port. Options: on (1): The port is active, transmission is possible. off (2): The port is inactive, transmission is not possible. Default Values: (1) On. For LAN ports (2) Off. For convergence ports Configuration Changed: Administrative') cxCfgIpxPortRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("invalid", 1), ("valid", 2))).clone('valid')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortRowStatus.setDescription('Determines the status of the objects in a table row. Options: valid (1): Values are enabled. invalid (2): Row is flagged, after next reset the values will be disabled and the row will be deleted from the table. Default Value: (1) Valid. Values are enabled Configuration Changed: Administrative ') cxCfgIpxPortTransportTime = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 30)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortTransportTime.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortTransportTime.setDescription('Determines the transport time, in clock ticks, for LAN or WAN links. This value is set to 1 for LAN links. WAN links may have a value of 1 or higher. One clock tick is 55 ms. Range of Values: From 1 to 30 Default Value: 1 Configuration Changed: Administrative') cxCfgIpxPortMaxHops = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16)).clone(16)).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortMaxHops.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortMaxHops.setDescription('Determines the maximum number of hops a packet may take before it is discarded. Range of Values: From 1 to 16 Default Value: 16 Configuration Changed: Administrative ') cxCfgIpxPortIntNetNum = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 8), NetNumber()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortIntNetNum.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortIntNetNum.setDescription('Determines the IPX internal network number associated with the port. The number must be entered as 8 hexadecimal characters, for example 0xAB12CD34. The x must be lowercase; the others are not case sensitive. Range of Values: 4 octets, each character ranging from 00 to FF Default Value: None Note: The system defines three default entries; their respective values are 00 00 00 0xa2, 00 00 00 0xf1, and 00 00 00 0xf2. Configuration Changed: Administrative ') cxCfgIpxPortPerSapBcast = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2))).clone('on')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortPerSapBcast.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortPerSapBcast.setDescription('Determines whether periodic SAP broadcasting is active. Options: On (1): SAP broadcasting is active, and the router sends periodic SAP broadcasts to advertise its services to other locally attached networks. Off (2): SAP broadcasting is inactive. Default Value: (1) Related parameter: The frequency of the broadcast is determined by cxCfgIpxPortPerSAPTxTimer. Configuration Changed: Administrative') cxCfgIpxPortPerRipBcast = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2))).clone('on')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortPerRipBcast.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortPerRipBcast.setDescription('Determines whether periodic RIP broadcasting is active. Options: on (1): RIP broadcasting is active, and the router sends periodic RIP broadcasts to advertise its services to other locally attached networks. off (2): RIP broadcasting is inactive. Default Value: on (1) Related Parameter: The frequency of the broadcast is determined by cxCfgIpxPortPerRipTxTimer. Configuration Changed: Administrative') cxCfgIpxPortSapBcast = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2))).clone('on')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortSapBcast.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortSapBcast.setDescription('Determines whether the port sends a SAP broadcast in response to a SAP query sent by another router. Options: on (1): The port will respond to SAP queries. off (2): The port will not respond to SAP queries. Default Value: on (1) Configuration Changed: Administrative') cxCfgIpxPortRipBcast = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2))).clone('on')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortRipBcast.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortRipBcast.setDescription('Determines whether the port sends a RIP broadcast in response to a RIP query sent by another router. When the value is set to on, the port responds to RIP queries. Options: On (1): The port will respond to RIP queries. Off (2): The port will not respond to RIP queries. Default Value: on (1) Configuration Changed: Administrative') cxCfgIpxPortDiagPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortDiagPackets.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortDiagPackets.setDescription('Determines whether the IPX port will respond to diagnostic packets. Options: On (1): The port will respond, and will transmit a diagnostic response packet. Off (2): The port will not respond. Default Value: off (2) Configuration Changed: Administrative. ') cxCfgIpxPortPerRipTxTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 3600)).clone(60)).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortPerRipTxTimer.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortPerRipTxTimer.setDescription('Determines the length of time, in seconds, between periodic RIP broadcasts. Range of Values: From 1 to 3600 Default Value: 60 Configuration Changed: Administrative ') cxCfgIpxPortPerSapTxTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 3600)).clone(60)).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortPerSapTxTimer.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortPerSapTxTimer.setDescription('Determines the length of time, in seconds, between periodic SAP broadcasts. Range of Values: From 1 to 3600 Default Value: 60 Configuration Changed: Administrative') cxCfgIpxPortRipAgeTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 3600)).clone(180)).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortRipAgeTimer.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortRipAgeTimer.setDescription("Determines the length of time, in seconds, that an entry can remain in the IPX port's RIP table without being updated. When the value (number of seconds) expires the entry in the RIP table is deleted. A value of 0 means aging is not used. Range of Values: From 1 to 3600 Default Value: 180 Configuration Changed: Administrative ") cxCfgIpxPortSapAgeTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 3600)).clone(180)).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortSapAgeTimer.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortSapAgeTimer.setDescription("Determines the length of time (aging), in seconds, that an entry can remain in the IPX port's SAP table without being updated. When the value (number of seconds) expires the entry in the SAP table is deleted. A value of 0 means aging is not used. Range of Values: From 1 to 3600 Default Value: 180 Configuration Changed: Administrative ") cxCfgIpxPortFrameType = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("raw-802-3", 1), ("ethernet-II", 2), ("llc-802-2", 3), ("snap", 4))).clone('raw-802-3')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortFrameType.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortFrameType.setDescription('Determines which type of framing is used for IPX header information. Framing refers to the way the header information is formatted. The format is determined by the destination IPX number. Upon receipt of data, the IPX router checks its address tables to determine which header format is used by the destination address. The first three options are used for LAN data; the fourth option is used for WAN (frame relay) destinations. Options: raw- 802-3 (1): Used for LAN data. ethernet-II (2): Used for LAN data. LLC-802-3 (3): Used for LAN data. snap (4): Used for WAN (frame relay). Default Value: raw- 802-3 (1) Configuration Changed: Administrative') cxCfgIpxPortWatchSpoof = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortWatchSpoof.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortWatchSpoof.setDescription('Determines whether IPX Watchdog Spoofing is enabled (on). IPX Watchdog Spoofing is a software technique that limits the number of IPX Watchdog frames that are sent over a WAN; the technique is intended to decrease the use of expensive WAN lines without disturbing overall network use. If IPX Watchdog Spoofing is desired, the remote peer must also have this parameter enabled. Options: on (1): IPX Watchdog Spoofing is enabled. off (2): IPX Watchdog Spoofing is disabled. Default Value: off (2) Configuration Changed: Administrative ') cxCfgIpxPortSpxWatchSpoof = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortSpxWatchSpoof.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortSpxWatchSpoof.setDescription('Determines whether SPX Watchdog Spoofing is enabled (on). SPX Watchdog Spoofing is a software technique that limits the number of SPX Watchdog frames that are sent over a WAN; the technique is intended to decrease the use of expensive WAN lines without disturbing overall network use. If SPX Watchdog Spoofing is desired, the remote peer must also have this parameter on. Options: On (1): SPX Watchdog Spoofing is enabled. Off (2): SPX Watchdog Spoofing is disabled. Default Value: off (2) Configuration Changed: Administrative') cxCfgIpxPortSerialSpoof = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortSerialSpoof.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortSerialSpoof.setDescription('Determines whether Serialization Spoofing is (enabled) on. Serialization Spoofing is a software technique that limits the number of Serialization frames (they test the legal version of Novell software) that are sent over a WAN; the technique is intended to decrease the use of expensive WAN lines without disturbing overall network use. Options: on (1): Serialization Spoofing is enabled. off (2): Serialization Spoofing is disabled. Default Value: off (2) Configuration Changed: Administrative ') cxCfgIpxPortSRSupport = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCfgIpxPortSRSupport.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortSRSupport.setDescription('Determines whether the port should support Source Routing packet. If it is enabled, the physical infterface of the port must be Token-Ring. If it is disabled, any Source Routing packet will be discarded. Default Value: disabled (2) Configuration Changed: administrative') cxCfgIpxMibLevel = MibScalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 20), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cxCfgIpxMibLevel.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxMibLevel.setDescription('Used to determine current MIB module release supported by the agent. Object is in decimal.') mibBuilder.exportSymbols("CXCFG-IPX-MIB", cxCfgIpxPortFrameType=cxCfgIpxPortFrameType, cxCfgIpxPortRowStatus=cxCfgIpxPortRowStatus, cxCfgIpxPortIfIndex=cxCfgIpxPortIfIndex, cxCfgIpxPortSubnetworkSAPAlias=cxCfgIpxPortSubnetworkSAPAlias, cxCfgIpxPortSpxWatchSpoof=cxCfgIpxPortSpxWatchSpoof, cxCfgIpxPortPerSapTxTimer=cxCfgIpxPortPerSapTxTimer, cxCfgIpxNumClockTicksPerSecond=cxCfgIpxNumClockTicksPerSecond, cxCfgIpxPortRipAgeTimer=cxCfgIpxPortRipAgeTimer, cxCfgIpxPortTransportTime=cxCfgIpxPortTransportTime, cxCfgIpxPortRipBcast=cxCfgIpxPortRipBcast, cxCfgIpxPortMaxHops=cxCfgIpxPortMaxHops, cxCfgIpxPortState=cxCfgIpxPortState, cxCfgIpxPortEntry=cxCfgIpxPortEntry, NetNumber=NetNumber, cxCfgIpxMibLevel=cxCfgIpxMibLevel, cxCfgIpxPortSerialSpoof=cxCfgIpxPortSerialSpoof, cxCfgIpxPortSapBcast=cxCfgIpxPortSapBcast, cxCfgIpxPortSapAgeTimer=cxCfgIpxPortSapAgeTimer, cxCfgIpxPortIntNetNum=cxCfgIpxPortIntNetNum, cxCfgIpxPortSRSupport=cxCfgIpxPortSRSupport, cxCfgIpxPortPerRipTxTimer=cxCfgIpxPortPerRipTxTimer, cxCfgIpx=cxCfgIpx, cxCfgIpxPortWatchSpoof=cxCfgIpxPortWatchSpoof, cxCfgIpxPortPerSapBcast=cxCfgIpxPortPerSapBcast, cxCfgIpxPortTable=cxCfgIpxPortTable, cxCfgIpxPortPerRipBcast=cxCfgIpxPortPerRipBcast, cxCfgIpxPortDiagPackets=cxCfgIpxPortDiagPackets, cxCfgIpxPort=cxCfgIpxPort)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, single_value_constraint, value_range_constraint, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint') (cx_ipx, alias) = mibBuilder.importSymbols('CXProduct-SMI', 'cxIpx', 'Alias') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (iso, mib_identifier, counter64, module_identity, counter32, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, bits, notification_type, time_ticks, gauge32, integer32, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'MibIdentifier', 'Counter64', 'ModuleIdentity', 'Counter32', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'Bits', 'NotificationType', 'TimeTicks', 'Gauge32', 'Integer32', 'IpAddress') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') cx_cfg_ipx = mib_identifier((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1)) class Netnumber(OctetString): subtype_spec = OctetString.subtypeSpec + value_size_constraint(4, 4) fixed_length = 4 cx_cfg_ipx_num_clock_ticks_per_second = mib_scalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 1), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxNumClockTicksPerSecond.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxNumClockTicksPerSecond.setDescription('Identifies the number of clock ticks per second. Range of Values: None Default Value: The value is always 1 ') cx_cfg_ipx_port_table = mib_table((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2)) if mibBuilder.loadTexts: cxCfgIpxPortTable.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortTable.setDescription('Provides configuration information for each IPX port. The table contains three default entries (rows); each row corresponds to a particular IPX port. Some of the values in a row can be modified. If more than three IPX ports are required, additional entries can be added.') cx_cfg_ipx_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1)).setIndexNames((0, 'CXCFG-IPX-MIB', 'cxCfgIpxPort')) if mibBuilder.loadTexts: cxCfgIpxPortEntry.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortEntry.setDescription('Provides configuration information for a particular IPX port. Some of the parameters can be modified.') cx_cfg_ipx_port = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: cxCfgIpxPort.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPort.setDescription('Identifies the number of the IPX Port. The number is used as local index for this and the ipxStatsTable. Range of Values: From 1 to 32 Default Value: None Note: The system defines three default entries; their respective values are 1, 2, and 3.') cx_cfg_ipx_port_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cxCfgIpxPortIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortIfIndex.setDescription('Identifies the table row that contains configuration or monitoring objects for a specific type of physical interface. Range of Values: From 1 to the number of entries in the interface table. Default value: None ') cx_cfg_ipx_port_subnetwork_sap_alias = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 3), alias()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortSubnetworkSAPAlias.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortSubnetworkSAPAlias.setDescription('Determines the name which uniquely defines the cxCfgIpxPortSubnetworkSap. Range of Values: 0 to 16 alphanumeric characters. The first character must be a letter, spaces are not allowed. Default Values: None Note: The system defines three default entries; their respective values are LAN-PORT1, CNV-PORT1, and CNV-PORT2. Related Parameter: The object must be the same as cxLanIoPortAlias of the cxLanIoPortTable, and cxFwkDestAlias in cxFwkCircuitTable. Configuration Changed: Administrative') cx_cfg_ipx_port_state = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortState.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortState.setDescription('Determines the initialization state of the IPX port. Options: on (1): The port is active, transmission is possible. off (2): The port is inactive, transmission is not possible. Default Values: (1) On. For LAN ports (2) Off. For convergence ports Configuration Changed: Administrative') cx_cfg_ipx_port_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('invalid', 1), ('valid', 2))).clone('valid')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortRowStatus.setDescription('Determines the status of the objects in a table row. Options: valid (1): Values are enabled. invalid (2): Row is flagged, after next reset the values will be disabled and the row will be deleted from the table. Default Value: (1) Valid. Values are enabled Configuration Changed: Administrative ') cx_cfg_ipx_port_transport_time = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 30)).clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortTransportTime.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortTransportTime.setDescription('Determines the transport time, in clock ticks, for LAN or WAN links. This value is set to 1 for LAN links. WAN links may have a value of 1 or higher. One clock tick is 55 ms. Range of Values: From 1 to 30 Default Value: 1 Configuration Changed: Administrative') cx_cfg_ipx_port_max_hops = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 16)).clone(16)).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortMaxHops.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortMaxHops.setDescription('Determines the maximum number of hops a packet may take before it is discarded. Range of Values: From 1 to 16 Default Value: 16 Configuration Changed: Administrative ') cx_cfg_ipx_port_int_net_num = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 8), net_number()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortIntNetNum.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortIntNetNum.setDescription('Determines the IPX internal network number associated with the port. The number must be entered as 8 hexadecimal characters, for example 0xAB12CD34. The x must be lowercase; the others are not case sensitive. Range of Values: 4 octets, each character ranging from 00 to FF Default Value: None Note: The system defines three default entries; their respective values are 00 00 00 0xa2, 00 00 00 0xf1, and 00 00 00 0xf2. Configuration Changed: Administrative ') cx_cfg_ipx_port_per_sap_bcast = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2))).clone('on')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortPerSapBcast.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortPerSapBcast.setDescription('Determines whether periodic SAP broadcasting is active. Options: On (1): SAP broadcasting is active, and the router sends periodic SAP broadcasts to advertise its services to other locally attached networks. Off (2): SAP broadcasting is inactive. Default Value: (1) Related parameter: The frequency of the broadcast is determined by cxCfgIpxPortPerSAPTxTimer. Configuration Changed: Administrative') cx_cfg_ipx_port_per_rip_bcast = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2))).clone('on')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortPerRipBcast.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortPerRipBcast.setDescription('Determines whether periodic RIP broadcasting is active. Options: on (1): RIP broadcasting is active, and the router sends periodic RIP broadcasts to advertise its services to other locally attached networks. off (2): RIP broadcasting is inactive. Default Value: on (1) Related Parameter: The frequency of the broadcast is determined by cxCfgIpxPortPerRipTxTimer. Configuration Changed: Administrative') cx_cfg_ipx_port_sap_bcast = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2))).clone('on')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortSapBcast.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortSapBcast.setDescription('Determines whether the port sends a SAP broadcast in response to a SAP query sent by another router. Options: on (1): The port will respond to SAP queries. off (2): The port will not respond to SAP queries. Default Value: on (1) Configuration Changed: Administrative') cx_cfg_ipx_port_rip_bcast = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2))).clone('on')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortRipBcast.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortRipBcast.setDescription('Determines whether the port sends a RIP broadcast in response to a RIP query sent by another router. When the value is set to on, the port responds to RIP queries. Options: On (1): The port will respond to RIP queries. Off (2): The port will not respond to RIP queries. Default Value: on (1) Configuration Changed: Administrative') cx_cfg_ipx_port_diag_packets = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortDiagPackets.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortDiagPackets.setDescription('Determines whether the IPX port will respond to diagnostic packets. Options: On (1): The port will respond, and will transmit a diagnostic response packet. Off (2): The port will not respond. Default Value: off (2) Configuration Changed: Administrative. ') cx_cfg_ipx_port_per_rip_tx_timer = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(1, 3600)).clone(60)).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortPerRipTxTimer.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortPerRipTxTimer.setDescription('Determines the length of time, in seconds, between periodic RIP broadcasts. Range of Values: From 1 to 3600 Default Value: 60 Configuration Changed: Administrative ') cx_cfg_ipx_port_per_sap_tx_timer = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(1, 3600)).clone(60)).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortPerSapTxTimer.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortPerSapTxTimer.setDescription('Determines the length of time, in seconds, between periodic SAP broadcasts. Range of Values: From 1 to 3600 Default Value: 60 Configuration Changed: Administrative') cx_cfg_ipx_port_rip_age_timer = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(1, 3600)).clone(180)).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortRipAgeTimer.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortRipAgeTimer.setDescription("Determines the length of time, in seconds, that an entry can remain in the IPX port's RIP table without being updated. When the value (number of seconds) expires the entry in the RIP table is deleted. A value of 0 means aging is not used. Range of Values: From 1 to 3600 Default Value: 180 Configuration Changed: Administrative ") cx_cfg_ipx_port_sap_age_timer = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(1, 3600)).clone(180)).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortSapAgeTimer.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortSapAgeTimer.setDescription("Determines the length of time (aging), in seconds, that an entry can remain in the IPX port's SAP table without being updated. When the value (number of seconds) expires the entry in the SAP table is deleted. A value of 0 means aging is not used. Range of Values: From 1 to 3600 Default Value: 180 Configuration Changed: Administrative ") cx_cfg_ipx_port_frame_type = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('raw-802-3', 1), ('ethernet-II', 2), ('llc-802-2', 3), ('snap', 4))).clone('raw-802-3')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortFrameType.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortFrameType.setDescription('Determines which type of framing is used for IPX header information. Framing refers to the way the header information is formatted. The format is determined by the destination IPX number. Upon receipt of data, the IPX router checks its address tables to determine which header format is used by the destination address. The first three options are used for LAN data; the fourth option is used for WAN (frame relay) destinations. Options: raw- 802-3 (1): Used for LAN data. ethernet-II (2): Used for LAN data. LLC-802-3 (3): Used for LAN data. snap (4): Used for WAN (frame relay). Default Value: raw- 802-3 (1) Configuration Changed: Administrative') cx_cfg_ipx_port_watch_spoof = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortWatchSpoof.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortWatchSpoof.setDescription('Determines whether IPX Watchdog Spoofing is enabled (on). IPX Watchdog Spoofing is a software technique that limits the number of IPX Watchdog frames that are sent over a WAN; the technique is intended to decrease the use of expensive WAN lines without disturbing overall network use. If IPX Watchdog Spoofing is desired, the remote peer must also have this parameter enabled. Options: on (1): IPX Watchdog Spoofing is enabled. off (2): IPX Watchdog Spoofing is disabled. Default Value: off (2) Configuration Changed: Administrative ') cx_cfg_ipx_port_spx_watch_spoof = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortSpxWatchSpoof.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortSpxWatchSpoof.setDescription('Determines whether SPX Watchdog Spoofing is enabled (on). SPX Watchdog Spoofing is a software technique that limits the number of SPX Watchdog frames that are sent over a WAN; the technique is intended to decrease the use of expensive WAN lines without disturbing overall network use. If SPX Watchdog Spoofing is desired, the remote peer must also have this parameter on. Options: On (1): SPX Watchdog Spoofing is enabled. Off (2): SPX Watchdog Spoofing is disabled. Default Value: off (2) Configuration Changed: Administrative') cx_cfg_ipx_port_serial_spoof = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 21), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortSerialSpoof.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortSerialSpoof.setDescription('Determines whether Serialization Spoofing is (enabled) on. Serialization Spoofing is a software technique that limits the number of Serialization frames (they test the legal version of Novell software) that are sent over a WAN; the technique is intended to decrease the use of expensive WAN lines without disturbing overall network use. Options: on (1): Serialization Spoofing is enabled. off (2): Serialization Spoofing is disabled. Default Value: off (2) Configuration Changed: Administrative ') cx_cfg_ipx_port_sr_support = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 2, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cxCfgIpxPortSRSupport.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxPortSRSupport.setDescription('Determines whether the port should support Source Routing packet. If it is enabled, the physical infterface of the port must be Token-Ring. If it is disabled, any Source Routing packet will be discarded. Default Value: disabled (2) Configuration Changed: administrative') cx_cfg_ipx_mib_level = mib_scalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 13, 1, 20), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cxCfgIpxMibLevel.setStatus('mandatory') if mibBuilder.loadTexts: cxCfgIpxMibLevel.setDescription('Used to determine current MIB module release supported by the agent. Object is in decimal.') mibBuilder.exportSymbols('CXCFG-IPX-MIB', cxCfgIpxPortFrameType=cxCfgIpxPortFrameType, cxCfgIpxPortRowStatus=cxCfgIpxPortRowStatus, cxCfgIpxPortIfIndex=cxCfgIpxPortIfIndex, cxCfgIpxPortSubnetworkSAPAlias=cxCfgIpxPortSubnetworkSAPAlias, cxCfgIpxPortSpxWatchSpoof=cxCfgIpxPortSpxWatchSpoof, cxCfgIpxPortPerSapTxTimer=cxCfgIpxPortPerSapTxTimer, cxCfgIpxNumClockTicksPerSecond=cxCfgIpxNumClockTicksPerSecond, cxCfgIpxPortRipAgeTimer=cxCfgIpxPortRipAgeTimer, cxCfgIpxPortTransportTime=cxCfgIpxPortTransportTime, cxCfgIpxPortRipBcast=cxCfgIpxPortRipBcast, cxCfgIpxPortMaxHops=cxCfgIpxPortMaxHops, cxCfgIpxPortState=cxCfgIpxPortState, cxCfgIpxPortEntry=cxCfgIpxPortEntry, NetNumber=NetNumber, cxCfgIpxMibLevel=cxCfgIpxMibLevel, cxCfgIpxPortSerialSpoof=cxCfgIpxPortSerialSpoof, cxCfgIpxPortSapBcast=cxCfgIpxPortSapBcast, cxCfgIpxPortSapAgeTimer=cxCfgIpxPortSapAgeTimer, cxCfgIpxPortIntNetNum=cxCfgIpxPortIntNetNum, cxCfgIpxPortSRSupport=cxCfgIpxPortSRSupport, cxCfgIpxPortPerRipTxTimer=cxCfgIpxPortPerRipTxTimer, cxCfgIpx=cxCfgIpx, cxCfgIpxPortWatchSpoof=cxCfgIpxPortWatchSpoof, cxCfgIpxPortPerSapBcast=cxCfgIpxPortPerSapBcast, cxCfgIpxPortTable=cxCfgIpxPortTable, cxCfgIpxPortPerRipBcast=cxCfgIpxPortPerRipBcast, cxCfgIpxPortDiagPackets=cxCfgIpxPortDiagPackets, cxCfgIpxPort=cxCfgIpxPort)
# # PySNMP MIB module RBN-ENVMON-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RBN-ENVMON-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:44:20 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint") rbnMgmt, = mibBuilder.importSymbols("RBN-SMI", "rbnMgmt") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Counter64, Counter32, TimeTicks, IpAddress, NotificationType, ModuleIdentity, Unsigned32, Gauge32, ObjectIdentity, Bits, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Counter64", "Counter32", "TimeTicks", "IpAddress", "NotificationType", "ModuleIdentity", "Unsigned32", "Gauge32", "ObjectIdentity", "Bits", "Integer32") TruthValue, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TextualConvention", "DisplayString") rbnEnvMonMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 2352, 2, 4)) if mibBuilder.loadTexts: rbnEnvMonMIB.setLastUpdated('9901272300Z') if mibBuilder.loadTexts: rbnEnvMonMIB.setOrganization('RedBack Networks, Inc.') rbnEnvMonMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 2352, 2, 4, 0)) rbnEnvMonMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1)) rbnEnvMonMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 2352, 2, 4, 2)) rbnFanStatusTable = MibTable((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 1), ) if mibBuilder.loadTexts: rbnFanStatusTable.setStatus('current') rbnFanStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 1, 1), ).setIndexNames((0, "RBN-ENVMON-MIB", "rbnFanIndex")) if mibBuilder.loadTexts: rbnFanStatusEntry.setStatus('current') rbnFanIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 1, 1, 1), Integer32()) if mibBuilder.loadTexts: rbnFanIndex.setStatus('current') rbnFanDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnFanDescr.setStatus('current') rbnFanFail = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 1, 1, 3), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnFanFail.setStatus('current') rbnPowerStatusTable = MibTable((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 2), ) if mibBuilder.loadTexts: rbnPowerStatusTable.setStatus('current') rbnPowerStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 2, 1), ).setIndexNames((0, "RBN-ENVMON-MIB", "rbnPowerIndex")) if mibBuilder.loadTexts: rbnPowerStatusEntry.setStatus('current') rbnPowerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 2, 1, 1), Integer32()) if mibBuilder.loadTexts: rbnPowerIndex.setStatus('current') rbnPowerDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 2, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnPowerDescr.setStatus('current') rbnPowerFail = MibTableColumn((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 2, 1, 3), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rbnPowerFail.setStatus('current') rbnFanFailChange = NotificationType((1, 3, 6, 1, 4, 1, 2352, 2, 4, 0, 1)).setObjects(("RBN-ENVMON-MIB", "rbnFanFail")) if mibBuilder.loadTexts: rbnFanFailChange.setStatus('current') rbnPowerFailChange = NotificationType((1, 3, 6, 1, 4, 1, 2352, 2, 4, 0, 2)).setObjects(("RBN-ENVMON-MIB", "rbnPowerFail")) if mibBuilder.loadTexts: rbnPowerFailChange.setStatus('current') rbnEnvMonMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 2352, 2, 4, 2, 1)) rbnEnvMonMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2352, 2, 4, 2, 2)) rbnEnvMonMIBObjectGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2352, 2, 4, 2, 1, 1)).setObjects(("RBN-ENVMON-MIB", "rbnFanDescr"), ("RBN-ENVMON-MIB", "rbnFanFail"), ("RBN-ENVMON-MIB", "rbnPowerDescr"), ("RBN-ENVMON-MIB", "rbnPowerFail")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rbnEnvMonMIBObjectGroup = rbnEnvMonMIBObjectGroup.setStatus('current') rbnEnvMonMIBNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 2352, 2, 4, 2, 1, 2)).setObjects(("RBN-ENVMON-MIB", "rbnFanFailChange"), ("RBN-ENVMON-MIB", "rbnPowerFailChange")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rbnEnvMonMIBNotificationGroup = rbnEnvMonMIBNotificationGroup.setStatus('current') rbnEnvMonMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2352, 2, 4, 2, 2, 1)).setObjects(("RBN-ENVMON-MIB", "rbnEnvMonMIBObjectGroup"), ("RBN-ENVMON-MIB", "rbnEnvMonMIBNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rbnEnvMonMIBCompliance = rbnEnvMonMIBCompliance.setStatus('current') mibBuilder.exportSymbols("RBN-ENVMON-MIB", rbnFanFail=rbnFanFail, rbnFanStatusEntry=rbnFanStatusEntry, rbnFanDescr=rbnFanDescr, rbnEnvMonMIBGroups=rbnEnvMonMIBGroups, rbnPowerIndex=rbnPowerIndex, rbnEnvMonMIB=rbnEnvMonMIB, rbnPowerFail=rbnPowerFail, rbnPowerStatusTable=rbnPowerStatusTable, rbnPowerStatusEntry=rbnPowerStatusEntry, rbnEnvMonMIBNotificationGroup=rbnEnvMonMIBNotificationGroup, rbnEnvMonMIBCompliances=rbnEnvMonMIBCompliances, PYSNMP_MODULE_ID=rbnEnvMonMIB, rbnPowerDescr=rbnPowerDescr, rbnEnvMonMIBObjects=rbnEnvMonMIBObjects, rbnEnvMonMIBObjectGroup=rbnEnvMonMIBObjectGroup, rbnPowerFailChange=rbnPowerFailChange, rbnFanFailChange=rbnFanFailChange, rbnFanIndex=rbnFanIndex, rbnEnvMonMIBCompliance=rbnEnvMonMIBCompliance, rbnFanStatusTable=rbnFanStatusTable, rbnEnvMonMIBNotifications=rbnEnvMonMIBNotifications, rbnEnvMonMIBConformance=rbnEnvMonMIBConformance)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_size_constraint, single_value_constraint, constraints_intersection, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint') (rbn_mgmt,) = mibBuilder.importSymbols('RBN-SMI', 'rbnMgmt') (notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup') (mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, counter64, counter32, time_ticks, ip_address, notification_type, module_identity, unsigned32, gauge32, object_identity, bits, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'Counter64', 'Counter32', 'TimeTicks', 'IpAddress', 'NotificationType', 'ModuleIdentity', 'Unsigned32', 'Gauge32', 'ObjectIdentity', 'Bits', 'Integer32') (truth_value, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'TextualConvention', 'DisplayString') rbn_env_mon_mib = module_identity((1, 3, 6, 1, 4, 1, 2352, 2, 4)) if mibBuilder.loadTexts: rbnEnvMonMIB.setLastUpdated('9901272300Z') if mibBuilder.loadTexts: rbnEnvMonMIB.setOrganization('RedBack Networks, Inc.') rbn_env_mon_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 2352, 2, 4, 0)) rbn_env_mon_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1)) rbn_env_mon_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 2352, 2, 4, 2)) rbn_fan_status_table = mib_table((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 1)) if mibBuilder.loadTexts: rbnFanStatusTable.setStatus('current') rbn_fan_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 1, 1)).setIndexNames((0, 'RBN-ENVMON-MIB', 'rbnFanIndex')) if mibBuilder.loadTexts: rbnFanStatusEntry.setStatus('current') rbn_fan_index = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 1, 1, 1), integer32()) if mibBuilder.loadTexts: rbnFanIndex.setStatus('current') rbn_fan_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 1, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnFanDescr.setStatus('current') rbn_fan_fail = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 1, 1, 3), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnFanFail.setStatus('current') rbn_power_status_table = mib_table((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 2)) if mibBuilder.loadTexts: rbnPowerStatusTable.setStatus('current') rbn_power_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 2, 1)).setIndexNames((0, 'RBN-ENVMON-MIB', 'rbnPowerIndex')) if mibBuilder.loadTexts: rbnPowerStatusEntry.setStatus('current') rbn_power_index = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 2, 1, 1), integer32()) if mibBuilder.loadTexts: rbnPowerIndex.setStatus('current') rbn_power_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 2, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnPowerDescr.setStatus('current') rbn_power_fail = mib_table_column((1, 3, 6, 1, 4, 1, 2352, 2, 4, 1, 2, 1, 3), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rbnPowerFail.setStatus('current') rbn_fan_fail_change = notification_type((1, 3, 6, 1, 4, 1, 2352, 2, 4, 0, 1)).setObjects(('RBN-ENVMON-MIB', 'rbnFanFail')) if mibBuilder.loadTexts: rbnFanFailChange.setStatus('current') rbn_power_fail_change = notification_type((1, 3, 6, 1, 4, 1, 2352, 2, 4, 0, 2)).setObjects(('RBN-ENVMON-MIB', 'rbnPowerFail')) if mibBuilder.loadTexts: rbnPowerFailChange.setStatus('current') rbn_env_mon_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 2352, 2, 4, 2, 1)) rbn_env_mon_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 2352, 2, 4, 2, 2)) rbn_env_mon_mib_object_group = object_group((1, 3, 6, 1, 4, 1, 2352, 2, 4, 2, 1, 1)).setObjects(('RBN-ENVMON-MIB', 'rbnFanDescr'), ('RBN-ENVMON-MIB', 'rbnFanFail'), ('RBN-ENVMON-MIB', 'rbnPowerDescr'), ('RBN-ENVMON-MIB', 'rbnPowerFail')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rbn_env_mon_mib_object_group = rbnEnvMonMIBObjectGroup.setStatus('current') rbn_env_mon_mib_notification_group = notification_group((1, 3, 6, 1, 4, 1, 2352, 2, 4, 2, 1, 2)).setObjects(('RBN-ENVMON-MIB', 'rbnFanFailChange'), ('RBN-ENVMON-MIB', 'rbnPowerFailChange')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rbn_env_mon_mib_notification_group = rbnEnvMonMIBNotificationGroup.setStatus('current') rbn_env_mon_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 2352, 2, 4, 2, 2, 1)).setObjects(('RBN-ENVMON-MIB', 'rbnEnvMonMIBObjectGroup'), ('RBN-ENVMON-MIB', 'rbnEnvMonMIBNotificationGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rbn_env_mon_mib_compliance = rbnEnvMonMIBCompliance.setStatus('current') mibBuilder.exportSymbols('RBN-ENVMON-MIB', rbnFanFail=rbnFanFail, rbnFanStatusEntry=rbnFanStatusEntry, rbnFanDescr=rbnFanDescr, rbnEnvMonMIBGroups=rbnEnvMonMIBGroups, rbnPowerIndex=rbnPowerIndex, rbnEnvMonMIB=rbnEnvMonMIB, rbnPowerFail=rbnPowerFail, rbnPowerStatusTable=rbnPowerStatusTable, rbnPowerStatusEntry=rbnPowerStatusEntry, rbnEnvMonMIBNotificationGroup=rbnEnvMonMIBNotificationGroup, rbnEnvMonMIBCompliances=rbnEnvMonMIBCompliances, PYSNMP_MODULE_ID=rbnEnvMonMIB, rbnPowerDescr=rbnPowerDescr, rbnEnvMonMIBObjects=rbnEnvMonMIBObjects, rbnEnvMonMIBObjectGroup=rbnEnvMonMIBObjectGroup, rbnPowerFailChange=rbnPowerFailChange, rbnFanFailChange=rbnFanFailChange, rbnFanIndex=rbnFanIndex, rbnEnvMonMIBCompliance=rbnEnvMonMIBCompliance, rbnFanStatusTable=rbnFanStatusTable, rbnEnvMonMIBNotifications=rbnEnvMonMIBNotifications, rbnEnvMonMIBConformance=rbnEnvMonMIBConformance)
# https://www.codechef.com/problems/MNMX for T in range(int(input())): n,a=int(input()),list(map(int,input().split())) print((n-1)*min(a)) # If order matters # s=0 # for z in range(n-1): # if(a[0]>=a[1]): # s+=a[1] # a.pop(0) # else: # s+=a[0] # a.pop(1) # print(s)
for t in range(int(input())): (n, a) = (int(input()), list(map(int, input().split()))) print((n - 1) * min(a))
class NoLastBookException (Exception): pass class OpenLastBookFileFailed (Exception): pass
class Nolastbookexception(Exception): pass class Openlastbookfilefailed(Exception): pass
""" Contains custom core exceptions """ class UnsupportedNews(Exception): """ Custom exception for raising when a news type is unsupported """ pass
""" Contains custom core exceptions """ class Unsupportednews(Exception): """ Custom exception for raising when a news type is unsupported """ pass
fruta = [] fruta.append('Banana') fruta.append('Tangerina') fruta.append('uva') fruta.append('Laranja') fruta.append('Melancia') for f,p in enumerate(fruta): print(f'Na prateleira {f} temos {p}')
fruta = [] fruta.append('Banana') fruta.append('Tangerina') fruta.append('uva') fruta.append('Laranja') fruta.append('Melancia') for (f, p) in enumerate(fruta): print(f'Na prateleira {f} temos {p}')
rows_count = int(input()) def get_snake_pos(matrix): for i, row in enumerate(matrix): if "S" in row: j = row.index("S") snake_pos = [i, j] return snake_pos def get_food_pos(matrix): food_positions = [] for i, row in enumerate(matrix): for j, _ in enumerate(row): if matrix[i][j] == "*": food_positions.append([i, j]) return food_positions def get_lair(matrix): lair_positions = [] for i, row in enumerate(matrix): for j, _ in enumerate(row): if matrix[i][j] == "B": lair_positions.append([i, j]) return lair_positions def move_left(snake_pos): (i, j) = snake_pos new_snake_pos = [i, j - 1] return new_snake_pos def move_right(snake_pos): (i, j) = snake_pos new_snake_pos = [i, j + 1] return new_snake_pos def move_up(snake_pos): (i, j) = snake_pos new_snake_pos = [i - 1, j] return new_snake_pos def move_down(snake_pos): (i, j) = snake_pos new_snake_pos = [i + 1, j] return new_snake_pos def on_food(snake_pos, food): flag = False for food_pos in food: if snake_pos == food_pos: flag = True return flag def on_lair(snake_pos, lairs): flag = False for lair_pos in lairs: if snake_pos == lair_pos: flag = True return flag def leave_trail(matrix, snake_pos): (i, j) = snake_pos matrix[i][j] = "." def out_of_field(snake_pos, rows_count): flag = False (i, j) = snake_pos if not (0 <= i <= rows_count - 1) or not (0 <= j <= rows_count - 1): flag = True return flag field = [input() for _ in range(rows_count)] # Get initial coords fo pieces food = get_food_pos(field) snake_pos = get_snake_pos(field) lairs = get_lair(field) food_count = 0 field = [list(row) for row in field] while True: command = input() if command == "left": leave_trail(field, snake_pos) snake_pos = move_left(snake_pos) elif command == "right": leave_trail(field, snake_pos) snake_pos = move_right(snake_pos) elif command == "up": leave_trail(field, snake_pos) snake_pos = move_up(snake_pos) elif command == "down": leave_trail(field, snake_pos) snake_pos = move_down(snake_pos) if out_of_field(snake_pos, rows_count): print("Game over!") break elif on_food(snake_pos, food): food_count += 1 food.remove(snake_pos) elif on_lair(snake_pos, lairs): lairs.remove(snake_pos) leave_trail(field, snake_pos) snake_pos = lairs[0] lairs = [] if food_count >= 10: print("You won! You fed the snake.") (i, j) = snake_pos field[i][j] = "S" break print(f"Food eaten: {food_count}") [print(''.join(row)) for row in field]
rows_count = int(input()) def get_snake_pos(matrix): for (i, row) in enumerate(matrix): if 'S' in row: j = row.index('S') snake_pos = [i, j] return snake_pos def get_food_pos(matrix): food_positions = [] for (i, row) in enumerate(matrix): for (j, _) in enumerate(row): if matrix[i][j] == '*': food_positions.append([i, j]) return food_positions def get_lair(matrix): lair_positions = [] for (i, row) in enumerate(matrix): for (j, _) in enumerate(row): if matrix[i][j] == 'B': lair_positions.append([i, j]) return lair_positions def move_left(snake_pos): (i, j) = snake_pos new_snake_pos = [i, j - 1] return new_snake_pos def move_right(snake_pos): (i, j) = snake_pos new_snake_pos = [i, j + 1] return new_snake_pos def move_up(snake_pos): (i, j) = snake_pos new_snake_pos = [i - 1, j] return new_snake_pos def move_down(snake_pos): (i, j) = snake_pos new_snake_pos = [i + 1, j] return new_snake_pos def on_food(snake_pos, food): flag = False for food_pos in food: if snake_pos == food_pos: flag = True return flag def on_lair(snake_pos, lairs): flag = False for lair_pos in lairs: if snake_pos == lair_pos: flag = True return flag def leave_trail(matrix, snake_pos): (i, j) = snake_pos matrix[i][j] = '.' def out_of_field(snake_pos, rows_count): flag = False (i, j) = snake_pos if not 0 <= i <= rows_count - 1 or not 0 <= j <= rows_count - 1: flag = True return flag field = [input() for _ in range(rows_count)] food = get_food_pos(field) snake_pos = get_snake_pos(field) lairs = get_lair(field) food_count = 0 field = [list(row) for row in field] while True: command = input() if command == 'left': leave_trail(field, snake_pos) snake_pos = move_left(snake_pos) elif command == 'right': leave_trail(field, snake_pos) snake_pos = move_right(snake_pos) elif command == 'up': leave_trail(field, snake_pos) snake_pos = move_up(snake_pos) elif command == 'down': leave_trail(field, snake_pos) snake_pos = move_down(snake_pos) if out_of_field(snake_pos, rows_count): print('Game over!') break elif on_food(snake_pos, food): food_count += 1 food.remove(snake_pos) elif on_lair(snake_pos, lairs): lairs.remove(snake_pos) leave_trail(field, snake_pos) snake_pos = lairs[0] lairs = [] if food_count >= 10: print('You won! You fed the snake.') (i, j) = snake_pos field[i][j] = 'S' break print(f'Food eaten: {food_count}') [print(''.join(row)) for row in field]
#!python3 class Map: """ Map A Map class. """ def __init__(self, map_list): """ Map(map_list ::= 2D list of MapObjects) Example: a = MapObject("Path", " ", True) b = MapObject("Rock", "X", False) map_list = [[a, a, a, a, a] [a, b, b, a, b]] """ if isinstance(map_list, list): for x in map_list: if not isinstance(x, list): raise TypeError() else: for o in x: if not isinstance(o, MapObject): raise TypeError() else: raise TypeError() self.map_list = map_list def __getitem__(self, coords): x = coords[0] y = coords[1] return self.map_list[y][x] def check_collision(self, coord): left_bound = -1 top_bound = -1 right_bound = len(self.map_list[0]) bottom_bound = len(self.map_list) if coord[0] <= left_bound or coord[0] >= right_bound: return True if coord[1] <= top_bound or coord[1] >= bottom_bound: return True obj_at_point = self.map_list[coord[1]][coord[0]] if obj_at_point.is_passable is False: return True return False class MapObject: """ MapObject Object type for Map legends """ def __init__(self, name, symbol, is_passable=False): if isinstance(symbol, str) and len(symbol) > 1: raise ValueError() if not isinstance(symbol, str) or not isinstance(name, str): raise TypeError() self.name = name self.symbol = symbol self.is_passable = is_passable
class Map: """ Map A Map class. """ def __init__(self, map_list): """ Map(map_list ::= 2D list of MapObjects) Example: a = MapObject("Path", " ", True) b = MapObject("Rock", "X", False) map_list = [[a, a, a, a, a] [a, b, b, a, b]] """ if isinstance(map_list, list): for x in map_list: if not isinstance(x, list): raise type_error() else: for o in x: if not isinstance(o, MapObject): raise type_error() else: raise type_error() self.map_list = map_list def __getitem__(self, coords): x = coords[0] y = coords[1] return self.map_list[y][x] def check_collision(self, coord): left_bound = -1 top_bound = -1 right_bound = len(self.map_list[0]) bottom_bound = len(self.map_list) if coord[0] <= left_bound or coord[0] >= right_bound: return True if coord[1] <= top_bound or coord[1] >= bottom_bound: return True obj_at_point = self.map_list[coord[1]][coord[0]] if obj_at_point.is_passable is False: return True return False class Mapobject: """ MapObject Object type for Map legends """ def __init__(self, name, symbol, is_passable=False): if isinstance(symbol, str) and len(symbol) > 1: raise value_error() if not isinstance(symbol, str) or not isinstance(name, str): raise type_error() self.name = name self.symbol = symbol self.is_passable = is_passable
#!/usr/bin/env python # TODO: import the random module # This function parses both the player # and monster files def parse_file(filename): members = {} file = open(filename,"r") lines = file.readlines() for line in lines: name, diff = line.split(";") members[name] = {"str": int(diff)} return members # MONSTER FIGHT! def fight_monster(diff, roll): if diff > roll: return -1 return 1 # Performs rolls for groups def do_roll(entities): roll = 0 for entity in entities: e_name = entity e_str = entities[entity]["str"] e_roll = roll_dice(e_str) roll += e_roll print(f"{entity} rolls a {e_roll}!") return roll # Roll an individual die def roll_dice(sides): return random.randint(1, sides) # Initialze points points = 0 # TODO: Load files to parse for player and # monster data # Create loop to move from challenge to challenge for monster in monsters: # TODO: "Appear" the monster and do the monster's # die roll # TODO: Get players' team roll print(f"The group rolled a total of: {group_roll}!") # TODO: Get the result of this single fight if result > 0: print(f"The players beat the {m_name}!\n") else: print(f"The players failed to beat the {m_name}!\n") # TODO: if statement to report the final outcome of all # battles!
def parse_file(filename): members = {} file = open(filename, 'r') lines = file.readlines() for line in lines: (name, diff) = line.split(';') members[name] = {'str': int(diff)} return members def fight_monster(diff, roll): if diff > roll: return -1 return 1 def do_roll(entities): roll = 0 for entity in entities: e_name = entity e_str = entities[entity]['str'] e_roll = roll_dice(e_str) roll += e_roll print(f'{entity} rolls a {e_roll}!') return roll def roll_dice(sides): return random.randint(1, sides) points = 0 for monster in monsters: print(f'The group rolled a total of: {group_roll}!') if result > 0: print(f'The players beat the {m_name}!\n') else: print(f'The players failed to beat the {m_name}!\n')
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/2/12 16:25 # @Author : Baimohan/PH # @Site : https://github.com/BaiMoHan # @File : setdefault.py # @Software: PyCharm cars = {'BMW': 8.5, 'BENS': 8.3, 'AUDI': 7.9} print(cars.setdefault('PORSCHE', 9.2)) print(cars) print(cars.setdefault('BMW', 4.5)) print(cars)
cars = {'BMW': 8.5, 'BENS': 8.3, 'AUDI': 7.9} print(cars.setdefault('PORSCHE', 9.2)) print(cars) print(cars.setdefault('BMW', 4.5)) print(cars)
NUMBER_OF_ROWS = 8 NUMBER_OF_COLUMNS = 8 DIMENSION_OF_EACH_SQUARE = 64 BOARD_COLOR_1 = "#DDB88C" BOARD_COLOR_2 = "#A66D4F" X_AXIS_LABELS = ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H') Y_AXIS_LABELS = (1, 2, 3, 4, 5, 6, 7, 8) SHORT_NAME = { 'R':'Rook', 'N':'Knight', 'B':'Bishop', 'Q':'Queen', 'K':'King', 'P':'Pawn' } # remember capital letters - White pieces, Small letters - Black pieces START_PIECES_POSITION = { "A8": "r", "B8": "n", "C8": "b", "D8": "q", "E8": "k", "F8": "b", "G8": "n", "H8": "r", "A7": "p", "B7": "p", "C7": "p", "D7": "p", "E7": "p", "F7": "p", "G7": "p", "H7": "p", "A2": "P", "B2": "P", "C2": "P", "D2": "P", "E2": "P", "F2": "P", "G2": "P", "H2": "P", "A1": "R", "B1": "N", "C1": "B", "D1": "Q", "E1": "K", "F1": "B", "G1": "N", "H1": "R" } ORTHOGONAL_POSITIONS = ((-1,0),(0,1),(1,0),(0, -1)) DIAGONAL_POSITIONS = ((-1,-1),(-1,1),(1,-1),(1,1)) KNIGHT_POSITIONS = ((-2,-1),(-2,1),(-1,-2),(-1,2),(1,-2),(1,2),(2,-1),(2,1))
number_of_rows = 8 number_of_columns = 8 dimension_of_each_square = 64 board_color_1 = '#DDB88C' board_color_2 = '#A66D4F' x_axis_labels = ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H') y_axis_labels = (1, 2, 3, 4, 5, 6, 7, 8) short_name = {'R': 'Rook', 'N': 'Knight', 'B': 'Bishop', 'Q': 'Queen', 'K': 'King', 'P': 'Pawn'} start_pieces_position = {'A8': 'r', 'B8': 'n', 'C8': 'b', 'D8': 'q', 'E8': 'k', 'F8': 'b', 'G8': 'n', 'H8': 'r', 'A7': 'p', 'B7': 'p', 'C7': 'p', 'D7': 'p', 'E7': 'p', 'F7': 'p', 'G7': 'p', 'H7': 'p', 'A2': 'P', 'B2': 'P', 'C2': 'P', 'D2': 'P', 'E2': 'P', 'F2': 'P', 'G2': 'P', 'H2': 'P', 'A1': 'R', 'B1': 'N', 'C1': 'B', 'D1': 'Q', 'E1': 'K', 'F1': 'B', 'G1': 'N', 'H1': 'R'} orthogonal_positions = ((-1, 0), (0, 1), (1, 0), (0, -1)) diagonal_positions = ((-1, -1), (-1, 1), (1, -1), (1, 1)) knight_positions = ((-2, -1), (-2, 1), (-1, -2), (-1, 2), (1, -2), (1, 2), (2, -1), (2, 1))
def power(x, y, p) : res = 1 # Initialize result # Update x if it is more # than or equal to p x = x % p if (x == 0) : return 0 while (y > 0) : # If y is odd, multiply # x with result if ((y & 1) == 1) : res = (res * x) % p # y must be even now y = y >> 1 # y = y/2 x = (x * x) % p return res mod = int(1e9)+7 for i in range(int(input())): n,a = [int(j) for j in input().split()] c = a%mod p = (a**2)%mod for j in range(n-1): q = power(p,(j+2)**2-(j+1)**2,mod) c = (c+q)%mod p = (q*p)%mod print(c)
def power(x, y, p): res = 1 x = x % p if x == 0: return 0 while y > 0: if y & 1 == 1: res = res * x % p y = y >> 1 x = x * x % p return res mod = int(1000000000.0) + 7 for i in range(int(input())): (n, a) = [int(j) for j in input().split()] c = a % mod p = a ** 2 % mod for j in range(n - 1): q = power(p, (j + 2) ** 2 - (j + 1) ** 2, mod) c = (c + q) % mod p = q * p % mod print(c)
""" Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: [ "((()))", "(()())", "(())()", "()(())", "()()()" ] """ # back tracking # Runtime: 40 ms, faster than 26.72% of Python3 online submissions for Generate Parentheses. # Memory Usage: 12.9 MB, less than 100.00% of Python3 online submissions for Generate Parentheses. class Solution: def generateParenthesis(self, n: int) -> List[str]: target = {"left":n, "right":n} curr = {"left":0, "right":0} res = set([]) self.dfs(res, [], target, curr) return res def dfs(self, res, tmp, target, current): # print("target:", target, "current:", current) # print("tmp:", tmp) if target["left"] < 0 or target["right"] < 0: return if target["left"] == 0 and target["right"] == 0: res.add("".join(tmp)) return target["left"] -= 1 current["left"] += 1 tmp.append("(") self.dfs(res, tmp, target, current) target["left"] += 1 current["left"] -= 1 tmp.pop() if current["left"] < current["right"] + 1: return target["right"] -= 1 current["right"] += 1 tmp.append(")") self.dfs(res, tmp, target, current) target["right"] += 1 current["right"] -= 1 tmp.pop()
""" Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: [ "((()))", "(()())", "(())()", "()(())", "()()()" ] """ class Solution: def generate_parenthesis(self, n: int) -> List[str]: target = {'left': n, 'right': n} curr = {'left': 0, 'right': 0} res = set([]) self.dfs(res, [], target, curr) return res def dfs(self, res, tmp, target, current): if target['left'] < 0 or target['right'] < 0: return if target['left'] == 0 and target['right'] == 0: res.add(''.join(tmp)) return target['left'] -= 1 current['left'] += 1 tmp.append('(') self.dfs(res, tmp, target, current) target['left'] += 1 current['left'] -= 1 tmp.pop() if current['left'] < current['right'] + 1: return target['right'] -= 1 current['right'] += 1 tmp.append(')') self.dfs(res, tmp, target, current) target['right'] += 1 current['right'] -= 1 tmp.pop()
class Solution: def isPalindrome(self, s: str) -> bool: l, r = 0, len(s) - 1 while(l < r): while(l < r and s[l].isalnum() == False): l+=1 while(l < r and s[r].isalnum() == False): r-=1 if(s[l].lower() != s[r].lower()): return False l += 1 r -= 1 return True # Time Complexity - O(n) # Space Complexity - O(1)
class Solution: def is_palindrome(self, s: str) -> bool: (l, r) = (0, len(s) - 1) while l < r: while l < r and s[l].isalnum() == False: l += 1 while l < r and s[r].isalnum() == False: r -= 1 if s[l].lower() != s[r].lower(): return False l += 1 r -= 1 return True
class Solution: def solve(self, nums): if len(nums) <= 2: return 0 l_maxes = [] l_max = -inf for num in nums: l_max = max(l_max,num) l_maxes.append(l_max) r_maxes = [] r_max = -inf for num in nums[::-1]: r_max = max(r_max,num) r_maxes.append(r_max) r_maxes.reverse() return sum(max(0,min(l_maxes[i-1],r_maxes[i+1])-nums[i]) for i in range(1,len(nums)-1))
class Solution: def solve(self, nums): if len(nums) <= 2: return 0 l_maxes = [] l_max = -inf for num in nums: l_max = max(l_max, num) l_maxes.append(l_max) r_maxes = [] r_max = -inf for num in nums[::-1]: r_max = max(r_max, num) r_maxes.append(r_max) r_maxes.reverse() return sum((max(0, min(l_maxes[i - 1], r_maxes[i + 1]) - nums[i]) for i in range(1, len(nums) - 1)))
# Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def swapPairs(self, head: ListNode) -> ListNode: return self.swap(head) def swap(self, head: ListNode) -> ListNode: if head == None: return None if head.next == None: return head temp = head head = head.next temp.next = self.swap(head.next) head.next = temp return head
class Listnode: def __init__(self, x): self.val = x self.next = None class Solution: def swap_pairs(self, head: ListNode) -> ListNode: return self.swap(head) def swap(self, head: ListNode) -> ListNode: if head == None: return None if head.next == None: return head temp = head head = head.next temp.next = self.swap(head.next) head.next = temp return head
def FermatPrimalityTest(number): ''' if number != 1 ''' if (number > 1): ''' repeat the test few times ''' for time in range(3): ''' Draw a RANDOM number in range of number ( Z_number ) ''' randomNumber = random.randint(2, number)-1 ''' Test if a^(n-1) = 1 mod n ''' if ( pow(randomNumber, number-1, number) != 1 ): return False return True else: ''' case number == 1 ''' return False
def fermat_primality_test(number): """ if number != 1 """ if number > 1: ' repeat the test few times ' for time in range(3): ' Draw a RANDOM number in range of number ( Z_number ) ' random_number = random.randint(2, number) - 1 ' Test if a^(n-1) = 1 mod n ' if pow(randomNumber, number - 1, number) != 1: return False return True else: ' case number == 1 ' return False
# Using Array slicing in python to reverse arrays # defining reverse function def reversedArray(array): print(array[::-1]) # Creating a Template Array array = [1, 2, 3, 4, 5] print("Current Array Order:") print(array) print("Reversed Array Order:") reversedArray(array)
def reversed_array(array): print(array[::-1]) array = [1, 2, 3, 4, 5] print('Current Array Order:') print(array) print('Reversed Array Order:') reversed_array(array)
#Get a left position and a right # iterative uses a loop def is_palindrome(string): left_index = 0 right_index = len(string) - 1 #repeat, or loop while left_index < right_index: #check if dismatch if string[left_index] != string[right_index]: return False #move to the next characters to check # with the left we wanna move forward, so we add 1 left_index += 1 # with right we need to substract right_index -= 1 return True #recursive def is_palindrome_recursive(string, left_index, right_index): print(left_index) print(right_index) #base case, it's when we stop if left_index == right_index: return True if string[left_index] != string[right_index]: return False #recursive case, when we call the function within itself if left_index < right_index: return is_palindrome_recursive(string, left_index + 1, right_index - 1) return True print(is_palindrome_recursive("talo", 0, len("deed")-1)) # print(is_palindrome_recursive("tacocat")) # print(is_palindrome_recursive("tasdfklajdf"))
def is_palindrome(string): left_index = 0 right_index = len(string) - 1 while left_index < right_index: if string[left_index] != string[right_index]: return False left_index += 1 right_index -= 1 return True def is_palindrome_recursive(string, left_index, right_index): print(left_index) print(right_index) if left_index == right_index: return True if string[left_index] != string[right_index]: return False if left_index < right_index: return is_palindrome_recursive(string, left_index + 1, right_index - 1) return True print(is_palindrome_recursive('talo', 0, len('deed') - 1))
#!/usr/bin/env python3 def char_frequency(filename): """ Counts the frequency of each character in the given file. """ # First try to open the file try: f = open(filename) # code in the except block is only executed if one of the instructions in the try block raise an error of the matching type except OSError: return None # Now process the file characters = {} for line in f: for char in line: characters[char] = characters.get(char, 0) + 1 f.close() return characters
def char_frequency(filename): """ Counts the frequency of each character in the given file. """ try: f = open(filename) except OSError: return None characters = {} for line in f: for char in line: characters[char] = characters.get(char, 0) + 1 f.close() return characters
def distributeCandies(self, candies: int, num_people: int) -> List[int]: r = [0 for _ in range(num_people)] i = 0 c = 1 while candies != 0: if i > num_people - 1: i = 0 if c > candies: r[i] += candies break r[i] += c candies -= c i += 1 c += 1 return r
def distribute_candies(self, candies: int, num_people: int) -> List[int]: r = [0 for _ in range(num_people)] i = 0 c = 1 while candies != 0: if i > num_people - 1: i = 0 if c > candies: r[i] += candies break r[i] += c candies -= c i += 1 c += 1 return r
LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' FIRST_LETTER = LETTERS[0] def get_sequence(column, count, step=1): column = validate(column) count = max(abs(count), 1) sequence = [] if column: sequence.append(column) count = count - 1 for i in range(count): previous = sequence[-1] if sequence else column sequence.append(next(previous, step)) return sequence def next(column, step=1): column = validate(column) if not column: return FIRST_LETTER step = max(abs(step), 1) base = column[0:-1] if len(column) > 1 else '' next_char = column[-1] if len(column) > 1 else column for i in range(step): next_char = get_next_char(next_char) if next_char == FIRST_LETTER: base = rollover(base) return base + next_char def rollover(column): if not column: return FIRST_LETTER base = column[0:-1] next_char = get_next_char(column[-1]) if next_char == FIRST_LETTER: return rollover(base) + next_char return base + next_char def get_next_char(char): index = LETTERS.index(char) + 1 return FIRST_LETTER if index >= len(LETTERS) else LETTERS[index] def validate(column): if not column: return None column = column.strip().upper() invalid_chars = [c for c in column if c not in LETTERS] return None if invalid_chars else column
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' first_letter = LETTERS[0] def get_sequence(column, count, step=1): column = validate(column) count = max(abs(count), 1) sequence = [] if column: sequence.append(column) count = count - 1 for i in range(count): previous = sequence[-1] if sequence else column sequence.append(next(previous, step)) return sequence def next(column, step=1): column = validate(column) if not column: return FIRST_LETTER step = max(abs(step), 1) base = column[0:-1] if len(column) > 1 else '' next_char = column[-1] if len(column) > 1 else column for i in range(step): next_char = get_next_char(next_char) if next_char == FIRST_LETTER: base = rollover(base) return base + next_char def rollover(column): if not column: return FIRST_LETTER base = column[0:-1] next_char = get_next_char(column[-1]) if next_char == FIRST_LETTER: return rollover(base) + next_char return base + next_char def get_next_char(char): index = LETTERS.index(char) + 1 return FIRST_LETTER if index >= len(LETTERS) else LETTERS[index] def validate(column): if not column: return None column = column.strip().upper() invalid_chars = [c for c in column if c not in LETTERS] return None if invalid_chars else column
def evalRec(env, rec): """hearing_loss_genes""" return (len(set(rec.Symbol) & { 'ABCD1', 'ABHD12', 'ABHD5', 'ACOT13', 'ACTB', 'ACTG1', 'ADCY1', 'ADGRV1', 'ADK', 'AIFM1', 'AK2', 'ALMS1', 'AMMECR1', 'ANKH', 'ARSB', 'ATP13A4', 'ATP2B2', 'ATP2C2', 'ATP6V1B1', 'ATP6V1B2', 'BCAP31', 'BCS1L', 'BDNF', 'BDP1', 'BSND', 'BTD', 'CABP2', 'CACNA1C', 'CACNA1D', 'CATSPER2', 'CCDC50', 'CD151', 'CD164', 'CDC14A', 'CDC42', 'CDH23', 'CDKN1C', 'CEACAM16', 'CEP78', 'CEP152', 'CFTR', 'CHD7', 'CHSY1', 'CIB2', 'CISD2', 'CLCNKA', 'CLCNKB', 'CLDN14', 'CLIC5', 'CLPP', 'CLRN1', 'CMIP', 'CNTNAP2', 'COCH', 'COL11A1', 'COL11A2', 'COL2A1', 'COL4A3', 'COL4A4', 'COL4A5', 'COL4A6', 'COL9A1', 'COL9A2', 'COL9A3', 'CRYL1', 'CRYM', 'CYP19A1', 'DCAF17', 'DCDC2', 'DCDC2', 'DIABLO', 'DIAPH1', 'DIAPH3', 'DLX5', 'DMXL2', 'DNMT1', 'DOCK4', 'DRD2', 'DSPP', 'DYX1C1', 'EDN3', 'EDNRB', 'ELMOD3', 'EPS8', 'EPS8L2', 'ERCC2', 'ERCC3', 'ESPN', 'ESRP1', 'ESRRB', 'EYA1', 'EYA4', 'FAM189A2', 'FDXR', 'FGF3', 'FGFR1', 'FGFR2', 'FGFR3', 'FKBP14', 'FOXC1', 'FOXF2', 'FOXI1', 'FOXP1', 'FOXP2', 'FOXRED1', 'FRMPD4', 'GAA', 'GATA3', 'GCFC2', 'GIPC3', 'GJA1', 'GJB1', 'GJB2', 'GJB3', 'GJB6', 'GNPTAB', 'GNPTG', 'GPLD1', 'GPSM2', 'GRAP', 'GREB1L', 'GRHL2', 'GRXCR1', 'GRXCR2', 'GSDME', 'GSTP1', 'GTPBP3', 'HAAO', 'HARS', 'HARS2', 'HGF', 'HOMER1', 'HOMER2', 'HOXA2', 'HOXB1', 'HSD17B4', 'HTRA2', 'IARS2', 'IDS', 'IGF1', 'ILDR1', 'JAG1', 'KARS', 'KCNE1', 'KCNJ10', 'KCNQ1', 'KCNQ4', 'KIAA0319', 'KIT', 'KITLG', 'LARS2', 'LHFPL5', 'LHX3', 'LMX1A', 'LOXHD1', 'LOXL3', 'LRP2', 'LRTOMT', 'MANBA', 'MARVELD2', 'MASP1', 'MCM2', 'MET', 'MFN2', 'MIR182', 'MIR183', 'MIR96', 'MITF', 'MPZL2', 'MRPL19', 'MSRB3', 'MTAP', 'MTO1', 'MTRNR1', 'MTTK', 'MTTL1', 'MTTS1', 'MYH14', 'MYH9', 'MYO15A', 'MYO1A', 'MYO1C', 'MYO1F', 'MYO3A', 'MYO6', 'MYO7A', 'NAGPA', 'NARS2', 'NDP', 'NDUFA1', 'NDUFA11', 'NDUFAF1', 'NDUFAF2', 'NDUFAF3', 'NDUFAF4', 'NDUFAF5', 'NDUFB11', 'NDUFB3', 'NDUFB9', 'NDUFS1', 'NDUFS2', 'NDUFS3', 'NDUFS4', 'NDUFS6', 'NDUFV1', 'NDUFV2', 'NF2', 'NLRP3', 'NOTCH2', 'NRSN1', 'NUBPL', 'OPA1', 'ORC1', 'OSBPL2', 'OTOA', 'OTOF', 'OTOG', 'OTOGL', 'P2RX2', 'PAX2', 'PAX3', 'PCDH15', 'PDE1C', 'PDZD7', 'PEX1', 'PEX6', 'PITX2', 'PJVK', 'PMP22', 'PNPT1', 'POLG', 'POLR1C', 'POLR1D', 'POU3F4', 'POU4F3', 'PRPS1', 'PTPRQ', 'RDX', 'RIPOR2', 'RMND1', 'ROBO1', 'ROR1', 'RPS6KA3', 'S1PR2', 'SALL1', 'SALL4', 'SEMA3E', 'SERAC1', 'SERPINB6', 'SETBP1', 'SGPL1', 'SF3B4', 'SIX1', 'SIX5', 'SLC12A1', 'SLC17A8', 'SLC19A2', 'SLC22A4', 'SLC26A4', 'SLC26A5', 'SLC29A3', 'SLC33A1', 'SLC4A11', 'SLC52A2', 'SLC52A3', 'SLC9A1', 'SLITRK6', 'SMAD4', 'SMPX', 'SNAI2', 'SOX10', 'SOX2', 'SPATC1L', 'SPINK5', 'SRPX2', 'STRC', 'STXBP2', 'STXBP3', 'SUCLA2', 'SUCLG1', 'SYNE4', 'TACO1', 'TBC1D24', 'TBL1X', 'TBX1', 'TCF21', 'TCOF1', 'TDP2', 'TECTA', 'TECTB', 'TFAP2A', 'TFB1M', 'TIMM8A', 'TIMMDC1', 'TJP2', 'TMC1', 'TMC2', 'TMEM126B', 'TMEM132E', 'TMIE', 'TMPRSS3', 'TMPRSS5', 'TNC', 'TPRN', 'TRIOBP', 'TRMU', 'TSPEAR', 'TUBB4B', 'TWNK', 'TYR', 'USH1C', 'USH1G', 'USH2A', 'VCAN', 'WBP2', 'WFS1', 'WHRN', } ) > 0)
def eval_rec(env, rec): """hearing_loss_genes""" return len(set(rec.Symbol) & {'ABCD1', 'ABHD12', 'ABHD5', 'ACOT13', 'ACTB', 'ACTG1', 'ADCY1', 'ADGRV1', 'ADK', 'AIFM1', 'AK2', 'ALMS1', 'AMMECR1', 'ANKH', 'ARSB', 'ATP13A4', 'ATP2B2', 'ATP2C2', 'ATP6V1B1', 'ATP6V1B2', 'BCAP31', 'BCS1L', 'BDNF', 'BDP1', 'BSND', 'BTD', 'CABP2', 'CACNA1C', 'CACNA1D', 'CATSPER2', 'CCDC50', 'CD151', 'CD164', 'CDC14A', 'CDC42', 'CDH23', 'CDKN1C', 'CEACAM16', 'CEP78', 'CEP152', 'CFTR', 'CHD7', 'CHSY1', 'CIB2', 'CISD2', 'CLCNKA', 'CLCNKB', 'CLDN14', 'CLIC5', 'CLPP', 'CLRN1', 'CMIP', 'CNTNAP2', 'COCH', 'COL11A1', 'COL11A2', 'COL2A1', 'COL4A3', 'COL4A4', 'COL4A5', 'COL4A6', 'COL9A1', 'COL9A2', 'COL9A3', 'CRYL1', 'CRYM', 'CYP19A1', 'DCAF17', 'DCDC2', 'DCDC2', 'DIABLO', 'DIAPH1', 'DIAPH3', 'DLX5', 'DMXL2', 'DNMT1', 'DOCK4', 'DRD2', 'DSPP', 'DYX1C1', 'EDN3', 'EDNRB', 'ELMOD3', 'EPS8', 'EPS8L2', 'ERCC2', 'ERCC3', 'ESPN', 'ESRP1', 'ESRRB', 'EYA1', 'EYA4', 'FAM189A2', 'FDXR', 'FGF3', 'FGFR1', 'FGFR2', 'FGFR3', 'FKBP14', 'FOXC1', 'FOXF2', 'FOXI1', 'FOXP1', 'FOXP2', 'FOXRED1', 'FRMPD4', 'GAA', 'GATA3', 'GCFC2', 'GIPC3', 'GJA1', 'GJB1', 'GJB2', 'GJB3', 'GJB6', 'GNPTAB', 'GNPTG', 'GPLD1', 'GPSM2', 'GRAP', 'GREB1L', 'GRHL2', 'GRXCR1', 'GRXCR2', 'GSDME', 'GSTP1', 'GTPBP3', 'HAAO', 'HARS', 'HARS2', 'HGF', 'HOMER1', 'HOMER2', 'HOXA2', 'HOXB1', 'HSD17B4', 'HTRA2', 'IARS2', 'IDS', 'IGF1', 'ILDR1', 'JAG1', 'KARS', 'KCNE1', 'KCNJ10', 'KCNQ1', 'KCNQ4', 'KIAA0319', 'KIT', 'KITLG', 'LARS2', 'LHFPL5', 'LHX3', 'LMX1A', 'LOXHD1', 'LOXL3', 'LRP2', 'LRTOMT', 'MANBA', 'MARVELD2', 'MASP1', 'MCM2', 'MET', 'MFN2', 'MIR182', 'MIR183', 'MIR96', 'MITF', 'MPZL2', 'MRPL19', 'MSRB3', 'MTAP', 'MTO1', 'MTRNR1', 'MTTK', 'MTTL1', 'MTTS1', 'MYH14', 'MYH9', 'MYO15A', 'MYO1A', 'MYO1C', 'MYO1F', 'MYO3A', 'MYO6', 'MYO7A', 'NAGPA', 'NARS2', 'NDP', 'NDUFA1', 'NDUFA11', 'NDUFAF1', 'NDUFAF2', 'NDUFAF3', 'NDUFAF4', 'NDUFAF5', 'NDUFB11', 'NDUFB3', 'NDUFB9', 'NDUFS1', 'NDUFS2', 'NDUFS3', 'NDUFS4', 'NDUFS6', 'NDUFV1', 'NDUFV2', 'NF2', 'NLRP3', 'NOTCH2', 'NRSN1', 'NUBPL', 'OPA1', 'ORC1', 'OSBPL2', 'OTOA', 'OTOF', 'OTOG', 'OTOGL', 'P2RX2', 'PAX2', 'PAX3', 'PCDH15', 'PDE1C', 'PDZD7', 'PEX1', 'PEX6', 'PITX2', 'PJVK', 'PMP22', 'PNPT1', 'POLG', 'POLR1C', 'POLR1D', 'POU3F4', 'POU4F3', 'PRPS1', 'PTPRQ', 'RDX', 'RIPOR2', 'RMND1', 'ROBO1', 'ROR1', 'RPS6KA3', 'S1PR2', 'SALL1', 'SALL4', 'SEMA3E', 'SERAC1', 'SERPINB6', 'SETBP1', 'SGPL1', 'SF3B4', 'SIX1', 'SIX5', 'SLC12A1', 'SLC17A8', 'SLC19A2', 'SLC22A4', 'SLC26A4', 'SLC26A5', 'SLC29A3', 'SLC33A1', 'SLC4A11', 'SLC52A2', 'SLC52A3', 'SLC9A1', 'SLITRK6', 'SMAD4', 'SMPX', 'SNAI2', 'SOX10', 'SOX2', 'SPATC1L', 'SPINK5', 'SRPX2', 'STRC', 'STXBP2', 'STXBP3', 'SUCLA2', 'SUCLG1', 'SYNE4', 'TACO1', 'TBC1D24', 'TBL1X', 'TBX1', 'TCF21', 'TCOF1', 'TDP2', 'TECTA', 'TECTB', 'TFAP2A', 'TFB1M', 'TIMM8A', 'TIMMDC1', 'TJP2', 'TMC1', 'TMC2', 'TMEM126B', 'TMEM132E', 'TMIE', 'TMPRSS3', 'TMPRSS5', 'TNC', 'TPRN', 'TRIOBP', 'TRMU', 'TSPEAR', 'TUBB4B', 'TWNK', 'TYR', 'USH1C', 'USH1G', 'USH2A', 'VCAN', 'WBP2', 'WFS1', 'WHRN'}) > 0
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Test data for firewall rules scanners.""" FAKE_FIREWALL_RULE_FOR_TEST_PROJECT = { 'name': 'policy1', 'full_name': ('organization/org/folder/folder1/' 'project/project0/firewall/policy1/'), 'network': 'network1', 'direction': 'ingress', 'allowed': [{'IPProtocol': 'tcp', 'ports': ['1', '3389']}], 'sourceRanges': ['0.0.0.0/0'], 'targetTags': ['linux'], } FAKE_FIREWALL_RULE_FOR_PROJECT1 = { 'name': 'policy1', 'full_name': ('organization/org/folder/test_instances/' 'project/project1/firewall/policy1/'), 'network': 'network1', 'direction': 'ingress', 'allowed': [{'IPProtocol': 'tcp', 'ports': ['22']}], 'sourceRanges': ['11.0.0.1'], 'targetTags': ['test'], }
"""Test data for firewall rules scanners.""" fake_firewall_rule_for_test_project = {'name': 'policy1', 'full_name': 'organization/org/folder/folder1/project/project0/firewall/policy1/', 'network': 'network1', 'direction': 'ingress', 'allowed': [{'IPProtocol': 'tcp', 'ports': ['1', '3389']}], 'sourceRanges': ['0.0.0.0/0'], 'targetTags': ['linux']} fake_firewall_rule_for_project1 = {'name': 'policy1', 'full_name': 'organization/org/folder/test_instances/project/project1/firewall/policy1/', 'network': 'network1', 'direction': 'ingress', 'allowed': [{'IPProtocol': 'tcp', 'ports': ['22']}], 'sourceRanges': ['11.0.0.1'], 'targetTags': ['test']}
# ToDo: Make it configurable DEFAULT_PARAMS = { "os_api": "23", "device_type": "Pixel", "ssmix": "a", "manifest_version_code": "2018111632", "dpi": 420, "app_name": "musical_ly", "version_name": "9.1.0", "is_my_cn": 0, "ac": "wifi", "update_version_code": "2018111632", "channel": "googleplay", "device_platform": "android", "build_number": "9.9.0", "version_code": 910, "timezone_name": "America/New_York", "timezone_offset": 36000, "resolution": "1080*1920", "os_version": "7.1.2", "device_brand": "Google", "mcc_mnc": "23001", "is_my_cn": 0, "fp": "", "app_language": "en", "language": "en", "region": "US", "sys_region": "US", "account_region": "US", "carrier_region": "US", "carrier_region_v2": "505", "aid": "1233", "pass-region": 1, "pass-route": 1, "app_type": "normal", # "iid": "6742828344465966597", # "device_id": "6746627788566021893", # ToDo: Make it dynamic "iid": "6749111388298184454", "device_id": "6662384847253865990", } DEFAULT_HEADERS = { "Host": "api2.musical.ly", "X-SS-TC": "0", "User-Agent": f"com.zhiliaoapp.musically/{DEFAULT_PARAMS['manifest_version_code']}" + f" (Linux; U; Android {DEFAULT_PARAMS['os_version']};" + f" {DEFAULT_PARAMS['language']}_{DEFAULT_PARAMS['region']};" + f" {DEFAULT_PARAMS['device_type']};" + f" Build/NHG47Q; Cronet/58.0.2991.0)", "Accept-Encoding": "gzip", "Accept": "*/*", "Connection": "keep-alive", "X-Tt-Token": "", "sdk-version": "1", "Cookie": "null = 1;", }
default_params = {'os_api': '23', 'device_type': 'Pixel', 'ssmix': 'a', 'manifest_version_code': '2018111632', 'dpi': 420, 'app_name': 'musical_ly', 'version_name': '9.1.0', 'is_my_cn': 0, 'ac': 'wifi', 'update_version_code': '2018111632', 'channel': 'googleplay', 'device_platform': 'android', 'build_number': '9.9.0', 'version_code': 910, 'timezone_name': 'America/New_York', 'timezone_offset': 36000, 'resolution': '1080*1920', 'os_version': '7.1.2', 'device_brand': 'Google', 'mcc_mnc': '23001', 'is_my_cn': 0, 'fp': '', 'app_language': 'en', 'language': 'en', 'region': 'US', 'sys_region': 'US', 'account_region': 'US', 'carrier_region': 'US', 'carrier_region_v2': '505', 'aid': '1233', 'pass-region': 1, 'pass-route': 1, 'app_type': 'normal', 'iid': '6749111388298184454', 'device_id': '6662384847253865990'} default_headers = {'Host': 'api2.musical.ly', 'X-SS-TC': '0', 'User-Agent': f"com.zhiliaoapp.musically/{DEFAULT_PARAMS['manifest_version_code']}" + f" (Linux; U; Android {DEFAULT_PARAMS['os_version']};" + f" {DEFAULT_PARAMS['language']}_{DEFAULT_PARAMS['region']};" + f" {DEFAULT_PARAMS['device_type']};" + f' Build/NHG47Q; Cronet/58.0.2991.0)', 'Accept-Encoding': 'gzip', 'Accept': '*/*', 'Connection': 'keep-alive', 'X-Tt-Token': '', 'sdk-version': '1', 'Cookie': 'null = 1;'}
def Ispalindrome(usrname): return usrname==usrname[::-1] def main(): usrname=input("Enter the String :") #temp=usrname[::-1] if Ispalindrome(usrname): print("String %s is palindrome"%(usrname)) else: print("String %s is not palindrome"%(usrname)) if __name__ == '__main__': main()
def ispalindrome(usrname): return usrname == usrname[::-1] def main(): usrname = input('Enter the String :') if ispalindrome(usrname): print('String %s is palindrome' % usrname) else: print('String %s is not palindrome' % usrname) if __name__ == '__main__': main()
# Advent of Code 2015 # # From https://adventofcode.com/2015/day/3 # inputs = [data.strip() for data in open('../inputs/Advent2015_03.txt', 'r')][0] move = {'^': 0 + 1j, ">": 1, "v": 0 - 1j, "<": -1} def visit(inputs): position = 0 + 0j visited = {position} for x in inputs: position = position + move[x] visited.add(position) return visited print(f"AoC 2015 Day 3, Part 1 answer is {len(visit(inputs))}") print(f"AoC 2015 Day 3, Part 2 answer is {len(visit(inputs[0::2]) | visit(inputs[1::2]))}")
inputs = [data.strip() for data in open('../inputs/Advent2015_03.txt', 'r')][0] move = {'^': 0 + 1j, '>': 1, 'v': 0 - 1j, '<': -1} def visit(inputs): position = 0 + 0j visited = {position} for x in inputs: position = position + move[x] visited.add(position) return visited print(f'AoC 2015 Day 3, Part 1 answer is {len(visit(inputs))}') print(f'AoC 2015 Day 3, Part 2 answer is {len(visit(inputs[0::2]) | visit(inputs[1::2]))}')
def bisect(f, a, b, tol=10e-5): """ Implements the bisection root finding algorithm, assuming that f is a real-valued function on [a, b] satisfying f(a) < 0 < f(b). """ lower, upper = a, b while upper - lower > tol: middle = 0.5 * (upper + lower) # === if root is between lower and middle === # if f(middle) > 0: lower, upper = lower, middle # === if root is between middle and upper === # else: lower, upper = middle, upper return 0.5 * (upper + lower)
def bisect(f, a, b, tol=0.0001): """ Implements the bisection root finding algorithm, assuming that f is a real-valued function on [a, b] satisfying f(a) < 0 < f(b). """ (lower, upper) = (a, b) while upper - lower > tol: middle = 0.5 * (upper + lower) if f(middle) > 0: (lower, upper) = (lower, middle) else: (lower, upper) = (middle, upper) return 0.5 * (upper + lower)
# -*- coding: utf-8 -*- """Products are standard objects that Loaders add to the data store.""" # For now Products are simple dictionaries. class Product(dict): """Standardised product data.""" pass
"""Products are standard objects that Loaders add to the data store.""" class Product(dict): """Standardised product data.""" pass
age1 = 12 age2 = 18 print("age1 + age2") print(age1 + age2) print("age1 - age2") print(age1 - age2) print("age1 * age2") print(age1 * age2) print("age1 / age2") print(age1 / age2) print("age1 % age2") print(age1 % age2) sent1 = "Today is a beautiful day" firstName = "Marlon" lastName = "Monzon" print(firstName + " " + lastName) print ("HI" * 10) sentence = "Marlon was playing basketball."; # Splicing print(sentence[0:6]) print(sentence[:-12])
age1 = 12 age2 = 18 print('age1 + age2') print(age1 + age2) print('age1 - age2') print(age1 - age2) print('age1 * age2') print(age1 * age2) print('age1 / age2') print(age1 / age2) print('age1 % age2') print(age1 % age2) sent1 = 'Today is a beautiful day' first_name = 'Marlon' last_name = 'Monzon' print(firstName + ' ' + lastName) print('HI' * 10) sentence = 'Marlon was playing basketball.' print(sentence[0:6]) print(sentence[:-12])
a = input() s = [int(x) for x in input().split()] ans = [str(x) for x in sorted(s)] print(' '.join(ans))
a = input() s = [int(x) for x in input().split()] ans = [str(x) for x in sorted(s)] print(' '.join(ans))
# Equations (c) Baltasar 2019 MIT License <[email protected]> class TDS: def __init__(self): self._vbles = {} def __iadd__(self, other): self._vbles[other[0]] = other[1] return self def __getitem__(self, item): return self._vbles[item] def __setitem__(self, item, value): self._vbles[item] = value def get_vble_names(self): return list(self._vbles.keys()) def __len__(self): return len(self._vbles) def get(self, vble): return self._vbles[vble] def __str__(self): toret = "" delim = "" for key in self._vbles.keys(): toret += delim toret += str(key) + " = " + str(self._vbles[key]) delim = ", " return toret
class Tds: def __init__(self): self._vbles = {} def __iadd__(self, other): self._vbles[other[0]] = other[1] return self def __getitem__(self, item): return self._vbles[item] def __setitem__(self, item, value): self._vbles[item] = value def get_vble_names(self): return list(self._vbles.keys()) def __len__(self): return len(self._vbles) def get(self, vble): return self._vbles[vble] def __str__(self): toret = '' delim = '' for key in self._vbles.keys(): toret += delim toret += str(key) + ' = ' + str(self._vbles[key]) delim = ', ' return toret
x = int(input("enter percentage\n")) if(x>=65): print("Excellent") elif(x>=55 and x<65): print("Good") elif(x>=40 and x<55): print("Fair") else: print("Failed")
x = int(input('enter percentage\n')) if x >= 65: print('Excellent') elif x >= 55 and x < 65: print('Good') elif x >= 40 and x < 55: print('Fair') else: print('Failed')
WORK_PATH = "/tmp/posts" PORT = 8000 AUTHOR = "@asadiyan" TITLE = "fsBlog" DESCRIPTION = "<h3></h3>"
work_path = '/tmp/posts' port = 8000 author = '@asadiyan' title = 'fsBlog' description = '<h3></h3>'
""" written and developed by Daniel Temkin please refer to LICENSE for ownership and reference information """
""" written and developed by Daniel Temkin please refer to LICENSE for ownership and reference information """
def TwosComplementOf(n): if isinstance(n,str) == True: binintnum = int(n) binmun = int("{0:08b}".format(binintnum)) strnum = str(binmun) size = len(strnum) idx = size -1 while idx >= 0: if strnum[idx] == '1': break idx = idx - 1 if idx == -1: return '1'+strnum position = idx-1 while position >= 0: if strnum[position] == '1': strnum = list(strnum) strnum[position] ='0' strnum = ''.join(strnum) else: strnum = list(strnum) strnum[position] = '1' strnum = ''.join(strnum) position = position-1 return strnum else: binmun = int("{0:08b}".format(n)) strnum = str(binmun) size = len(strnum) idx = size - 1 while idx >= 0: if strnum[idx] == '1': break idx = idx - 1 if idx == -1: return '1' + strnum position = idx - 1 while position >= 0: if strnum[position] == '1': strnum = list(strnum) strnum[position] = '0' strnum = ''.join(strnum) else: strnum = list(strnum) strnum[position] = '1' strnum = ''.join(strnum) position = position - 1 return strnum
def twos_complement_of(n): if isinstance(n, str) == True: binintnum = int(n) binmun = int('{0:08b}'.format(binintnum)) strnum = str(binmun) size = len(strnum) idx = size - 1 while idx >= 0: if strnum[idx] == '1': break idx = idx - 1 if idx == -1: return '1' + strnum position = idx - 1 while position >= 0: if strnum[position] == '1': strnum = list(strnum) strnum[position] = '0' strnum = ''.join(strnum) else: strnum = list(strnum) strnum[position] = '1' strnum = ''.join(strnum) position = position - 1 return strnum else: binmun = int('{0:08b}'.format(n)) strnum = str(binmun) size = len(strnum) idx = size - 1 while idx >= 0: if strnum[idx] == '1': break idx = idx - 1 if idx == -1: return '1' + strnum position = idx - 1 while position >= 0: if strnum[position] == '1': strnum = list(strnum) strnum[position] = '0' strnum = ''.join(strnum) else: strnum = list(strnum) strnum[position] = '1' strnum = ''.join(strnum) position = position - 1 return strnum
# pylint: skip-file # pylint: disable=too-many-instance-attributes class GcloudComputeZones(GcloudCLI): ''' Class to wrap the gcloud compute zones command''' # pylint allows 5 # pylint: disable=too-many-arguments def __init__(self, region=None, verbose=False): ''' Constructor for gcloud resource ''' super(GcloudComputeZones, self).__init__() self._region = region self.verbose = verbose @property def region(self): '''property for region''' return self._region def list_zones(self): '''return a list of zones''' results = self._list_zones() if results['returncode'] == 0 and self.region: zones = [] for zone in results['results']: if self.region == zone['region']: zones.append(zone) results['results'] = zones return results
class Gcloudcomputezones(GcloudCLI): """ Class to wrap the gcloud compute zones command""" def __init__(self, region=None, verbose=False): """ Constructor for gcloud resource """ super(GcloudComputeZones, self).__init__() self._region = region self.verbose = verbose @property def region(self): """property for region""" return self._region def list_zones(self): """return a list of zones""" results = self._list_zones() if results['returncode'] == 0 and self.region: zones = [] for zone in results['results']: if self.region == zone['region']: zones.append(zone) results['results'] = zones return results
class Stack: def __init__(self, *objects): self.stack = [] if len(objects) > 0: for obj in objects: self.stack.append(obj) def push(self, *objects): for obj in objects: self.stack.append(obj) def pop(self, obj): if self.stack != []: self.stack.pop() def top_item(self): if self.stack != []: return self.stack[len(self.stack) - 1] def isempty(self): return self.stack == 0 def dimension(self): return len(self.stack) def clear(self): self.stack.clear() def __str__(self): return self.stack.__str__() def __repr__(self): return self.stack.__repr__() def __eq__(self, Stack_instance): return self.stack == Stack_instance.stack # usage if __name__ == '__main__': q = Stack() q2 = Stack(1, 2, 3, 4, 5, 6, 7, 8) print(q) print(q2) q3 = Stack(1, 2, 3, 4, *[1, 2, 3, 4, 5], Stack(1, 2, 3, 4)) print(q3) print(q == q3)
class Stack: def __init__(self, *objects): self.stack = [] if len(objects) > 0: for obj in objects: self.stack.append(obj) def push(self, *objects): for obj in objects: self.stack.append(obj) def pop(self, obj): if self.stack != []: self.stack.pop() def top_item(self): if self.stack != []: return self.stack[len(self.stack) - 1] def isempty(self): return self.stack == 0 def dimension(self): return len(self.stack) def clear(self): self.stack.clear() def __str__(self): return self.stack.__str__() def __repr__(self): return self.stack.__repr__() def __eq__(self, Stack_instance): return self.stack == Stack_instance.stack if __name__ == '__main__': q = stack() q2 = stack(1, 2, 3, 4, 5, 6, 7, 8) print(q) print(q2) q3 = stack(1, 2, 3, 4, *[1, 2, 3, 4, 5], stack(1, 2, 3, 4)) print(q3) print(q == q3)
class CalcError(Exception): def __init__(self, error): self.message = error super().__init__(self.message)
class Calcerror(Exception): def __init__(self, error): self.message = error super().__init__(self.message)
#Binary to Decimal conversion def binDec(n): num = int(n); value = 0; base = 1; flag = num; while(flag): l = flag%10; flag = int(flag/10); print(flag); value = value+l*base; base = base*2; return value num = input(); a = binDec(num); print(a)
def bin_dec(n): num = int(n) value = 0 base = 1 flag = num while flag: l = flag % 10 flag = int(flag / 10) print(flag) value = value + l * base base = base * 2 return value num = input() a = bin_dec(num) print(a)
{ 'targets': [ { 'target_name': 'lb_shell_package', 'type': 'none', 'default_project': 1, 'dependencies': [ 'lb_shell_contents', ], 'conditions': [ ['target_arch=="android"', { 'dependencies': [ 'lb_shell_android.gyp:lb_shell_apk', ], }, { 'dependencies': [ 'lb_shell_exe.gyp:lb_shell', ], }], ['target_arch not in ["linux", "android", "wiiu"]', { 'dependencies': [ '../platforms/<(target_arch)_deploy.gyp:lb_shell_deploy', ], }], ], }, { 'target_name': 'lb_layout_tests_package', 'type': 'none', 'dependencies': [ 'lb_shell_exe.gyp:lb_layout_tests', 'lb_shell_contents', ], }, { 'target_name': 'lb_unit_tests_package', 'type': 'none', 'dependencies': [ 'lb_shell_exe.gyp:unit_tests_base', 'lb_shell_exe.gyp:unit_tests_crypto', 'lb_shell_exe.gyp:unit_tests_media', 'lb_shell_exe.gyp:unit_tests_net', 'lb_shell_exe.gyp:unit_tests_sql', 'lb_shell_exe.gyp:lb_unit_tests', 'lb_shell_exe.gyp:unit_tests_image_decoder', 'lb_shell_exe.gyp:unit_tests_xml_parser', 'lb_shell_contents', '<@(platform_contents_unit_tests)', ], 'conditions': [ ['target_arch not in ["linux", "android", "wiiu"]', { 'dependencies': [ '../platforms/<(target_arch)_deploy.gyp:unit_tests_base_deploy', '../platforms/<(target_arch)_deploy.gyp:unit_tests_media_deploy', '../platforms/<(target_arch)_deploy.gyp:unit_tests_net_deploy', '../platforms/<(target_arch)_deploy.gyp:unit_tests_sql_deploy', '../platforms/<(target_arch)_deploy.gyp:lb_unit_tests_deploy', ], }], ], }, { 'target_name': 'lb_shell_contents', 'type': 'none', 'dependencies': [ '<@(platform_contents_lbshell)', ], }, ], 'conditions': [ ['target_arch == "android"', { 'targets': [ { 'target_name': 'lb_unit_tests_package_apks', 'type': 'none', 'dependencies': [ 'lb_shell_exe.gyp:unit_tests_base_apk', 'lb_shell_exe.gyp:unit_tests_crypto_apk', 'lb_shell_exe.gyp:unit_tests_media_apk', 'lb_shell_exe.gyp:unit_tests_net_apk', 'lb_shell_exe.gyp:unit_tests_sql_apk', 'lb_shell_exe.gyp:lb_unit_tests_apk', 'lb_shell_exe.gyp:unit_tests_image_decoder_apk', 'lb_shell_exe.gyp:unit_tests_xml_parser_apk', 'lb_shell_contents', '<@(platform_contents_unit_tests)', ], }, ], }], ], }
{'targets': [{'target_name': 'lb_shell_package', 'type': 'none', 'default_project': 1, 'dependencies': ['lb_shell_contents'], 'conditions': [['target_arch=="android"', {'dependencies': ['lb_shell_android.gyp:lb_shell_apk']}, {'dependencies': ['lb_shell_exe.gyp:lb_shell']}], ['target_arch not in ["linux", "android", "wiiu"]', {'dependencies': ['../platforms/<(target_arch)_deploy.gyp:lb_shell_deploy']}]]}, {'target_name': 'lb_layout_tests_package', 'type': 'none', 'dependencies': ['lb_shell_exe.gyp:lb_layout_tests', 'lb_shell_contents']}, {'target_name': 'lb_unit_tests_package', 'type': 'none', 'dependencies': ['lb_shell_exe.gyp:unit_tests_base', 'lb_shell_exe.gyp:unit_tests_crypto', 'lb_shell_exe.gyp:unit_tests_media', 'lb_shell_exe.gyp:unit_tests_net', 'lb_shell_exe.gyp:unit_tests_sql', 'lb_shell_exe.gyp:lb_unit_tests', 'lb_shell_exe.gyp:unit_tests_image_decoder', 'lb_shell_exe.gyp:unit_tests_xml_parser', 'lb_shell_contents', '<@(platform_contents_unit_tests)'], 'conditions': [['target_arch not in ["linux", "android", "wiiu"]', {'dependencies': ['../platforms/<(target_arch)_deploy.gyp:unit_tests_base_deploy', '../platforms/<(target_arch)_deploy.gyp:unit_tests_media_deploy', '../platforms/<(target_arch)_deploy.gyp:unit_tests_net_deploy', '../platforms/<(target_arch)_deploy.gyp:unit_tests_sql_deploy', '../platforms/<(target_arch)_deploy.gyp:lb_unit_tests_deploy']}]]}, {'target_name': 'lb_shell_contents', 'type': 'none', 'dependencies': ['<@(platform_contents_lbshell)']}], 'conditions': [['target_arch == "android"', {'targets': [{'target_name': 'lb_unit_tests_package_apks', 'type': 'none', 'dependencies': ['lb_shell_exe.gyp:unit_tests_base_apk', 'lb_shell_exe.gyp:unit_tests_crypto_apk', 'lb_shell_exe.gyp:unit_tests_media_apk', 'lb_shell_exe.gyp:unit_tests_net_apk', 'lb_shell_exe.gyp:unit_tests_sql_apk', 'lb_shell_exe.gyp:lb_unit_tests_apk', 'lb_shell_exe.gyp:unit_tests_image_decoder_apk', 'lb_shell_exe.gyp:unit_tests_xml_parser_apk', 'lb_shell_contents', '<@(platform_contents_unit_tests)']}]}]]}
# PRINT OUT A WELCOME MESSAGE. print('Welcome to Food Funhouse!') # LOOP UNTIL THE USER CHOOSES TO EXIT. order_total_in_dollars_and_cents = 0.0 while True: # PRINT OUT THE MENU OPTIONS. print('1. Cheeseburger - $5.50') print('2. Pizza - $5.00') print('3. Taco - $3.00') print('4. Cookie - $1.99') print('5. Milk - $0.99') print('6. Pay for Order/Exit') print('7. Cancel Order/Exit') # LET THE USER SELECT A MENU OPTION. selected_menu_option = int(input('Select an item to order: ')) # PRINT OUT THE OPTION THE USER SELECTED. if 1 == selected_menu_option: order_total_in_dollars_and_cents += 5.50 print('You ordered a cheeseburger. Order total: $' + str(order_total_in_dollars_and_cents)) elif 2 == selected_menu_option: order_total_in_dollars_and_cents += 5.00 print('You ordered a pizza. Order total: $' + str(order_total_in_dollars_and_cents)) elif 3 == selected_menu_option: order_total_in_dollars_and_cents += 3.00 print('You ordered a taco. Order total: $' + str(order_total_in_dollars_and_cents)) elif 4 == selected_menu_option: order_total_in_dollars_and_cents += 1.99 print('You ordered a cookie. Order total: $' + str(order_total_in_dollars_and_cents)) elif 5 == selected_menu_option: order_total_in_dollars_and_cents += 0.99 print('You ordered milk. Order total: $' + str(order_total_in_dollars_and_cents)) elif 6 == selected_menu_option: # PRINT THE ORDER TOTAL. print('Your order total is $' + str(order_total_in_dollars_and_cents)) # WAIT UNTIL THE USER INPUTS ENOUGH MONEY TO PAY FOR THE ORDER. payment_amount_in_dollars_and_cents = 0.0 while payment_amount_in_dollars_and_cents < order_total_in_dollars_and_cents: # GET THE PAYMENT AMOUNT FROM THE USER. payment_amount_in_dollars_and_cents = float(input('Enter payment amount: ')) # INFORM THE USER IF THE PAYMENT AMOUNT ISN'T ENOUGH. payment_amount_enough = payment_amount_in_dollars_and_cents >= order_total_in_dollars_and_cents if not payment_amount_enough: print('Not enough to pay for order.') # CALCULATE THE CHANGE FOR THE ORDER. change_in_dollars_and_cents = payment_amount_in_dollars_and_cents - order_total_in_dollars_and_cents # INFORM THE USER OF THEIR CHANGE. print('Thanks for paying!') print('Your change is $' + str(change_in_dollars_and_cents)) break elif 7 == selected_menu_option: print('Exiting...') break else: print('Invalid selection. Please try again.')
print('Welcome to Food Funhouse!') order_total_in_dollars_and_cents = 0.0 while True: print('1. Cheeseburger - $5.50') print('2. Pizza - $5.00') print('3. Taco - $3.00') print('4. Cookie - $1.99') print('5. Milk - $0.99') print('6. Pay for Order/Exit') print('7. Cancel Order/Exit') selected_menu_option = int(input('Select an item to order: ')) if 1 == selected_menu_option: order_total_in_dollars_and_cents += 5.5 print('You ordered a cheeseburger. Order total: $' + str(order_total_in_dollars_and_cents)) elif 2 == selected_menu_option: order_total_in_dollars_and_cents += 5.0 print('You ordered a pizza. Order total: $' + str(order_total_in_dollars_and_cents)) elif 3 == selected_menu_option: order_total_in_dollars_and_cents += 3.0 print('You ordered a taco. Order total: $' + str(order_total_in_dollars_and_cents)) elif 4 == selected_menu_option: order_total_in_dollars_and_cents += 1.99 print('You ordered a cookie. Order total: $' + str(order_total_in_dollars_and_cents)) elif 5 == selected_menu_option: order_total_in_dollars_and_cents += 0.99 print('You ordered milk. Order total: $' + str(order_total_in_dollars_and_cents)) elif 6 == selected_menu_option: print('Your order total is $' + str(order_total_in_dollars_and_cents)) payment_amount_in_dollars_and_cents = 0.0 while payment_amount_in_dollars_and_cents < order_total_in_dollars_and_cents: payment_amount_in_dollars_and_cents = float(input('Enter payment amount: ')) payment_amount_enough = payment_amount_in_dollars_and_cents >= order_total_in_dollars_and_cents if not payment_amount_enough: print('Not enough to pay for order.') change_in_dollars_and_cents = payment_amount_in_dollars_and_cents - order_total_in_dollars_and_cents print('Thanks for paying!') print('Your change is $' + str(change_in_dollars_and_cents)) break elif 7 == selected_menu_option: print('Exiting...') break else: print('Invalid selection. Please try again.')
# Simple Calculator def calculate(x,y,operator): if operator == "*": result = float(x * y) print(f"The answer is {result} ") elif operator == "/": result = float(x / y) print(f"The answer is {result} ") elif operator == "+": result = float(x + y) print(f"The answer is {result} ") elif operator == "-": result = float(x - y) print(f"The answer is {result} ") else: print("Try Again") x = int(input("Enter First Number: \n")) y = int(input("Enter Second Number: \n")) operator = (input("What do we do with these? \n")) calculate(x,y,operator)
def calculate(x, y, operator): if operator == '*': result = float(x * y) print(f'The answer is {result} ') elif operator == '/': result = float(x / y) print(f'The answer is {result} ') elif operator == '+': result = float(x + y) print(f'The answer is {result} ') elif operator == '-': result = float(x - y) print(f'The answer is {result} ') else: print('Try Again') x = int(input('Enter First Number: \n')) y = int(input('Enter Second Number: \n')) operator = input('What do we do with these? \n') calculate(x, y, operator)
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """ List resources from the Key Manager service. """ def create_secret(conn): print("Create a secret:") conn.key_manager.create_secret(name="My public key", secret_type="public", expiration="2020-02-28T23:59:59", payload="ssh rsa...", payload_content_type="text/plain")
""" List resources from the Key Manager service. """ def create_secret(conn): print('Create a secret:') conn.key_manager.create_secret(name='My public key', secret_type='public', expiration='2020-02-28T23:59:59', payload='ssh rsa...', payload_content_type='text/plain')
# Outputs string representation of a unicode hex representation def uc(hex): return chr(int(hex)) '''CONSONANTS. Format: Place_Manner_Voicing; Place: L=labial, LD=labiodental, D=dental, A=alveolar, R=retroflex, PA=postalveolar, P=palatal, V=velar, U=uvular, PH=pharyngeal, G=glottal; Manner: P=plosive, N=nasal, TR=trill, TF=tap/flap, F=fricative, LF=lateral fricative, A=approximant, LA=lateral approximant; Voicing: VL=voiceless, V=voiced ''' R_P_VL=uc(0x0288) R_P_V=uc(0x0256) P_P_V=uc(0x025F) G_P_VL=uc(0x0294) LD_N_V=uc(0x0271) R_N_V=uc(0x0273) P_N_V=uc(0x0272) V_N_V=uc(0x014B) A_TF_V=uc(0x027E) R_TF_V=uc(0x027D) L_F_VL=uc(0x0278) L_F_V=uc(0x03B2) D_F_VL=uc(0x03B8) D_F_V=uc(0x00F0) R_F_VL=uc(0x0282) R_F_V=uc(0x0290) P_F_VL=uc(0x00E7) P_F_V=uc(0x029D) V_F_V=uc(0x0263) U_F_VL=uc(0x03C7) U_F_V=uc(0x0281) PH_F_VL=uc(0x0127) PH_F_V=uc(0x0295) G_F_V=uc(0x0266) A_LF_VL=uc(0x026C) A_LF_V=uc(0x026E) PA_LF_VL=uc(0x0283) PA_LF_V=uc(0x0292) LD_A_V=uc(0x028B) A_A_V=uc(0x0279) R_A_V=uc(0x027B) V_A_V=uc(0x0270) R_LA_V=uc(0x026D) P_LA_V=uc(0x028E) # To print in help menu cons_as_dict = { 'R_P_VL':R_P_VL, 'R_P_V': R_P_V, 'P_P_V': P_P_V, 'G_P_VL': G_P_VL, 'LD_N_V': LD_N_V, 'R_N_V': R_N_V, 'P_N_V': P_N_V, 'V_N_V': V_N_V, 'A_TF_V': A_TF_V, 'R_TF_V': R_TF_V, 'L_F_VL': L_F_VL, 'L_F_V': L_F_V, 'D_F_VL': D_F_VL, 'D_F_V': D_F_V, 'R_F_VL': R_F_VL, 'R_F_V': R_F_V, 'P_F_VL': P_F_VL, 'P_F_V': P_F_V, 'V_F_V': V_F_V, 'U_F_VL': U_F_VL, 'U_F_V': U_F_V, 'PH_F_VL': PH_F_VL, 'PH_F_V': PH_F_V, 'G_F_V': G_F_V, 'A_LF_VL': A_LF_VL, 'A_LF_V': A_LF_V, 'PA_LF_VL': PA_LF_VL, 'PA_LF_V': PA_LF_V, 'LD_A_V': LD_A_V, 'A_A_V': A_A_V, 'R_A_V': R_A_V, 'V_A_V': V_A_V, 'R_LA_V': R_LA_V, 'P_LA_V': P_LA_V, } '''VOWELS. (long/)front/back_high/low_rounding_tense;long:Long=long; front/back: F=+front,-back, B=-front,+back, C=-front,-back; high/low: H=+high,-low, M=-high,-low, L=-high,+low; rounding: R=rounded, U=unrounded; tense: T=+tense, NT=lax ''' C_H_U_T=uc(0x0268) C_H_R_T=uc(0x0289) B_H_U_T=uc(0x026F) B_H_R_NT=uc(0x028A) F_M_R_T=uc(0x00F8) C_M_U_T=uc(0x0258) C_M_R_T=uc(0x0275) B_M_U_T=uc(0x0264) schwa=uc(0x0259) F_M_U_NT=uc(0x025B) F_M_R_NT=uc(0x0153) C_M_U_NT=uc(0x025C) C_M_R_NT=uc(0x025E) B_M_U_NT=uc(0x028C) B_M_R_NT=uc(0x0254) F_L_U_T=uc(0x00E6) C_L_U_T=uc(0x0250) C_L_R_NT=uc(0x0276) B_L_U_NT=uc(0x0251) B_L_R_NT=uc(0x0252) Long_F_H_U_T='i'+uc(0x02D0) Long_F_H_R_T='y'+uc(0x02D0) Long_B_H_R_T='u'+uc(0x02D0) Long_F_M_U_T='e'+uc(0x02D0) Long_F_M_R_T=uc(0x00F8)+uc(0x02D0) Long_B_M_R_T='o'+uc(0x02D0) Long_C_L_U_NT='a'+uc(0x02D0) #a: Long_C_L_U_T=uc(0x0250)+uc(0x02D0) Long_F_H_U_NT='I'+uc(0x02D0) Long_B_H_R_NT=uc(0x028A)+uc(0x02D0) Long_F_M_U_NT=uc(0x025B)+uc(0x02D0) Long_B_M_R_NT=uc(0x0254)+uc(0x02D0) Cent_B_H_R_T='u'+uc(0x0308) Cent_B_M_R_T='o'+uc(0x0308) Cent_F_H_U_T='i'+uc(0x0308) Cent_C_L_U_NT='a'+uc(0x0308) # To print in help menu vowels_as_dict = { 'C_H_U_T': C_H_U_T, 'C_H_R_T': C_H_R_T, 'B_H_U_T': B_H_U_T, 'B_H_R_NT': B_H_R_NT, 'F_M_R_T': F_M_R_T, 'C_M_U_T': C_M_U_T, 'C_M_R_T': C_M_R_T, 'B_M_U_T': B_M_U_T, 'schwa': schwa, 'F_M_U_NT': F_M_U_NT, 'F_M_R_NT': F_M_R_NT, 'C_M_U_NT': C_M_U_NT, 'C_M_R_NT': C_M_R_NT, 'B_M_U_NT': B_M_U_NT, 'B_M_R_NT': B_M_R_NT, 'F_L_U_T': F_L_U_T, 'C_L_U_T': C_L_U_T, 'C_L_R_NT': C_L_R_NT, 'B_L_U_NT': B_L_U_NT, 'B_L_R_NT': B_L_R_NT, 'Long_F_H_U_T':Long_F_H_U_T, 'Long_F_H_R_T':Long_F_H_R_T, 'Long_B_H_R_T':Long_B_H_R_T, 'Long_F_M_U_T':Long_F_M_U_T, 'Long_F_M_R_T':Long_F_M_R_T, 'Long_B_M_R_T':Long_B_M_R_T, 'Long_C_L_U_NT':Long_C_L_U_NT, 'Long_C_L_U_T':Long_C_L_U_T, 'Long_F_H_U_NT':Long_F_H_U_NT, 'Long_B_H_R_NT':Long_B_H_R_NT, 'Long_F_M_U_NT':Long_F_M_U_NT, 'Long_B_M_R_NT':Long_B_M_R_NT, 'Cent_B_H_R_T':Cent_B_H_R_T, 'Cent_B_M_R_T':Cent_B_M_R_T, 'Cent_F_H_U_T':Cent_F_H_U_T, 'Cent_C_L_U_NT':Cent_C_L_U_NT }
def uc(hex): return chr(int(hex)) 'CONSONANTS. Format: Place_Manner_Voicing;\n\n Place:\n L=labial, LD=labiodental, D=dental, A=alveolar, R=retroflex,\n PA=postalveolar, P=palatal, V=velar, U=uvular, PH=pharyngeal, G=glottal;\n\n Manner:\n P=plosive, N=nasal, TR=trill, TF=tap/flap, F=fricative,\n LF=lateral fricative, A=approximant, LA=lateral approximant;\n\n Voicing:\n VL=voiceless, V=voiced\n' r_p_vl = uc(648) r_p_v = uc(598) p_p_v = uc(607) g_p_vl = uc(660) ld_n_v = uc(625) r_n_v = uc(627) p_n_v = uc(626) v_n_v = uc(331) a_tf_v = uc(638) r_tf_v = uc(637) l_f_vl = uc(632) l_f_v = uc(946) d_f_vl = uc(952) d_f_v = uc(240) r_f_vl = uc(642) r_f_v = uc(656) p_f_vl = uc(231) p_f_v = uc(669) v_f_v = uc(611) u_f_vl = uc(967) u_f_v = uc(641) ph_f_vl = uc(295) ph_f_v = uc(661) g_f_v = uc(614) a_lf_vl = uc(620) a_lf_v = uc(622) pa_lf_vl = uc(643) pa_lf_v = uc(658) ld_a_v = uc(651) a_a_v = uc(633) r_a_v = uc(635) v_a_v = uc(624) r_la_v = uc(621) p_la_v = uc(654) cons_as_dict = {'R_P_VL': R_P_VL, 'R_P_V': R_P_V, 'P_P_V': P_P_V, 'G_P_VL': G_P_VL, 'LD_N_V': LD_N_V, 'R_N_V': R_N_V, 'P_N_V': P_N_V, 'V_N_V': V_N_V, 'A_TF_V': A_TF_V, 'R_TF_V': R_TF_V, 'L_F_VL': L_F_VL, 'L_F_V': L_F_V, 'D_F_VL': D_F_VL, 'D_F_V': D_F_V, 'R_F_VL': R_F_VL, 'R_F_V': R_F_V, 'P_F_VL': P_F_VL, 'P_F_V': P_F_V, 'V_F_V': V_F_V, 'U_F_VL': U_F_VL, 'U_F_V': U_F_V, 'PH_F_VL': PH_F_VL, 'PH_F_V': PH_F_V, 'G_F_V': G_F_V, 'A_LF_VL': A_LF_VL, 'A_LF_V': A_LF_V, 'PA_LF_VL': PA_LF_VL, 'PA_LF_V': PA_LF_V, 'LD_A_V': LD_A_V, 'A_A_V': A_A_V, 'R_A_V': R_A_V, 'V_A_V': V_A_V, 'R_LA_V': R_LA_V, 'P_LA_V': P_LA_V} 'VOWELS. (long/)front/back_high/low_rounding_tense;long:Long=long;\n\n front/back: F=+front,-back, B=-front,+back, C=-front,-back;\n\n high/low: H=+high,-low, M=-high,-low, L=-high,+low;\n\n rounding: R=rounded, U=unrounded;\n\n tense: T=+tense, NT=lax\n' c_h_u_t = uc(616) c_h_r_t = uc(649) b_h_u_t = uc(623) b_h_r_nt = uc(650) f_m_r_t = uc(248) c_m_u_t = uc(600) c_m_r_t = uc(629) b_m_u_t = uc(612) schwa = uc(601) f_m_u_nt = uc(603) f_m_r_nt = uc(339) c_m_u_nt = uc(604) c_m_r_nt = uc(606) b_m_u_nt = uc(652) b_m_r_nt = uc(596) f_l_u_t = uc(230) c_l_u_t = uc(592) c_l_r_nt = uc(630) b_l_u_nt = uc(593) b_l_r_nt = uc(594) long_f_h_u_t = 'i' + uc(720) long_f_h_r_t = 'y' + uc(720) long_b_h_r_t = 'u' + uc(720) long_f_m_u_t = 'e' + uc(720) long_f_m_r_t = uc(248) + uc(720) long_b_m_r_t = 'o' + uc(720) long_c_l_u_nt = 'a' + uc(720) long_c_l_u_t = uc(592) + uc(720) long_f_h_u_nt = 'I' + uc(720) long_b_h_r_nt = uc(650) + uc(720) long_f_m_u_nt = uc(603) + uc(720) long_b_m_r_nt = uc(596) + uc(720) cent_b_h_r_t = 'u' + uc(776) cent_b_m_r_t = 'o' + uc(776) cent_f_h_u_t = 'i' + uc(776) cent_c_l_u_nt = 'a' + uc(776) vowels_as_dict = {'C_H_U_T': C_H_U_T, 'C_H_R_T': C_H_R_T, 'B_H_U_T': B_H_U_T, 'B_H_R_NT': B_H_R_NT, 'F_M_R_T': F_M_R_T, 'C_M_U_T': C_M_U_T, 'C_M_R_T': C_M_R_T, 'B_M_U_T': B_M_U_T, 'schwa': schwa, 'F_M_U_NT': F_M_U_NT, 'F_M_R_NT': F_M_R_NT, 'C_M_U_NT': C_M_U_NT, 'C_M_R_NT': C_M_R_NT, 'B_M_U_NT': B_M_U_NT, 'B_M_R_NT': B_M_R_NT, 'F_L_U_T': F_L_U_T, 'C_L_U_T': C_L_U_T, 'C_L_R_NT': C_L_R_NT, 'B_L_U_NT': B_L_U_NT, 'B_L_R_NT': B_L_R_NT, 'Long_F_H_U_T': Long_F_H_U_T, 'Long_F_H_R_T': Long_F_H_R_T, 'Long_B_H_R_T': Long_B_H_R_T, 'Long_F_M_U_T': Long_F_M_U_T, 'Long_F_M_R_T': Long_F_M_R_T, 'Long_B_M_R_T': Long_B_M_R_T, 'Long_C_L_U_NT': Long_C_L_U_NT, 'Long_C_L_U_T': Long_C_L_U_T, 'Long_F_H_U_NT': Long_F_H_U_NT, 'Long_B_H_R_NT': Long_B_H_R_NT, 'Long_F_M_U_NT': Long_F_M_U_NT, 'Long_B_M_R_NT': Long_B_M_R_NT, 'Cent_B_H_R_T': Cent_B_H_R_T, 'Cent_B_M_R_T': Cent_B_M_R_T, 'Cent_F_H_U_T': Cent_F_H_U_T, 'Cent_C_L_U_NT': Cent_C_L_U_NT}
# 8.2) find path to robot in a c*r grid, robot can only move right and down. def find_path(c, r, off_limits): path = [] move_robot(0, 0, c, r, off_limits, path) return path def move_robot(x, y, c, r, off_limits, path): if x == (c - 1) and y == (r - 1): return elif [x + 1, y] not in off_limits and (x + 1) < c: path.append([x + 1, y]) move_robot(x + 1, y, c, r, off_limits, path) elif [x, y + 1] not in off_limits and (y + 1) < r: path.append([x, y + 1]) move_robot(x, y + 1, c, r, off_limits, path) else: raise Exception('No path') # test code columns = 4 rows = 3 limits = [[1, 0], [2, 1], [3, 1]] print(find_path(columns, rows, limits))
def find_path(c, r, off_limits): path = [] move_robot(0, 0, c, r, off_limits, path) return path def move_robot(x, y, c, r, off_limits, path): if x == c - 1 and y == r - 1: return elif [x + 1, y] not in off_limits and x + 1 < c: path.append([x + 1, y]) move_robot(x + 1, y, c, r, off_limits, path) elif [x, y + 1] not in off_limits and y + 1 < r: path.append([x, y + 1]) move_robot(x, y + 1, c, r, off_limits, path) else: raise exception('No path') columns = 4 rows = 3 limits = [[1, 0], [2, 1], [3, 1]] print(find_path(columns, rows, limits))
test_cases = int(input().strip()) for t in range(1, test_cases + 1): s = input().strip() stack = [] bracket = {'}': '{', ')': '('} result = 1 for letter in s: if letter == '{' or letter == '(': stack.append(letter) elif letter == '}' or letter == ')': if not stack or stack[-1] != bracket.get(letter): result = 0 break else: stack.pop() if stack: result = 0 print('#{} {}'.format(t, result))
test_cases = int(input().strip()) for t in range(1, test_cases + 1): s = input().strip() stack = [] bracket = {'}': '{', ')': '('} result = 1 for letter in s: if letter == '{' or letter == '(': stack.append(letter) elif letter == '}' or letter == ')': if not stack or stack[-1] != bracket.get(letter): result = 0 break else: stack.pop() if stack: result = 0 print('#{} {}'.format(t, result))
# Tristan Protzman # Created 2019-02-07 # Holds the note patters class Pattern: def __init__(self, beats, subdivisions, notes): self.beats = beats # How many beats per measure self.subdivisions = subdivisions # How many divisions per beat self.divisions = self.beats * self.subdivisions # Total divisions in pattern self.notes = notes # How many different notes are in the patters self.pattern = [set() for _ in range(self.divisions)] # Top level list, one entry per division def __str__(self): """ Returns a printable representation of the current pattern state. A # represents the slot is active, a - means it isn't. Prints 1 line per pitch, doesn't print a line if it contains no active notes. Guaranteed to print at least one line if no notes are present in pattern :return: A multiline string representing the state :rtype: str """ representation = "" for i in range(self.notes): line = "{:0=3d}| ".format(i) for j in range(self.divisions): if i in self.pattern[j]: line += "# " else: line += "- " if "#" in line: representation += line + "\n" if representation == "": representation = "000| " + self.divisions * "- " else: representation = representation[:-1] return representation def __repr__(self): """ Returns a printable representation of the current pattern state. A # represents the slot is active, a - means it isn't. Prints 1 line per pitch, doesn't print a line if it contains no active notes. Guaranteed to print at least one line if no notes are present in pattern :return: A multiline string representing the state :rtype: str """ return str(self) def add_note(self, note, div): """ Adds the given note to the pattern. Returns true if the note is allowed to be added, false otherwise. A note may be prevented from being added if it is outside the division range, outside the note range, or already exists. :param note: The note to add :param div: The division to place the note at :type note: int :type div: int :return: True if successful :rtype: bool """ if note >= self.notes or note < 0: return False if div >= self.divisions or div < 0: return False if note in self.pattern[div]: return False self.pattern[div].add(note) return True def remove_note(self, note, div): """ Removes the specified note from the pattern. True if note is removed, false if it doesn't xists/can't be removed. :param note: The note to remove :param div: The division to remove it from :type note: int :type div: int :return: True if successful :rtype: bool """ if note >= self.notes: return False if div >= self.divisions: return False if note not in self.pattern[div]: return False self.pattern[div].remove(note) return True def notes_at_div(self, div): """ Returns the notes active at the specified division :param div: The division we want the active notes at :type div: int :return: The set of notes active at div :rtype: set """ if self.divisions > div >= 0: return self.pattern[div] return None
class Pattern: def __init__(self, beats, subdivisions, notes): self.beats = beats self.subdivisions = subdivisions self.divisions = self.beats * self.subdivisions self.notes = notes self.pattern = [set() for _ in range(self.divisions)] def __str__(self): """ Returns a printable representation of the current pattern state. A # represents the slot is active, a - means it isn't. Prints 1 line per pitch, doesn't print a line if it contains no active notes. Guaranteed to print at least one line if no notes are present in pattern :return: A multiline string representing the state :rtype: str """ representation = '' for i in range(self.notes): line = '{:0=3d}| '.format(i) for j in range(self.divisions): if i in self.pattern[j]: line += '# ' else: line += '- ' if '#' in line: representation += line + '\n' if representation == '': representation = '000| ' + self.divisions * '- ' else: representation = representation[:-1] return representation def __repr__(self): """ Returns a printable representation of the current pattern state. A # represents the slot is active, a - means it isn't. Prints 1 line per pitch, doesn't print a line if it contains no active notes. Guaranteed to print at least one line if no notes are present in pattern :return: A multiline string representing the state :rtype: str """ return str(self) def add_note(self, note, div): """ Adds the given note to the pattern. Returns true if the note is allowed to be added, false otherwise. A note may be prevented from being added if it is outside the division range, outside the note range, or already exists. :param note: The note to add :param div: The division to place the note at :type note: int :type div: int :return: True if successful :rtype: bool """ if note >= self.notes or note < 0: return False if div >= self.divisions or div < 0: return False if note in self.pattern[div]: return False self.pattern[div].add(note) return True def remove_note(self, note, div): """ Removes the specified note from the pattern. True if note is removed, false if it doesn't xists/can't be removed. :param note: The note to remove :param div: The division to remove it from :type note: int :type div: int :return: True if successful :rtype: bool """ if note >= self.notes: return False if div >= self.divisions: return False if note not in self.pattern[div]: return False self.pattern[div].remove(note) return True def notes_at_div(self, div): """ Returns the notes active at the specified division :param div: The division we want the active notes at :type div: int :return: The set of notes active at div :rtype: set """ if self.divisions > div >= 0: return self.pattern[div] return None
class Chat: START_TEXT = """This is a Telegram Bot to Mux subtitle into a video <b>Send me a Telegram file to begin</b> /help for more details.. Credits :- @mohdsabahat """ HELP_USER = "??" HELP_TEXT ="""<b>Welcome to the Help Menu</b> 1.) Send a Video file or url. 2.) Send a subtitle file (ass or srt) 3.) Choose you desired type of muxing! To give custom name to file send it with url seperated with | <i>url|custom_name.mp4</i> <b>Note : </b><i>Please note that only english type fonts are supported in hardmux other scripts will be shown as empty blocks on the video!</i> <a href="https://github.com/mohdsabahat/sub-muxer">Repo URL</a>""" NO_AUTH_USER = "You are not authorised to use this bot.\nContact the bot owner!" DOWNLOAD_SUCCESS = """File downloaded successfully! Time taken : {} seconds.""" FILE_SIZE_ERROR = "ERROR : Cannot Extract File Size from URL!" MAX_FILE_SIZE = "File size is greater than 2Gb. Which is the limit imposed by telegram!" LONG_CUS_FILENAME = """Filename you provided is greater than 60 characters. Please provide a shorter name.""" UNSUPPORTED_FORMAT = "ERROR : File format {} Not supported!" CHOOSE_CMD = "Subtitle file downloaded successfully.\nChoose your desired muxing!\n[ /softremove , /softmux , /hardmux ]"
class Chat: start_text = 'This is a Telegram Bot to Mux subtitle into a video\n\n<b>Send me a Telegram file to begin</b>\n\n/help for more details..\n\nCredits :- @mohdsabahat\n ' help_user = '??' help_text = '<b>Welcome to the Help Menu</b>\n\n1.) Send a Video file or url.\n2.) Send a subtitle file (ass or srt)\n3.) Choose you desired type of muxing!\n\nTo give custom name to file send it with url seperated with |\n<i>url|custom_name.mp4</i>\n\n<b>Note : </b><i>Please note that only english type fonts are supported in hardmux other scripts will be shown as empty blocks on the video!</i>\n\n<a href="https://github.com/mohdsabahat/sub-muxer">Repo URL</a>' no_auth_user = 'You are not authorised to use this bot.\nContact the bot owner!' download_success = 'File downloaded successfully!\n\nTime taken : {} seconds.' file_size_error = 'ERROR : Cannot Extract File Size from URL!' max_file_size = 'File size is greater than 2Gb. Which is the limit imposed by telegram!' long_cus_filename = 'Filename you provided is greater than 60 characters.\nPlease provide a shorter name.' unsupported_format = 'ERROR : File format {} Not supported!' choose_cmd = 'Subtitle file downloaded successfully.\nChoose your desired muxing!\n[ /softremove , /softmux , /hardmux ]'
# To Find an algorithm for giving selected attributes in a formal concept analysis acc to given conditions a,arr= [],[] start,end = 3,5 with open('Naive Algo/Input/test2.txt') as file: for line in file: line = line.strip() for c in line: if c != ' ': # print(int(c)) a.append(int(c)) # print(a) arr.append(a) a = [] # print(arr) s = set() for st in range(start, end+1): for i in range(len(arr)): for j in range(len(arr[i])): if j == st - 1 and arr[i][j] == 1: s.add(i + 1) #if j == end - 1 and arr[i][j] == 1: #s.add(i + 1) print(s) # Gr s1 = set() coun = 0 k = 0 ans = 0 for r in range(start): for i in range(len(arr)): for j in range(len(arr[i])): if j == r - 1 and arr[i][j] == 1: #print(r,i+1) # k = 0 coun += 1 if i+1 in s: k+=1 ans = j+1 # print(coun,k) if coun == k and k!=0 and coun !=0: s1.add(ans) coun = 0 k = 0 print(s1) # attributes
(a, arr) = ([], []) (start, end) = (3, 5) with open('Naive Algo/Input/test2.txt') as file: for line in file: line = line.strip() for c in line: if c != ' ': a.append(int(c)) arr.append(a) a = [] s = set() for st in range(start, end + 1): for i in range(len(arr)): for j in range(len(arr[i])): if j == st - 1 and arr[i][j] == 1: s.add(i + 1) print(s) s1 = set() coun = 0 k = 0 ans = 0 for r in range(start): for i in range(len(arr)): for j in range(len(arr[i])): if j == r - 1 and arr[i][j] == 1: coun += 1 if i + 1 in s: k += 1 ans = j + 1 if coun == k and k != 0 and (coun != 0): s1.add(ans) coun = 0 k = 0 print(s1)
class Configuracoes: """Armazena as configuracoes do jogo estrela.""" def __init__(self): """Inicializa as configuracoes do jogo.""" # Configuracoes de tela self.tela_largura = 1200 self.tela_altura = 600 self.cor_fundo = (46, 46, 46)
class Configuracoes: """Armazena as configuracoes do jogo estrela.""" def __init__(self): """Inicializa as configuracoes do jogo.""" self.tela_largura = 1200 self.tela_altura = 600 self.cor_fundo = (46, 46, 46)
"""Project Euler problem 9""" def calculate(perimeter): """Returns the product a*b*c of a Pythagorean triplet for which a + b + c == perimeter""" for a in range(1, perimeter): if a > perimeter: break for b in range(1, perimeter): if a + b > perimeter: break for c in range(1, perimeter): if a + b + c > perimeter: break if a + b + c == perimeter and a ** 2 + b ** 2 == c ** 2: answer = a * b * c return answer if __name__ == "__main__": print(calculate(1000))
"""Project Euler problem 9""" def calculate(perimeter): """Returns the product a*b*c of a Pythagorean triplet for which a + b + c == perimeter""" for a in range(1, perimeter): if a > perimeter: break for b in range(1, perimeter): if a + b > perimeter: break for c in range(1, perimeter): if a + b + c > perimeter: break if a + b + c == perimeter and a ** 2 + b ** 2 == c ** 2: answer = a * b * c return answer if __name__ == '__main__': print(calculate(1000))
## Copyright 2020 Google LLC ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## https://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. """To be documented.""" def grpc_web_dependencies(): """An utility method to load all dependencies of `gRPC-Web`.""" fail("Loading dependencies through grpc_web_dependencies() is not supported yet.") def grpc_web_toolchains(): """An utility method to load all gRPC-Web toolchains.""" native.register_toolchains( "@com_github_grpc_grpc_web//bazel:closure_toolchain", )
"""To be documented.""" def grpc_web_dependencies(): """An utility method to load all dependencies of `gRPC-Web`.""" fail('Loading dependencies through grpc_web_dependencies() is not supported yet.') def grpc_web_toolchains(): """An utility method to load all gRPC-Web toolchains.""" native.register_toolchains('@com_github_grpc_grpc_web//bazel:closure_toolchain')
#========================================================================================= class Job(): """Represent job to-do in schedule""" def __init__(self, aItineraryName, aItineraryColor, aTaskNumber, aItineraryNumber, aMachineName, aDuration): self.itinerary = aItineraryName self.machine = aMachineName self.startTime = 0 self.duration = aDuration self.endTime = 0 self.colorOfItinerary = aItineraryColor self.idOperation = aTaskNumber self.idItinerary = aItineraryNumber self.completed = False self.priority = 0 self.assignedMachine = "" def __eq__(self, other): return self.itinerary == other.itinerary and self.colorOfItinerary == other.colorOfItinerary and self.machine == other.machine and self.duration == other.duration and self.completed == other.completed and self.idOperation == other.idOperation def __hash__(self): return hash(str(self)) def __str__(self): return "Job" + str(self.idItinerary) + "_" + str(self.idOperation) + " Machine:" + self.machine + "Duration: " + str(self.duration) def getTupleStartAndDuration(self): return (self.startTime, self.duration) def getEndTime(self): self.endTime = self.startTime + self.duration return self.endTime
class Job: """Represent job to-do in schedule""" def __init__(self, aItineraryName, aItineraryColor, aTaskNumber, aItineraryNumber, aMachineName, aDuration): self.itinerary = aItineraryName self.machine = aMachineName self.startTime = 0 self.duration = aDuration self.endTime = 0 self.colorOfItinerary = aItineraryColor self.idOperation = aTaskNumber self.idItinerary = aItineraryNumber self.completed = False self.priority = 0 self.assignedMachine = '' def __eq__(self, other): return self.itinerary == other.itinerary and self.colorOfItinerary == other.colorOfItinerary and (self.machine == other.machine) and (self.duration == other.duration) and (self.completed == other.completed) and (self.idOperation == other.idOperation) def __hash__(self): return hash(str(self)) def __str__(self): return 'Job' + str(self.idItinerary) + '_' + str(self.idOperation) + ' Machine:' + self.machine + 'Duration: ' + str(self.duration) def get_tuple_start_and_duration(self): return (self.startTime, self.duration) def get_end_time(self): self.endTime = self.startTime + self.duration return self.endTime
def palin(n,m): if n<l//2: if arr[n]==arr[m]: return palin(n+1,m-1) else: return False else: return True try: arr= [] print(" Enter the array inputs and type 'stop' when you are done\n" ) while True: arr.append(int(input())) except:# if the input is not-integer, just continue to the next step l= len(arr) if palin(0,l-1): print("PALINDROME") else: print("NOT PALINDROME")
def palin(n, m): if n < l // 2: if arr[n] == arr[m]: return palin(n + 1, m - 1) else: return False else: return True try: arr = [] print(" Enter the array inputs and type 'stop' when you are done\n") while True: arr.append(int(input())) except: l = len(arr) if palin(0, l - 1): print('PALINDROME') else: print('NOT PALINDROME')
""" What are Python Packages? Packages are just folders(directories) that contain modules. They contain a special python file named:__init__.py The __init__.py file can be empty. The file tells Python that the directory of folder contains a python package which can be imported like a module. Packages are a convent way to organize modules. A package also can contain sub-packages. """
""" What are Python Packages? Packages are just folders(directories) that contain modules. They contain a special python file named:__init__.py The __init__.py file can be empty. The file tells Python that the directory of folder contains a python package which can be imported like a module. Packages are a convent way to organize modules. A package also can contain sub-packages. """
''' Created on 1 dec. 2021 @author: laurentmichel ''' class TableIterator(object): ''' Simple wrapper iterating over table rows ''' def __init__(self, name, data_table): """ Constructor :param name: table name : not really used :param data_table: Numpy table returned by astropy.votable """ self.name = name self.data_table = data_table self.last_row = None self.iter = None # not used yet self.row_filter = None def _get_next_row(self): ''' Returns the next Numpy row or None. The end of table exception usually returned by Numpy is trapped ''' # The iterator is set at the first iteration if self.iter == None: self.iter = iter(self.data_table) try: while True: row = next(self.iter) if row is not None: if (self.row_filter is None or self.row_filter.row_match(row) == True): self.last_row = row return row else: return None except: return None def _rewind(self): """ Set the pointer on the table top, destroys the iterator actually """ self.iter = None
""" Created on 1 dec. 2021 @author: laurentmichel """ class Tableiterator(object): """ Simple wrapper iterating over table rows """ def __init__(self, name, data_table): """ Constructor :param name: table name : not really used :param data_table: Numpy table returned by astropy.votable """ self.name = name self.data_table = data_table self.last_row = None self.iter = None self.row_filter = None def _get_next_row(self): """ Returns the next Numpy row or None. The end of table exception usually returned by Numpy is trapped """ if self.iter == None: self.iter = iter(self.data_table) try: while True: row = next(self.iter) if row is not None: if self.row_filter is None or self.row_filter.row_match(row) == True: self.last_row = row return row else: return None except: return None def _rewind(self): """ Set the pointer on the table top, destroys the iterator actually """ self.iter = None
__version__ = "v0.6.1-1" __author__ = "Kanelis Elias" __email__ = "[email protected]" __license__ = "MIT"
__version__ = 'v0.6.1-1' __author__ = 'Kanelis Elias' __email__ = '[email protected]' __license__ = 'MIT'
## https://leetcode.com/problems/count-and-say/ ## this problem seems hard at first, but that's mostly ## because it's incredibly poorly described. went to ## wikipedia and it makes sense. for ease, I went ahead ## and hard-coded in the first 5; after that, we generate ## from the previous one. ## generating the next one is actually pretty easy -- just ## loop over the string and keep track of how many times ## you hit the same number in a row, then when you hit a new ## number, update the output string with the number of times ## you saw the previous number (then make sure to catch the ## final run outside the loop). ## runtime comes in at ~94th percentile and memory comes in ## at ~86th percentile. class Solution: def generate_next(self, seq: str) -> str: char = seq[0] count = 1 out = '' for c in seq[1:]: if c == char: count = count + 1 else: out = out + str(count) + char char = c count = 1 ## now the final string of numbers: out = out + str(count) + char return out def countAndSay(self, n: int) -> str: ## ok so the description of the problem is terrible. from wikipedia: ## To generate a member of the sequence from the previous member, ## read off the digits of the previous member, counting the number ## of digits in groups of the same digit. ## so, 1st term is "one one", so the second term is "11". ## second term is then "two ones", so the third term is "21" ## then you read one 2, one 1s => 1211, etc. if n == 1: return '1' if n == 2: return '11' if n == 3: return '21' if n == 4: return '1211' if n == 5: return '111221' myn = 5 seq = '111221' while myn < n: myn += 1 seq = self.generate_next(seq) return seq
class Solution: def generate_next(self, seq: str) -> str: char = seq[0] count = 1 out = '' for c in seq[1:]: if c == char: count = count + 1 else: out = out + str(count) + char char = c count = 1 out = out + str(count) + char return out def count_and_say(self, n: int) -> str: if n == 1: return '1' if n == 2: return '11' if n == 3: return '21' if n == 4: return '1211' if n == 5: return '111221' myn = 5 seq = '111221' while myn < n: myn += 1 seq = self.generate_next(seq) return seq
soma = 0 for n in range(1, 500, 2): if n % 3 == 0: soma = soma + n print(soma)
soma = 0 for n in range(1, 500, 2): if n % 3 == 0: soma = soma + n print(soma)
# Times Tables # Ask the user to input the number they would like the times tables for tTable = int(input("What number would you like to see the times table for? ")) # Loop through 12 times for number in range(12): print("{0} times {1} equals {2}" .format(number+1, tTable, (number+1) * tTable)) input()
t_table = int(input('What number would you like to see the times table for? ')) for number in range(12): print('{0} times {1} equals {2}'.format(number + 1, tTable, (number + 1) * tTable)) input()
expected_output = { "GigabitEthernet3/8/0/38": { "auto_negotiate": True, "counters": { "normal": { "in_broadcast_pkts": 1093, "in_mac_pause_frames": 0, "in_multicast_pkts": 18864, "in_octets": 0, "in_pkts": 7446905, "in_unicast_pkts": 7426948, "out_broadcast_pkts": 373635, "out_mac_pause_frames": 0, "out_multicast_pkts": 34367737, "out_octets": 0, "out_pkts": 40981139, "out_unicast_pkts": 6239767 }, "in_abort": 0, "in_broadcast_pkts": 1093, "in_crc_errors": 0, "in_errors": 0, "in_frame": 0, "in_giants": 0, "in_ignored": 0, "in_mac_pause_frames": 0, "in_multicast_pkts": 18864, "in_octets": 10280397282, "in_overrun": 0, "in_parity_errors": 0, "in_pkts": 7446905, "in_runts": 0, "in_throttles": 0, "in_unicast_pkts": 7426948, "last_clear": "Never", "out_abort": 0, "out_broadcast_pkts": 373635, "out_buffer_failure": 0, "out_collision": 0, "out_deferred": 0, "out_errors": 0, "out_late_collision": 0, "out_lost_carrier": 0, "out_mac_pause_frames": 0, "out_multicast_pkts": 34367737, "out_no_carrier": 0, "out_octets": 44666966188, "out_pkts": 40981139, "out_underruns": 0, "out_unicast_pkts": 6239767, "rate": { "in_rate_bytes": 0, "in_rate_pkts": 0, "load_interval": 300, "out_rate_bytes": 0, "out_rate_pkts": 0 } }, "description": "GigabitEthernet3/8/0/38 Interface", "duplex_mode": "unknown", "enabled": True, "frame_type": "PKTFMT_ETHNT_2", "mac_address": "cc3e-5f69-5751", "max_frame_length": 9216, "media_type": "twisted pair", "oper_status": "DOWN", "port_speed": "unknown", "port_type": "1000_BASE_T", "priority": 0, "pvid": 17, "switchport": { "mode": "access", "untagged": 17 }, "type": "GigabitEthernet" } }
expected_output = {'GigabitEthernet3/8/0/38': {'auto_negotiate': True, 'counters': {'normal': {'in_broadcast_pkts': 1093, 'in_mac_pause_frames': 0, 'in_multicast_pkts': 18864, 'in_octets': 0, 'in_pkts': 7446905, 'in_unicast_pkts': 7426948, 'out_broadcast_pkts': 373635, 'out_mac_pause_frames': 0, 'out_multicast_pkts': 34367737, 'out_octets': 0, 'out_pkts': 40981139, 'out_unicast_pkts': 6239767}, 'in_abort': 0, 'in_broadcast_pkts': 1093, 'in_crc_errors': 0, 'in_errors': 0, 'in_frame': 0, 'in_giants': 0, 'in_ignored': 0, 'in_mac_pause_frames': 0, 'in_multicast_pkts': 18864, 'in_octets': 10280397282, 'in_overrun': 0, 'in_parity_errors': 0, 'in_pkts': 7446905, 'in_runts': 0, 'in_throttles': 0, 'in_unicast_pkts': 7426948, 'last_clear': 'Never', 'out_abort': 0, 'out_broadcast_pkts': 373635, 'out_buffer_failure': 0, 'out_collision': 0, 'out_deferred': 0, 'out_errors': 0, 'out_late_collision': 0, 'out_lost_carrier': 0, 'out_mac_pause_frames': 0, 'out_multicast_pkts': 34367737, 'out_no_carrier': 0, 'out_octets': 44666966188, 'out_pkts': 40981139, 'out_underruns': 0, 'out_unicast_pkts': 6239767, 'rate': {'in_rate_bytes': 0, 'in_rate_pkts': 0, 'load_interval': 300, 'out_rate_bytes': 0, 'out_rate_pkts': 0}}, 'description': 'GigabitEthernet3/8/0/38 Interface', 'duplex_mode': 'unknown', 'enabled': True, 'frame_type': 'PKTFMT_ETHNT_2', 'mac_address': 'cc3e-5f69-5751', 'max_frame_length': 9216, 'media_type': 'twisted pair', 'oper_status': 'DOWN', 'port_speed': 'unknown', 'port_type': '1000_BASE_T', 'priority': 0, 'pvid': 17, 'switchport': {'mode': 'access', 'untagged': 17}, 'type': 'GigabitEthernet'}}
""" Write an iterative implementation of a binary search function. """ def binary_search(haystack, needle): first = 0 last = len(haystack) - 1 found = False while first <= last and not found: mid = (first + last) // 2 print('haystack is {}, mid is {}, first is {}, last is {}'.format( haystack, mid, first, last)) if haystack[mid] == needle: found = True elif haystack[mid] < needle: first = mid + 1 else: last = mid - 1 return found print(binary_search([2, 4, 6, 8, 9, 11, 15], 11))
""" Write an iterative implementation of a binary search function. """ def binary_search(haystack, needle): first = 0 last = len(haystack) - 1 found = False while first <= last and (not found): mid = (first + last) // 2 print('haystack is {}, mid is {}, first is {}, last is {}'.format(haystack, mid, first, last)) if haystack[mid] == needle: found = True elif haystack[mid] < needle: first = mid + 1 else: last = mid - 1 return found print(binary_search([2, 4, 6, 8, 9, 11, 15], 11))
"""These keypoint formats are taken from https://github.com/CMU-Perceptual- Computing-Lab/openpose/blob/master/src/openpose/pose/poseParameters.cpp.""" OPENPOSE_135_KEYPOINTS = [ 'nose', 'left_eye', 'right_eye', 'left_ear', 'right_ear', 'left_shoulder', 'right_shoulder', 'left_elbow', 'right_elbow', 'left_wrist', 'right_wrist', 'left_hip', 'right_hip', 'left_knee', 'right_knee', 'left_ankle', 'right_ankle', 'neck', # upper_neck 'head', 'left_bigtoe', 'left_smalltoe', 'left_heel', 'right_bigtoe', 'right_smalltoe', 'right_heel', 'left_thumb_1', 'left_thumb_2', 'left_thumb_3', 'left_thumb', 'left_index_1', 'left_index_2', 'left_index_3', 'left_index', 'left_middle_1', 'left_middle_2', 'left_middle_3', 'left_middle', 'left_ring_1', 'left_ring_2', 'left_ring_3', 'left_ring', 'left_pinky_1', 'left_pinky_2', 'left_pinky_3', 'left_pinky', 'right_thumb_1', 'right_thumb_2', 'right_thumb_3', 'right_thumb', 'right_index_1', 'right_index_2', 'right_index_3', 'right_index', 'right_middle_1', 'right_middle_2', 'right_middle_3', 'right_middle', 'right_ring_1', 'right_ring_2', 'right_ring_3', 'right_ring', 'right_pinky_1', 'right_pinky_2', 'right_pinky_3', 'right_pinky', 'face_contour_1', 'face_contour_2', 'face_contour_3', 'face_contour_4', 'face_contour_5', 'face_contour_6', 'face_contour_7', 'face_contour_8', 'face_contour_9', 'face_contour_10', 'face_contour_11', 'face_contour_12', 'face_contour_13', 'face_contour_14', 'face_contour_15', 'face_contour_16', 'face_contour_17', 'right_eyebrow_1', 'right_eyebrow_2', 'right_eyebrow_3', 'right_eyebrow_4', 'right_eyebrow_5', 'left_eyebrow_5', 'left_eyebrow_4', 'left_eyebrow_3', 'left_eyebrow_2', 'left_eyebrow_1', 'nosebridge_1', 'nosebridge_2', 'nosebridge_3', 'nosebridge_4', 'nose_1', 'nose_2', 'nose_3', 'nose_4', 'nose_5', 'right_eye_1', 'right_eye_2', 'right_eye_3', 'right_eye_4', 'right_eye_5', 'right_eye_6', 'left_eye_4', 'left_eye_3', 'left_eye_2', 'left_eye_1', 'left_eye_6', 'left_eye_5', 'mouth_1', 'mouth_2', 'mouth_3', 'mouth_4', 'mouth_5', 'mouth_6', 'mouth_7', 'mouth_8', 'mouth_9', 'mouth_10', 'mouth_11', 'mouth_12', 'lip_1', 'lip_2', 'lip_3', 'lip_4', 'lip_5', 'lip_6', 'lip_7', 'lip_8', 'right_eyeball', 'left_eyeball' ] OPENPOSE_25_KEYPOINTS = [ 'nose_openpose', 'neck_openpose', # 'upper_neck' 'right_shoulder_openpose', 'right_elbow_openpose', 'right_wrist_openpose', 'left_shoulder_openpose', 'left_elbow_openpose', 'left_wrist_openpose', 'pelvis_openpose', # 'mid_hip' 'right_hip_openpose', 'right_knee_openpose', 'right_ankle_openpose', 'left_hip_openpose', 'left_knee_openpose', 'left_ankle_openpose', 'right_eye_openpose', 'left_eye_openpose', 'right_ear_openpose', 'left_ear_openpose', 'left_bigtoe_openpose', 'left_smalltoe_openpose', 'left_heel_openpose', 'right_bigtoe_openpose', 'right_smalltoe_openpose', 'right_heel_openpose' ]
"""These keypoint formats are taken from https://github.com/CMU-Perceptual- Computing-Lab/openpose/blob/master/src/openpose/pose/poseParameters.cpp.""" openpose_135_keypoints = ['nose', 'left_eye', 'right_eye', 'left_ear', 'right_ear', 'left_shoulder', 'right_shoulder', 'left_elbow', 'right_elbow', 'left_wrist', 'right_wrist', 'left_hip', 'right_hip', 'left_knee', 'right_knee', 'left_ankle', 'right_ankle', 'neck', 'head', 'left_bigtoe', 'left_smalltoe', 'left_heel', 'right_bigtoe', 'right_smalltoe', 'right_heel', 'left_thumb_1', 'left_thumb_2', 'left_thumb_3', 'left_thumb', 'left_index_1', 'left_index_2', 'left_index_3', 'left_index', 'left_middle_1', 'left_middle_2', 'left_middle_3', 'left_middle', 'left_ring_1', 'left_ring_2', 'left_ring_3', 'left_ring', 'left_pinky_1', 'left_pinky_2', 'left_pinky_3', 'left_pinky', 'right_thumb_1', 'right_thumb_2', 'right_thumb_3', 'right_thumb', 'right_index_1', 'right_index_2', 'right_index_3', 'right_index', 'right_middle_1', 'right_middle_2', 'right_middle_3', 'right_middle', 'right_ring_1', 'right_ring_2', 'right_ring_3', 'right_ring', 'right_pinky_1', 'right_pinky_2', 'right_pinky_3', 'right_pinky', 'face_contour_1', 'face_contour_2', 'face_contour_3', 'face_contour_4', 'face_contour_5', 'face_contour_6', 'face_contour_7', 'face_contour_8', 'face_contour_9', 'face_contour_10', 'face_contour_11', 'face_contour_12', 'face_contour_13', 'face_contour_14', 'face_contour_15', 'face_contour_16', 'face_contour_17', 'right_eyebrow_1', 'right_eyebrow_2', 'right_eyebrow_3', 'right_eyebrow_4', 'right_eyebrow_5', 'left_eyebrow_5', 'left_eyebrow_4', 'left_eyebrow_3', 'left_eyebrow_2', 'left_eyebrow_1', 'nosebridge_1', 'nosebridge_2', 'nosebridge_3', 'nosebridge_4', 'nose_1', 'nose_2', 'nose_3', 'nose_4', 'nose_5', 'right_eye_1', 'right_eye_2', 'right_eye_3', 'right_eye_4', 'right_eye_5', 'right_eye_6', 'left_eye_4', 'left_eye_3', 'left_eye_2', 'left_eye_1', 'left_eye_6', 'left_eye_5', 'mouth_1', 'mouth_2', 'mouth_3', 'mouth_4', 'mouth_5', 'mouth_6', 'mouth_7', 'mouth_8', 'mouth_9', 'mouth_10', 'mouth_11', 'mouth_12', 'lip_1', 'lip_2', 'lip_3', 'lip_4', 'lip_5', 'lip_6', 'lip_7', 'lip_8', 'right_eyeball', 'left_eyeball'] openpose_25_keypoints = ['nose_openpose', 'neck_openpose', 'right_shoulder_openpose', 'right_elbow_openpose', 'right_wrist_openpose', 'left_shoulder_openpose', 'left_elbow_openpose', 'left_wrist_openpose', 'pelvis_openpose', 'right_hip_openpose', 'right_knee_openpose', 'right_ankle_openpose', 'left_hip_openpose', 'left_knee_openpose', 'left_ankle_openpose', 'right_eye_openpose', 'left_eye_openpose', 'right_ear_openpose', 'left_ear_openpose', 'left_bigtoe_openpose', 'left_smalltoe_openpose', 'left_heel_openpose', 'right_bigtoe_openpose', 'right_smalltoe_openpose', 'right_heel_openpose']
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. __all__ = ['SE_Block', ] '''see: Squeeze-and-Excitation Networks''' def SE_Block(sym, data, num_out, name): if type(num_out) is tuple: num_mid = (int(sum(num_out)/16), 0) else: num_mid = int(num_out/16) # global pooling out = sym.Pooling(data=data, pool_type='avg', kernel=(1, 1), global_pool=True, stride=(1, 1), name=('%s_pool' % name)) # fc1 out = sym.FullyConnected(data=out, num_hidden=num_mid, no_bias=False, name=('%s_fc1' % name)) out = sym.Activation(data=out, act_type='relu', name=('%s_relu' % name)) # fc2 out = sym.FullyConnected(data=out, num_hidden=num_out, no_bias=False, name=('%s_fc2' % name)) out = sym.Activation(data=out, act_type='sigmoid', name=('%s_sigmoid' % name)) # rescale out = sym.expand_dims(out, axis=2, name=('%s_expend1' % name)) out = sym.expand_dims(out, axis=3, name=('%s_expend2' % name)) # add spatial dims back output = sym.broadcast_mul(data, out, name=('%s_mul' % name)) return output # import mxnet as mx # # def SE_Block(sym, data, num_out, name): # if type(num_out) is tuple: # num_mid = (int(sum(num_out) / 16), 0) # else: # num_mid = int(num_out / 16) # # # global pooling # out = sym.Pooling(data=data, pool_type='avg', kernel=(1, 1), global_pool=True, stride=(1, 1), # name=('%s_pool' % name)) # # # fc1 # out = mx.sym.Convolution(data=out, num_filter=num_mid, kernel=(1,1), stride=(1,1), pad=(0,0), name=('%s_fc1' % name)) # out = sym.Activation(data=out, act_type='relu', name=('%s_relu' % name)) # # # fc2 # out = mx.sym.Convolution(data=out, num_filter=num_out, kernel=(1,1), stride=(1,1), pad=(0,0), name=('%s_fc2' % name)) # out = sym.Activation(data=out, act_type='sigmoid', name=('%s_sigmoid' % name)) # # # rescale # # out = sym.expand_dims(out, axis=2, name=('%s_expend1' % name)) # # out = sym.expand_dims(out, axis=3, name=('%s_expend2' % name)) # add spatial dims back # output = sym.broadcast_mul(data, out, name=('%s_mul' % name)) # # return output
__all__ = ['SE_Block'] 'see: Squeeze-and-Excitation Networks' def se__block(sym, data, num_out, name): if type(num_out) is tuple: num_mid = (int(sum(num_out) / 16), 0) else: num_mid = int(num_out / 16) out = sym.Pooling(data=data, pool_type='avg', kernel=(1, 1), global_pool=True, stride=(1, 1), name='%s_pool' % name) out = sym.FullyConnected(data=out, num_hidden=num_mid, no_bias=False, name='%s_fc1' % name) out = sym.Activation(data=out, act_type='relu', name='%s_relu' % name) out = sym.FullyConnected(data=out, num_hidden=num_out, no_bias=False, name='%s_fc2' % name) out = sym.Activation(data=out, act_type='sigmoid', name='%s_sigmoid' % name) out = sym.expand_dims(out, axis=2, name='%s_expend1' % name) out = sym.expand_dims(out, axis=3, name='%s_expend2' % name) output = sym.broadcast_mul(data, out, name='%s_mul' % name) return output
__title__ = "access-client" __version__ = "0.0.1" __summary__ = "Client for accessai solutions" __uri__ = "http://accessai.co" __author__ = "ConvexHull Technology" __email__ = "[email protected]" __license__ = "Apache 2.0" __release__ = True
__title__ = 'access-client' __version__ = '0.0.1' __summary__ = 'Client for accessai solutions' __uri__ = 'http://accessai.co' __author__ = 'ConvexHull Technology' __email__ = '[email protected]' __license__ = 'Apache 2.0' __release__ = True
''' Write code to remove duplicates from an unsorted linked list. FOLLOW UP How would you solve this problem if a temporary buffer is not allowed? ''' class Node(object): def __init__(self, data=None, next_node=None): self.data = data self.next_node = next_node def get_data(self): return self.data def set_data(self, data): self.data = data def get_next_node(self): return self.next_node def set_next_node(self, next_node): self.next_node = next_node dup_data = dict() class LinkedList(object): def __init__(self, head=None): self.head = head def insert_node(self, data): new_node = Node(data, self.head) self.head = new_node # print(data, " inserted!") def traversal(self): curr_node = self.head while curr_node: data_ = curr_node.get_data() print(data_, end=" ") curr_node = curr_node.get_next_node() print("") def build_dup_hashset(self): global dup_data curr_node = self.head while curr_node: data_ = curr_node.get_data() if data_ in dup_data: count = dup_data[data_] dup_data[data_] = count + 1 else: dup_data[data_] = 1 curr_node = curr_node.get_next_node() def del_node(self, data): curr_node = self.head prev_node = None while curr_node: if curr_node.get_data() == data: if prev_node: prev_node.set_next_node(curr_node.get_next_node()) else: self.head = curr_node.get_next_node() print(data, " deleted!") return else: prev_node = curr_node curr_node = curr_node.get_next_node() def del_dups(self): global dup_data self.build_dup_hashset() for k, v in dup_data.items(): if v > 1: for _ in range(v-1): self.del_node(k) dup_data[k] = v - 1 myLL = LinkedList() print("Inserting nodes to linked list") myLL.insert_node(10) myLL.insert_node(20) myLL.insert_node(50) myLL.insert_node(30) myLL.insert_node(20) myLL.insert_node(50) myLL.insert_node(50) myLL.insert_node(20) myLL.insert_node(10) myLL.insert_node(60) print("Traversing the linked list") myLL.traversal() print("Deleting duplicate data") print(myLL.del_dups()) print("Traversing the de-duplicated linked list") myLL.traversal()
""" Write code to remove duplicates from an unsorted linked list. FOLLOW UP How would you solve this problem if a temporary buffer is not allowed? """ class Node(object): def __init__(self, data=None, next_node=None): self.data = data self.next_node = next_node def get_data(self): return self.data def set_data(self, data): self.data = data def get_next_node(self): return self.next_node def set_next_node(self, next_node): self.next_node = next_node dup_data = dict() class Linkedlist(object): def __init__(self, head=None): self.head = head def insert_node(self, data): new_node = node(data, self.head) self.head = new_node def traversal(self): curr_node = self.head while curr_node: data_ = curr_node.get_data() print(data_, end=' ') curr_node = curr_node.get_next_node() print('') def build_dup_hashset(self): global dup_data curr_node = self.head while curr_node: data_ = curr_node.get_data() if data_ in dup_data: count = dup_data[data_] dup_data[data_] = count + 1 else: dup_data[data_] = 1 curr_node = curr_node.get_next_node() def del_node(self, data): curr_node = self.head prev_node = None while curr_node: if curr_node.get_data() == data: if prev_node: prev_node.set_next_node(curr_node.get_next_node()) else: self.head = curr_node.get_next_node() print(data, ' deleted!') return else: prev_node = curr_node curr_node = curr_node.get_next_node() def del_dups(self): global dup_data self.build_dup_hashset() for (k, v) in dup_data.items(): if v > 1: for _ in range(v - 1): self.del_node(k) dup_data[k] = v - 1 my_ll = linked_list() print('Inserting nodes to linked list') myLL.insert_node(10) myLL.insert_node(20) myLL.insert_node(50) myLL.insert_node(30) myLL.insert_node(20) myLL.insert_node(50) myLL.insert_node(50) myLL.insert_node(20) myLL.insert_node(10) myLL.insert_node(60) print('Traversing the linked list') myLL.traversal() print('Deleting duplicate data') print(myLL.del_dups()) print('Traversing the de-duplicated linked list') myLL.traversal()
# @lc app=leetcode id=2139 lang=python3 # # [2139] Minimum Moves to Reach Target Score # # https://leetcode.com/problems/minimum-moves-to-reach-target-score/ # @lc code=start class Solution: def minMoves(self, target: int, maxDoubles: int) -> int: steps = 0 while maxDoubles > 0 and target > 1: if target % 2 == 0: target /= 2 steps = steps + 1 maxDoubles -= 1 else: target -= 1 steps = steps + 1 steps = steps + target - 1 return int(steps) # @lc code=end
class Solution: def min_moves(self, target: int, maxDoubles: int) -> int: steps = 0 while maxDoubles > 0 and target > 1: if target % 2 == 0: target /= 2 steps = steps + 1 max_doubles -= 1 else: target -= 1 steps = steps + 1 steps = steps + target - 1 return int(steps)
# Truncatable primes def prime_test_list(numbers): return all(prime_test(elem) for elem in numbers) def prime_test(num): try: if num == 2: return True if num == 0 or num == 1 or num % 2 == 0: return False for i in range(3, int(num**(1/2))+1, 2): if num % i == 0: return False else: return True except TypeError: return all(prime_test(elem) for elem in num) def make_truncated_list(integer): len_str_int = len(str(integer)) return [int(integer/(10**i)) for i in range(len_str_int)] + [integer % (10**i) for i in range(1, len_str_int)] counter = 11 truncatable_prime_numbers = [] while len(truncatable_prime_numbers) < 11: if prime_test_list(make_truncated_list(counter)): print("The number {} is prime_truncatable both ways.".format(counter)) truncatable_prime_numbers.append(counter) counter += 2 print(truncatable_prime_numbers)
def prime_test_list(numbers): return all((prime_test(elem) for elem in numbers)) def prime_test(num): try: if num == 2: return True if num == 0 or num == 1 or num % 2 == 0: return False for i in range(3, int(num ** (1 / 2)) + 1, 2): if num % i == 0: return False else: return True except TypeError: return all((prime_test(elem) for elem in num)) def make_truncated_list(integer): len_str_int = len(str(integer)) return [int(integer / 10 ** i) for i in range(len_str_int)] + [integer % 10 ** i for i in range(1, len_str_int)] counter = 11 truncatable_prime_numbers = [] while len(truncatable_prime_numbers) < 11: if prime_test_list(make_truncated_list(counter)): print('The number {} is prime_truncatable both ways.'.format(counter)) truncatable_prime_numbers.append(counter) counter += 2 print(truncatable_prime_numbers)
class RunnerMixin(object): def add_artifacts(self, artifacts): url = self._url('/runner/artifacts') data = [{'filename': d} for d in artifacts] return self._result(self.post(url, json={ 'artifacts': data })) def add_logs(self, logs): url = self._url('/runner/log') return self._result(self.post(url, json={ 'logs': logs })) def fetch_config(self): url = self._url('/runner/config') return self._result(self.get(url)) def get_runner_status(self): url = self._url('/runner/status') return self._result(self.get(url)) def set_runner_status(self, status, error=None): url = self._url('/runner/status') data = { 'status': status } if error: data['error'] = error return self._result(self.post(url, json=data))
class Runnermixin(object): def add_artifacts(self, artifacts): url = self._url('/runner/artifacts') data = [{'filename': d} for d in artifacts] return self._result(self.post(url, json={'artifacts': data})) def add_logs(self, logs): url = self._url('/runner/log') return self._result(self.post(url, json={'logs': logs})) def fetch_config(self): url = self._url('/runner/config') return self._result(self.get(url)) def get_runner_status(self): url = self._url('/runner/status') return self._result(self.get(url)) def set_runner_status(self, status, error=None): url = self._url('/runner/status') data = {'status': status} if error: data['error'] = error return self._result(self.post(url, json=data))
# -*- encoding: utf-8 -*- """ @File : __init__.py.py @Time : 2020/2/29 11:57 AM @Author : zhengjiani @Email : [email protected] @Software: PyCharm """
""" @File : __init__.py.py @Time : 2020/2/29 11:57 AM @Author : zhengjiani @Email : [email protected] @Software: PyCharm """
def load(h): return ({'abbr': 'a', 'code': 1, 'title': '70 332.5 40 10'}, {'abbr': 'b', 'code': 2, 'title': '72.5 0 50 45'}, {'abbr': 'c', 'code': 3, 'title': '57.5 345 32.5 17.5'}, {'abbr': 'd', 'code': 4, 'title': '57.5 2.5 32.5 42.5'}, {'abbr': 'e', 'code': 5, 'title': '75 340 30 45'}, {'abbr': 'f', 'code': 6, 'title': '60 310 40 0'}, {'abbr': 'm', 'code': 7, 'title': '66 354 30 42'}, {'abbr': 'm', 'code': 8, 'title': '66 -6 30 42'}, {'abbr': 'm', 'code': 9, 'title': '46 354 30 36'}, {'abbr': 'm', 'code': 10, 'title': '46 -6 30 36'}, {'abbr': 'm', 'code': 11, 'title': '46 -6 30 36.5'}, {'abbr': 'm', 'code': 12, 'title': '46 -6 35 17'}, {'abbr': 'm', 'code': 13, 'title': '46 12 40 20'}, {'abbr': 'm', 'code': 14, 'title': '81 262 9 42'}, {'abbr': 'm', 'code': 15, 'title': '81 -98 9 42'}, {'abbr': 'g', 'code': 16, 'title': '90 0 -90 359.5'}, {'abbr': 'g', 'code': 17, 'title': '81 0 -81 358.5'}, {'abbr': 'g', 'code': 18, 'title': '81 0 -81 359.5'}, {'abbr': 'g', 'code': 19, 'title': '90 0 -90 358.5'}, {'abbr': 'g', 'code': 20, 'title': '90 0 -90 357'}, {'abbr': 'g', 'code': 21, 'title': '90 0 -90 357.9'}, {'abbr': 'g', 'code': 22, 'title': '90 0 -90 359'}, {'abbr': 'g', 'code': 23, 'title': '81 0 -78 357'}, {'abbr': 'g', 'code': 24, 'title': '90 0 -90 357.5'}, {'abbr': 'g', 'code': 25, 'title': '90 0 -90 359.64'}, {'abbr': 's', 'code': 26, 'title': '-0.5 0 -81 359.5'}, {'abbr': 'n', 'code': 27, 'title': '81 0 0 359.5'}, {'abbr': 'b', 'code': 28, 'title': '66 9 40 42'}, {'abbr': 'm', 'code': 29, 'title': '44.5 -6 35 16'}, {'abbr': 'm', 'code': 30, 'title': '45 -6 35 14'}, {'abbr': 'm', 'code': 31, 'title': '45.976 12 40 19.956'}, {'abbr': 'g', 'code': 32, 'title': '89.731 0 -89.731 359.648'}, {'abbr': 'g', 'code': 33, 'title': '90 0 -90 358.5'}, {'abbr': 'n', 'code': 34, 'title': '90 0 30 359.9'}, {'abbr': 's', 'code': 35, 'title': '-30 0 -90 359.9'}, {'abbr': 'e', 'code': 36, 'title': '75 320 25 34.999'}, {'abbr': 't', 'code': 37, 'title': '30 260 0 359.9'}, {'abbr': 'u', 'code': 38, 'title': '30 100 0 220'}, {'abbr': 'g', 'code': 39, 'title': '0 0 0 0'})
def load(h): return ({'abbr': 'a', 'code': 1, 'title': '70 332.5 40 10'}, {'abbr': 'b', 'code': 2, 'title': '72.5 0 50 45'}, {'abbr': 'c', 'code': 3, 'title': '57.5 345 32.5 17.5'}, {'abbr': 'd', 'code': 4, 'title': '57.5 2.5 32.5 42.5'}, {'abbr': 'e', 'code': 5, 'title': '75 340 30 45'}, {'abbr': 'f', 'code': 6, 'title': '60 310 40 0'}, {'abbr': 'm', 'code': 7, 'title': '66 354 30 42'}, {'abbr': 'm', 'code': 8, 'title': '66 -6 30 42'}, {'abbr': 'm', 'code': 9, 'title': '46 354 30 36'}, {'abbr': 'm', 'code': 10, 'title': '46 -6 30 36'}, {'abbr': 'm', 'code': 11, 'title': '46 -6 30 36.5'}, {'abbr': 'm', 'code': 12, 'title': '46 -6 35 17'}, {'abbr': 'm', 'code': 13, 'title': '46 12 40 20'}, {'abbr': 'm', 'code': 14, 'title': '81 262 9 42'}, {'abbr': 'm', 'code': 15, 'title': '81 -98 9 42'}, {'abbr': 'g', 'code': 16, 'title': '90 0 -90 359.5'}, {'abbr': 'g', 'code': 17, 'title': '81 0 -81 358.5'}, {'abbr': 'g', 'code': 18, 'title': '81 0 -81 359.5'}, {'abbr': 'g', 'code': 19, 'title': '90 0 -90 358.5'}, {'abbr': 'g', 'code': 20, 'title': '90 0 -90 357'}, {'abbr': 'g', 'code': 21, 'title': '90 0 -90 357.9'}, {'abbr': 'g', 'code': 22, 'title': '90 0 -90 359'}, {'abbr': 'g', 'code': 23, 'title': '81 0 -78 357'}, {'abbr': 'g', 'code': 24, 'title': '90 0 -90 357.5'}, {'abbr': 'g', 'code': 25, 'title': '90 0 -90 359.64'}, {'abbr': 's', 'code': 26, 'title': '-0.5 0 -81 359.5'}, {'abbr': 'n', 'code': 27, 'title': '81 0 0 359.5'}, {'abbr': 'b', 'code': 28, 'title': '66 9 40 42'}, {'abbr': 'm', 'code': 29, 'title': '44.5 -6 35 16'}, {'abbr': 'm', 'code': 30, 'title': '45 -6 35 14'}, {'abbr': 'm', 'code': 31, 'title': '45.976 12 40 19.956'}, {'abbr': 'g', 'code': 32, 'title': '89.731 0 -89.731 359.648'}, {'abbr': 'g', 'code': 33, 'title': '90 0 -90 358.5'}, {'abbr': 'n', 'code': 34, 'title': '90 0 30 359.9'}, {'abbr': 's', 'code': 35, 'title': '-30 0 -90 359.9'}, {'abbr': 'e', 'code': 36, 'title': '75 320 25 34.999'}, {'abbr': 't', 'code': 37, 'title': '30 260 0 359.9'}, {'abbr': 'u', 'code': 38, 'title': '30 100 0 220'}, {'abbr': 'g', 'code': 39, 'title': '0 0 0 0'})
def inv_lr_scheduler(param_lr, optimizer, iter_num, gamma=10, power=0.75, init_lr=0.001,weight_decay=0.0005, max_iter=10000): #10000 """Decay learning rate by a factor of 0.1 every lr_decay_epoch epochs.""" #max_iter = 10000 gamma = 10.0 lr = init_lr * (1 + gamma * min(1.0, iter_num / max_iter)) ** (-power) i=0 for param_group in optimizer.param_groups: param_group['lr'] = lr * param_lr[i] i+=1 return lr
def inv_lr_scheduler(param_lr, optimizer, iter_num, gamma=10, power=0.75, init_lr=0.001, weight_decay=0.0005, max_iter=10000): """Decay learning rate by a factor of 0.1 every lr_decay_epoch epochs.""" gamma = 10.0 lr = init_lr * (1 + gamma * min(1.0, iter_num / max_iter)) ** (-power) i = 0 for param_group in optimizer.param_groups: param_group['lr'] = lr * param_lr[i] i += 1 return lr
"""A module with errors used in the qtools3 package.""" class XlsformError(Exception): pass class ConvertError(Exception): pass class XformError(Exception): pass class QxmleditError(Exception): pass
"""A module with errors used in the qtools3 package.""" class Xlsformerror(Exception): pass class Converterror(Exception): pass class Xformerror(Exception): pass class Qxmlediterror(Exception): pass
description = 'Devices for the first detector assembly' pvpref = 'SQ:ZEBRA:mcu3:' excludes = ['wagen2'] devices = dict( nu = device('nicos_ess.devices.epics.motor.EpicsMotor', description = 'Detector tilt', motorpv = pvpref + 'A4T', errormsgpv = pvpref + 'A4T-MsgTxt', precision = 0.01, ), detdist = device('nicos_ess.devices.epics.motor.EpicsMotor', description = 'Detector distance', motorpv = pvpref + 'W1DIST', errormsgpv = pvpref + 'W1DIST-MsgTxt', precision = 0.1, ), ana = device('nicos.devices.generic.mono.Monochromator', description = 'Dummy analyzer for TAS mode', unit = 'meV' ), )
description = 'Devices for the first detector assembly' pvpref = 'SQ:ZEBRA:mcu3:' excludes = ['wagen2'] devices = dict(nu=device('nicos_ess.devices.epics.motor.EpicsMotor', description='Detector tilt', motorpv=pvpref + 'A4T', errormsgpv=pvpref + 'A4T-MsgTxt', precision=0.01), detdist=device('nicos_ess.devices.epics.motor.EpicsMotor', description='Detector distance', motorpv=pvpref + 'W1DIST', errormsgpv=pvpref + 'W1DIST-MsgTxt', precision=0.1), ana=device('nicos.devices.generic.mono.Monochromator', description='Dummy analyzer for TAS mode', unit='meV'))
class Person: def __init__(self, fname, lname): self.firstname = fname self.lastname = lname def printname(self): print(self.firstname, self.lastname) #Use the Person class to create an object, and then execute the printname method: x = Person("John", "Doe") x.printname()
class Person: def __init__(self, fname, lname): self.firstname = fname self.lastname = lname def printname(self): print(self.firstname, self.lastname) x = person('John', 'Doe') x.printname()
name = "Maedeh Ashouri" for i in name: print(i)
name = 'Maedeh Ashouri' for i in name: print(i)
# Copyright (c) 2017-2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 __all__ = ["ConfigError", "ConfigWarning"] class ConfigError(ValueError): pass class ConfigWarning(Warning): pass
__all__ = ['ConfigError', 'ConfigWarning'] class Configerror(ValueError): pass class Configwarning(Warning): pass
# coding: utf-8 # In[3]: class RuleClass: attributes = [] attributes_value = [] attributes_cover = [] decision_cover =[] false_cover =[] Decision = '' def __cmp__(self, other): if self.strength > other.strength: return 1 elif self.strength < other.strength: return -1 else: return 0 def __init__(self,attributes,attributes_value,attributes_cover,decision,decision_cover,false_cover): self.strength = len(decision_cover) self.specificity=len(attributes) self.support = self.strength*self.specificity self.attributes=attributes self.attributes_value=attributes_value self.attributes_cover = attributes_cover self.Decision=decision self.decision_cover = decision_cover self.false_cover= false_cover self.conditionalProbablity=0 if(len(attributes_cover)!=0): self.conditionalProbablity= self.strength/len(attributes_cover) def print_rule(self): print('Rule ') print(attributes, attributes_value , decision_cover) print('Strength ',self.strength) print('Specificity ',self.specificity) print('Support ',self.support) prine('-----------------------------------------') # In[2]:
class Ruleclass: attributes = [] attributes_value = [] attributes_cover = [] decision_cover = [] false_cover = [] decision = '' def __cmp__(self, other): if self.strength > other.strength: return 1 elif self.strength < other.strength: return -1 else: return 0 def __init__(self, attributes, attributes_value, attributes_cover, decision, decision_cover, false_cover): self.strength = len(decision_cover) self.specificity = len(attributes) self.support = self.strength * self.specificity self.attributes = attributes self.attributes_value = attributes_value self.attributes_cover = attributes_cover self.Decision = decision self.decision_cover = decision_cover self.false_cover = false_cover self.conditionalProbablity = 0 if len(attributes_cover) != 0: self.conditionalProbablity = self.strength / len(attributes_cover) def print_rule(self): print('Rule ') print(attributes, attributes_value, decision_cover) print('Strength ', self.strength) print('Specificity ', self.specificity) print('Support ', self.support) prine('-----------------------------------------')
def convert_lambda_to_def(string): args=string[string.index("lambda ")+7:string.index(":")] name=string[:string.index(" ")] cal=string[string.index(":")+2:] return f"def {name}({args}):\n return {cal}"
def convert_lambda_to_def(string): args = string[string.index('lambda ') + 7:string.index(':')] name = string[:string.index(' ')] cal = string[string.index(':') + 2:] return f'def {name}({args}):\n return {cal}'
# -*- coding: utf-8 -*- class SigfoxBaseException(BaseException): pass class SigfoxConnectionError(SigfoxBaseException): pass class SigfoxBadStatusError(SigfoxBaseException): pass class SigfoxResponseError(SigfoxBaseException): pass class SigfoxTooManyRequestsError(SigfoxBaseException): pass
class Sigfoxbaseexception(BaseException): pass class Sigfoxconnectionerror(SigfoxBaseException): pass class Sigfoxbadstatuserror(SigfoxBaseException): pass class Sigfoxresponseerror(SigfoxBaseException): pass class Sigfoxtoomanyrequestserror(SigfoxBaseException): pass
#To find factorial of number num = int(input('N=')) factorial = 1 if num<0: print('Number is not accepted') elif num==0: print(1) else: for i in range(1,num+1): factorial = factorial * i print(factorial)
num = int(input('N=')) factorial = 1 if num < 0: print('Number is not accepted') elif num == 0: print(1) else: for i in range(1, num + 1): factorial = factorial * i print(factorial)
income = float(input()) gross_pay = income taxes_owed = income * .12 net_pay = gross_pay - taxes_owed print(gross_pay) print(taxes_owed) print(net_pay)
income = float(input()) gross_pay = income taxes_owed = income * 0.12 net_pay = gross_pay - taxes_owed print(gross_pay) print(taxes_owed) print(net_pay)
'''Plotting utility functions''' def remove_top_right_borders(ax): '''Remove top and right borders from Matplotlib axis''' ax.spines['right'].set_visible(False) ax.spines['top'].set_visible(False) ax.xaxis.set_ticks_position('bottom') ax.yaxis.set_ticks_position('left')
"""Plotting utility functions""" def remove_top_right_borders(ax): """Remove top and right borders from Matplotlib axis""" ax.spines['right'].set_visible(False) ax.spines['top'].set_visible(False) ax.xaxis.set_ticks_position('bottom') ax.yaxis.set_ticks_position('left')
first_wire = ['R8', 'U5', 'L5', 'D3'] second_wire = ['U7', 'R6', 'D4', 'L4'] def wire_path(wire): path = {} x = 0 y = 0 count = 0 dirs = {"R": 1, "L": -1, "U": 1, "D": -1} for i in wire: dir = i[0] mov = int(i[1:]) for _ in range(mov): count += 1 if dir in "RL": x += dirs[dir] else: y += dirs[dir] path[(x, y)] = count return path def part1(first_wire, second_wire): path_first = wire_path(first_wire) path_second = wire_path(second_wire) inter = [abs(i[0]) + abs(i[1]) for i in path_first.keys() if i in path_second] return min(inter) def part2(first_wire, second_wire): path_first = wire_path(first_wire) path_second = wire_path(second_wire) inter = [path_first[i] + path_second[i] for i in path_first.keys() if i in path_second] return min(inter) # Test first_wire = ['R8', 'U5', 'L5', 'D3'] second_wire = ['U7', 'R6', 'D4', 'L4'] assert (part1(first_wire, second_wire) == 6) assert (part2(first_wire, second_wire) == 30) with open("input.txt", 'r') as file: first_wire = [i for i in file.readline().split(',')] second_wire = [i for i in file.readline().split(',')] print(part1(first_wire, second_wire)) print(part2(first_wire, second_wire))
first_wire = ['R8', 'U5', 'L5', 'D3'] second_wire = ['U7', 'R6', 'D4', 'L4'] def wire_path(wire): path = {} x = 0 y = 0 count = 0 dirs = {'R': 1, 'L': -1, 'U': 1, 'D': -1} for i in wire: dir = i[0] mov = int(i[1:]) for _ in range(mov): count += 1 if dir in 'RL': x += dirs[dir] else: y += dirs[dir] path[x, y] = count return path def part1(first_wire, second_wire): path_first = wire_path(first_wire) path_second = wire_path(second_wire) inter = [abs(i[0]) + abs(i[1]) for i in path_first.keys() if i in path_second] return min(inter) def part2(first_wire, second_wire): path_first = wire_path(first_wire) path_second = wire_path(second_wire) inter = [path_first[i] + path_second[i] for i in path_first.keys() if i in path_second] return min(inter) first_wire = ['R8', 'U5', 'L5', 'D3'] second_wire = ['U7', 'R6', 'D4', 'L4'] assert part1(first_wire, second_wire) == 6 assert part2(first_wire, second_wire) == 30 with open('input.txt', 'r') as file: first_wire = [i for i in file.readline().split(',')] second_wire = [i for i in file.readline().split(',')] print(part1(first_wire, second_wire)) print(part2(first_wire, second_wire))
class Solution: def calculate(self, s: str) -> int: stack = [1] sign = 1 res = 0 i = 0 while i < len(s): if s[i].isdigit(): val = 0 while i < len(s) and s[i].isdigit(): val = val * 10 + int(s[i]) i += 1 res += val * sign else: if s[i] == "+": sign = stack[-1] elif s[i] == "-": sign = -stack[-1] elif s[i] == "(": stack.append(sign) elif s[i] == ")": stack.pop() elif s[i] == " ": pass else: raise ValueError("Unexpected character") i += 1 return res
class Solution: def calculate(self, s: str) -> int: stack = [1] sign = 1 res = 0 i = 0 while i < len(s): if s[i].isdigit(): val = 0 while i < len(s) and s[i].isdigit(): val = val * 10 + int(s[i]) i += 1 res += val * sign else: if s[i] == '+': sign = stack[-1] elif s[i] == '-': sign = -stack[-1] elif s[i] == '(': stack.append(sign) elif s[i] == ')': stack.pop() elif s[i] == ' ': pass else: raise value_error('Unexpected character') i += 1 return res
class Calculator: def __init__(self, ss, am, fsp, sc, isp, bc, cgtr): self.ss = ss self.am = int(am) self.fsp = float(fsp) self.sc = float(sc) self.isp = float(isp) self.bc = float(bc) self.cgtr = float(cgtr) def get_pc(self): pc = self.am * self.fsp return pc def get_cost(self): proceeds = self.get_pc() commission = self.bc + self.sc price = self.am * self.isp tax = (self.cgtr / 100) * (proceeds - commission - price) costs = price + commission + tax return costs def get_net_profit(self): profit = self.get_pc() - self.get_cost() return profit def get_roi(self): roi = self.get_net_profit() / self.get_cost() return "{:.2%}".format(roi) def get_expect_fsp(self): commission = self.bc + self.sc expect_fsp = commission / self.am + self.isp return expect_fsp def get_purchase_price(self): return self.am * self.isp def get_tax(self): tax = self.cgtr/100 * (self.get_pc() - self.bc - self.sc - (self.am * self.isp)) return tax
class Calculator: def __init__(self, ss, am, fsp, sc, isp, bc, cgtr): self.ss = ss self.am = int(am) self.fsp = float(fsp) self.sc = float(sc) self.isp = float(isp) self.bc = float(bc) self.cgtr = float(cgtr) def get_pc(self): pc = self.am * self.fsp return pc def get_cost(self): proceeds = self.get_pc() commission = self.bc + self.sc price = self.am * self.isp tax = self.cgtr / 100 * (proceeds - commission - price) costs = price + commission + tax return costs def get_net_profit(self): profit = self.get_pc() - self.get_cost() return profit def get_roi(self): roi = self.get_net_profit() / self.get_cost() return '{:.2%}'.format(roi) def get_expect_fsp(self): commission = self.bc + self.sc expect_fsp = commission / self.am + self.isp return expect_fsp def get_purchase_price(self): return self.am * self.isp def get_tax(self): tax = self.cgtr / 100 * (self.get_pc() - self.bc - self.sc - self.am * self.isp) return tax
"""igcollect - Library Entry Point Copyright (c) 2018 InnoGames GmbH """
"""igcollect - Library Entry Point Copyright (c) 2018 InnoGames GmbH """
# -*- coding: utf-8 -*- """The Windows Registry definitions.""" KEY_PATH_SEPARATOR = '\\' # The Registry value types. REG_NONE = 0 REG_SZ = 1 REG_EXPAND_SZ = 2 REG_BINARY = 3 REG_DWORD = 4 REG_DWORD_LITTLE_ENDIAN = 4 REG_DWORD_LE = REG_DWORD_LITTLE_ENDIAN REG_DWORD_BIG_ENDIAN = 5 REG_DWORD_BE = REG_DWORD_BIG_ENDIAN REG_LINK = 6 REG_MULTI_SZ = 7 REG_RESOURCE_LIST = 8 REG_FULL_RESOURCE_DESCRIPTOR = 9 REG_RESOURCE_REQUIREMENTS_LIST = 10 REG_QWORD = 11 # Kept for backwards compatibility for now. REG_RESOURCE_REQUIREMENT_LIST = REG_RESOURCE_REQUIREMENTS_LIST INTEGER_VALUE_TYPES = frozenset([REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_QWORD])
"""The Windows Registry definitions.""" key_path_separator = '\\' reg_none = 0 reg_sz = 1 reg_expand_sz = 2 reg_binary = 3 reg_dword = 4 reg_dword_little_endian = 4 reg_dword_le = REG_DWORD_LITTLE_ENDIAN reg_dword_big_endian = 5 reg_dword_be = REG_DWORD_BIG_ENDIAN reg_link = 6 reg_multi_sz = 7 reg_resource_list = 8 reg_full_resource_descriptor = 9 reg_resource_requirements_list = 10 reg_qword = 11 reg_resource_requirement_list = REG_RESOURCE_REQUIREMENTS_LIST integer_value_types = frozenset([REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_QWORD])
# V0 # V1 # https://blog.csdn.net/fuxuemingzhu/article/details/79343638 # IDEA : DFS class Solution(object): def combinationSum2(self, candidates, target): """ :type candidates: List[int] :type target: int :rtype: List[List[int]] """ candidates.sort() print(candidates) res = [] self.dfs(candidates, target, 0, res, []) return res def dfs(self, nums, target, index, res, path): if target < 0: return elif target == 0: res.append(path) return for i in range(index, len(nums)): if i > index and nums[i] == nums[i-1]: continue self.dfs(nums, target - nums[i], i + 1, res, path + [nums[i]]) # V1' # IDEA : BACKTRACKING # V2 # Time: O(k * C(n, k)) # Space: O(k) class Solution(object): # @param candidates, a list of integers # @param target, integer # @return a list of lists of integers def combinationSum2(self, candidates, target): result = [] self.combinationSumRecu(sorted(candidates), result, 0, [], target) return result def combinationSumRecu(self, candidates, result, start, intermediate, target): if target == 0: result.append(list(intermediate)) prev = 0 while start < len(candidates) and candidates[start] <= target: if prev != candidates[start]: intermediate.append(candidates[start]) self.combinationSumRecu(candidates, result, start + 1, intermediate, target - candidates[start]) intermediate.pop() prev = candidates[start] start += 1
class Solution(object): def combination_sum2(self, candidates, target): """ :type candidates: List[int] :type target: int :rtype: List[List[int]] """ candidates.sort() print(candidates) res = [] self.dfs(candidates, target, 0, res, []) return res def dfs(self, nums, target, index, res, path): if target < 0: return elif target == 0: res.append(path) return for i in range(index, len(nums)): if i > index and nums[i] == nums[i - 1]: continue self.dfs(nums, target - nums[i], i + 1, res, path + [nums[i]]) class Solution(object): def combination_sum2(self, candidates, target): result = [] self.combinationSumRecu(sorted(candidates), result, 0, [], target) return result def combination_sum_recu(self, candidates, result, start, intermediate, target): if target == 0: result.append(list(intermediate)) prev = 0 while start < len(candidates) and candidates[start] <= target: if prev != candidates[start]: intermediate.append(candidates[start]) self.combinationSumRecu(candidates, result, start + 1, intermediate, target - candidates[start]) intermediate.pop() prev = candidates[start] start += 1
''' https://leetcode.com/problems/maximum-length-of-pair-chain/solution/ You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. Now, we define a pair (c, d) can follow another pair (a, b) if and only if b < c. Chain of pairs can be formed in this fashion. Given a set of pairs, find the length longest chain which can be formed. You needn't use up all the given pairs. You can select pairs in any order. Example 1: Input: [[1,2], [2,3], [3,4]] Output: 2 Explanation: The longest chain is [1,2] -> [3,4] Note: The number of given pairs will be in the range [1, 1000] ''' class Solution: def findLongestChain(self, pairs: List[List[int]]) -> int: intervals = sorted(pairs, key=lambda v: v[1]) lastInterval = intervals.pop(0) chainLen = 1 for interval in intervals: s, e = interval[0], interval[1] if s > lastInterval[1]: lastInterval = interval chainLen = chainLen + 1 return chainLen
""" https://leetcode.com/problems/maximum-length-of-pair-chain/solution/ You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. Now, we define a pair (c, d) can follow another pair (a, b) if and only if b < c. Chain of pairs can be formed in this fashion. Given a set of pairs, find the length longest chain which can be formed. You needn't use up all the given pairs. You can select pairs in any order. Example 1: Input: [[1,2], [2,3], [3,4]] Output: 2 Explanation: The longest chain is [1,2] -> [3,4] Note: The number of given pairs will be in the range [1, 1000] """ class Solution: def find_longest_chain(self, pairs: List[List[int]]) -> int: intervals = sorted(pairs, key=lambda v: v[1]) last_interval = intervals.pop(0) chain_len = 1 for interval in intervals: (s, e) = (interval[0], interval[1]) if s > lastInterval[1]: last_interval = interval chain_len = chainLen + 1 return chainLen